irrlicht: unbreak musl

This commit is contained in:
jbu 2015-08-02 17:23:00 +02:00
parent a22b793e90
commit b4d9cf0c90

View file

@ -1,7 +1,7 @@
# Template file for 'irrlicht'
pkgname=irrlicht
version=1.8.1
revision=1
revision=2
hostmakedepends="unzip pkg-config"
makedepends="libjpeg-turbo-devel libpng-devel libXcursor-devel libXext-devel MesaLib-devel"
short_desc="Lightning fast realtime 3D engine"
@ -16,9 +16,14 @@ pre_build() {
for file in COpenGLExtensionHandler.h glext.h glxext.h wglext.h; do
$XBPS_FETCH_CMD "http://sourceforge.net/p/irrlicht/code/4600/tree/trunk/source/Irrlicht/${file}?format=raw>${file}"
done
case "$XBPS_TARGET_MACHINE" in
*-musl) # There is no <sys/sysctl.h> in musl libc
sed -e "s;<sys/sysctl\.h>;<linux/sysctl.h>;" \
-i ${wrksrc}/source/Irrlicht/COSOperator.cpp
esac
}
do_build() {
cd source/Irrlicht
cd ${wrksrc}/source/Irrlicht
make ${makejobs} NDEBUG=1 sharedlib
make ${makejobs} NDEBUG=1
}