PKGBUILDs/community/pari/PKGBUILD

65 lines
2.1 KiB
Bash
Raw Normal View History

2020-11-03 00:13:21 +00:00
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Gaetan Bisson <bisson@archlinux.org>
2020-04-25 21:22:55 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - comment adding -flto to CFLAGS
2020-04-26 01:16:44 +00:00
# - generalize cd Olinux-* for install-bin-sta
2020-04-25 21:22:55 +00:00
pkgname=pari
2021-01-25 21:25:41 +00:00
pkgver=2.13.1
2021-03-28 16:51:49 +00:00
pkgrel=2
2020-04-25 21:22:55 +00:00
pkgdesc='Computer algebra system designed for fast computations in number theory'
url='https://pari.math.u-bordeaux.fr/'
2020-11-03 00:13:21 +00:00
license=(GPL)
arch=(x86_64)
depends=(gmp libx11)
makedepends=(perl texlive-core chrpath)
optdepends=('perl: gphelp, tex2mail'
'pari-elldata: J. Cremona elliptic curve database'
'pari-galdata: to compute Galois groups in degrees 8 through 11'
'pari-seadata: needed by ellap for large primes'
'pari-galpol: GALPOL database of polynomials defining Galois extensions of the rationals')
2021-03-28 16:51:49 +00:00
source=("https://pari.math.u-bordeaux.fr/pub/pari/unix/$pkgname-$pkgver.tar.gz"{,.asc}
pari-rnfdisc.patch)
2021-01-25 21:25:41 +00:00
sha256sums=('81ecf7d70ccdaae230165cff627c9ce2ec297b8f22f9f40742279d85f86dfcb1'
2021-03-28 16:51:49 +00:00
'SKIP'
'4ddd27fa348d5c00b9a668c1122461488ad719ad31a397ed9b49fb14f6599d94')
2020-11-03 00:13:21 +00:00
validpgpkeys=('42028EA404A2E9D80AC453148F0E7C2B4522E387')
2020-04-25 21:22:55 +00:00
2020-11-03 00:13:21 +00:00
prepare() {
cd $pkgname-$pkgver
2021-03-28 16:51:49 +00:00
patch -p1 < ../pari-rnfdisc.patch # https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2284
2020-11-03 00:13:21 +00:00
sed -e 's|DLLDFLAGS = \$DLLDFLAGS|DLLDFLAGS = $DLLDFLAGS $LDFLAGS|' -i config/Makefile.SH # Honor system LDFLAGS
}
2020-04-25 21:22:55 +00:00
build() {
2020-11-03 00:13:21 +00:00
cd $pkgname-$pkgver
# Upstream Bill Allombert recommends linking gp statically against
# libpari.so with -flto to recover speed losses incurred when enabling
# pthread support. That's also what he now does for the Debian package.
#export CFLAGS+=' -flto'
./Configure \
--prefix=/usr \
--with-readline \
--mt=pthread \
--with-gmp
make all
make -C Olinux-* gp-sta
2020-04-25 21:22:55 +00:00
}
check() {
2020-11-03 00:13:21 +00:00
cd $pkgname-$pkgver
make bench
2020-04-25 21:22:55 +00:00
}
package() {
2020-11-03 00:13:21 +00:00
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" -C Olinux-* install-bin-sta
ln -sf gp.1.gz "$pkgdir"/usr/share/man/man1/pari.1
chrpath -d "$pkgdir"/usr/bin/gp-*
2020-04-25 21:22:55 +00:00
}