desktop/blender/PKGBUILD

95 lines
3.3 KiB
Bash
Raw Normal View History

# Contributions from Arch: https://www.archlinux.org/packages/community/x86_64/blender/
2010-07-05 08:03:22 +08:00
2015-11-14 08:49:29 +08:00
_gittag=v2.76b
#_gitcommit=c6b042be
2014-09-12 04:56:05 +08:00
2010-07-05 08:03:22 +08:00
pkgname=blender
2015-11-14 08:49:29 +08:00
pkgver=2.76b
2014-09-12 04:56:05 +08:00
[[ -n ${_gitcommit} ]] && pkgver=${pkgver}.git1.${_gitcommit}
pkgrel=1
2015-11-14 08:49:29 +08:00
epoch=2
2011-04-29 09:20:25 +08:00
pkgdesc="A fully integrated 3D graphics creation suite"
arch=('x86_64')
2010-07-05 08:03:22 +08:00
license=('GPL')
2011-04-29 09:20:25 +08:00
url="http://www.blender.org"
2015-11-14 08:49:29 +08:00
depends=('libpng' 'libtiff' 'openexr' 'python3' 'python3-requests' 'desktop-file-utils'
'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'glew' 'libspnav'
'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'x264' 'opencollada'
'openimageio' 'libsndfile' 'jack' 'opencolorio' 'openjpeg' 'jemalloc' 'ptex' 'opensubdiv')
makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm')
optdepends=('cuda: cycles renderer cuda support')
2014-04-01 07:04:54 +08:00
screenshot=('http://www.blender.org/index.php?eID=tx_cms_showpic&file=uploads%2Fpics%2Fblender_screenshot3_03.png&width=800m&height=600m&bodyTag=%3Cbody%20style%3D%22margin%3A0%3B%20background%3A%23fff%3B%22%3E&wrap=%3Ca%20href%3D%22javascript%3Aclose%28%29%3B%22%3E%20%7C%20%3C%2Fa%3E&md5=cddc8ef0fbe1e90d0d22e78b4911860b')
2014-09-12 04:56:05 +08:00
options=(!strip)
2010-07-05 08:03:22 +08:00
install=blender.install
2014-09-12 04:56:05 +08:00
#source=("http://download.blender.org/source/${pkgname}-${pkgver}.tar.gz")
source=("git://git.blender.org/blender-addons.git"
"git://git.blender.org/blender-addons-contrib.git"
"git://git.blender.org/blender-translations.git"
"git://git.blender.org/scons.git")
if [[ -n $_gittag ]]; then
source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#tag=${_gittag}")
else
source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#commit=${_gitcommit}")
fi
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')
prepare() {
cd "$srcdir/$pkgname-$pkgver"
git submodule init
git config submodule."release/scripts/addons".url "${srcdir}/blender-addons"
git config submodule."release/scripts/addons_contrib".url "${srcdir}/blender-addons-contrib"
git config submodule."release/datafiles/locale".url "${srcdir}/blender-translations"
git config submodule."scons".url "${srcdir}/scons"
git submodule update
}
2010-07-05 08:03:22 +08:00
build() {
2014-09-12 04:56:05 +08:00
cd ${pkgname}-${pkgver}
2011-07-09 12:40:32 +08:00
2014-06-10 15:18:16 +08:00
mkdir -p build && cd build
2015-11-14 08:49:29 +08:00
2014-09-12 04:56:05 +08:00
# enable again -DWITH_OPENCOLLADA=ON when 2.71 is build!
# Still does not work. Does opencollada need a rebuild or a new version?
2015-01-14 19:07:07 +08:00
cmake -C../build_files/cmake/config/blender_full.cmake .. \
2013-07-27 18:39:30 +08:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_INSTALL_PORTABLE=OFF \
-DWITH_PYTHON_INSTALL=OFF \
2015-01-14 19:07:07 +08:00
-DWITH_SYSTEM_OPENJPEG=ON \
2013-07-27 18:39:30 +08:00
-DOPENIMAGEIO_ROOT_DIR=/usr \
-DWITH_GAMEENGINE=ON \
-DWITH_JACK=ON \
-DWITH_PLAYER=ON \
-DWITH_CODEC_FFMPEG=ON \
-DWITH_CODEC_SNDFILE=ON \
-DWITH_CYCLES_OSL=ON \
-DWITH_CYCLES_CUDA_BINARIES=ON \
2015-11-14 08:49:29 +08:00
-DWITH_CYCLES_PTEX=ON \
-DWITH_OPENSUBDIV=ON \
2014-09-12 04:56:05 +08:00
-DWITH_LLVM=ON \
2015-01-14 19:07:07 +08:00
-DLLVM_VERSION=3.5 \
2014-09-12 04:56:05 +08:00
-DLLVM_STATIC=OFF \
2013-07-27 18:39:30 +08:00
-DWITH_FFTW3=ON \
-DWITH_MOD_OCEANSIM=ON \
2015-11-14 08:49:29 +08:00
-DWITH_OPENCOLLADA=ON \
2014-09-12 04:56:05 +08:00
-DPYTHON_VERSION=3.4 \
2013-07-27 18:39:30 +08:00
-DPYTHON_LIBPATH=/usr/lib \
2014-09-12 04:56:05 +08:00
-DPYTHON_LIBRARY=python3.4m \
-DPYTHON_INCLUDE_DIRS=/usr/include/python3.4m
2011-04-29 09:20:25 +08:00
make
2010-07-05 08:03:22 +08:00
}
2011-04-29 09:20:25 +08:00
package() {
2014-09-12 04:56:05 +08:00
cd ${pkgname}-${pkgver}/build
2013-07-27 18:39:30 +08:00
2011-04-29 09:20:25 +08:00
make DESTDIR="${pkgdir}" install
2011-04-30 06:26:06 +08:00
python3 -m compileall "${pkgdir}/usr/share/blender"
2014-09-12 04:56:05 +08:00
python3 -O -m compileall "${pkgdir}/usr/share/blender"
2011-12-14 13:27:15 +08:00
}