summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-02-06 19:12:49 +0100
committerbartus2020-02-06 19:12:49 +0100
commit2eec89c7d3c56b51e085d25cf4c63b7832b481d7 (patch)
tree2d4112edeced4c0069caf0a8d0f5be15376aa84d
parent2e1b02c9baa5372d6f494e46343bcd4127983866 (diff)
downloadaur-2eec89c7d3c56b51e085d25cf4c63b7832b481d7.tar.gz
Proper way to avoid conflict with other blender versions.
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD18
-rw-r--r--addon_path.patch64
3 files changed, 77 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 41bd44f40184..5119564e1eab 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = blender-fracture_modifier-git
pkgdesc = Development version of Blenders fracture_modifier branch
- pkgver = v2.79b.r2168.g969fca718a4
+ pkgver = 2.79b.r2169.g233ad61cb8d
pkgrel = 1
url = https://blender.org/
install = blender.install
@@ -13,7 +13,6 @@ pkgbase = blender-fracture_modifier-git
makedepends = mesa
makedepends = llvm
makedepends = ninja
- makedepends = cuda
depends = alembic
depends = libgl
depends = python
@@ -53,6 +52,7 @@ pkgbase = blender-fracture_modifier-git
source = oiio-2.0.patch
source = Cleanup-use-PyImport_GetModuleDict.patch
source = python3.8.patch
+ source = addon_path.patch
md5sums = SKIP
md5sums = SKIP
md5sums = SKIP
@@ -69,6 +69,7 @@ pkgbase = blender-fracture_modifier-git
md5sums = f98eb0576a8e00444cc3e936d31a9812
md5sums = 1fafe7b27c376f0fd8b7bb7985deef6e
md5sums = 54caa2acab217f8abb9a00ef05f1d0d7
+ md5sums = 88097ddbca087f932f8805f0caa185f4
pkgname = blender-fracture_modifier-git
diff --git a/PKGBUILD b/PKGBUILD
index 51091c338c74..92f19845ab8d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,10 +8,10 @@
_branch="fracture_modifier"
_sufix=${_branch}
-_blenver=2.82
_fragment="#branch=${_branch}"
pkgname=blender-${_sufix}-git
-pkgver=v2.79b.r2168.g969fca718a4
+pkgver=2.79b.r2169.g233ad61cb8d
+_blenver=${pkgver:0:4}
pkgrel=1
pkgdesc="Development version of Blenders ${_branch} branch"
arch=('i686' 'x86_64')
@@ -49,6 +49,7 @@ source=("git://git.blender.org/blender.git${_fragment}"
oiio-2.0.patch
Cleanup-use-PyImport_GetModuleDict.patch
python3.8.patch
+ addon_path.patch
)
md5sums=('SKIP'
'SKIP'
@@ -65,11 +66,12 @@ md5sums=('SKIP'
'4e4423315f07bc724c7703c57c4481d7'
'f98eb0576a8e00444cc3e936d31a9812'
'1fafe7b27c376f0fd8b7bb7985deef6e'
- '54caa2acab217f8abb9a00ef05f1d0d7')
+ '54caa2acab217f8abb9a00ef05f1d0d7'
+ '88097ddbca087f932f8805f0caa185f4')
pkgver() {
cd "$srcdir/blender"
- git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
@@ -87,14 +89,14 @@ prepare() {
git apply -v ${srcdir}/oiio-2.0.patch
git apply -v ${srcdir}/Cleanup-use-PyImport_GetModuleDict.patch
git apply -v ${srcdir}/python3.8.patch
- msg "change BLENDER_VERSION to ${_blenver/./}"
- sed -i "/#define BLENDER_VERSION */s/279/${_blenver/./}/" source/blender/blenkernel/BKE_blender_version.h
+ sed -i "s/@@_sufix@@/${_sufix}/g" ${srcdir}/addon_path.patch
+ git apply -v ${srcdir}/addon_path.patch
}
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}"
@@ -140,7 +142,7 @@ package() {
((DISABLE_NINJA)) && make install DESTDIR="$pkgdir" || DESTDIR="$pkgdir" ninja install
msg "install fracture-helper addon"
- install ${srcdir}/blender-fracture-helper/*.py ${pkgdir}/usr/share/blender/${_blenver}/scripts/addons/
+ install ${srcdir}/blender-fracture-helper/*.py ${pkgdir}/usr/share/blender/${_blenver}_${_sufix}/scripts/addons/
msg "add -${_sufix} sufix to desktop shortcut"
sed -i "s/=blender/=blender-${_sufix}/g" ${pkgdir}/usr/share/applications/blender.desktop
diff --git a/addon_path.patch b/addon_path.patch
new file mode 100644
index 000000000000..9b21afdf2045
--- /dev/null
+++ b/addon_path.patch
@@ -0,0 +1,64 @@
+diff --git a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp b/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
+index 8fd6aee28da..99d61882451 100644
+--- a/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
++++ b/intern/ghost/intern/GHOST_SystemPathsUnix.cpp
+@@ -56,7 +56,7 @@ const GHOST_TUns8 *GHOST_SystemPathsUnix::getSystemDir(int, const char *versions
+ {
+ /* 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@@";
+ return (GHOST_TUns8 *)system_path.c_str();
+ }
+
+@@ -77,7 +77,7 @@ const GHOST_TUns8 *GHOST_SystemPathsUnix::getUserDir(int version, const char *ve
+ last_version = version;
+
+ if (home) {
+- user_path = string(home) + "/.blender/" + versionstr;
++ user_path = string(home) + "/.blender/" + versionstr + "_@@_sufix@@";
+ }
+ else {
+ return NULL;
+@@ -92,7 +92,7 @@ const GHOST_TUns8 *GHOST_SystemPathsUnix::getUserDir(int version, const char *ve
+ last_version = version;
+
+ if (home) {
+- user_path = string(home) + "/blender/" + versionstr;
++ user_path = string(home) + "/blender/" + versionstr + "_@@_sufix@@";
+ }
+ else {
+ home = getenv("HOME");
+@@ -100,7 +100,7 @@ const GHOST_TUns8 *GHOST_SystemPathsUnix::getUserDir(int version, const char *ve
+ if (home == NULL)
+ home = getpwuid(getuid())->pw_dir;
+
+- user_path = string(home) + "/.config/blender/" + versionstr;
++ user_path = string(home) + "/.config/blender/" + versionstr + "_@@_sufix@@";
+ }
+ }
+
+diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+index 8fb04c320a0..3102752ec97 100644
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -303,15 +303,15 @@ endif()
+ if(UNIX AND NOT APPLE)
+ if(WITH_PYTHON_MODULE)
+ if(WITH_INSTALL_PORTABLE)
+- set(TARGETDIR_VER ${BLENDER_VERSION})
++ set(TARGETDIR_VER ${BLENDER_VERSION}_@@_sufix@@)
+ else()
+- set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION})
++ set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION}_@@_sufix@@)
+ endif()
+ else()
+ if(WITH_INSTALL_PORTABLE)
+- set(TARGETDIR_VER ${BLENDER_VERSION})
++ set(TARGETDIR_VER ${BLENDER_VERSION}_@@_sufix@@)
+ else()
+- set(TARGETDIR_VER share/blender/${BLENDER_VERSION})
++ set(TARGETDIR_VER share/blender/${BLENDER_VERSION}_@@_sufix@@)
+ endif()
+ endif()
+