# Maintainer: Antonio Rojas # Contributor: Gaetan Bisson # ALARM: Kevin Mihelich # - generalize cd Olinux-* for install-bin-sta pkgname=pari pkgver=2.17.0 pkgrel=2 pkgdesc='Computer algebra system designed for fast computations in number theory' url='https://pari.math.u-bordeaux.fr/' license=(GPL-2.0-or-later) arch=(x86_64) depends=(gcc-libs glibc gmp libx11 readline sh) makedepends=(chrpath perl texlive-latex) 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') checkdepends=(pari-elldata pari-galdata pari-seadata pari-galpol) source=(https://pari.math.u-bordeaux.fr/pub/pari/unix/$pkgname-$pkgver.tar.gz{,.asc} qfcvp.patch) sha256sums=('e723e7cef18d08c6ece2283af9a9b4d56077c22b4fce998faaa588d389b1aea8' 'SKIP' '9dc74c77e2f72d672db4ee857057a18dd947474ebe8214358a8c2ea7dbf54d8c') validpgpkeys=('42028EA404A2E9D80AC453148F0E7C2B4522E387') prepare() { cd $pkgname-$pkgver sed -e 's|DLLDFLAGS = \$DLLDFLAGS|DLLDFLAGS = $DLLDFLAGS $LDFLAGS|' -i config/Makefile.SH # Honor system LDFLAGS patch -p1 -i ../qfcvp.patch # https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2575 } build() { cd $pkgname-$pkgver ./Configure \ --prefix=/usr \ --with-readline \ --mt=pthread \ --with-gmp make all make -C Olinux-* gp-sta } check() { cd $pkgname-$pkgver make test-all } package() { 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-* }