tiv: fix PIE

See #4572
This commit is contained in:
Juergen Buchmueller 2016-09-04 01:18:22 +02:00
parent 3a3a81863d
commit 3d99d5ebff
1 changed files with 17 additions and 1 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'tiv'
pkgname=tiv
version=0.1
revision=3
revision=4
build_style=gnu-makefile
hostmakedepends="pkg-config vala"
makedepends="vala-devel glib-devel gdk-pixbuf-devel libjpeg-turbo-devel"
@ -12,6 +12,22 @@ license="MIT"
distfiles="http://github.com/radare/$pkgname/archive/$version.tar.gz"
checksum=4aeae8b132ff507084ed1365652dda96ee245e003a4b409d3a304ce0871802f3
pre_build() {
local _p _cflags _ldflags
# Prepend every CFLAGS item with -X
for _p in ${CFLAGS}; do
_cflags="${_cflags} -X $_p"
done
# Prepend every LDFLAGS item with -X
for _p in ${LDFLAGS}; do
_ldflags="${_ldflags} -X $_p"
done
# Add to VALACFLAGS
sed -i Makefile \
-e "/VALAC.*/a VALACFLAGS=$_cflags $_ldflags" \
-e 's;${VALAC};$(VALAC) $(VALACFLAGS);'
}
pre_install() {
vmkdir usr/bin
}