blob: d40a373a55fefffc5929eaf15c69afe5f74e6e33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org>
pkgname=irrlicht
pkgver=1.8
case $pkgver in
*.*.*) _pkgmajver=${pkgver%.*};;
*.*) _pkgmajver=${pkgver};;
esac
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=""
subpackages="$pkgname-dev $pkgname-doc"
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
ln -s libIrrlicht.so.$pkgver libIrrlicht.so.$_pkgmajver
mv "$pkgdir"/../include/* "$pkgdir"/usr/include/$pkgname/include/
mv "$pkgdir"/usr/include/$pkgname/include/irrlicht/* "$pkgdir"/usr/include/$pkgname/include/
rm -rf "$pkgdir"/../include/
install -m755 "$srcdir"/$pkgname-$pkgver/bin/Linux/* "$pkgdir"/usr/share/$pkgname/examples/bin/
}
md5sums="d06329d8f466658caaf4838ba349e393 irrlicht-1.8.zip"
sha256sums="f8756c3cf83f16f41eb1eca8f4ebb530f0e8fd572443905e3d8eb8f09445a642 irrlicht-1.8.zip"
sha512sums="07aa6e49252f073e352fbd715b77d171b6d25d22e6b0faccaf7328b28693e6851f37498cfb4094f7b09d122170c491571431bf8f698828e82c2aa9d7ff792af7 irrlicht-1.8.zip"
|