diff options
author | bartus | 2022-05-21 14:11:18 +0200 |
---|---|---|
committer | bartus | 2022-05-21 14:18:03 +0200 |
commit | 6683832869d7535e6f2310b723eb07ca44fa681b (patch) | |
tree | e05162ea12f89621ba54951be1f83a8b01e0b637 | |
parent | 416486fa6284387fbe2e2e82a10d230efe31ff02 (diff) | |
download | aur-6683832869d7535e6f2310b723eb07ca44fa681b.tar.gz |
Add env var configuration
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 22 |
2 files changed, 18 insertions, 6 deletions
@@ -33,7 +33,7 @@ pkgbase = meshlab-git optdepends = mpir: for Constructive Solid Geometry operation filters provides = meshlab conflicts = meshlab - source = meshlab::git+https://github.com/cnr-isti-vclab/meshlab.git + source = meshlab::git+https://github.com/cnr-isti-vclab/meshlab.git#branch=main source = vcglib::git+https://github.com/cnr-isti-vclab/vcglib.git source = nexus::git+https://github.com/cnr-isti-vclab/nexus.git source = corto::git+https://github.com/cnr-isti-vclab/corto.git @@ -2,6 +2,18 @@ # Maintainer : bartus <arch-user-repoᘓbartus.33mail.com> # shellcheck disable=SC2034,SC2154 # allow unused/uninitialized variables. +#Configuration: +#Use: makepkg VAR1=0 VAR2=1 to enable(1) disable(0) a feature +#Use: {yay,paru} --mflags=VAR1=0,VAR2=1 +#Use: aurutils --margs=VAR1=0,VAR2=1 +#Use: VAR1=0 VAR2=1 pamac + +# Use FRAGMENT={commit,tag,brach}=xxx for bisect build +_fragment="#${FRAGMENT:-branch=main}" + +# Use CMAKE_FLAGS=xxx:yyy:zzz to define extra CMake flags +[[ -v CMAKE_FLAGS ]] && mapfile -t -d: _cmake_flags < <(echo -n "$CMAKE_FLAGS") + _name="meshlab" pkgname="$_name-git" pkgver=2021.10.r66.gd9d9ed105 @@ -20,7 +32,7 @@ optdepends=('u3d: for U3D and IDTF file support' 'muparser: for filer_func plugins' 'mpir: for Constructive Solid Geometry operation filters') #also create openctm(aur) jhead-lib structuresynth-lib to handle last dep -source=("$_name::git+https://github.com/cnr-isti-vclab/meshlab.git" +source=("$_name::git+https://github.com/cnr-isti-vclab/meshlab.git${_fragment}" ) sha256sums=('SKIP' 'SKIP' @@ -38,10 +50,10 @@ pkgver() { } build() { - local cmake_flags=( '-DALLOW_SYSTEM_QHULL=OFF' - '-DCMAKE_INSTALL_PREFIX=/usr' - ) - cmake "${cmake_flags[@]}" -G Ninja -B "${srcdir}/build" -S "${srcdir}/meshlab/src" + _cmake_flags+=( '-DALLOW_SYSTEM_QHULL=OFF' + '-DCMAKE_INSTALL_PREFIX=/usr' + ) + cmake "${_cmake_flags[@]}" -G Ninja -B "${srcdir}/build" -S "${srcdir}/meshlab/src" # shellcheck disable=SC2086 # allow MAKEFLAGS to split when passing multiple flags. ninja ${MAKEFLAGS:--j1} -C "${srcdir}/build" } |