# Template file for 'lcalc'
pkgname=lcalc
version=2.1.0
revision=1
build_style=gnu-configure
configure_args="--with-pari"
hostmakedepends="automake libtool pkg-config gengetopt"
makedepends="gmp-devel pari-devel"
short_desc="Michael Rubinstein's L-function calculator"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-2.0-or-later"
homepage="https://gitlab.com/sagemath/lcalc"
changelog="https://gitlab.com/sagemath/lcalc/-/raw/master/doc/ChangeLog"
distfiles="https://gitlab.com/sagemath/lcalc/-/archive/${version}/lcalc-${version}.tar.bz2"
checksum=463f26cc42262a90440fcec95a56cc267f00d6ac9870dfe1f4838359696664d5

case $XBPS_TARGET_MACHINE in
	# avoid numerical noise caused by extended-precision of registers
	i686*) CXXFLAGS="-mfpmath=sse -msse2" ;;
esac

pre_configure() {
	autoreconf -fi
}

lcalc-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
