summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Hirzel2020-12-10 20:41:00 -0500
committerAlex Hirzel2020-12-10 20:41:00 -0500
commit214c1f0d96c8e33697a3f036827ea503c29d60d7 (patch)
treef5483b8c6ea5b4f01c537949687d4bc9ff2cf6ab
parent8b4e6e293d79fc4b56ee57525002c974d15351c7 (diff)
downloadaur-214c1f0d96c8e33697a3f036827ea503c29d60d7.tar.gz
customize mitsuba.conf and default to the scalar_rgb renderer
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD9
2 files changed, 9 insertions, 1 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 53b18160221f..6b5d48921ff9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -17,6 +17,7 @@ pkgbase = mitsuba2-git
makedepends = python-sphinx
makedepends = python-guzzle-sphinx-theme
makedepends = python-sphinxcontrib-bibtex
+ makedepends = jq
depends = libpng
depends = libjpeg-turbo
depends = libc++
diff --git a/PKGBUILD b/PKGBUILD
index 412dce130932..2cbe8ff768c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,7 +9,7 @@ url="https://www.mitsuba-renderer.org/"
license=('custom')
groups=()
depends=('libpng' 'libjpeg-turbo' 'libc++' 'pybind11' 'pugixml' 'tbb')
-makedepends=('clang' 'git' 'cmake' 'ninja' 'patchelf' 'python' 'python-sphinx' 'python-guzzle-sphinx-theme' 'python-sphinxcontrib-bibtex')
+makedepends=('clang' 'git' 'cmake' 'ninja' 'patchelf' 'python' 'python-sphinx' 'python-guzzle-sphinx-theme' 'python-sphinxcontrib-bibtex' 'jq')
checkdepends=('python-pytest' 'python-pytest-xdist' 'python-numpy')
install=
source=('swap_pybind.patch'
@@ -61,6 +61,13 @@ prepare() {
# not used with the current build options
rmdir ext/embree ext/nanogui
+
+ # generate the mitsuba.conf file with only one renderer (RGB)
+ # NOTE: change this if you want to build something else
+ grep -v '#' < "$srcdir/${pkgname%-git}"/resources/mitsuba.conf.template \
+ | jq '.["enabled"] = ["scalar_rgb"]' \
+ | jq '.["default"] = "scalar_rgb"' \
+ > "$srcdir/${pkgname%-git}"/mitsuba.conf
}
build() {