mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
97 lines
2.6 KiB
Bash
97 lines
2.6 KiB
Bash
pkgbase=ogre
|
|
pkgname=('ogre' 'ogre-docs')
|
|
pkgver=1.9.0
|
|
pkgrel=4
|
|
pkgdesc="A scene-oriented, flexible 3D engine written in C++"
|
|
arch=('x86_64')
|
|
url='http://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')
|
|
categories=('graphics')
|
|
install=ogre.install
|
|
source=("hg+https://bitbucket.org/sinbad/ogre#tag=v${pkgver//./-}"
|
|
"gcc_gentoo.patch")
|
|
md5sums=('SKIP'
|
|
'ff86c68ce440b66431cc2d1d4bed1fec')
|
|
#source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}_src_v${pkgver//./-}.tar.bz2")
|
|
|
|
prepare() {
|
|
cd ${srcdir}/${pkgbase}
|
|
patch -Np1 -i ${srcdir}/gcc_gentoo.patch
|
|
}
|
|
|
|
build() {
|
|
cd ${srcdir}/${pkgbase}
|
|
|
|
# get a clean build dir
|
|
[[ -d build ]] && rm -rf build
|
|
mkdir build
|
|
cd build
|
|
|
|
# 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
|
|
|
|
# compile
|
|
make
|
|
|
|
# generate docs
|
|
if [[ $(which dot) && $(which doxygen) ]]; then
|
|
make OgreDoc
|
|
fi
|
|
}
|
|
|
|
package_ogre() {
|
|
optdepends=('ogre-docs: documentation')
|
|
|
|
cd ${srcdir}/${pkgname}/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/
|
|
|
|
# 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 ../Docs/License.html ${pkgdir}/usr/share/licenses/${pkgname}/license.html
|
|
|
|
# move docs out of this package
|
|
mv ${pkgdir}/usr/share/OGRE/docs ${srcdir}/docs
|
|
}
|
|
|
|
package_ogre-docs() {
|
|
pkgdesc="Documentation for ogre"
|
|
depends=()
|
|
cd ${srcdir}/${pkgbase}/build
|
|
|
|
# move docs into this package
|
|
install -dm755 ${pkgdir}/usr/share/doc
|
|
mv ${srcdir}/docs ${pkgdir}/usr/share/doc/OGRE/
|
|
|
|
# symlink for docs
|
|
install -dm755 ${pkgdir}/usr/share/OGRE/
|
|
cd ${pkgdir}/usr/share
|
|
ln -s doc/OGRE/ OGRE/docs
|
|
}
|
|
|