2019-06-22 19:09:39 +00:00
|
|
|
# Maintainer: Antonio Rojas <arojas@archlinux.org>
|
|
|
|
# Contributor: TDY <tdy@archlinux.info>
|
|
|
|
# Contributor: Rémy Oudompheng <oudomphe@clipper.ens.fr>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - rm -fr "$pkgdir"/usr/lib/gap/pkg/digraphs-*/bin/lib/ for aarch64
|
|
|
|
|
|
|
|
pkgbase=gap
|
|
|
|
pkgname=(gap gap-doc gap-packages)
|
2020-03-06 19:42:58 +00:00
|
|
|
pkgver=4.11.0
|
2020-04-19 16:42:03 +00:00
|
|
|
pkgrel=2
|
2019-06-22 19:09:39 +00:00
|
|
|
pkgdesc="Groups, Algorithms, Programming: a system for computational discrete algebra"
|
|
|
|
arch=(x86_64)
|
|
|
|
url="https://www.gap-system.org/"
|
|
|
|
license=(GPL)
|
2020-04-19 16:42:03 +00:00
|
|
|
source=("https://files.gap-system.org/gap-${pkgver%.*}/tar.gz/gap-$pkgver.tar.gz" gap.sh
|
2020-01-12 02:36:56 +00:00
|
|
|
git+https://github.com/gap-packages/NormalizInterface#commit=cd69a42
|
2020-01-30 01:06:42 +00:00
|
|
|
gap-polymake-4.0.patch)
|
2020-03-06 19:42:58 +00:00
|
|
|
sha256sums=('6fda7af23394708aeb3b4bca8885f5fdcb7c3ae4419639dfb2d9f67d3f590abb'
|
2019-11-28 15:18:22 +00:00
|
|
|
'143fb8a79a52c007903cce13407850df309ef803a9b00398d05169355917de46'
|
2020-01-12 02:36:56 +00:00
|
|
|
'SKIP'
|
2020-01-30 01:06:42 +00:00
|
|
|
'e3f6d671c8df9acb6143a7c279391957967cd44f0a00b949323401d5b54ed685')
|
|
|
|
makedepends=(libxaw givaro mpfi normaliz polymake boost libsemigroups c-xsc zeromq fplll wget chrpath fmt git)
|
2019-06-22 19:09:39 +00:00
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd gap-$pkgver
|
|
|
|
|
|
|
|
# Use system normaliz
|
|
|
|
sed -e '/build-normaliz.sh/d' -i bin/BuildPackages.sh
|
|
|
|
# Use system libsemigroups
|
|
|
|
sed -e 's|test "$with_external_libsemigroups" = yes|true|' -i pkg/semigroups-*/configure
|
|
|
|
# Fix https://bugs.archlinux.org/task/55174
|
|
|
|
sed -e '/xgap/d' -i pkg/sonata-*/PackageInfo.g
|
|
|
|
sed -e '/XGAP/d' -i pkg/cryst/PackageInfo.g
|
2019-11-28 15:18:22 +00:00
|
|
|
|
2020-01-12 02:36:56 +00:00
|
|
|
# Update NormalizInterface to support recent normaliz
|
2020-03-06 19:42:58 +00:00
|
|
|
rm -r pkg/NormalizInterface-1.1.0
|
2020-01-12 02:36:56 +00:00
|
|
|
cp -r ../NormalizInterface pkg
|
|
|
|
|
2020-04-19 16:42:03 +00:00
|
|
|
cd pkg/PolymakeInterface-*
|
2020-01-30 01:06:42 +00:00
|
|
|
patch -p2 -i "$srcdir"/gap-polymake-4.0.patch # Fix build with polymake 4.0
|
2019-06-22 19:09:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd gap-$pkgver
|
|
|
|
./configure --prefix=/usr --with-gmp=system
|
|
|
|
|
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=655517
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
|
|
|
|
|
|
make
|
|
|
|
make libgap.la
|
|
|
|
|
|
|
|
# Install libgap so we can link packages against it
|
|
|
|
mkdir -p tmp-install
|
|
|
|
libtool --mode=install install libgap.la "$srcdir"/gap-$pkgver/tmp-install
|
|
|
|
|
|
|
|
cd pkg
|
|
|
|
export CXXFLAGS+=" -I/usr/include/cxsc" # Find c-xsc headers
|
|
|
|
export LDFLAGS+=" -L$srcdir/gap-$pkgver/tmp-install -lgap" # See https://trac.sagemath.org/ticket/27372
|
|
|
|
export LD_LIBRARY_PATH="$srcdir"/gap-$pkgver/tmp-install
|
2020-01-12 02:36:56 +00:00
|
|
|
export MAKEFLAGS="-j1"
|
2019-06-22 19:09:39 +00:00
|
|
|
../bin/BuildPackages.sh
|
|
|
|
}
|
|
|
|
|
|
|
|
_standardpkgs=(GAPDoc-* primgrp-* SmallGrp-* transgrp atlasrep autpgrp-* alnuth-* crisp-* ctbllib FactInt-* fga irredsol-* laguna-*
|
|
|
|
polenta-* polycyclic-* resclasses-* sophus-* tomlib-*)
|
|
|
|
|
|
|
|
package_gap() {
|
|
|
|
depends=(gmp zlib)
|
|
|
|
optdepends=('gap-packages: extra packages' 'gap-doc: documentation')
|
|
|
|
conflicts=(libgap)
|
|
|
|
replaces=(gap-data libgap gap-4.8 gap-4.8-data)
|
|
|
|
cd gap-$pkgver
|
|
|
|
|
|
|
|
install -Dm644 src/*.h -t "$pkgdir"/usr/include/gap
|
|
|
|
install -Dm644 gen/config.h -t "$pkgdir"/usr/include/gap
|
|
|
|
install -Dm644 src/hpc/*.h -t "$pkgdir"/usr/include/gap/hpc
|
|
|
|
|
|
|
|
install -d "$pkgdir"/usr/lib
|
|
|
|
libtool --mode=install install libgap.la "$pkgdir"/usr/lib
|
|
|
|
|
|
|
|
mkdir -p "$pkgdir"/usr/{bin,lib/gap/pkg}
|
|
|
|
cp -r grp lib "$pkgdir"/usr/lib/gap
|
|
|
|
for _pkg in ${_standardpkgs[@]}; do
|
|
|
|
cp -r pkg/$_pkg "$pkgdir"/usr/lib/gap/pkg
|
|
|
|
done
|
|
|
|
install -Dm755 gap -t "$pkgdir"/usr/lib/gap
|
|
|
|
# Install launcher script
|
|
|
|
install -Dm755 "$srcdir"/gap.sh "$pkgdir"/usr/bin/gap
|
2019-09-05 23:25:55 +00:00
|
|
|
|
|
|
|
mkdir -p "$pkgdir"/usr/share
|
|
|
|
ln -s /usr/lib/gap -t "$pkgdir"/usr/share # expected by sagemath
|
2019-06-22 19:09:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_gap-doc() {
|
|
|
|
depends=(gap)
|
|
|
|
replaces=(gap-4.8-doc)
|
|
|
|
pkgdesc="Documentation for GAP"
|
|
|
|
cd gap-$pkgver
|
|
|
|
|
|
|
|
mkdir -p "$pkgdir"/usr/lib/gap
|
|
|
|
cp -r doc "$pkgdir"/usr/lib/gap
|
|
|
|
}
|
|
|
|
|
|
|
|
package_gap-packages() {
|
|
|
|
depends=(gap)
|
|
|
|
replaces=(gap-4.8-packages)
|
|
|
|
optdepends=('normaliz: Normaliz interface package' 'libxaw: xgap package' 'c-xsc: float package' 'mpfi: float package'
|
|
|
|
'libmpc: float package' 'fplll: float package' 'zeromq: ZeroMQ interface package' 'planarity: digraph package'
|
2020-01-30 01:06:42 +00:00
|
|
|
'curl: curl interface package' 'libsemigroups: semigroups package' 'polymake: Polymake interface package')
|
2019-06-22 19:09:39 +00:00
|
|
|
pkgdesc="Extra packages for GAP"
|
|
|
|
cd gap-$pkgver
|
|
|
|
|
2019-10-14 23:18:54 +00:00
|
|
|
mkdir -p "$pkgdir"/usr/{bin,lib/gap}
|
2019-06-22 19:09:39 +00:00
|
|
|
cp -r pkg "$pkgdir"/usr/lib/gap
|
|
|
|
|
2019-10-14 23:18:54 +00:00
|
|
|
# fix xgap launch script
|
2020-04-19 16:42:03 +00:00
|
|
|
sed -e "s|/build/gap/src/gap-$pkgver|/usr/lib/gap|g" -e 's|^GAP=.*|GAP=/usr/lib/gap/gap|g' \
|
2019-10-14 23:18:54 +00:00
|
|
|
"$pkgdir"/usr/lib/gap/pkg/xgap-*/xgap.sh > "$pkgdir"/usr/bin/xgap
|
|
|
|
chmod 755 "$pkgdir"/usr/bin/xgap
|
|
|
|
rm "$pkgdir"/usr/lib/gap/pkg/xgap-*/xgap.sh*
|
|
|
|
|
2019-06-22 19:09:39 +00:00
|
|
|
# provided by main gap package
|
|
|
|
for _pkg in ${_standardpkgs[@]}; do
|
|
|
|
rm -r "$pkgdir"/usr/lib/gap/pkg/$_pkg
|
|
|
|
done
|
|
|
|
|
|
|
|
# fix RPATH
|
|
|
|
find "$pkgdir"/usr/lib/gap/pkg/ -name '*.so' | xargs chrpath -d
|
|
|
|
|
|
|
|
# remove bundled planarity
|
|
|
|
rm -fr "$pkgdir"/usr/lib/gap/pkg/digraphs-*/bin/lib/
|
|
|
|
|
|
|
|
# remove leftover binaries and source files
|
|
|
|
find "$pkgdir"/usr/lib/gap/pkg -name .libs -o -name '*.o' | xargs rm -fr
|
|
|
|
find "$pkgdir"/usr/lib/gap/pkg -type d -name src | xargs rm -fr
|
|
|
|
rm -fr "$pkgdir"/usr/lib/gap/pkg/log
|
|
|
|
}
|