summaryrefslogtreecommitdiff
path: root/libre/blender-libre/PKGBUILD
blob: 5dd14405debd50e08c69b6355bb4774eb63c4243 (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
# $Id$
# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com>

_pkgname=blender
pkgname=blender-libre
pkgver=2.63a
pkgrel=2.1
epoch=4
pkgdesc="A fully integrated 3D graphics creation suite (without nonfree cuda-toolkit support)"
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')
replaces=("${_pkgname}")
conflicts=("${_pkgname}")
provides=("${_pkgname}=${pkgver}")
options=(!strip)
install=${_pkgname}.install
source=(http://download.${_pkgname}.org/source/${_pkgname}-${pkgver}.tar.gz ffmpeg-0.11.patch)
md5sums=('31a60b3ce5466d965cb7e2648995e092' '9e5649403e51654615d30b10bc460217')

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}"

  patch -Np1 < "${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() {
  cd "${srcdir}/${_pkgname}-${pkgver}/build"
  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/
}