summaryrefslogtreecommitdiff
path: root/libre/blender-libre/PKGBUILD
diff options
context:
space:
mode:
authorMárcio Silva <marcio@pc-02.localdomain>2012-06-08 17:12:51 -0300
committerMárcio Silva <marcio@pc-02.localdomain>2012-06-08 17:12:51 -0300
commit21c0554290cb194d7b00e645a2fbf1b28f92f758 (patch)
tree4f5903c4a95a7972f350aa77e7efb24270734aa3 /libre/blender-libre/PKGBUILD
parent0724a23f4f986eda5d8b3900cdb3981807e959a2 (diff)
adding blender-libre package
Diffstat (limited to 'libre/blender-libre/PKGBUILD')
-rw-r--r--libre/blender-libre/PKGBUILD118
1 files changed, 118 insertions, 0 deletions
diff --git a/libre/blender-libre/PKGBUILD b/libre/blender-libre/PKGBUILD
new file mode 100644
index 000000000..1262356bc
--- /dev/null
+++ b/libre/blender-libre/PKGBUILD
@@ -0,0 +1,118 @@
+# $Id$
+# Contributor: John Sowiak <john@archlinux.org>
+# Contributor: tobias <tobias@archlinux.org>
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Maintainer (Parabola): Márcio Silva <coadde@adinet.com.uy>
+
+# Apparently, the blender guys refuse to release source tarballs for
+# intermediate releases that deal mainly with binaries but incorporate tiny
+# minor changes from svn. Since I'm sick and tired of the urges of users that
+# look for release numbers only, we make a messy PKGBUILD that can checkout svn
+# release if necessary.
+
+_svn=true
+_pkgname=blender
+pkgname=blender-libre
+true && pkgver=2.63a # Hack for svn
+true && pkgrel=2
+epoch=4
+pkgdesc="A fully integrated 3D graphics creation suite without cuda-toolkit recommendation"
+arch=('i686' 'x86_64' 'mips64el')
+license=('GPL')
+url="http://www.blender.org"
+depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils'
+ 'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'glew'
+ 'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada'
+ 'openimageio' 'libsndfile' 'jack')
+makedepends=('cmake' 'boost' 'subversion')
+options=(!strip)
+install=blender.install
+if [[ $_svn = false ]]; then
+ source=(http://download.blender.org/source/$_pkgname-$pkgver.tar.gz)
+ md5sums=('31a60b3ce5466d965cb7e2648995e092')
+else
+ source=(ffmpeg-0.11.patch)
+ md5sums=('168db32487e363e71fd4671e204afccf')
+fi
+
+_svntrunk="https://svn.blender.org/svnroot/bf-blender/trunk/blender"
+_svnmod="blender"
+
+build() {
+if [[ $_svn = true ]]; then
+ cd "$srcdir"
+ msg "Connecting to SVN server...."
+
+ if [[ -d "$_svnmod/.svn" ]]; then
+ (cd "$_svnmod" && svn up )
+ else
+ svn co "$_svntrunk" --config-dir ./ "$_svnmod"
+ fi
+
+ msg "SVN checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_svnmod-build"
+ cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
+ cd "$srcdir/$_svnmod-build"
+else
+ cd "$srcdir/$_pkgname-$pkgver"
+fi
+
+ patch -Np0 < "$srcdir"/ffmpeg-0.11.patch
+ sed -i "/<libavcodec\/opt.h>/d" intern/ffmpeg/ffmpeg_compat.h
+ sed -i "/<libavcodec\/opt.h>/d" source/blender/blenkernel/intern/writeffmpeg.c
+
+ mkdir build
+ cd build
+
+ [[ $CARCH == i686 ]] && ENABLESSE2="-DSUPPORT_SSE2_BUILD=OFF"
+
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DWITH_INSTALL_PORTABLE=OFF \
+ -DWITH_PYTHON_INSTALL=OFF \
+ -DWITH_OPENCOLLADA=ON \
+ -DOPENIMAGEIO_ROOT_DIR=/usr \
+ -DWITH_GAMEENGINE=ON \
+ -DWITH_JACK=ON \
+ -DWITH_PLAYER=ON \
+ -DWITH_BUILTIN_GLEW=OFF \
+ -DWITH_CODEC_FFMPEG=ON \
+ -DWITH_CODEC_SNDFILE=ON \
+ -DWITH_CYCLES=ON \
+ -DWITH_CYCLES_CUDA_BINARIES=OFF \
+ -DWITH_FFTW3=ON \
+ -DWITH_MOD_OCEANSIM=ON \
+ -DPYTHON_VERSION=3.2 \
+ -DPYTHON_LIBPATH=/usr/lib \
+ -DPYTHON_LIBRARY=python3.2mu \
+ -DPYTHON_INCLUDE_DIRS=/usr/include/python3.2mu \
+ $ENABLESSE2
+
+ make $MAKEFLAGS
+
+# cp -rf "$srcdir"/${_pkgname}-$pkgver/release/plugins/* \
+# "$srcdir"/${_pkgname}-$pkgver/source/blender/blenpluginapi/
+# cd "$srcdir"/${_pkgname}-$pkgver/source/blender/blenpluginapi
+# chmod 755 bmake
+ make
+}
+
+package() {
+ if [[ $_svn = true ]]; then
+ cd "$srcdir/$_svnmod-build/build"
+ else
+ cd "$srcdir/$_pkgname-$pkgver/build"
+ fi
+ make DESTDIR="${pkgdir}" install
+ python -m compileall "${pkgdir}/usr/share/blender"
+
+# install plugins
+# install -d -m755 "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/{sequence,texture}
+# cp "$srcdir"/${_pkgname}-$pkgver/source/blender/blenpluginapi/sequence/*.so \
+# "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/sequence/
+# cp "$srcdir"/${_pkgname}-$pkgver/source/blender/blenpluginapi/texture/*.so \
+# "$pkgdir"/usr/share/blender/${pkgver%[a-z]}/plugins/texture/
+}