diff options
author | Jeff Bilyk <jbilyk@gmail.com> | 2011-03-17 20:26:18 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2011-03-18 15:24:44 +0000 |
commit | 3dcf6e4c80b1194bf2709ee287893118e21eb366 (patch) | |
tree | d1ac373feba3b3ceff14b43c26722794a5491450 /testing/irrlicht | |
parent | c36831332866bd01a295c797cbf8c31fad3f8f6e (diff) | |
download | aports-3dcf6e4c80b1194bf2709ee287893118e21eb366.tar.bz2 aports-3dcf6e4c80b1194bf2709ee287893118e21eb366.tar.xz |
testing/irrlicht: new aport
Diffstat (limited to 'testing/irrlicht')
-rw-r--r-- | testing/irrlicht/APKBUILD | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/testing/irrlicht/APKBUILD b/testing/irrlicht/APKBUILD new file mode 100644 index 0000000000..96442ac50a --- /dev/null +++ b/testing/irrlicht/APKBUILD @@ -0,0 +1,74 @@ +# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org> +pkgname=irrlicht +pkgver=1.7.2 +pkgrel=0 +pkgdesc="3D graphics engine" +url="http://irrlicht.sourceforge.net" +arch="all" +license="ZLIB" +depends= +depends_dev="mesa-dev jpeg-dev bzip2 libpng-dev zlib-dev" +makedepends="$depends_dev" +install="" +source="http://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip" + +_builddir="$srcdir"/$pkgname-$pkgver/source/Irrlicht +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + make sharedlib || return 1 + make || return 1 + + #from arch pkgbuild: example build helper + ln -s libIrrlicht.so.$pkgver "$srcdir"/$pkgname-$pkgver/lib/Linux/libIrrlicht.so + + cd ../../examples + # Fix examples building + sed -i '/define USE_IRRKLANG/s:.*://&:' ./Demo/CDemo.h + make || return 1 +} + +package() { + cd "$_builddir" + + mkdir -p "$pkgdir"/usr/lib + mkdir -p "$pkgdir"/usr/share/licenses/$pkgname + mkdir -p "$pkgdir"/usr/share/$pkgname/examples/bin + mkdir -p "$pkgdir"/usr/share/doc/$pkgname + mkdir -p "$pkgdir"/usr/include/$pkgname/include + + make INSTALL_DIR="$pkgdir" install || return 1 + + cd ../.. + install -m644 readme.txt "$pkgdir"/usr/share/licenses/$pkgname + + #from arch pkgbuild: install static library and fix perms + install -m644 lib/Linux/libIrrlicht.a "$pkgdir"/usr/lib + + #from arch pkgbuild: install media file examples + cp -r media "$pkgdir"/usr/share/$pkgname + + #from arch pkgbuild: install docs + cp -r doc/* "$pkgdir"/usr/share/doc/$pkgname + rm -f "$pkgdir"/usr/share/doc/$pkgname/*.txt + + cd "$pkgdir"/usr/lib + mv ../../libIrrlicht* ./ + ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1 + + mv "$pkgdir"/../include/* "$pkgdir"/usr/include/$pkgname/include/ + rm -rf "$pkgdir"/../include/ + + install -m755 "$srcdir"/$pkgname-$pkgver/bin/Linux/* "$pkgdir"/usr/share/$pkgname/examples/bin/ +} + +md5sums="eb627d4c432bf73f12bc6d9ddc700b07 irrlicht-1.7.2.zip" |