[arch-commits] Commit in gap/trunk (PKGBUILD)

Antonio Rojas arojas at archlinux.org
Sat Mar 2 16:11:04 UTC 2019


    Date: Saturday, March 2, 2019 @ 16:11:04
  Author: arojas
Revision: 437391

Fix issues in sagemath when gap-packages is installed

Link all binary packages to libgap explicitely, and remove xgap from suggested packages so sagemath won't try to load it

Modified:
  gap/trunk/PKGBUILD

----------+
 PKGBUILD |   20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-03-02 16:09:49 UTC (rev 437390)
+++ PKGBUILD	2019-03-02 16:11:04 UTC (rev 437391)
@@ -5,7 +5,7 @@
 pkgbase=gap
 pkgname=(gap gap-doc gap-packages)
 pkgver=4.10.0
-pkgrel=6
+pkgrel=7
 pkgdesc="Groups, Algorithms, Programming: a system for computational discrete algebra"
 arch=(x86_64)
 url="https://www.gap-system.org/"
@@ -28,6 +28,9 @@
   sed -e '/build-normaliz.sh/d' -i bin/BuildPackages.sh
 # Disable anupq package, it's i686 only
   rm -r pkg/anupq-*
+# 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
 
 # Patches to make sagemath work with GAP's libgap
   patch -p1 -i ../gap-sagemath-1.patch
@@ -41,10 +44,20 @@
 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
 
+  # Install libgap so we can link packages against it
+  mkdir -p tmp-install
+  make DESTDIR="$srcdir"/gap-$pkgver/tmp-install install-libgap
+
   cd pkg
   export MAKEFLAGS='-j1' # Fix build of carat package
+  export LDFLAGS+=" -L$srcdir/gap-$pkgver/tmp-install/usr/lib -lgap" # See https://trac.sagemath.org/ticket/27372
+  export LD_LIBRARY_PATH="$srcdir"/gap-$pkgver/tmp-install/usr/lib
   ../bin/BuildPackages.sh
 }
 
@@ -103,6 +116,7 @@
   chrpath -r \$ORIGIN/../lib/ "$pkgdir"/usr/lib/gap/pkg/semigroups-*/bin/x86_64-pc-linux-gnu-default64/semigroups.so
   chrpath -d "$pkgdir"/usr/lib/gap/pkg/NormalizInterface-*/bin/x86_64-pc-linux-gnu-default64/NormalizInterface.so
 
-# remove leftover binaries
-  find "$pkgdir"/usr/lib/gap/pkg -name .libs | xargs rm -r
+# 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
 }



More information about the arch-commits mailing list