PKGBUILDs/community/vigra/PKGBUILD
2021-10-08 23:53:38 +00:00

59 lines
1.8 KiB
Bash

# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - build v5 with -DCMAKE_CXX_FLAGS=-std=c++11 -DWITH_BOOST_THREAD=1 to fix FTBFS
pkgname=vigra
pkgver=1.11.1.r45+g8acd73a5
pkgrel=3
pkgdesc="Computer vision library"
arch=(x86_64)
url="https://ukoethe.github.io/vigra/"
license=(custom:MIT)
depends=(libpng libtiff openexr gcc-libs sh hdf5 fftw)
makedepends=(git cmake boost python-numpy)
checkdepends=(python-nose)
optdepends=('python: for python bindings'
'boost-libs: for python bindings')
source=(git+https://github.com/ukoethe/vigra#commit=8acd73a5e0408326e2a3c1ed1c2c70ffe2b954d0
vigra-openexr3.patch)
sha256sums=(SKIP
2572717e39f916c7c463b8f49306b683c5923906be2721f7da181c58b3a2b34b)
pkgver() {
cd ${pkgname}
git describe --long --tags | sed 's/^Version-//;s/\([^-]*-g\)/r\1/;s/-/./g;s/\.g/+g/'
}
prepare() {
cd ${pkgbase}
# Fix build with openexr 3
patch -p1 < ../vigra-openexr3.patch
}
build() {
cmake -B build -S ${pkgbase} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python \
-DWITH_OPENEXR=true \
-DWITH_VIGRANUMPY=1 \
-DDOCINSTALL=share/doc \
-DCMAKE_C_FLAGS="-DH5_USE_110_API" \
-DCMAKE_CXX_FLAGS="-DH5_USE_110_API" \
$([ $CARCH == arm ] && echo "-DCMAKE_CXX_FLAGS=-std=c++11 -DWITH_BOOST_THREAD=1")
make -C build
}
# Numerous failures, upstream almost dead
# https://github.com/ukoethe/vigra/issues/409
# https://github.com/ukoethe/vigra/issues/491
#check() {
# make -C build -j1 -k check
#}
package() {
make -C build DESTDIR="${pkgdir}" install
install -Dm644 ${pkgbase}/LICENSE.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}/
}