summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-05-07 21:27:24 +0200
committerbartus2020-05-07 21:27:24 +0200
commit27c6d01adf525c04c2ef033233e7292889970e03 (patch)
treef1e7f5ba3d2b56e6b594600e084b64423cf47572
parenta70cc33f4191d13036c801abf56fc6e5cdc47e32 (diff)
downloadaur-27c6d01adf525c04c2ef033233e7292889970e03.tar.gz
Refactor fix.
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD69
-rw-r--r--addon_path.patch16
-rw-r--r--usd_python.patch4
4 files changed, 48 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2f500801a3b..c53acf577ae 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = blender-2.82-git
- pkgdesc = Development version of Blender 2.8 branch
+ pkgdesc = Maintenance version of Blenders blender-v2.82-release branch
pkgver = 2.82.r92824.g375c7dc4caf
pkgrel = 1
url = https://blender.org/
- changelog = blender.changelog
arch = i686
arch = x86_64
license = GPL
@@ -43,17 +42,17 @@ pkgbase = blender-2.82-git
source = blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git
source = SelectCudaComputeArch.patch
source = usd_python.patch
- source = embree.patch
source = addon_path.patch
+ source = embree.patch
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = 66b9bf3db441f35119ef0eb5f855142f2e773e8002ac0216e056bcc6f8ac409c
- sha256sums = 12bd6db5c1fe14244fd7321e3d740941a36aa545ec21b02325e7553c9214778a
+ sha256sums = 893b127c9e0ea1a67905434f729b45a993c58a7ea954f9f89480ad1cc0578849
+ sha256sums = 350063cd4f234565bd928a356b4e5f65cf37fc1377904a08bf60f7010c88740b
sha256sums = 42afe119529a5350034a489225958112bf4b84bdee38757a932e5caaa9bd5ed4
- sha256sums = 81e0047ba48662ee0ec1da1ffd427641305a0edc68c7913da9460ae4c1fefe72
pkgname = blender-2.82-git
diff --git a/PKGBUILD b/PKGBUILD
index faaa4ff4001..6fe2b55b4ef 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,14 +3,14 @@
# shellcheck disable=SC2034,SC2154 # allow unused/unset variables
# shellcheck disable=SC2191 # preserve current _CMAKE_FLAGS initialization.
-# To force cuda compute arch uncomment this line and update value of sm_xx model accordingly
-#_cuda_capability+=(sm_30 sm_35 sm_37)
-#_cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75)
-((TRAVIS)) && _cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75) # Travis memory limit is not enough to build for arch 3.x.
-
# Configuration.
-_fragment="#branch=blender-v2.82-release"
+_blenver="2.82"
+_branch="blender-v${_blenver}-release"
+_fragment=${FRAGMENT:-#branch=${_branch}}
+[[ -v CUDA_ARCH ]] && _cuda_capability=${CUDA_ARCH}
+
#some extra, unofficially supported stuff goes here:
+((TRAVIS)) && _cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75) # Travis memory limit is not enough to build for arch 3.x.
_CMAKE_FLAGS+=( -DWITH_ALEMBIC_HDF5=ON )
((DISABLE_EMBREE)) || {
_CMAKE_FLAGS+=( -DWITH_CYCLES_EMBREE=ON )
@@ -25,11 +25,10 @@ _CMAKE_FLAGS+=( -DWITH_ALEMBIC_HDF5=ON )
#shellcheck disable=SC2015
((DISABLE_CUDA)) && optdepends+=('cuda: CUDA support in Cycles') || { makedepends+=('cuda') ; ((DISABLE_OPTIX)) || makedepends+=('optix>=7.0'); }
-pkgname=blender-2.82-git
+pkgname=blender-${_blenver}-git
pkgver=2.82.r92824.g375c7dc4caf
pkgrel=1
-pkgdesc="Development version of Blender 2.8 branch"
-changelog=blender.changelog
+pkgdesc="Maintenance version of Blenders ${_branch} branch"
arch=('i686' 'x86_64')
url="https://blender.org/"
depends+=('alembic' 'libgl' 'python' 'python-numpy' 'openjpeg2'
@@ -37,8 +36,8 @@ depends+=('alembic' 'libgl' 'python' 'python-numpy' 'openjpeg2'
'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng')
depends+=('openimagedenoise')
makedepends+=('git' 'cmake' 'boost' 'mesa' 'llvm')
-provides=("blender-${pkgver%%.r*}")
-conflicts=("blender-${pkgver%%.r*}")
+provides=("blender-${_blenver}")
+conflicts=("blender-${_blenver}")
license=('GPL')
# 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
@@ -52,8 +51,8 @@ source=("git://git.blender.org/blender.git${_fragment}"
'blender-dev-tools.git::git://git.blender.org/blender-dev-tools.git'
SelectCudaComputeArch.patch
usd_python.patch #add missing python headers when building against python enabled usd.
- embree.patch #add missing embree link.
addon_path.patch
+ embree.patch #add missing embree link.
)
sha256sums=('SKIP'
'SKIP'
@@ -61,9 +60,9 @@ sha256sums=('SKIP'
'SKIP'
'SKIP'
'66b9bf3db441f35119ef0eb5f855142f2e773e8002ac0216e056bcc6f8ac409c'
- '12bd6db5c1fe14244fd7321e3d740941a36aa545ec21b02325e7553c9214778a'
- '42afe119529a5350034a489225958112bf4b84bdee38757a932e5caaa9bd5ed4'
- '81e0047ba48662ee0ec1da1ffd427641305a0edc68c7913da9460ae4c1fefe72')
+ '893b127c9e0ea1a67905434f729b45a993c58a7ea954f9f89480ad1cc0578849'
+ '350063cd4f234565bd928a356b4e5f65cf37fc1377904a08bf60f7010c88740b'
+ '42afe119529a5350034a489225958112bf4b84bdee38757a932e5caaa9bd5ed4')
pkgver() {
blender_version=$(grep -Po "BLENDER_VERSION \K[0-9]{3}" "$srcdir"/blender/source/blender/blenkernel/BKE_blender_version.h)
@@ -80,11 +79,11 @@ prepare() {
if [ ! -v _cuda_capability ] && grep -q nvidia <(lsmod); then
git -C "$srcdir/blender" apply -v "${srcdir}"/SelectCudaComputeArch.patch
fi
+ if [[ -v _suffix ]]; then
+ git -C "$srcdir/blender" apply -v <(sed "s/@@_suffix@@/${_suffix}/g" "${srcdir}/addon_path.patch")
+ fi
((DISABLE_USD)) || git -C "$srcdir/blender" apply -v "${srcdir}"/usd_python.patch
((DISABLE_EMBREE)) || git -C "$srcdir/blender" apply -v "${srcdir}"/embree.patch
- if [[ -v _sufix ]]; then
- git apply -v <(sed "s/@@_sufix@@/${_sufix}/g" "${srcdir}/addon_path.patch")
- fi
}
build() {
@@ -92,7 +91,8 @@ build() {
msg "python version detected: ${_pyver}"
# determine whether we can precompile CUDA kernels
- if pacman -Qq cuda 2>&- ; then
+ _CUDA_PKG=`pacman -Qq cuda 2>/dev/null` || true
+ if [ "$_CUDA_PKG" != "" ] && ! ((DISABLE_CUDA)) ; then
_CMAKE_FLAGS+=( -DWITH_CYCLES_CUDA_BINARIES=ON
-DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda )
((DISABLE_OPTIX)) || _CMAKE_FLAGS+=( -DOPTIX_ROOT_DIR=/opt/optix )
@@ -121,37 +121,36 @@ build() {
}
package() {
- _suffix=${pkgver%%.r*}
export DESTDIR="$pkgdir"
if ((DISABLE_NINJA)); then make -C "$srcdir/build" install; else ninja -C "$srcdir/build" install; fi
- msg "add -${_suffix} suffix to desktop shortcut"
- sed -i "s/=blender/=blender-${_suffix}/g" "${pkgdir}/usr/share/applications/blender.desktop"
- sed -i "s/=Blender/=Blender-${_suffix}/g" "${pkgdir}/usr/share/applications/blender.desktop"
- mv "${pkgdir}/usr/share/applications/blender.desktop" "${pkgdir}/usr/share/applications/blender-${_suffix}.desktop"
+ msg "add -${_blenver} suffix to desktop shortcut"
+ sed -i "s/=blender/=blender-${_blenver}/g" "${pkgdir}/usr/share/applications/blender.desktop"
+ sed -i "s/=Blender/=Blender-${_blenver}/g" "${pkgdir}/usr/share/applications/blender.desktop"
+ mv "${pkgdir}/usr/share/applications/blender.desktop" "${pkgdir}/usr/share/applications/blender-${_blenver}.desktop"
- msg "add -${_suffix} suffix to binaries"
- mv "${pkgdir}/usr/bin/blender" "${pkgdir}/usr/bin/blender-${_suffix}"
- mv "${pkgdir}/usr/bin/blender-thumbnailer.py" "${pkgdir}/usr/bin/blender-${_suffix}-thumbnailer.py"
+ msg "add -${_blenver} suffix to binaries"
+ mv "${pkgdir}/usr/bin/blender" "${pkgdir}/usr/bin/blender-${_blenver}"
+ mv "${pkgdir}/usr/bin/blender-thumbnailer.py" "${pkgdir}/usr/bin/blender-${_blenver}-thumbnailer.py"
- msg "mv doc/blender to doc/blender-${_suffix}"
- mv "${pkgdir}/usr/share/doc/blender" "${pkgdir}/usr/share/doc/blender-${_suffix}"
+ msg "mv doc/blender to doc/blender-${_blenver}"
+ mv "${pkgdir}/usr/share/doc/blender" "${pkgdir}/usr/share/doc/blender-${_blenver}"
- msg "add -${_suffix} suffix to man page"
- mv "${pkgdir}/usr/share/man/man1/blender.1" "${pkgdir}/usr/share/man/man1/blender-${_suffix}.1"
+ msg "add -${_blenver} suffix to man page"
+ mv "${pkgdir}/usr/share/man/man1/blender.1" "${pkgdir}/usr/share/man/man1/blender-${_blenver}.1"
- msg "add -${_suffix} suffix to all icons"
+ msg "add -${_blenver} suffix to all icons"
while read -r icon
do
# ${filename##/*.} extra extenssion from path
# ${filename%.*} extract filename form path
# look at bash "manipulatin string"
- mv "$icon" "${icon%.*}-${_suffix}.${icon##/*.}"
+ mv "$icon" "${icon%.*}-${_blenver}.${icon##/*.}"
done < <(find "${pkgdir}/usr/share/icons" -type f)
- if [[ -e "$pkgdir/usr/share/blender/${_suffix}/scripts/addons/cycles/lib/" ]] ; then
+ if [[ -e "$pkgdir/usr/share/blender/${_blenver}${_suffix:+_$_suffix}/scripts/addons/cycles/lib/" ]] ; then
# make sure the cuda kernels are not stripped
- chmod 444 "$pkgdir"/usr/share/blender/${_suffix}/scripts/addons/cycles/lib/*
+ chmod 444 "$pkgdir"/usr/share/blender/${_blenver}${_suffix:+_$_suffix}/scripts/addons/cycles/lib/*
fi
}
# vim:set sw=2 ts=2 et:
diff --git a/addon_path.patch b/addon_path.patch
index 9b21afdf204..65df639ffaa 100644
--- a/addon_path.patch
+++ b/addon_path.patch
@@ -7,7 +7,7 @@ index 8fd6aee28da..99d61882451 100644
/* no prefix assumes a portable build which only uses bundled scripts */
if (static_path) {
- static string system_path = string(static_path) + "/blender/" + versionstr;
-+ static string system_path = string(static_path) + "/blender/" + versionstr + "_@@_sufix@@";
++ static string system_path = string(static_path) + "/blender/" + versionstr + "_@@_suffix@@";
return (GHOST_TUns8 *)system_path.c_str();
}
@@ -16,7 +16,7 @@ index 8fd6aee28da..99d61882451 100644
if (home) {
- user_path = string(home) + "/.blender/" + versionstr;
-+ user_path = string(home) + "/.blender/" + versionstr + "_@@_sufix@@";
++ user_path = string(home) + "/.blender/" + versionstr + "_@@_suffix@@";
}
else {
return NULL;
@@ -25,7 +25,7 @@ index 8fd6aee28da..99d61882451 100644
if (home) {
- user_path = string(home) + "/blender/" + versionstr;
-+ user_path = string(home) + "/blender/" + versionstr + "_@@_sufix@@";
++ user_path = string(home) + "/blender/" + versionstr + "_@@_suffix@@";
}
else {
home = getenv("HOME");
@@ -34,7 +34,7 @@ index 8fd6aee28da..99d61882451 100644
home = getpwuid(getuid())->pw_dir;
- user_path = string(home) + "/.config/blender/" + versionstr;
-+ user_path = string(home) + "/.config/blender/" + versionstr + "_@@_sufix@@";
++ user_path = string(home) + "/.config/blender/" + versionstr + "_@@_suffix@@";
}
}
@@ -47,18 +47,18 @@ index 8fb04c320a0..3102752ec97 100644
if(WITH_PYTHON_MODULE)
if(WITH_INSTALL_PORTABLE)
- set(TARGETDIR_VER ${BLENDER_VERSION})
-+ set(TARGETDIR_VER ${BLENDER_VERSION}_@@_sufix@@)
++ set(TARGETDIR_VER ${BLENDER_VERSION}_@@_suffix@@)
else()
- set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION})
-+ set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION}_@@_sufix@@)
++ set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION}_@@_suffix@@)
endif()
else()
if(WITH_INSTALL_PORTABLE)
- set(TARGETDIR_VER ${BLENDER_VERSION})
-+ set(TARGETDIR_VER ${BLENDER_VERSION}_@@_sufix@@)
++ set(TARGETDIR_VER ${BLENDER_VERSION}_@@_suffix@@)
else()
- set(TARGETDIR_VER share/blender/${BLENDER_VERSION})
-+ set(TARGETDIR_VER share/blender/${BLENDER_VERSION}_@@_sufix@@)
++ set(TARGETDIR_VER share/blender/${BLENDER_VERSION}_@@_suffix@@)
endif()
endif()
diff --git a/usd_python.patch b/usd_python.patch
index a72d75cd6f0..1834b1a1571 100644
--- a/usd_python.patch
+++ b/usd_python.patch
@@ -14,8 +14,8 @@ index ac570f17e47..505aa97934c 100644
if(NOT Boost_FOUND)
diff --git a/source/blender/usd/CMakeLists.txt b/source/blender/usd/CMakeLists.txt
index 6ea02f44d76..0ec18e17689 100644
---- a/source/blender/io/usd/CMakeLists.txt
-+++ b/source/blender/io/usd/CMakeLists.txt
+--- a/source/blender/usd/CMakeLists.txt
++++ b/source/blender/usd/CMakeLists.txt
@@ -48,6 +48,7 @@ set(INC
set(INC_SYS
${USD_INCLUDE_DIRS}