# Maintainer: Sven-Hendrik Haase pkgname=ogre pkgver=13.5.3 pkgrel=1 pkgdesc='Scene-oriented, flexible 3D engine written in C++' arch=('x86_64') url='http://www.ogre3d.org' license=('custom:MIT') depends=('freeimage' 'freetype2' 'libxaw' 'libxrandr' 'sdl2' 'glu' 'pugixml' 'zlib') makedepends=('cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'mesa' 'python' 'ninja' 'cppunit' 'swig') install=ogre.install source=("$pkgname-$pkgver.tar.gz::https://github.com/OGRECave/ogre/archive/v${pkgver}.tar.gz") optdepends=('python: python bindings') sha512sums=('cfb3127d9f2059877141de46a42769a718560bf0343c46c9374ea6e2f442de50d697847f3c5775b92b74193e20cf4c92da6ec176a9a82729f7f2feb9393df819') prepare() { cd ogre-${pkgver} sed -i 's|set(PYTHON_SITE_PACKAGES lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/dist-packages/Ogre/)|set(PYTHON_SITE_PACKAGES lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/dist-packages/Ogre/ CACHE FILEPATH "")|' Components/Python/CMakeLists.txt } build() { cd ogre-${pkgver} cmake \ -Bbuild \ -GNinja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DOGRE_BUILD_TESTS=ON \ -DOGRE_BUILD_DEPENDENCIES=OFF \ -DPYTHON_SITE_PACKAGES=$(python -c "import sysconfig; print(sysconfig.get_paths()[\"platlib\"]+'/Ogre/')") ninja -C build ninja -C build OgreDoc } check() { cd ogre-${pkgver} ninja -C build test } package() { cd ogre-${pkgver} DESTDIR="${pkgdir}" ninja -C build install mkdir -p "${pkgdir}"/opt/ogre/samples mv "${pkgdir}"/usr/bin/SampleBrowser "${pkgdir}"/opt/ogre/samples mv "${pkgdir}"/usr/bin/Test_* "${pkgdir}"/opt/ogre/samples install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE } # vim:set ts=2 sw=2 et: