boswars: fix cross compilation

This commit is contained in:
newbluemoon 2017-12-30 20:32:09 +01:00 committed by Toyam Cox
parent c679b1f27f
commit c04364ade9
1 changed files with 7 additions and 5 deletions

View File

@ -3,22 +3,23 @@ pkgname=boswars
version=2.7
revision=4
wrksrc="${pkgname}-${version}-src"
hostmakedepends="pkg-config libpng-progs"
makedepends="lua51-devel libtheora-devel libogg-devel libpng-devel libvorbis-devel MesaLib-devel SDL-devel"
hostmakedepends="pkg-config libpng-progs python"
makedepends="lua51-devel libtheora-devel libogg-devel libpng-devel
libvorbis-devel MesaLib-devel SDL-devel glu-devel"
short_desc="A futuristic real-time strategy game (RTS)"
maintainer="Diogo Leal <diogo@diogoleal.com>"
license="GPL-2"
homepage="http://boswars.org"
distfiles="http://www.boswars.org/dist/releases/boswars-${version}-src.tar.gz"
checksum=dc3718f531e9ea413cf37e1333b62a4c5e69f1405502d9c59b9e424635135e3e
nocross=yes
do_build() {
# Patch make.py to respect our $CXXFLAGS and $LDFLAGS
sed -i make.py \
-e "s;^gccflags = '\(.*\)'.split();gccflags = '${CXXFLAGS} \1'.split();" \
-e "/^gccflags.*/a gldflags = '${LDFLAGS}'.split()" \
-e "s;self.ldflags = list(ldflags);self.ldflags = gldflags + list(ldflags);"
-e "s;self.ldflags = list(ldflags);self.ldflags = gldflags + list(ldflags);" \
-e "s/cc='g++'/cc='$CXX'/"
python make.py
}
@ -50,4 +51,5 @@ post_extract() {
pngfix -q ${i/.png/_fixed.png} && mv ${i/.png/_fixed.png} ${i};
}
done
}
}