blob: ca166de129a7ce130f4dd26e32f3db60945a4505 (
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
|
# $Id: PKGBUILD 66356 2012-02-23 23:04:08Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# 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>
pkgname=irrlicht
pkgver=1.7.3
pkgrel=1
pkgdesc="An open source high performance realtime 3D graphics engine."
arch=('i686' 'x86_64')
url="http://irrlicht.sourceforge.net/"
license=('ZLIB')
depends=('libgl' 'libjpeg' 'bzip2' 'libpng')
makedepends=('mesa' 'unzip')
source=("http://downloads.sourceforge.net/irrlicht/$pkgname-$pkgver.zip"
"irrlicht-1.7.2-libpng15.patch")
noextract=($pkgname-$pkgver.zip)
md5sums=('cfbdc8c68fbca544c7c8dfb3623ae086'
'a7f8d4aa1bc2880bbeaf3449e09f69a5')
build() {
unzip $pkgname-$pkgver.zip
cd $srcdir/$pkgname-$pkgver
patch -Np0 < $srcdir/irrlicht-1.7.2-libpng15.patch
sed -i -e '/^#.*NON_SYSTEM_ZLIB/d' \
-e '/^#.*NON_SYSTEM_JPEG/d' \
-e '/^#.*NON_SYSTEM_LIB_PNG/d' \
-e '/^#.*NON_SYSTEM_BZLIB/d' \
include/IrrCompileConfig.h
cd source/Irrlicht
sed -i "/^INSTALL_DIR/s:=.*:=$pkgdir/usr/lib:" \
Makefile
make sharedlib
make
install -d $pkgdir/usr/lib \
$pkgdir/usr/share/licenses/$pkgname \
$pkgdir/usr/share/$pkgname/examples/bin \
$pkgdir/usr/share/doc/$pkgname
make install
cd $srcdir/$pkgname-$pkgver/
install -m644 readme.txt $pkgdir/usr/share/licenses/$pkgname
# Install static library and fix headers permissions
install -m644 lib/Linux/libIrrlicht.a $pkgdir/usr/lib
chmod 644 $pkgdir/usr/include/$pkgname/*
# Install media files for examples
cp -r media $pkgdir/usr/share/$pkgname
# Install documentation
cp -r doc/* $pkgdir/usr/share/doc/$pkgname
rm -f $pkgdir/usr/share/doc/$pkgname/*.txt
cd $pkgdir/usr/lib
ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1
# Just a helper for examples compilation
ln -s libIrrlicht.so.$pkgver $srcdir/$pkgname-$pkgver/lib/Linux/libIrrlicht.so
# Edit, build and install the examples
cd $srcdir/$pkgname-$pkgver/examples
sed -i '/define USE_IRRKLANG/s:.*://&:' ./Demo/CDemo.h
sed -i '/^CXXFLAGS/d' $(grep -Rl "^CXXFLAGS =" *)
make
install -m755 ../bin/Linux/* /$pkgdir/usr/share/$pkgname/examples/bin/
}
|