updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / irrlicht-svn / PKGBUILD
bloba79f4027f720f144e2a349dd25509d0e6b83f0c4
1 # Contributor: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
3 pkgname=irrlicht-svn
4 _pkgname=irrlicht
5 pkgver=4021
6 _pkgver=1.8.0
7 pkgrel=1
8 pkgdesc="High performance realtime 3D graphics engine."
9 arch=('i686' 'x86_64')
10 url="http://irrlicht.sourceforge.net/"
11 license=('ZLIB')
12 depends=('bzip2' 'freeglut' 'libgl' 'libjpeg' 'libpng' 'zlib')
13 makedepends=('subversion')
14 provides=('irrlicht')
15 replaces=('irrlicht') # It will be this way until SuperTuxKart supports a stable release.
16 conflicts=('irrlicht')
17 source=(include-config.diff
18         makefile-fixes.diff)
19 md5sums=('7ff49d8ddc50deac316f4e2141828f31'
20          '87ea931c460eda957b5d6e752686705d')
22 #FORCE_VER=3843
24 _svntrunk="https://$_pkgname.svn.sourceforge.net/svnroot/$_pkgname/trunk"
25 _svnmod="$_pkgname"
27 build() {
28   msg "Starting SVN checkout..."
30   cd $srcdir
32   if [ -d $_svnmod/.svn ]; then
33     (cd $_svnmod && svn up -r $pkgver)
34   else
35     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
36   fi
38   msg "SVN checkout done or server timeout"
39   msg "Starting make..."
41   rm -rf $srcdir/$_svnmod-build
42   cp -r $srcdir/$_svnmod $srcdir/$_svnmod-build
43   cd $srcdir/$_svnmod-build
45   # Patches.
46   #patch -uN "$srcdir/$_svnmod-build/include/IrrCompileConfig.h" "$srcdir/include-config.diff"
47   #patch -uN "$srcdir/$_svnmod-build/source/Irrlicht/Makefile" "$srcdir/makefile-fixes.diff"
49   sed -i -e '/^CXXFLAGS/s:-g.*::' \
50          -e '/^CXXFLAGS/s:-Wall::' \
51          -e '/^CFLAGS/s/:= -O3 -fexpensive-optimizations/+=/' \
52          -e 's:--no-export-all-symbols --add-stdcall-alias::' \
53          -e 's/0-SVN/0/' \
54          -e "/^INSTALL_DIR/s:=.*:= ${pkgdir}/usr/lib:" \
55          $srcdir/$_svnmod-build/source/Irrlicht/Makefile
57   # Compilation.
58   cd source/Irrlicht
59   make sharedlib
61   make NDEBUG=1
64 package() {
65   cd "$srcdir/$_svnmod-build/source/Irrlicht"
67   install -d $pkgdir/usr/share/licenses/$_pkgname \
68              $pkgdir/usr/share/doc/$_pkgname
70   make install
72   cd $srcdir/$_svnmod-build/
73   install -m644 readme.txt $pkgdir/usr/share/licenses/$_pkgname
75   # Install documentation
76   cp -r doc/* $pkgdir/usr/share/doc/$_pkgname
77   rm -f $pkgdir/usr/share/doc/$_pkgname/*.txt
79   cd $pkgdir/usr/lib
80   ln -s libIrrlicht.so.$_pkgver libIrrlicht.so.1
81   #ln -s libIrrlicht.so.$_pkgver libIrrlicht.so