blob: 673ee84355ddb1b66abd843f5d0f43bb35d4be9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
# $Id$
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
pkgbase=ogre
pkgname=(
ogre-libre
#ogre-docs
)
pkgver=1.8.1
pkgrel=2
pkgdesc='A scene-oriented, flexible 3D engine written in C++, without nonfree nvidia-cg-toolkit support'
arch=(
i686
x86_64
mips64el
)
url="http://www.${pkgbase}3d.org"
license=(
'custom:MIT'
)
depends=(
boost-libs
freeimage
freetype2
libxaw
libxrandr
zziplib
ois
glu
)
makedepends=(
boost
cmake
doxygen
graphviz
ttf-dejavu
mesa
)
install=$pkgbase.install
source=(
"https://downloads.sourceforge.net/$pkgbase/${pkgbase}_src_v${pkgver//./-}.tar.bz2"
)
sha512sums=(
0bbce593e5a9ebf51e3cb53661f6447d99ae28a53365d7f518c6d408216690527ef7552385160cff8d5c3ef15d3ab5c2520ef2c1f51fda5541d5d4dca4663ae2
)
build() {
cd $srcdir/${pkgbase}_src_v${pkgver//./-}
# get a clean build dir
[[ -d build ]] && rm -rf build
mkdir build && cd build
# generate CMake Makefile
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-D${pkgbase^^}_INSTALL_PLUGINS_HEADERS=TRUE \
-D${pkgbase^^}_INSTALL_SAMPLES=TRUE \
-D${pkgbase^^}_INSTALL_DOCS=TRUE \
-D${pkgbase^^}_INSTALL_MEDIA=TRUE \
-D${pkgbase^^}_INSTALL_SAMPLES_SOURCE=TRUE \
-DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version
# compile
make
# generate docs
if [[ $(which dot) && $(which doxygen) ]]; then
make doc
fi
}
package_ogre-libre() {
optdepends=(
'cppunit: unit testing'
'intel-tbb: better threading support'
'poco: portability'
"boost: for developing using $pkgbase"
"$pkgbase-docs: documentation"
)
provides=(
$pkgbase=$pkgver
)
conflicts=(
$pkgbase
)
replaces=(
$pkgbase
)
cd $srcdir/${pkgbase}_src_v${pkgver//./-}/build
# install the bugger
make DESTDIR=$pkgdir install
# fix up samples
install -dm775 -o root -g users $pkgdir/opt/${pkgbase^^}/samples
mv $pkgdir/usr/share/${pkgbase^^}/*.cfg $pkgdir/opt/${pkgbase^^}/samples
mv $pkgdir/usr/bin/SampleBrowser $pkgdir/opt/${pkgbase^^}/samples
# make sample launcher
echo '#!/bin/bash' > $pkgdir/usr/bin/${pkgbase^}SampleBrowser
echo 'cd /opt/${pkgbase^^}/samples && ./SampleBrowser' >> $pkgdir/usr/bin/${pkgbase^}SampleBrowser
chmod +x $pkgdir/usr/bin/${pkgbase^}SampleBrowser
# install license
install -Dm644 ../Docs/License.html $pkgdir/usr/share/licenses/$pkgbase/license.html
# move docs out of this package
mv $pkgdir/usr/share/${pkgbase^^}/docs $srcdir/docs
}
package_ogre-docs() {
pkgdesc="Documentation for $pkgbase"
depends=(
)
cd $srcdir/${pkgbase}_src_v${pkgver//./-}/build
# move docs into this package
install -dm755 $pkgdir/usr/share/doc
mv $srcdir/docs $pkgdir/usr/share/doc/${pkgbase^^}
# symlink for docs
install -dm755 $pkgdir/usr/share/${pkgbase^^}
cd $pkgdir/usr/share
ln -s doc/${pkgbase^^} ${pkgbase^^}/docs
}
# vim:set ts=2 sw=2 et:
|