mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
92 lines
3.4 KiB
Bash
92 lines
3.4 KiB
Bash
# Contributions from Arch: https://www.archlinux.org/packages/community/x86_64/blender/
|
|
|
|
pkgname=blender
|
|
pkgver=2.79.b
|
|
_gittag=v2.79b
|
|
#_gitcommit=c6b042be
|
|
[[ -n ${_gitcommit} ]] && pkgver=${pkgver}.git1.${_gitcommit}
|
|
pkgrel=3
|
|
epoch=2
|
|
pkgdesc="A fully integrated 3D graphics creation suite"
|
|
arch=('x86_64')
|
|
license=('GPL')
|
|
url="http://www.blender.org"
|
|
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' 'openjpeg2')
|
|
makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm' 'python2') # man pages require python
|
|
optdepends=('cuda: cycles renderer cuda support')
|
|
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')
|
|
options=(!strip)
|
|
#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/blender-dev-tools.git"
|
|
"git://git.blender.org/scons.git"
|
|
ffmpeg4.0.patch)
|
|
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'
|
|
'7e72c2f9a743d6efd69ee989f426fe439094f414df6a8af260599b5f3905d438'
|
|
'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."source/tools".url ${srcdir}/blender-dev-tools
|
|
git config submodule."scons".url "${srcdir}/scons"
|
|
git submodule update
|
|
|
|
|
|
# ffmpeg 4.0 fixes
|
|
patch -Np1 -i "${srcdir}"/ffmpeg4.0.patch
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname}-${pkgver}
|
|
|
|
mkdir -p build && cd build
|
|
|
|
cmake -C../build_files/cmake/config/blender_release.cmake .. \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DWITH_INSTALL_PORTABLE=OFF \
|
|
-DWITH_PYTHON_INSTALL=OFF \
|
|
-DOPENIMAGEIO_ROOT_DIR=/usr \
|
|
-DWITH_SYSTEM_OPENJPEG=ON \
|
|
-DWITH_GL_PROFILE_CORE=OFF \
|
|
-DWITH_GL_PROFILE_ES20=OFF \
|
|
-DWITH_LLVM=ON \
|
|
-DLLVM_VERSION=5.0 \
|
|
-DLLVM_STATIC=OFF \
|
|
-DWITH_CYCLES_CUDA_BINARIES=ON \
|
|
-DWITH_CYCLES_PTEX=OFF \
|
|
-DPYTHON_VERSION=3.6 \
|
|
-DPYTHON_LIBPATH=/usr/lib \
|
|
-DPYTHON_LIBRARY=python3.6m \
|
|
-DPYTHON_INCLUDE_DIRS=/usr/include/python3.6m
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}-${pkgver}/build
|
|
|
|
make DESTDIR="${pkgdir}" install
|
|
install -Dm755 ../release/bin/blender-softwaregl "${pkgdir}/usr/bin/blender-softwaregl"
|
|
python3 -m compileall "${pkgdir}/usr/share/blender"
|
|
python3 -O -m compileall "${pkgdir}/usr/share/blender"
|
|
}
|