blob: 9bdc80d9f4289287294f6488b15f89d1562ded2b (
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
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
|
# Contributor: Mark Riedesel <mark@klowner.com>
# Maintainer: Mark Riedesel <mark@klowner.com>
pkgname=blender
pkgver=2.78a
_pkgver=${pkgver/[a-z]}
pkgrel=1
pkgdesc="3D Creation/Animation/Publishing System"
url="http://www.blender.org/"
arch="all !armhf !aarch64"
license="GPL2"
depends="blender-shared=$pkgver-r$pkgrel"
makedepends="cmake libx11-dev jpeg-dev zlib-dev libpng-dev freetype-dev python3-dev
openimageio-dev opencolorio-dev glew-dev openal-soft-dev ffmpeg2.8-dev
fftw-dev tiff-dev mesa-dev libxi-dev libsndfile-dev libxmu-dev boost-dev
openexr-dev py-numpy-dev opensubdiv-dev"
install=""
subpackages="$pkgname-doc $pkgname-shared::noarch $pkgname-headless $pkgname-player py3-$pkgname:python"
source="http://download.blender.org/source/${pkgname}-${pkgver}.tar.gz
blender-2.78a-musl.patch"
builddir="$srcdir"/$pkgname-$pkgver
build() {
# Headless
cd "$builddir"
mkdir "$builddir"/build-headless
cd "$builddir"/build-headless
_build -C../build_files/cmake/config/blender_headless.cmake
# Full
cd "$builddir"
mkdir "$builddir"/build-full
cd "$builddir"/build-full
_build -C../build_files/cmake/config/blender_full.cmake
# Python module
cd "$builddir"
mkdir "$builddir"/build-py
cd "$builddir"/build-py
_build -C../build_files/cmake/config/bpy_module.cmake
}
_build() {
local PY_VERSION=$(python3 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))')
cmake .. $@ \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_PYTHON_INSTALL:BOOL=OFF \
-DWITH_INSTALL_PORTABLE:BOOL=OFF \
-DWITH_OPENCOLORIO:BOOL=ON \
-DPYTHON_VERSION=$PY_VERSION \
-DPYTHON_LIBPATH=/usr/lib \
-DPYTHON_LIBRARY=python${PY_VERSION}m \
-DPYTHON_INCLUDE_DIRS=/usr/include/python${PY_VERSION}m \
-DNO_EXECINFO:BOOL=ON \
|| return 1
make || return 1
}
package() {
# Install headless files
cd "$builddir"/build-headless
make DESTDIR="$pkgdir"/headless install || return 1
# Rename the headless blender to blender-headless
mkdir -p "$pkgdir"/usr/bin
mv "$pkgdir"/headless/usr/bin/blender "$pkgdir"/usr/bin/blender-headless || return 1
rm -rf "$pkgdir"/headless
# Install python module
cd "$builddir"/build-py
make DESTDIR="$pkgdir" install || return 1
# Install the full package
cd "$builddir"/build-full
make DESTDIR="$pkgdir" install || return 1
}
shared() {
pkgdesc="Blender shared runtime data and add-on scripts"
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/blender "$subpkgdir"/usr/share/
}
headless() {
pkgdesc="$pkgdesc (headless build)"
depends="blender-shared=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/blender-headless "$subpkgdir"/usr/bin/
}
player() {
pkgdesc="Blender player runtime"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/blenderplayer "$subpkgdir"/usr/bin/
}
python() {
local PY_VERSION=$(python3 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))')
pkgdesc="Blender modules for Python 3"
mkdir -p "$subpkgdir"/usr/lib/python${PY_VERSION}/site-packages
mv "$pkgdir"/usr/lib/python${PY_VERSION}/site-packages/bpy.so "$subpkgdir"/usr/lib/python${PY_VERSION}/site-packages/
rm -rf "$pkgdir"/usr/lib
# Symlink to the blender-shared files
ln -s /usr/share/blender/${_pkgver} "$subpkgdir"/usr/lib/python${PY_VERSION}/site-packages/${_pkgver}
}
md5sums="8f75b9d7c8507c563bda882c4f73c2d2 blender-2.78a.tar.gz
3b31965a3dc3addfacddd0ae7b10a63b blender-2.78a-musl.patch"
sha256sums="014a14b1ba00c0e651f106469b2e5dd444f11be5a7af48056f0ed59de90cceaf blender-2.78a.tar.gz
2f40e664f04c8f40a38e65ac546643c289c146a43053d585c59f9fb3f241965b blender-2.78a-musl.patch"
sha512sums="57239b6ce473aaef114453f97a6e88535ec0a2f50cfecd221fa6bdcca6fe6559dcbefd48c3f20dc2235c195de13c59a1a155d5b64d777be31812d32e68be9370 blender-2.78a.tar.gz
47e8a6a017cea8c004d7e4205f201f167dd81ba95a4aadf9e55d01e81cc4a23e4d7f1d6aa7a6d1300fe3a5f5c98c664f584e7551fcde7fb1137147e2438f7ed5 blender-2.78a-musl.patch"
|