xonotic: fix PIE

See #4572
This commit is contained in:
Juergen Buchmueller 2016-09-04 00:18:36 +02:00
parent f1593e1567
commit 7fa769b2e2
1 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# Template file for 'xonotic'
pkgname=xonotic
version=0.8.1
revision=2
revision=3
wrksrc="Xonotic"
homepage="http://xonotic.org"
license="GPL-2, GPL-3"
@ -17,17 +17,24 @@ makedepends="gmp-devel MesaLib-devel SDL2-devel libcurl-devel alsa-lib-devel
depends="desktop-file-utils xonotic-data"
do_build() {
local target
make_build_args="SDL_CONFIG=sdl2-config DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) ;;
*) make_build_args+=" CFLAGS_SSE= CFLAGS_SSE2=";;
esac
echo $make_build_args
make ${makejobs} -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" $make_build_args cl-release
make ${makejobs} -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" $make_build_args sdl-release
make ${makejobs} -C source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" $make_build_args sv-release
cd source/darkplaces
# Inject our $CFLAGS and $LDFLAGS
sed -i makefile.inc \
-e "s;^\(CPUOPTIMIZATIONS\)?=\(.*\);\1=${CFLAGS} \2;" \
-e "s;^\(LDFLAGS_UNIXCOMMON\)=\(.*\);\1=${LDFLAGS} \2;"
for target in cl sdl sv; do
make ${makejobs} ${make_build_args} ${target}-release
done
cd source/d0_blind_id
cd ${wrksrc}/source/d0_blind_id
autoreconf -fi
./configure --prefix=/usr --disable-rijndael
make ${makejobs}