pari: update to 2.13.0.

This commit is contained in:
Đoàn Trần Công Danh 2020-11-12 06:20:25 +07:00
parent f050dcadde
commit e0b75ebccf
1 changed files with 21 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Template file for 'pari'
pkgname=pari
version=2.11.4
version=2.13.0
revision=1
build_style=configure
build_helper=qemu
@ -9,16 +9,26 @@ configure_args="--prefix=/usr"
make_build_target=all
make_check_target=test-all
hostmakedepends="perl texlive"
makedepends="gmp-devel libX11-devel readline-devel"
makedepends="gmp-devel readline-devel $(vopt_if x11 libX11-devel)"
short_desc="Fast computations library in number theory"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://pari.math.u-bordeaux.fr"
distfiles="https://pari.math.u-bordeaux.fr/pub/pari/unix/${pkgname}-${version}.tar.gz"
checksum="bfc88fc4f7352f4840e6e352c72f0369cbea8a45403b1834a6269f3709970b1c"
checksum=c811946de9d2c1ed0e97ff08e80d966f9a0b55848b7688406fab229e3948ba93
build_options="x11"
build_options_default="x11"
post_patch() {
vsed -i -e 's/ulong/unsigned long/' config/has_sse2.c
# 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"
@ -26,6 +36,12 @@ post_patch() {
}
pre_configure() {
local _date
# Reproducibility
# date's wrapper is not available in do_patch
_date=$(date +"%b %d %Y")
vsed -i -e "s/__DATE__/\"$_date\"/" src/language/paricfg.c
export LD="$CC"
if [ "$CROSS_BUILD" ]; then
export RUNTEST="/usr/bin/qemu-$XBPS_TARGET_QEMU_MACHINE-static"
@ -34,7 +50,7 @@ pre_configure() {
pari-devel_package() {
short_desc+=" - development files"
depends="pari-${version}_${revision}"
depends="pari>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"