summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-06-28 09:31:32 +0200
committerbartus2020-06-28 09:34:04 +0200
commitdc9f00db3b022809483dcc2155127c0586b2c618 (patch)
tree5af78fdf86e45b7e6b9207e3798fec151a50666b
parent6158611443968494220768e150e5d69d64cad557 (diff)
downloadaur-dc9f00db3b022809483dcc2155127c0586b2c618.tar.gz
Add denoise.patch
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD13
-rw-r--r--denoise.patch21
3 files changed, 32 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5f90bd58bce..bd37ad8ac5c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,7 +9,9 @@ pkgbase = blender-plugin-luxcorerender-git
provides = blender-plugin-luxcorerender
conflicts = blender-plugin-luxcorerender
source = luxcorerender::git+https://github.com/LuxCoreRender/BlendLuxCore.git
+ source = denoise.patch
sha256sums = SKIP
+ sha256sums = 63103ec3bf77c502a54f6f74cad020a448c9641be90202944c46bda0a1ff8bfe
pkgname = blender-plugin-luxcorerender-git
depends = blender>=2.80
diff --git a/PKGBUILD b/PKGBUILD
index 23295bf4ff3..d8cb789087f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,12 +14,17 @@ license=('GPL')
makedepends=(git)
conflicts=(blender-plugin-luxcorerender)
provides=(blender-plugin-luxcorerender)
-source=("${_name}::git+https://github.com/LuxCoreRender/BlendLuxCore.git${_fragment}")
-sha256sums=("SKIP")
+source=("${_name}::git+https://github.com/LuxCoreRender/BlendLuxCore.git${_fragment}"
+ "denoise.patch")
+sha256sums=('SKIP'
+ '63103ec3bf77c502a54f6f74cad020a448c9641be90202944c46bda0a1ff8bfe')
+
+prepare() {
+ git -C "${_name}" apply -v "${srcdir}/denoise.patch"
+}
pkgver() {
- cd "${srcdir}/${_name}"
- git describe --long --tags --match blendluxcore_v* | sed 's/^blendluxcore_v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+ git -C "${_name}" describe --long --tags --match blendluxcore_v* | sed 's/^blendluxcore_v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
package() {
diff --git a/denoise.patch b/denoise.patch
new file mode 100644
index 00000000000..4c74a4a1690
--- /dev/null
+++ b/denoise.patch
@@ -0,0 +1,21 @@
+diff -Naur BlendLuxCore-blendluxcore_v2.2/draw/viewport.py BlendLuxCore-blendluxcore_v2.2-patch/draw/viewport.py
+--- BlendLuxCore-blendluxcore_v2.2/draw/viewport.py 2019-09-30 12:40:01.000000000 +0200
++++ BlendLuxCore-blendluxcore_v2.2-patch/draw/viewport.py 2019-11-28 08:19:28.433741235 +0100
+@@ -8,6 +8,7 @@
+ from ..bin import pyluxcore
+ from .. import utils
+ from ..utils import pfm
++from shutil import which
+
+ NULL = 0
+
+@@ -72,8 +73,7 @@
+ self._albedo_file_path = self._make_denoiser_filepath("albedo")
+ self._normal_file_path = self._make_denoiser_filepath("normal")
+ self._denoised_file_path = self._make_denoiser_filepath("denoised")
+- current_dir = os.path.dirname(os.path.realpath(__file__))
+- self._denoiser_path = os.path.join(os.path.dirname(current_dir), "bin", "denoise")
++ self._denoiser_path = which('denoise')
+ if platform.system() == "Windows":
+ self._denoiser_path += ".exe"
+ self._denoiser_process = None