void-packages/srcpkgs/qhull/template

47 lines
1.3 KiB
Bash

# Template file for 'qhull'
pkgname=qhull
version=2020.2
revision=1
build_style=cmake
make_build_target="all libqhull"
short_desc="Computes volumes, surface areas and approximations to the convex hull"
maintainer="Martin Riese <grauehaare@gmx.de>"
license="Qhull"
homepage="http://www.qhull.org"
changelog="http://www.qhull.org/src/Changes.txt"
distfiles="https://github.com/qhull/qhull/archive/$version.tar.gz"
checksum=59356b229b768e6e2b09a701448bfa222c37b797a84f87f864f97462d8dbc7c5
post_install() {
vlicense COPYING.txt
# Manually install libqhull which the package author has deprecated,
# but octave and matplotlib still require.
cp -r ${wrksrc}/build/libqhull.so* ${DESTDIR}/usr/lib
install -Dm644 ${FILESDIR}/qhull.pc ${DESTDIR}/usr/lib/pkgconfig/qhull.pc
sed -i "s|@VERSION@|${version}|" ${DESTDIR}/usr/lib/pkgconfig/qhull.pc
# convenience links for backwards compatibility (required by at least octave)
ln -sf libqhull ${DESTDIR}/usr/include/qhull
ln -sf libqhull.h ${DESTDIR}/usr/include/qhull/qhull.h
}
libqhull_package() {
short_desc+=" - runtime libraries"
pkg_install() {
vmove usr/lib/*.so.*
vlicense COPYING.txt
}
}
libqhull-devel_package() {
depends="libqhull>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/*.a
vmove usr/lib/*.so
vmove usr/lib/pkgconfig
}
}