void-packages/srcpkgs/flintlib/template

42 lines
1.2 KiB
Bash

# Template file for 'flintlib'
pkgname=flintlib
version=2.8.5
revision=1
wrksrc="flint-${version}"
build_style=configure
configure_args="--prefix=/usr $(vopt_with ntl)
$(vopt_if openblas --with-blas=${XBPS_CROSS_BASE}/usr/include/openblas)"
makedepends="mpfr-devel $(vopt_if ntl ntl-devel)
$(vopt_if openblas openblas-devel)"
short_desc="Fast Library for Number Theory"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="LGPL-2.1-or-later"
homepage="https://flintlib.org"
changelog="https://raw.githubusercontent.com/wbhart/flint2/trunk/NEWS"
distfiles="https://flintlib.org/flint-${version}.tar.gz"
checksum=5911fedff911100f15781f35e3a4fa934fe60e4aea02a8c10cc8918101c1eed8
build_options="ntl openblas"
desc_option_ntl="enable NTL support"
build_options_default=""
if [ -z "$CROSS_BUILD" ]; then
build_options_default+=" ntl"
fi
case "$XBPS_TARGET_MACHINE" in
x86_64*|i686*|aarch64*|arm*|ppc64*) build_options_default+=" openblas";;
esac
CFLAGS="-D_GNU_SOURCE" # needed for cpu_set_t
flintlib-devel_package() {
depends="${sourcepkg}>=${version}_${revision} mpfr-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}