[arch-commits] Commit in vigra/trunk (PKGBUILD)

Bruno Pagani archange at archlinux.org
Fri Apr 24 16:15:19 UTC 2020


    Date: Friday, April 24, 2020 @ 16:15:18
  Author: archange
Revision: 619321

hdf5 1.12 rebuild

Temporarily fallback to H110 API to allow building while waiting for an
upstream fix.

Also some PKGBUILD linting.

Modified:
  vigra/trunk/PKGBUILD

----------+
 PKGBUILD |   39 ++++++++++++++++++---------------------
 1 file changed, 18 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-24 15:45:28 UTC (rev 619320)
+++ PKGBUILD	2020-04-24 16:15:18 UTC (rev 619321)
@@ -3,26 +3,25 @@
 # Contributor: Lukas Jirkovsky <l.jirkovsky at gmail.com>
 
 pkgbase=vigra
-pkgname=('vigra' 'vigra-doc')
+pkgname=(vigra vigra-doc)
 pkgver=1.11.1
-pkgrel=21
+pkgrel=22
 pkgdesc="Computer vision library"
-arch=('x86_64')
+arch=(x86_64)
 url="https://ukoethe.github.io/vigra/"
-license=('custom:MIT')
+license=(custom:MIT)
 makedepends=(# runtime deps
-             'libpng' 'libtiff' 'openexr' 'gcc-libs' 'sh' 'hdf5' 'fftw'
+             libpng libtiff openexr gcc-libs sh hdf5 fftw
              # additional makedeps
-             'cmake' 'boost' 'python-numpy')
-checkdepends=('python-nose')
+             cmake boost python-numpy)
+checkdepends=(python-nose)
 source=("https://github.com/ukoethe/vigra/releases/download/Version-${pkgver//./-}/vigra-${pkgver}-src.tar.gz"
-        'fix-incorrect-template-parameter-type.patch' 'py3.7.diff')
+        fix-incorrect-template-parameter-type.patch py3.7.diff)
 sha256sums=('a5564e1083f6af6a885431c1ee718bad77d11f117198b277557f8558fa461aaf'
             'f151f902483dfa2b1f3d431f54bb161300cf184158c9f416fa653d19ab363cc4'
             '8fcdcce50c377be44387cbd4a001dadf5e03b32483de55c05a359c887e95a05b')
 
 prepare() {
-  mkdir -p build
   cd ${pkgbase}-${pkgver}
   # https://github.com/ukoethe/vigra/issues/414
   patch -Np1 -i ../fix-incorrect-template-parameter-type.patch
@@ -31,19 +30,19 @@
 }
 
 build() {
-  cd build
-  cmake ../${pkgbase}-${pkgver} \
+  cmake -B build -S ${pkgbase}-${pkgver} \
       -DCMAKE_INSTALL_PREFIX=/usr \
       -DPYTHON_EXECUTABLE=/usr/bin/python \
       -DWITH_OPENEXR=true \
       -DWITH_VIGRANUMPY=1 \
-      -DDOCINSTALL=share/doc
-  make
+      -DDOCINSTALL=share/doc \
+      -DCMAKE_C_FLAGS="-DH5_USE_110_API" \
+      -DCMAKE_CXX_FLAGS="-DH5_USE_110_API"
+  make -C build
 }
 
 check() {
-  cd build
-  make -j1 -k check || warning "Tests failed" # https://github.com/ukoethe/vigra/issues/409
+  make -C build -j1 -k check || warning "Tests failed" # https://github.com/ukoethe/vigra/issues/409
 }
 
 package_vigra() {
@@ -52,10 +51,9 @@
   optdepends=('python: for python bindings'
               'boost-libs: for python bindings')
 
-  cd build
-  make DESTDIR="${pkgdir}" install
+  make -C build DESTDIR="${pkgdir}" install
 
-  install -Dm644 "${srcdir}"/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  install -Dm644 ${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
   
   # Remove doc
   rm -rf "${pkgdir}"/usr/share/doc
@@ -65,11 +63,10 @@
   pkgdesc="Computer vision library - documentation and examples"
   #arch=('any') # Not supported for now, maybe later
 
-  cd build
-  make DESTDIR="${pkgdir}" install
+  make -C build DESTDIR="${pkgdir}" install
 
   # Remove vigra package content
   rm -rf "${pkgdir}"/usr/{bin,include,lib}
 
-  install -Dm644 "${srcdir}"/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  install -Dm644 ${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 }



More information about the arch-commits mailing list