summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2019-07-14 16:44:21 +0200
committerbartus2019-07-14 16:44:21 +0200
commit120ba486091e64837b8139ec2745acd2d86526c9 (patch)
treeaaf21e0592e2bd4f584be092518efd476bc8dd2f
downloadaur-120ba486091e64837b8139ec2745acd2d86526c9.tar.gz
initial
-rw-r--r--.SRCINFO54
-rw-r--r--PKGBUILD137
-rw-r--r--SelectCudaComputeArch.patch15
-rw-r--r--blender-2.7.desktop14
-rw-r--r--blender.install14
5 files changed, 234 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4547f30e134
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,54 @@
+pkgbase = blender-2.7
+ pkgdesc = Blender 2.7 branch
+ pkgver = 2.7.r71421.e045fe53f1b
+ pkgrel = 1
+ url = https://blender.org/
+ install = blender.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = cmake
+ makedepends = boost
+ makedepends = mesa
+ makedepends = llvm
+ makedepends = cuda
+ depends = alembic
+ depends = libgl
+ depends = python
+ depends = python-numpy
+ depends = openjpeg
+ depends = desktop-file-utils
+ depends = hicolor-icon-theme
+ depends = ffmpeg
+ depends = fftw
+ depends = openal
+ depends = freetype2
+ depends = libxi
+ depends = openimageio
+ depends = opencolorio
+ depends = openvdb
+ depends = opencollada
+ depends = opensubdiv
+ depends = openshadinglanguage
+ depends = libtiff
+ depends = libpng
+ provides = blender=2.7
+ options = !strip
+ source = git://git.blender.org/blender.git#branch=blender2.7
+ source = blender-addons.git::git://git.blender.org/blender-addons.git
+ source = blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git
+ source = blender-translations.git::git://git.blender.org/blender-translations.git
+ source = blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git
+ source = blender-2.7.desktop
+ source = SelectCudaComputeArch.patch
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = cef7a015d4ab57592b424ea06c8b576e
+ md5sums = 2f1b08655352e70c7c74d4957d481dc8
+
+pkgname = blender-2.7
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..4ee20205613
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,137 @@
+# Maintainer : bartus <arch-user-repoᘓbartus.33mail.com>
+# shellcheck disable=SC2034
+
+#to enforce cuda verison uncomment this line and update value of sm_xx model accordingly
+#_cuda_capability+=(sm_30 sm_35 sm_37) # suppress to prevent Travis build exceed time limit.
+_cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75)
+
+pkgname=blender-2.7
+_fragment="#branch=blender2.7"
+pkgver=2.7.r71421.e045fe53f1b
+pkgrel=1
+pkgdesc="Blender 2.7 branch"
+arch=('i686' 'x86_64')
+url="https://blender.org/"
+depends=('alembic' 'libgl' 'python' 'python-numpy' 'openjpeg' 'desktop-file-utils' 'hicolor-icon-theme'
+ 'ffmpeg' 'fftw' 'openal' 'freetype2' 'libxi' 'openimageio' 'opencolorio'
+ 'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng')
+#optdepends=('cuda: CUDA support in Cycles')
+makedepends=('git' 'cmake' 'boost' 'mesa' 'llvm')
+makedepends+=('cuda>=10.1.168-9') # disable to prevent build process from exiting Travis 50m build time limit
+options=(!strip)
+provides=('blender=2.7')
+license=('GPL')
+install=blender.install
+# NOTE: the source array has to be kept in sync with .gitmodules
+# the submodules has to be stored in path ending with git to match
+# the path in .gitmodules.
+# More info:
+# http://wiki.blender.org/index.php/Dev:Doc/Tools/Git
+source=("git://git.blender.org/blender.git${_fragment}" \
+ 'blender-addons.git::git://git.blender.org/blender-addons.git' \
+ 'blender-addons-contrib.git::git://git.blender.org/blender-addons-contrib.git' \
+ 'blender-translations.git::git://git.blender.org/blender-translations.git' \
+ 'blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git' \
+ blender-2.7.desktop \
+ SelectCudaComputeArch.patch \
+ )
+md5sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'cef7a015d4ab57592b424ea06c8b576e'
+ '8b22ddc71fb3a766029dc460bba49a0a')
+
+pkgver() {
+ cd "$srcdir/blender"
+ printf "2.7.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/blender"
+ # update the submodules
+ git submodule update --init --recursive --remote
+ if [ -z "$_cuda_capability" ] && grep -q nvidia <(lsmod); then
+ git apply -v ${srcdir}/SelectCudaComputeArch.patch
+ fi
+}
+
+build() {
+
+ mkdir -p "$srcdir/blender-build"
+ cd "$srcdir/blender-build"
+
+ _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
+ msg "python version detected: ${_pyver}"
+
+ # determine whether we can precompile CUDA kernels
+ _CUDA_PKG=`pacman -Qq cuda 2>/dev/null` || true
+ if [ "$_CUDA_PKG" != "" ]; then
+ _EXTRAOPTS=(-DWITH_CYCLES_CUDA_BINARIES=ON \
+ -DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda)
+ ((TRAVIS)) && _EXTRAOPTS+=(-DCUDA_NVCC_FLAGS="--ptxas-options=-w") # suppress all ptxas warnings in Travis build
+ if [ "$_cuda_capability" != "" ]; then
+ _EXTRAOPTS+=(-DCYCLES_CUDA_BINARIES_ARCH=$(IFS=';'; echo "${_cuda_capability[*]}";))
+ fi
+ fi
+
+# export CFLAGS="${CFLAGS} -DOPENVDB_3_ABI_COMPATIBLE -DOPENVDB_USE_DEPRECATED_ABI"
+# export CXXFLAGS="${CXXFLAGS} -DOPENVDB_3_ABI_COMPATIBLE -DOPENVDB_USE_DEPRECATED_ABI"
+ cmake "$srcdir/blender" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_INSTALL_PORTABLE=OFF \
+ -DWITH_CXX11=ON \
+ -DWITH_ALEMBIC=NO \
+ -DWITH_OPENCOLORIO=ON \
+ -DWITH_FFTW3=ON \
+ -DWITH_SYSTEM_GLEW=ON \
+ -DWITH_CODEC_FFMPEG=ON \
+ -DWITH_PYTHON_INSTALL=OFF \
+ -DPYTHON_VERSION=${_pyver} \
+ -DWITH_MOD_OCEANSIM=ON \
+ -DWITH_CYCLES_OPENSUBDIV=ON \
+ -DWITH_CYCLES_OSL=ON \
+ -DWITH_LLVM=ON \
+ -DWITH_IMAGE_OPENEXR=ON \
+ -DWITH_OPENSUBDIV=ON \
+ -DWITH_OPENVDB=ON \
+ -DWITH_OPENVDB_BLOSC=ON \
+ -DWITH_OPENCOLLADA=ON \
+ ${_EXTRAOPTS[@]}
+ make
+}
+
+package() {
+ cd "$srcdir/blender-build"
+ make DESTDIR="$pkgdir" install
+
+ msg "add -2.7 sufix to desktop shortcut"
+ sed -i 's/=blender/=blender-2.7/g' ${pkgdir}/usr/share/applications/blender.desktop
+ sed -i 's/=Blender/=Blender-2.7/g' ${pkgdir}/usr/share/applications/blender.desktop
+ mv ${pkgdir}/usr/share/applications/blender.desktop ${pkgdir}/usr/share/applications/blender-2.7.desktop
+
+ msg "add -2.7 sufix to binaries"
+ mv ${pkgdir}/usr/bin/blender ${pkgdir}/usr/bin/blender-2.7
+ mv ${pkgdir}/usr/bin/blender-thumbnailer.py ${pkgdir}/usr/bin/blender-2.7-thumbnailer.py
+# mv ${pkgdir}/usr/bin/blenderplayer ${pkgdir}/usr/bin/blenderplayer-2.7
+
+ msg "mv doc/blender to doc/blender-2.7"
+ mv ${pkgdir}/usr/share/doc/blender ${pkgdir}/usr/share/doc/blender-2.7
+
+ msg "add -2.7 sufix to all icons"
+ for icon in `find ${pkgdir}/usr/share/icons -type f`
+ do
+ # ${filename##/*.} extra extenssion from path
+ # ${filename%.*} extract filename form path
+ # look at bash "manipulatin string"
+ mv $icon ${icon%.*}-2.7.${icon##/*.}
+ done
+
+ ## not needed when using options=(!strip)?
+ #if [ -e "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/ ] ; then
+ # # make sure the cuda kernels are not stripped
+ # chmod 444 "$pkgdir"/usr/share/blender/*/scripts/addons/cycles/lib/*
+ #fi
+}
+# vim:set sw=2 ts=2 et:
diff --git a/SelectCudaComputeArch.patch b/SelectCudaComputeArch.patch
new file mode 100644
index 00000000000..8b129acc07f
--- /dev/null
+++ b/SelectCudaComputeArch.patch
@@ -0,0 +1,15 @@
+diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
+index d0f473a2939..90fcb40107a 100644
+--- a/intern/cycles/cmake/external_libs.cmake
++++ b/intern/cycles/cmake/external_libs.cmake
+@@ -41,6 +41,10 @@ if(WITH_CYCLES_CUDA_BINARIES OR NOT WITH_CUDA_DYNLOAD)
+ find_package(CUDA) # Try to auto locate CUDA toolkit
+ if(CUDA_FOUND)
+ message(STATUS "CUDA nvcc = ${CUDA_NVCC_EXECUTABLE}")
++ CUDA_SELECT_NVCC_ARCH_FLAGS(CUDA_ARCH_FLAGS Auto)
++ set(CYCLES_CUDA_BINARIES_ARCH "${CUDA_ARCH_FLAGS_readable}")
++ message(STATUS "Enabling CUDA support (version: ${CUDA_VERSION_STRING},"
++ " archs: ${CUDA_ARCH_FLAGS_readable})")
+ else()
+ message(STATUS "CUDA compiler not found, disabling WITH_CYCLES_CUDA_BINARIES")
+ set(WITH_CYCLES_CUDA_BINARIES OFF)
diff --git a/blender-2.7.desktop b/blender-2.7.desktop
new file mode 100644
index 00000000000..3d11ba8ae4c
--- /dev/null
+++ b/blender-2.7.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Name=Blender-2.7
+Comment=A 3D program
+Comment[cs]=Program pro 3D modeling a animaci
+Comment[es]=Un programa de 3D
+Comment[no]=Et 3d-program
+Comment[da]=Et program til 3d-modelering
+Exec=blender-2.7
+Icon=blender-2.7
+Terminal=false
+X-MultipleArgs=false
+Type=Application
+Categories=Graphics;3DGraphics;
+MimeType=application/blender;application/x-blender;
diff --git a/blender.install b/blender.install
new file mode 100644
index 00000000000..d061748130f
--- /dev/null
+++ b/blender.install
@@ -0,0 +1,14 @@
+
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -qf /usr/share/icons/hicolor/
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
+