memtester: update to 4.5.1.

Also rename pre_build to post_patch and use vsed.
This commit is contained in:
Érico Nogueira 2021-06-17 00:17:07 -03:00
parent feb81bf908
commit b52fd9108f

View file

@ -1,7 +1,7 @@
# Template file for 'memtester'
pkgname=memtester
version=4.5.0
revision=2
version=4.5.1
revision=1
build_style=gnu-makefile
short_desc="Userspace utility for testing the memory subsystem for faults"
maintainer="Érico Nogueira <ericonr@disroot.org>"
@ -9,13 +9,14 @@ license="GPL-2.0-or-later"
homepage="http://pyropus.ca/software/memtester"
changelog="http://pyropus.ca/software/memtester/CHANGELOG"
distfiles="http://pyropus.ca/software/memtester/old-versions/memtester-${version}.tar.gz"
checksum=8ed52b0d06d4aeb61954994146e2a5b2d20448a8f3ce3ee995120e6dbde2ae37
checksum=1c5fc2382576c084b314cfd334d127a66c20bd63892cac9f445bc1d8b4ca5a47
CFLAGS="-fcommon"
pre_build() {
sed -i -e "s|^cc|$CC|" -e "s|-c|${CFLAGS} -c|" conf-cc
sed -i -e "s|^cc|$CC|" -e "s|-s|${LDFLAGS} -s|" conf-ld
sed -i -e "s|/usr/local|${DESTDIR}/usr|" \
post_patch() {
# first two won't change anything for native builds
vsed -i -e "s|^cc|$CC|" -e "s|-c|${CFLAGS} -c|" conf-cc
vsed -i -e "s|^cc|$CC|" -e "s|-s|${LDFLAGS} -s|" conf-ld
vsed -i -e "s|/usr/local|${DESTDIR}/usr|" \
-e "s|man/man8|share/man/man8|" Makefile
}