70 lines
2.1 KiB
Bash
70 lines
2.1 KiB
Bash
# Template file for 'pari'
|
|
pkgname=pari
|
|
version=2.15.4
|
|
revision=1
|
|
build_style=configure
|
|
build_helper=qemu
|
|
configure_script=./Configure
|
|
configure_args="--prefix=/usr $(vopt_if pthreads --mt=pthread)"
|
|
make_build_target="gp doc docpdf"
|
|
make_check_target=statest-all
|
|
make_install_target="install install-bin-sta install-lib-sta install-docpdf"
|
|
hostmakedepends="perl texlive"
|
|
makedepends="gmp-devel readline-devel $(vopt_if x11 libX11-devel)"
|
|
checkdepends="pari-elldata-small pari-galdata pari-galpol-small
|
|
pari-seadata-small pari-nflistdata"
|
|
short_desc="Fast computations library in number theory"
|
|
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://pari.math.u-bordeaux.fr"
|
|
changelog="https://pari.math.u-bordeaux.fr/cgi-bin/gitweb.cgi?p=pari.git;a=blob_plain;f=CHANGES;hb=refs/heads/pari-${version%.*}"
|
|
distfiles="https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-${version}.tar.gz"
|
|
checksum=c3545bfee0c6dfb40b77fb4bbabaf999d82e60069b9f6d28bcb6cf004c8c5c0f
|
|
|
|
build_options="x11 pthreads"
|
|
build_options_default="x11 pthreads"
|
|
desc_option_pthreads="Enable support for pthreads"
|
|
|
|
# reduce speed losses due to pthreads
|
|
CFLAGS="-flto=auto -fno-semantic-interposition"
|
|
|
|
# force `etex` to use SOURCE_DATE_EPOCH when creating dvi files
|
|
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897627
|
|
export FORCE_SOURCE_DATE=1
|
|
make_build_args="TEX=etex"
|
|
|
|
post_patch() {
|
|
# sse2 is not available on all i686
|
|
# and it's available on all x86_64
|
|
if [ "${XBPS_TARGET_MACHINE%-musl}" != x86_64 ]; then
|
|
echo 'int main() { return 1; }' > config/has_sse2.c
|
|
else
|
|
echo 'int main() { return 0; }' > config/has_sse2.c
|
|
fi
|
|
|
|
cat <<-EOF >config/arch-osname
|
|
#!/bin/sh
|
|
echo "${XBPS_TARGET_MACHINE%-musl}-linux"
|
|
EOF
|
|
|
|
# No RPATH please
|
|
vsed -i -e '/runpathprefix=/s/=.*/=/' config/get_ld
|
|
}
|
|
|
|
pre_configure() {
|
|
export LD="$CC"
|
|
if [ "$CROSS_BUILD" ]; then
|
|
export RUNTEST="/usr/bin/qemu-$XBPS_TARGET_QEMU_MACHINE-static"
|
|
fi
|
|
}
|
|
|
|
pari-devel_package() {
|
|
short_desc+=" - development files"
|
|
depends="pari>=${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
}
|
|
}
|