summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2019-08-01 14:31:02 +0200
committerbartus2019-08-01 16:06:50 +0200
commit5339ab3e71282bb84b2454e50d3c548a750b084b (patch)
tree56db8bf84d9022eb2aba190487f9d63602942021
parent9bf2b60890b4d910865210879d040fdad1073202 (diff)
downloadaur-5339ab3e71282bb84b2454e50d3c548a750b084b.tar.gz
Swich cmake backend to Ninja
* add DISABLE_NINJA env, allowing user to fall back to make backend
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD11
2 files changed, 9 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 62981b0263d..9e7e9f0c77f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -12,6 +12,7 @@ pkgbase = blender-fracture_modifier-git
makedepends = boost
makedepends = mesa
makedepends = llvm
+ makedepends = ninja
makedepends = cuda
depends = alembic
depends = libgl
diff --git a/PKGBUILD b/PKGBUILD
index 0b29394bc86..d18d75c5633 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,6 +21,7 @@ depends=('alembic' 'libgl' 'python' 'python-numpy' 'openjpeg' 'desktop-file-util
'openvdb' 'opencollada' 'opensubdiv' 'openshadinglanguage' 'libtiff' 'libpng')
makedepends=('git' 'cmake' 'boost' 'mesa' 'llvm')
+((DISABLE_NINJA)) || makedepends+=('ninja')
((DISABLE_CUDA)) && optdepends=('cuda: CUDA support in Cycles') || makedepends+=('cuda')
provides=("blender-${_sufix}")
conflicts=("blender-${_sufix}")
@@ -100,7 +101,10 @@ build() {
_EXTRAOPTS+=(-DCYCLES_CUDA_BINARIES_ARCH=$(IFS=';'; echo "${_cuda_capability[*]}";))
fi
fi
- cmake "$srcdir/blender" \
+
+ ((DISABLE_NINJA)) && generator="Unix Makefiles" || generator="Ninja"
+ cmake -G "$generator" "$srcdir/blender" \
+ -C${srcdir}/blender/build_files/cmake/config/blender_release.cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_INSTALL_PORTABLE=OFF \
-DWITH_PLAYER=OFF \
@@ -121,12 +125,13 @@ build() {
-DWITH_OPENVDB_BLOSC=ON \
-DWITH_OPENCOLLADA=ON \
${_EXTRAOPTS[@]}
- make
+ export NINJA_STATUS="[%p | %f<%r<%u | %cbps ] "
+ ((DISABLE_NINJA)) && make -j$(nproc) || ninja -d stats
}
package() {
cd "$srcdir/blender-build"
- make DESTDIR="$pkgdir" install
+ ((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/