2016-07-07 01:31:22 +00:00
|
|
|
# $Id$
|
2018-01-06 21:05:54 +00:00
|
|
|
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
|
|
|
# Contributor: AndyRTR <andyrtr@archlinux.org>
|
2016-07-07 01:31:22 +00:00
|
|
|
# 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
|
|
|
|
|
|
|
|
pkgbase=vigra
|
|
|
|
pkgname=('vigra' 'vigra-doc')
|
2017-05-30 23:37:48 +00:00
|
|
|
pkgver=1.11.1
|
2018-03-13 00:09:36 +00:00
|
|
|
pkgrel=6
|
2018-01-06 21:05:54 +00:00
|
|
|
pkgdesc="Computer vision library"
|
|
|
|
arch=('x86_64')
|
2017-05-30 23:37:48 +00:00
|
|
|
url="https://ukoethe.github.io/vigra/"
|
2016-07-07 01:31:22 +00:00
|
|
|
license=('custom:MIT')
|
|
|
|
makedepends=(# runtime deps
|
|
|
|
'libpng' 'libtiff' 'openexr' 'gcc-libs' 'sh' 'hdf5' 'fftw'
|
|
|
|
# additional makedeps
|
2018-03-13 00:09:36 +00:00
|
|
|
'cmake' 'boost' 'python-numpy')
|
|
|
|
checkdepends=('python-nose')
|
2018-01-06 21:05:54 +00:00
|
|
|
source=("https://github.com/ukoethe/vigra/releases/download/Version-${pkgver//./-}/vigra-${pkgver}-src.tar.gz")
|
2017-05-30 23:37:48 +00:00
|
|
|
sha256sums=('a5564e1083f6af6a885431c1ee718bad77d11f117198b277557f8558fa461aaf')
|
2016-07-07 01:31:22 +00:00
|
|
|
|
2018-01-06 21:05:54 +00:00
|
|
|
prepare() {
|
|
|
|
mkdir -p build
|
|
|
|
}
|
|
|
|
|
2016-07-07 01:31:22 +00:00
|
|
|
build() {
|
2018-01-06 21:05:54 +00:00
|
|
|
cd build
|
|
|
|
cmake ../${pkgbase}-${pkgver} \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
2016-07-07 01:31:22 +00:00
|
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python \
|
|
|
|
-DWITH_OPENEXR=true \
|
|
|
|
-DWITH_VIGRANUMPY=1 \
|
|
|
|
-DDOCINSTALL=share/doc \
|
|
|
|
$([ $CARCH == arm ] && echo "-DCMAKE_CXX_FLAGS=-std=c++11 -DWITH_BOOST_THREAD=1")
|
|
|
|
make
|
|
|
|
}
|
|
|
|
|
2018-01-06 21:05:54 +00:00
|
|
|
check() {
|
|
|
|
cd build
|
|
|
|
make -j1 -k check || warning "Tests failed" # https://github.com/ukoethe/vigra/issues/409
|
|
|
|
}
|
2016-07-07 01:31:22 +00:00
|
|
|
|
|
|
|
package_vigra() {
|
|
|
|
pkgdesc="Computer vision library"
|
|
|
|
depends=('libpng' 'libtiff' 'openexr' 'gcc-libs' 'sh' 'hdf5' 'fftw')
|
|
|
|
optdepends=('python: for python bindings'
|
|
|
|
'boost-libs: for python bindings')
|
|
|
|
|
2018-01-06 21:05:54 +00:00
|
|
|
cd build
|
2016-07-07 01:31:22 +00:00
|
|
|
make DESTDIR="${pkgdir}" install
|
2018-01-06 21:05:54 +00:00
|
|
|
|
2018-03-13 00:09:36 +00:00
|
|
|
install -Dm644 "${srcdir}"/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
2016-07-07 01:31:22 +00:00
|
|
|
|
2018-01-06 21:05:54 +00:00
|
|
|
# Remove doc
|
2016-07-07 01:31:22 +00:00
|
|
|
rm -rf "${pkgdir}"/usr/share/doc
|
|
|
|
}
|
|
|
|
|
|
|
|
package_vigra-doc() {
|
|
|
|
pkgdesc="Computer vision library - documentation and examples"
|
2018-01-06 21:05:54 +00:00
|
|
|
#arch=('any') # Not supported for now, maybe later
|
2016-07-07 01:31:22 +00:00
|
|
|
|
2018-01-06 21:05:54 +00:00
|
|
|
cd build
|
2016-07-07 01:31:22 +00:00
|
|
|
make DESTDIR="${pkgdir}" install
|
2018-01-06 21:05:54 +00:00
|
|
|
|
|
|
|
# Remove vigra package content
|
2016-07-07 01:31:22 +00:00
|
|
|
rm -rf "${pkgdir}"/usr/{bin,include,lib}
|
|
|
|
|
2018-03-13 00:09:36 +00:00
|
|
|
install -Dm644 "${srcdir}"/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
2016-07-07 01:31:22 +00:00
|
|
|
}
|