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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
# $Id$
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>
pkgbase=ogre
pkgname=(
ogre-libre
#ogre-docs
)
pkgflag=(
-libre
-docs
)
pkgver=1.8.1
pkgrel=4
pkgdesc='Scene-oriented, flexible 3D engine written in C++, without nonfree nvidia-cg-toolkit support, nonfree fonts and arts'
arch=(
i686
x86_64
mips64el
)
url="http://www.${pkgbase}3d.org"
license=(
'MIT:(software)'
'cc by-sa:(sinbad character)'
)
depends=(
boost-libs
freeimage
freetype2
glu
libxaw
libxrandr
ois
zziplib
)
makedepends=(
boost
cmake
doxygen
graphviz
intel-tbb
mesa
#poco
ttf-dejavu
)
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
cmake .. \
-DCMAKE_BUILD_TYPE=Release\
-DCMAKE_INSTALL_PREFIX=/usr\
-DCPACK_PACKAGE_DESCRIPTION_SUMMARY='Libre 3D Graphics Engine'\
-D${pkgbase^^}_BUILD_COMPONENT_PAGING=TRUE\
-D${pkgbase^^}_BUILD_COMPONENT_PROPERTY=TRUE\
-D${pkgbase^^}_BUILD_COMPONENT_RTSHADERSYSTEM=TRUE\
-D${pkgbase^^}_BUILD_COMPONENT_TERRAIN=TRUE\
-D${pkgbase^^}_BUILD_PLATFORM_APPLE_IOS=FALSE\
-D${pkgbase^^}_BUILD_PLUGIN_BSP=TRUE\
-D${pkgbase^^}_BUILD_PLUGIN_CG=FALSE\
-D${pkgbase^^}_BUILD_PLUGIN_OCTREE=TRUE\
-D${pkgbase^^}_BUILD_PLUGIN_PCZ=TRUE\
-D${pkgbase^^}_BUILD_PLUGIN_PFX=TRUE\
-D${pkgbase^^}_BUILD_RENDERSYSTEM_D3D9=FALSE\
-D${pkgbase^^}_BUILD_RENDERSYSTEM_D3D11=FALSE\
-D${pkgbase^^}_BUILD_RENDERSYSTEM_GL=TRUE\
-D${pkgbase^^}_BUILD_RENDERSYSTEM_GLES=FALSE\
-D${pkgbase^^}_BUILD_RENDERSYSTEM_GLES2=FALSE\
-D${pkgbase^^}_BUILD_SAMPLES=TRUE\
-D${pkgbase^^}_BUILD_TESTS=FALSE\
-D${pkgbase^^}_BUILD_TOOLS=TRUE\
-D${pkgbase^^}_CONFIG_ENABLE_DDS=TRUE\
-D${pkgbase^^}_CONFIG_ENABLE_FREEIMAGE=TRUE\
-D${pkgbase^^}_CONFIG_ENABLE_GLES2_CG_SUPPORT=FALSE\
-D${pkgbase^^}_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER=FALSE\
-D${pkgbase^^}_CONFIG_ENABLE_PVRTC=TRUE\
-D${pkgbase^^}_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE=TRUE\
-D${pkgbase^^}_CONFIG_ENABLE_ZIP=TRUE\
-D${pkgbase^^}_CONFIG_NEW_COMPILERS=TRUE\
-D${pkgbase^^}_INSTALL_DOCS=TRUE\
-D${pkgbase^^}_INSTALL_SAMPLES=TRUE\
-D${pkgbase^^}_INSTALL_SAMPLES_SOURCE=TRUE\
-D${pkgbase^^}_INSTALL_TOOLS=TRUE\
-D${pkgbase^^}_LIB_DIRECTORY=lib\
-D${pkgbase^^}_PROFILING=TRUE\
-D${pkgbase^^}_USE_BOOST=TRUE
make V=0
# generate docs
if [[ $(which dot) && $(which doxygen) ]]; then
make V=0 doc
fi
}
package_ogre-libre() {
optdepends=(
'intel-tbb: better threading support'
#'poco: portability'
"boost: for developing using $pkgbase"
"$pkgbase${pkgflag[1]}: documentation"
)
provides=(
$pkgbase=$pkgver
)
conflicts=(
$pkgbase
)
replaces=(
$pkgbase
)
cd $srcdir/${pkgbase}_src_v${pkgver//./-}/build
make DESTDIR=$pkgdir install
# fix samplebrowser name
mv $pkgdir/usr/bin/SampleBrowser $pkgdir/usr/bin/${pkgbase^}SampleBrowser
## LIBRE PATCH ##
# drop cg shaders, hlsl shaders, unusable headers, unusable samples, nonfree fonts and nonfree arts
rm -fv $pkgdir/usr/include/${pkgbase^^}/RTShaderSystem/${pkgbase^}Shader{CG,HLSL}Program{Processor,Writer}.h
rm -fv $pkgdir/usr/lib/${pkgbase^^}/Samples/Sample_{BSP,CelShading,Dot3Bump,Fresnel,SSAO}.so
rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/{BSP,CelShading,Dot3Bump,Fresnel,SSAO}
rm -fvr $pkgdir/usr/share/${pkgbase^^}/media/materials/textures/nvidia
rm -fv $pkgdir/usr/share/${pkgbase^^}/media/packs/{chiropteraDM.{pk3,txt},cubemapsJS.zip}
rm -fvr $pkgdir/usr/share/${pkgbase^^}/media/fonts
sed -i -e '
/BSP/d
/CelShading/d
/Dot3Bump/d
/Fresnel/d
/SSAO/d
' $pkgdir/usr/share/${pkgbase^^}/samples.cfg
sed -i -e '
/Direct3D9/d
/Direct3D11/d
/CgProgramManager/d
' $pkgdir/usr/share/${pkgbase^^}/plugins.cfg
sed -i -e '
/cubemapsJS/d
/fonts/d
/nvidia/d
' $pkgdir/usr/share/${pkgbase^^}/resources.cfg
find $pkgdir -type f -name *.cg -delete
find $pkgdir -type f -name *.hlsl -delete
rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/Browser/Android
rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/Browser/include/SampleBrowser_{NaCl,OSX,iOS}.h
rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/Browser/src/FileSystemLayerImpl_{{Android,NaCl,OSX,WIN32}.cpp,iOS.mm}
# 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:
|