diff options
author | bartus | 2020-03-17 18:16:11 +0100 |
---|---|---|
committer | bartus | 2020-03-17 18:16:32 +0100 |
commit | b802ee446991913da523dea4ccde86e8fb0e517c (patch) | |
tree | a4e65b2cdf0899838c8455c736b5098ff6e21a58 /PKGBUILD | |
parent | d47958c0e8ef22ed812c1f282758d41d370ab5cf (diff) | |
download | aur-b802ee446991913da523dea4ccde86e8fb0e517c.tar.gz |
Refactor
* drop unneeded install file.
* fix desktop file name.
* change checksums md5>sha256.
* init vcglib submodule.
* fix pkgver().
* fix ninja MAKEFLAGS: allow split, prevent nproc autodetect.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 22 insertions, 13 deletions
@@ -1,6 +1,10 @@ +#!/usr/hint/bash # Maintainer : bartus <arch-user-repoᘓbartus.33mail.com> -pkgname=meshlab-git -pkgver=2020.01.r1.g07c8855a +# shellcheck disable=SC2034,SC2154 # allow unused/uninitialized variables. + +_name="meshlab" +pkgname="$_name-git" +pkgver=2020.03.r36.gd0fa7a31f pkgrel=1 pkgdesc="System for processing and editing of unstructured 3D models arising in 3D scanning (qt5 version)" arch=('i686' 'x86_64') @@ -16,32 +20,37 @@ 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 -install="${pkgname}.install" -source=("git+https://github.com/cnr-isti-vclab/meshlab.git" - "git+https://github.com/cnr-isti-vclab/vcglib.git#branch=devel" +source=("$_name::git+https://github.com/cnr-isti-vclab/meshlab.git" + "vcglib::git+https://github.com/cnr-isti-vclab/vcglib.git" + "desktop.patch" "meshlab.desktop") sha256sums=('SKIP' 'SKIP' + '485cac3630d937c986f8d8c772419bed6221cedd698d9aa0314afc67c926a782' '030ab1dcafb7d793bed3bc455497208addadf1091a4619576fe7e044aed4231a') +prepare() { + git -C "${srcdir}/${_name}" submodule init + git -C "${srcdir}/${_name}" config submodule.vcglib.url "$srcdir"/vcglib + git -C "${srcdir}/${_name}" submodule update + git -C "${srcdir}/${_name}" apply -v "${srcdir}/desktop.patch" +} + pkgver() { - cd ${srcdir}/${pkgname%-git} - git describe --long --tags | sed 's/Meshlab-\([0-9]*-[0-9]*\)-[a-z0-9]*-/\1-/g;s/\([^-]*-g\)/r\1/;s/-/./g' + git -C "${srcdir}/${_name}" describe --long --tags | sed 's/Meshlab-//g;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { local cmake_flags=( '-DALLOW_SYSTEM_QHULL=OFF' '-DCMAKE_INSTALL_PREFIX=/usr' ) - mkdir -p "${srcdir}/build" - cmake "${cmake_flags[@]}" -G Ninja -B "${srcdir}/build" "${srcdir}/meshlab/src" - cd "${srcdir}/build" - ninja $([ -v MAKEFLAGS ] || echo -j1) + 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" } package() { - cd "${srcdir}/build" - DESTDIR="$pkgdir" ninja install + DESTDIR="$pkgdir" ninja -C "${srcdir}/build" install } # vim:set ts=2 sw=2 et: |