PKGBUILDs/extra/giac/PKGBUILD
2023-09-18 18:23:30 -04:00

66 lines
1.6 KiB
Bash

# Maintainer: Antonio Rojas <arojas@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinxuarm.org>
# - delete shipped x86 binary src/mkjs to force rebuild for ARM
pkgname=giac
_pkgver=1.9.0-59
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc='A free computer algebra system'
arch=(x86_64)
url='http://www-fourier.ujf-grenoble.fr/~parisse/giac.html'
license=(GPL3)
depends=(blas
cblas
curl
fltk
gcc-libs
glibc
glpk
gmp
gmp-ecm
gsl
lapack
libao
libglvnd
libpng
libsamplerate
libusb
mpfi
mpfr
ntl
pari
readline
zlib)
makedepends=(hevea
libjpeg-turbo
nauty
python
texlive-mathscience)
optdepends=('perl: for pgiac')
source=(http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/${pkgname}_$_pkgver.tar.gz
format-security.patch
fix-build.patch)
sha256sums=('c5b1ba93f42e758f46d541b28d9350f165eaf8c459bdea80f4a73a72d43c10de'
'04288944e408807a15aa502e1215087870d8921229c9f9890d862d3c9de337cd'
'184e158a59d6a07b03436d7fdc197f1422c0e6786b3d89c7a7231d10b193c5bb')
prepare() {
cd $pkgname-${pkgver%.*}
patch -p1 < ../format-security.patch # Fix -Werror=format-security errors
patch -p1 < ../fix-build.patch
rm -f src/mkjs # force rebuild for ARM
}
build() {
cd $pkgname-${pkgver%.*}
CXXFLAGS+=" -Wp,-U_GLIBCXX_ASSERTIONS" # Fix crashes
./configure --prefix=/usr
make
}
package() {
cd $pkgbase-${pkgver%.*}
make DESTDIR="$pkgdir" install
}