void-packages/srcpkgs/irrlicht/template
2017-10-26 12:42:15 +02:00

59 lines
1.6 KiB
Bash

# Template file for 'irrlicht'
pkgname=irrlicht
version=1.8.4
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"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="LGPL-2.1"
homepage="http://irrlicht.sourceforge.net"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.zip"
checksum=f42b280bc608e545b820206fe2a999c55f290de5c7509a02bdbeeccc1bf9e433
CPPFLAGS="-DPNG_ARM_NEON_OPT=0"
if [ ${XBPS_GCC_VERSION_MAJOR} -gt 5 ]; then
CXXFLAGS="-Wno-error=narrowing"
fi
pre_build() {
cd source/Irrlicht
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 ${wrksrc}/source/Irrlicht
make ${makejobs} NDEBUG=1 sharedlib
make ${makejobs} NDEBUG=1
}
do_install() {
cd source/Irrlicht
vmkdir usr/lib
sed -i "/^INSTALL_DIR/s:=.*:=${DESTDIR}/usr/lib:" Makefile
make install
cd ${wrksrc}
vinstall lib/Linux/libIrrlicht.a 644 usr/lib
chmod 644 ${DESTDIR}/usr/include/$pkgname/*
cd ${DESTDIR}/usr/lib
ln -s libIrrlicht.so.${version} libIrrlicht.so.1
}
irrlicht-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}-${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}