1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 # Contributor: Hilton Medeiros <medeiros.hilton AT gmail DOT com>
6 pkgdesc="A scene-oriented, flexible 3D engine written in C++"
8 url='http://www.ogre3d.org'
10 depends=('boost' 'freeimage' 'freetype2' 'libxaw' 'libxrandr'
11 'nvidia-cg-toolkit' 'mesa' 'zziplib' 'ois')
12 makedepends=('cmake' 'mercurial')
13 optdepends=('cppunit: unit testing'
14 'doxygen: generate API docs'
15 'dot2tex: generate API docs'
16 'intel-tbb: better threading support'
25 _hgbranch=http://bitbucket.org/sinbad/ogre/
31 if [ -d ${_hgrepo} ]; then
32 (cd ${_hgrepo} && hg pull -u) || return 1
34 hg clone ${_hgbranch} || return 1
37 msg "Mercurial clone done or server timeout"
38 msg "Starting make..."
40 rm -rf ${_hgrepo}-build
41 cp -r ${_hgrepo} ${_hgrepo}-build
45 -DCMAKE_INSTALL_PREFIX=/usr \
46 -DOGRE_INSTALL_PLUGINS_HEADERS=TRUE \
47 -DOGRE_INSTALL_SAMPLES=TRUE \
48 -DOGRE_INSTALL_DOCS=TRUE \
49 -DOGRE_INSTALL_MEDIA=TRUE \
50 -DOGRE_INSTALL_SAMPLES_SOURCE=TRUE
52 make || return 1 # OGRE has a lot of source files.
53 # Make sure your makepkg.conf has the appropiate "-jN" option for your CPU
54 # type (-j3 for dualcore, -j5 for quadcore).
56 # Check for optdepends and then attemt to generate docs
57 if [[ $(which dot) && $(which doxygen) ]]; then
58 make doc 2>/dev/null || return 1
60 make DESTDIR=${pkgdir} install || return 1
63 install -dm777 ${pkgdir}/opt/OGRE/samples/
64 mv ${pkgdir}/usr/share/OGRE/*.cfg ${pkgdir}/opt/OGRE/samples/
65 mv ${pkgdir}/usr/bin/SampleBrowser ${pkgdir}/opt/OGRE/samples/
66 echo "#!/bin/bash" > ${pkgdir}/usr/bin/OgreSampleBrowser
67 echo "cd /opt/OGRE/samples && ./SampleBrowser" >> ${pkgdir}/usr/bin/OgreSampleBrowser
68 chmod +x ${pkgdir}/usr/bin/OgreSampleBrowser
70 # vim:set ts=2 sw=2 et: