ogre: update to 1.11.2

This commit is contained in:
Jeff Huang 2018-10-18 04:28:46 +02:00
parent 735a5787b7
commit a0e93e522a

View File

@ -1,73 +1,51 @@
pkgbase=ogre
pkgname=('ogre' 'ogre-docs')
pkgver=1.10.8
pkgver=1.11.2
pkgrel=1
pkgdesc="A scene-oriented, flexible 3D engine written in C++"
arch=('x86_64')
url='http://www.ogre3d.org'
url='https://www.ogre3d.org'
license=('custom:MIT')
depends=('boost-libs' 'freeimage' 'freetype2' 'libxaw' 'libxrandr'
'nvidia-cg-toolkit' 'mesa' 'zziplib' 'ois' 'glu')
makedepends=('boost' 'cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'mercurial')
optdepends=('cppunit: unit testing'
'intel-tbb: better threading support'
'poco: portability'
'boost: for developing using ogre')
depends=('boost-libs' 'freeimage' 'freetype2' 'libxaw' 'libxrandr' 'openexr'
'nvidia-cg-toolkit' 'mesa' 'zziplib' 'sdl2' 'glu')
makedepends=('boost' 'cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'python3' 'swig' 'systemd' 'java-environment')
categories=('graphics')
install=ogre.install
source=("hg+https://bitbucket.org/sinbad/ogre#tag=v${pkgver//./-}")
md5sums=('SKIP')
#source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}_src_v${pkgver//./-}.tar.bz2")
source=("https://github.com/OGRECave/ogre/archive/v${pkgver}.tar.gz")
md5sums=('457fb2cde9ac715b01e7d049fffeea0a')
build() {
cd ${srcdir}/${pkgbase}
cd ogre-${pkgver}
# get a clean build dir
[[ -d build ]] && rm -rf build
mkdir build
cd build
mkdir build && cd build
export JAVA_HOME=/usr/lib/jvm/default
# generate CMake Makefile
CXXFLAGS+=' -Wno-deprecated-declarations'
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOGRE_INSTALL_PLUGINS_HEADERS=TRUE \
-DOGRE_INSTALL_SAMPLES=TRUE \
-DOGRE_INSTALL_DOCS=TRUE \
-DOGRE_INSTALL_MEDIA=TRUE \
-DOGRE_INSTALL_SAMPLES_SOURCE=TRUE \
-DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
-DCMAKE_INSTALL_PREFIX=/usr \
-DOGRE_BUILD_DEPENDENCIES=FALSE \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOGRE_BUILD_PLUGIN_FREEIMAGE=TRUE \
-DOGRE_BUILD_PLUGIN_EXRCODEC=TRUE
# compile
make
# generate docs
if [[ $(which dot) && $(which doxygen) ]]; then
make OgreDoc
fi
make OgreDoc
}
package_ogre() {
optdepends=('ogre-docs: documentation')
optdepends=('cppunit: unit testing'
'python3: python bindings'
'java-environment: jni bindings'
'ogre-docs: documentation')
cd ${srcdir}/${pkgname}/build
cd ogre-${pkgver}/build
# install the bugger
make DESTDIR=${pkgdir} install
# fix up samples
install -dm775 -o root -g users ${pkgdir}/opt/OGRE/samples/
mv ${pkgdir}/usr/share/OGRE/*.cfg ${pkgdir}/opt/OGRE/samples/
mv ${pkgdir}/usr/bin/SampleBrowser ${pkgdir}/opt/OGRE/samples/
mv ${pkgdir}/usr/bin/SampleBrowser ${pkgdir}/usr/bin/OgreSampleBrowser
install -Dm644 ../LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
# make sample launcher
echo "#!/bin/bash" > ${pkgdir}/usr/bin/OgreSampleBrowser
echo "cd /opt/OGRE/samples && ./SampleBrowser" >> ${pkgdir}/usr/bin/OgreSampleBrowser
chmod +x ${pkgdir}/usr/bin/OgreSampleBrowser
# install license
install -Dm644 ../COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
# move docs out of this package
mv ${pkgdir}/usr/share/OGRE/docs ${srcdir}/docs
}
@ -75,7 +53,8 @@ package_ogre() {
package_ogre-docs() {
pkgdesc="Documentation for ogre"
depends=()
cd ${srcdir}/${pkgbase}/build
cd ogre-${pkgver}/build
# move docs into this package
install -dm755 ${pkgdir}/usr/share/doc
@ -84,6 +63,5 @@ package_ogre-docs() {
# symlink for docs
install -dm755 ${pkgdir}/usr/share/OGRE/
cd ${pkgdir}/usr/share
ln -s doc/OGRE/ OGRE/docs
ln -s /usr/share/doc/OGRE/ OGRE/docs
}