diff options
Diffstat (limited to 'testing/blender/APKBUILD')
-rw-r--r-- | testing/blender/APKBUILD | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/testing/blender/APKBUILD b/testing/blender/APKBUILD new file mode 100644 index 0000000000..eff8b5ac03 --- /dev/null +++ b/testing/blender/APKBUILD @@ -0,0 +1,122 @@ +# Contributor: Mark Riedesel <mark@klowner.com> +# Maintainer: Mark Riedesel <mark@klowner.com> +pkgname=blender +pkgver=2.77a +pkgrel=0 +pkgdesc="3D Creation/Animation/Publishing System" +url="http://www.blender.org/" +arch="all" +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 $pkgname-headless $pkgname-player py3-$pkgname:python" +source="http://download.blender.org/source/${pkgname}-${pkgver}.tar.gz + blender-2.77a-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() { + local PY_VERSION=$(python3 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))') + local VERSION=$(echo $pkgver | grep -o '[0-9]+\.[0-9]+') + + # 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" + arch="noarch" + 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))') + local VERSION=$(echo $pkgver | grep -o '[0-9]*\.[0-9]*') + + 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/${VERSION} "$subpkgdir"/usr/lib/python${PY_VERSION}/site-packages/${VERSION} +} + +md5sums="bb192274fe5957ce62bce9f0557ea4b4 blender-2.77a.tar.gz +93bda85f6a3c0c587ee7790b7d35e4cc blender-2.77a-musl.patch" +sha256sums="3770fa00f50a6654eb8b5fe625ca8942ab5672ac4685b7af24597251ace85c67 blender-2.77a.tar.gz +f536a69354bd1a4b482a6150542d528a92a0107ff639832500f7dc28c64360ec blender-2.77a-musl.patch" +sha512sums="4f8223a3786b80fa613ace27bea9349309b5857bcc1fafdb7d769f6192d5cb455ce4faf60920d7a1c2cb82ef8c40a10b25a760748b305c16c550657cf1e4df93 blender-2.77a.tar.gz +6ecf4a6a9b56f045c9d14093ae13c6cb714ce8dff2212a08830edcf540ec47f143c2670e197a97ca42f380a60825abab4e7b3d7dbc88c44265fae7f83f2cd602 blender-2.77a-musl.patch" |