updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / blender-cycles-svn / PKGBUILD
blob021d6c07390b4fa5a8e928ca8af93283da5147e6
1 # Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
2 # Contributor: XercesBlue (nullfied)
3 # Contributor: Mikael Eriksson (miffe)
4 # Maintainer: N30N <archlinux@alunamation.com>
5 # Contributor: miffe <mikael_eriksson@miffe.org>
7 pkgname="blender-cycles-svn"
8 pkgver=41800
9 pkgrel=1
10 arch=("i686" "x86_64")
11 url="http://blender.org/"
12 depends=("desktop-file-utils" "hicolor-icon-theme" "python" "ffmpeg" "fftw" \
13         "libsndfile" "openimageio-git")
14 makedepends=("subversion" "cmake" "sdl" "openal" "jack" "boost")
15 optdepends=("sdl: as your audio backend" \
16         "openal: as your audio backend" \
17         "jack: as your audio backend" \
18         "cuda-toolkit: for GPU rendering")
19 provides=("blender")
20 conflicts=("blender")
21 license=("GPL2")
22 options=("!strip")
23 install="blender.install"
25 case "${pkgname}" in
26         "blender-nurbs-svn")
27                 _svnmod="nurbs"
28                 ;;
29         "blender-bmesh-svn")
30                 _svnmod="bmesh"
31                 ;;
32         "blender-freestyle-svn")
33                 _svnmod="soc-2008-mxcurioni"
34                 ;;
35         *)
36                 pkgdesc="SVN version of Blender"
37                 _svnmod="trunk"
38                 _svntrunk="https://svn.blender.org/svnroot/bf-blender/trunk/blender"
39                 ;;
40 esac
42 if [ -z "${_svntrunk}" ]; then
43         pkgdesc="${_svnmod} SVN branch of Blender"
44         _svntrunk="https://svn.blender.org/svnroot/bf-blender/branches/${_svnmod}"
47 build() {
48         msg "Connecting to SVN server..."
49         if [ -d "${_svnmod}/.svn" ]; then
50                 (cd "${_svnmod}" && svn up -r "${pkgver}")
51         else
52                 svn co "${_svntrunk}" --config-dir ./ -r "${pkgver}" "${_svnmod}"
53         fi
54         msg "SVN checkout done or server timeout"
56         [ -d build ] && rm -rf build
57         mkdir -p build
58         cd build
60         if [ "${CC-gcc}" = "gcc" ]; then
61                 export \
62                         CFLAGS="${CFLAGS} -ffast-math" \
63                         CXXFLAGS="${CXXFLAGS} -ffast-math"
64         fi
66         cmake \
67                 -DCMAKE_VERBOSE_MAKEFILE="OFF" \
68                 -DCMAKE_INSTALL_PREFIX="/usr" \
69                 -DPYTHON_VERSION="$(python3 -V 2>&1 | sed -r "s/^.+\s(3\.[0-9]).*$/\1/")" \
70                 -DWITH_PYTHON_INSTALL="OFF" \
71                 -DWITH_INSTALL_PORTABLE="OFF" \
72                 -DWITH_PLAYER="ON" \
73                 -DWITH_CODEC_FFMPEG="ON" \
74                 -DWITH_FFTW3="ON" \
75                 -DWITH_JACK="ON" \
76                 -DWITH_CODEC_SNDFILE="ON" \
77                 -DWITH_OPENCOLLADA="OFF" \
78                 -DWITH_MEM_JEMALLOC="OFF" \
79                 -DWITH_CYCLES_CUDA_BINARIES="OFF" \
80                 -DCUDA_TOOLKIT_INCLUDE="/usr/include/cuda" \
81                 -DCYCLES_CUDA_BINARIES_ARCH="sm_10;sm_11;sm_12;sm_13;sm_20;sm_21" \
82                 ../${_svnmod}
84         make
85         make DESTDIR="${pkgdir}" install
88 # vim: set noet ff=unix: