PKGBUILDs/community/irrlicht/PKGBUILD

70 lines
2.2 KiB
Bash
Raw Normal View History

2020-03-31 11:40:41 +00:00
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
2019-08-17 00:43:46 +00:00
# Contributor: Hilton Medeiros <medeiros.hilton AT gmail DOT com>
# Contributor: Ali H. Caliskan <ali.h.caliskan AT gmail DOT com>
# Contributor: Paolo Fagni <paolo.fagni AT mail DOT com>
# Contributor: Lukas Kropatschek <lukas.krop AT gmail DOT com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - add -DPNG_ARM_NEON_OPT=0 to CPPFLAGS
pkgbase=irrlicht
pkgname=('irrlicht' 'irrlicht-docs')
pkgver=1.8.4
2020-03-31 11:40:41 +00:00
pkgrel=3
2019-08-17 00:43:46 +00:00
pkgdesc="An open source high performance realtime 3D graphics engine."
arch=('x86_64')
url="http://irrlicht.sourceforge.net/"
license=('ZLIB')
depends=('libgl' 'libjpeg' 'bzip2' 'libpng')
makedepends=('mesa' 'unzip' 'libxcursor')
optdepends=('libxcursor: run examples')
source=("https://downloads.sourceforge.net/irrlicht/$pkgname-$pkgver.zip")
noextract=($pkgname-$pkgver.zip)
2020-03-31 11:40:41 +00:00
sha512sums=('de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1')
2019-08-17 00:43:46 +00:00
prepare() {
unzip $pkgbase-$pkgver.zip
2020-03-31 11:40:41 +00:00
cd $pkgbase-$pkgver
2019-08-17 00:43:46 +00:00
2020-03-31 11:40:41 +00:00
sed -r '/^#define _IRR_USE_NON_SYSTEM_(JPEG_LIB|LIB_PNG|ZLIB|BZLIB)_/d' -i include/IrrCompileConfig.h
sed -r '/^(ZLIB|JPEGLIB|LIBPNG|BZIP2)OBJ/d' -i source/Irrlicht/Makefile
sed -r '/^sharedlib: LDFLAGS/s,\r?$, -lz -ljpeg -lpng -lz -lbz2,' -i source/Irrlicht/Makefile
rm -r source/Irrlicht/{bzip2,jpeglib,libpng,zlib}
2019-08-17 00:43:46 +00:00
}
build() {
2020-03-31 11:40:41 +00:00
cd $pkgbase-$pkgver/source/Irrlicht
2019-08-17 00:43:46 +00:00
CPPFLAGS+=" -DPNG_ARM_NEON_OPT=0"
make NDEBUG=1 sharedlib
}
package_irrlicht() {
2020-03-31 11:40:41 +00:00
cd $pkgbase-$pkgver/source/Irrlicht
2019-08-17 00:43:46 +00:00
sed -i "/^INSTALL_DIR/s:=.*:=$pkgdir/usr/lib:" Makefile
make install
2020-03-31 11:40:41 +00:00
cd "$srcdir"/$pkgbase-$pkgver/
2019-08-17 00:43:46 +00:00
install -Dm644 readme.txt $pkgdir/usr/share/licenses/$pkgbase/LICENSE
# fix headers permissions
chmod 644 $pkgdir/usr/include/$pkgbase/*
2020-03-31 11:40:41 +00:00
ln -s libIrrlicht.so.$pkgver "$pkgdir"/usr/lib/libIrrlicht.so.1
2019-08-17 00:43:46 +00:00
}
package_irrlicht-docs() {
2020-03-31 11:40:41 +00:00
cd $pkgbase-$pkgver/
2019-08-17 00:43:46 +00:00
2020-03-31 11:40:41 +00:00
install -d "$pkgdir"/usr/share/$pkgbase "$pkgdir"/usr/share/doc/$pkgbase
2019-08-17 00:43:46 +00:00
# install media files for examples
2020-03-31 11:40:41 +00:00
cp -r media "$pkgdir"/usr/share/$pkgbase
2019-08-17 00:43:46 +00:00
# install documentation
2020-03-31 11:40:41 +00:00
cp -r doc/* "$pkgdir"/usr/share/doc/$pkgbase
rm -f "$pkgdir"/usr/share/doc/$pkgbase/*.txt
2019-08-17 00:43:46 +00:00
}