core/vigra/PKGBUILD

63 lines
1.7 KiB
Bash
Raw Normal View History

pkgbase=vigra
pkgname=('vigra' 'vigra-doc')
2018-01-19 07:35:30 +08:00
pkgver=1.11.1
2018-01-30 07:38:11 +08:00
pkgrel=3
arch=('x86_64')
2011-04-25 00:19:16 +08:00
url="http://hci.iwr.uni-heidelberg.de/vigra/"
license=('custom:MIT')
2017-03-17 23:59:41 +08:00
makedepends=(# runtime deps
'libpng' 'libtiff' 'openexr' 'gcc-libs' 'sh' 'hdf5' 'fftw'
# buildtime deps
2018-01-19 07:35:30 +08:00
'cmake' 'python3-nose' 'doxygen' 'python3-sphinx' 'boost' 'python3-numpy')
2017-03-17 23:59:41 +08:00
source=("https://github.com/ukoethe/vigra/releases/download/Version-${pkgver//./-}/${pkgname}-${pkgver}-src.tar.gz")
2018-01-19 07:35:30 +08:00
md5sums=('e72faf9fb82fa71fa63ba064bb63b703')
prepare() {
mkdir -p build
}
2011-04-25 00:19:16 +08:00
build() {
2018-01-19 07:35:30 +08:00
cd build
cmake ../${pkgbase}-${pkgver} \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
2017-03-17 23:59:41 +08:00
-DWITH_OPENEXR=true \
-DWITH_VIGRANUMPY=1 \
2018-01-19 07:35:30 +08:00
-DDOCDIR=../build/doc \
2017-03-17 23:59:41 +08:00
-DDOCINSTALL=share/doc
2011-04-25 00:19:16 +08:00
make
}
2018-01-19 07:35:30 +08:00
check() {
cd build
make -j1 -k check || warning "Tests failed" # https://github.com/ukoethe/vigra/issues/409
}
package_vigra() {
2017-03-17 23:59:41 +08:00
pkgdesc="Computer vision library"
depends=('libpng' 'libtiff' 'openexr' 'gcc-libs' 'sh' 'hdf5' 'fftw')
2018-01-19 07:35:30 +08:00
optdepends=('python3: for python bindings'
'boost-libs: for python bindings')
2018-01-19 07:35:30 +08:00
cd build
make DESTDIR="${pkgdir}" install
2018-01-19 07:35:30 +08:00
install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
2017-03-17 23:59:41 +08:00
2018-01-19 07:35:30 +08:00
# Remove doc
rm -rf "${pkgdir}"/usr/share/doc
}
package_vigra-doc() {
2017-03-17 23:59:41 +08:00
pkgdesc="Computer vision library - documentation and examples"
2018-01-19 07:35:30 +08:00
#arch=('any') # Not supported for now, maybe later
2018-01-19 07:35:30 +08:00
cd build
2011-04-25 00:19:16 +08:00
make DESTDIR="${pkgdir}" install
2018-01-19 07:35:30 +08:00
# Remove vigra package content
rm -rf "${pkgdir}"/usr/{bin,include,lib}
2018-01-19 07:35:30 +08:00
install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
2011-04-25 00:19:16 +08:00
}