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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
# Contributor (Arch): John Sowiak <john@archlinux.org>
# Contributor (Arch): tobias <tobias@archlinux.org>
# Maintainer (Arch): Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Márcio Silva <coadde@parabola.nu>
# Sometimes blender.org takes some time to release patch releases and because the blender package
# is broke, we sometimes need to build from git directly.
# Update because I get so many queries on this:
# Due to our other rolling deps, it's sometimes not possible to build Blender stable releases.
# More often than not, a new openshadinglanguage breaks it and I could either backport fixes
# or simply roll with a new version. I usually choose the latter when the former seems
# unreasonable.
_gittag=v2.72
#_gitcommit=d42c08
pkgbase=blender
pkgname=("$pkgbase") # "$pkgbase-addon-gimp" "$pkgbase-addon-povray")
pkgver=2.72
[[ -n $_gitcommit ]] && pkgver=$pkgver.git1.$_gitcommit
pkgrel=1.parabola1
epoch=14
_jpgver=1.5
_llvmver=3.5
_pyver=3.4
pkgdesc='Fully integrated 3D graphics creation suite, without nonfree cuda support'
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url="http://www.$pkgbase.org"
depends=('boost-libs' 'desktop-file-utils' 'ffmpeg' 'fftw' 'freetype2' 'glew'
'hicolor-icon-theme' 'jack' 'libpng' 'libsndfile' 'libspnav' 'libtiff'
'openal' 'opencolorio' 'opencollada' 'openexr' 'openimageio'
'openshadinglanguage' 'python' 'shared-mime-info' 'xdg-utils')
makedepends=('boost' 'cmake' 'git' 'llvm') # 'bullet' (boost: for cycles, booleans, audaspace and/or i18n)
optdepends=('bullet: for Rigid Bodies and Physics Simulation'
#'mesa-libcl: for rendering with optional Mesa OpenCL'
'povray: for optional renderer with POV-Ray'
'xcftools: for import GIMP images to scene (pcr repo)'
'blender-addon-luxrender: for optional renderer and exporter with LuxRender'
'blender-addon-mitsuba: for optional renderer and exporter with Mitsuba (pcr repo)'
'blender-addon-ogre: for export to Ogre3D formats (pcr repo)'
'blender-addon-yafaray: for optional renderer with YafaRay (pcr repo)')
conflicts=("$pkgbase-libre" "$pkgbase-libre-spacenav" "$pkgbase-spacenav-libre")
replaces=("$pkgbase-libre" "$pkgbase-libre-spacenav" "$pkgbase-spacenav-libre")
options=('!strip')
install="$pkgbase.install"
source=("git://git.$pkgbase.org/$pkgbase-addons.git"
"git://git.$pkgbase.org/$pkgbase-addons-contrib.git"
"git://git.$pkgbase.org/$pkgbase-translations.git"
"git://git.$pkgbase.org/scons.git")
if [[ -n $_gittag ]]; then
source+=("$pkgbase-$pkgver::git://git.$pkgbase.org/$pkgbase.git#tag=$_gittag")
else
source+=("$pkgbase-$pkgver::git://git.$pkgbase.org/$pkgbase.git#commit=$_gitcommit")
fi
md5sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
prepare() {
cd $srcdir/$pkgbase-$pkgver
git submodule init
git config submodule.'release/scripts/addons'.url $srcdir/$pkgbase-addons
git config submodule.'release/scripts/addons_contrib'.url $srcdir/$pkgbase-addons-contrib
git config submodule.'release/datafiles/locale'.url $srcdir/$pkgbase-translations
git config submodule.'scons'.url $srcdir/scons
git submodule update
msg 'renaming wrong OS name'
[[ $(uname -o) == GNU ]] && sed -i 's|BUILD_PLATFORM;|"GNU";|' source/creator/buildinfo.c
[[ $(uname -o) == GNU/Linux ]] && sed -i 's|BUILD_PLATFORM;|"GNU/Linux";|' source/creator/buildinfo.c
[[ $(uname -o) == GNU/kFreeBSD ]] && sed -i 's|BUILD_PLATFORM;|"GNU/kFreeBSD";|' source/creator/buildinfo.c
sed -i 's|Linux, Mac OS X, Windows and FreeBSD|GNU and BSD|
s|Linux, FreeBSD|GNU and BSD|
s|Unpack the archive, Then run the Blender executable.|Install from Parabola repo (pacman -S '"$pkgname"'), Then run blender.|
\|Windows|d;\|Mac OS X|d
s|The downloaded Blender package includes|The '"${pkgname^}"' package includes|
' release/text/readme.html
sed -i 's|Linux|GNU|
' release/scripts/{addons/game_engine_save_as_runtime,modules/bl_i18n_utils/utils_rtl}.py
sed -i 's| (.so under Linux, .dll under windows...)| (.so under GNU or BSD, .dll under Wine or ReactOS...)|
' release/scripts/{addons/ui_translate,modules/bl_i18n_utils}/settings.py
msg 'removing Open Source term'
sed -i 's|free, open source|free|
s|free and open-source|free|
s|open-source and free|free|
' release/text/readme.html
msg 'fixing povray-libre path and desc'
sed -i "s|FILE_PATH',|FILE_PATH',\n default='/usr/bin/povray',|
s|both POV-Ray 3[.]7 and this script are beta|this script is beta|
" release/scripts/addons/render_povray/__init__.py
mkdir -v build
}
build() {
cd $srcdir/$pkgbase-$pkgver/build
[[ $CARCH == x86_64 || $CARCH == i686 ]] && _SSE=ON _SSE2=ON || _SSE=OFF _SSE2=OFF
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE="-fno-delete-null-pointer-checks -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-fno-delete-null-pointer-checks -DNDEBUG" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCYCLES_OSL=/usr \
-DLLVM_STATIC=OFF \
-DLLVM_VERSION=$_llvmver \
-DOPENIMAGEIO_ROOT_DIR=/usr \
-DOPENJPEG_INCLUDE_DIR=/usr/include/openjpeg-$_jpgver \
-DOSL_INCLUDES=/usr/include/OSL \
-DPYTHON_INCLUDE_DIRS=/usr/include/python${_pyver}m \
-DPYTHON_LIBPATH=/usr/lib \
-DPYTHON_LIBRARY=python${_pyver}m \
-DPYTHON_VERSION=$_pyver \
-DSUPPORT_SSE_BUILD=ON \
-DSUPPORT_SSE2_BUILD=ON \
-DWITH_AUDASPACE=ON \
-DWITH_BLENDER=ON \
-DWITH_BOOST=ON \
-DWITH_BOOST_ICU=OFF \
-DWITH_BUILDINFO=ON \
-DWITH_BULLET=ON \
-DWITH_CODEC_AVI=ON \
-DWITH_CODEC_FFMPEG=ON \
-DWITH_CODEC_SNDFILE=ON \
-DWITH_COMPOSITOR=ON \
-DWITH_CYCLES=ON \
-DWITH_CYCLES_CUDA_BINARIES=OFF \
-DWITH_CYCLES_OSL=ON \
-DWITH_CYCLES_STANDALONE=ON \
-DWITH_CYCLES_STANDALONE_GUI=ON \
-DWITH_FFTW3=ON \
-DWITH_FREESTYLE=ON \
-DWITH_GAMEENGINE=ON \
-DWITH_GHOST_XDND=ON \
-DWITH_IK_ITASC=ON \
-DWITH_IK_SOLVER=ON \
-DWITH_IMAGE_CINEON=ON \
-DWITH_IMAGE_DDS=ON \
-DWITH_IMAGE_FRAMESERVER=ON \
-DWITH_IMAGE_HDR=ON \
-DWITH_IMAGE_OPENEXR=ON \
-DWITH_IMAGE_OPENJPEG=ON \
-DWITH_IMAGE_REDCODE=ON \
-DWITH_IMAGE_TIFF=ON \
-DWITH_INPUT_NDOF=ON \
-DWITH_INSTALL_PORTABLE=OFF \
-DWITH_INTERNATIONAL=ON \
-DWITH_JACK=ON \
-DWITH_JACK_DYNLOAD=ON \
-DWITH_LIBMV=OFF \
-DWITH_LLVM=ON \
-DWITH_LZMA=ON \
-DWITH_LZO=ON \
-DWITH_MEM_JEMALLOC=OFF \
-DWITH_MEM_VALGRIND=OFF \
-DWITH_MOD_BOOLEAN=ON \
-DWITH_MOD_FLUID=ON \
-DWITH_MOD_OCEANSIM=ON \
-DWITH_MOD_REMESH=ON \
-DWITH_MOD_SMOKE=ON \
-DWITH_OPENAL=ON \
-DWITH_OPENIMAGEIO=ON \
-DWITH_OPENCOLLADA=ON \
-DWITH_OPENCOLORIO=ON \
-DWITH_OPENMP=ON \
-DWITH_PLAYER=ON \
-DWITH_PYTHON=ON \
-DWITH_PYTHON_INSTALL=OFF \
-DWITH_PYTHON_INSTALL_NUMPY=OFF \
-DWITH_PYTHON_INSTALL_REQUESTS=ON \
-DWITH_PYTHON_MODULE=OFF \
-DWITH_PYTHON_SAFETY=OFF \
-DWITH_PYTHON_SECURITY=ON \
-DWITH_RAYOPTIMIZATION=ON \
-DWITH_SDL=ON \
-DWITH_STATIC_LIBS=OFF \
-DWITH_SYSTEM_GLEW=ON \
-DWITH_SYSTEM_OPENJPEG=ON \
-DWITH_X11_XF86VMODE=ON \
-DWITH_X11_XINPUT=ON
#-DWITH_MOD_CLOTH_ELTOPO=ON\
#-DWITH_SYSTEM_BULLET=ON\
#-DSUPPORT_SSE_BUILD=$_SSE \
#-DSUPPORT_SSE2_BUILD=$_SSE2 \
# Note: Fix for gcc 4.9 :/
# -DCMAKE_C_FLAGS_RELEASE="-fno-delete-null-pointer-checks -DNDEBUG"
# -DCMAKE_CXX_FLAGS_RELEASE="-fno-delete-null-pointer-checks -DNDEBUG"
make
}
package_blender() {
cd $srcdir/$pkgbase-$pkgver/build
make DESTDIR=$pkgdir install
python -m compileall $pkgdir/usr/share/$pkgbase
python -O -m compileall $pkgdir/usr/share/$pkgbase
}
|