[arch-commits] Commit in gap/repos (4 files)

Felix Yan felixonmars at gemini.archlinux.org
Tue Nov 30 21:30:31 UTC 2021


    Date: Tuesday, November 30, 2021 @ 21:30:31
  Author: felixonmars
Revision: 1058913

archrelease: copy trunk to community-staging-x86_64

Added:
  gap/repos/community-staging-x86_64/
  gap/repos/community-staging-x86_64/PKGBUILD
    (from rev 1058912, gap/trunk/PKGBUILD)
  gap/repos/community-staging-x86_64/gap-libsemigroups-1.3.4.patch
    (from rev 1058912, gap/trunk/gap-libsemigroups-1.3.4.patch)
  gap/repos/community-staging-x86_64/gap.sh
    (from rev 1058912, gap/trunk/gap.sh)

-------------------------------+
 PKGBUILD                      |  137 +++++++++++++++++++++++++++++++++++
 gap-libsemigroups-1.3.4.patch |  153 ++++++++++++++++++++++++++++++++++++++++
 gap.sh                        |    7 +
 3 files changed, 297 insertions(+)

Copied: gap/repos/community-staging-x86_64/PKGBUILD (from rev 1058912, gap/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-11-30 21:30:31 UTC (rev 1058913)
@@ -0,0 +1,137 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor:  TDY <tdy at archlinux.info>
+# Contributor: Rémy Oudompheng <oudomphe at clipper.ens.fr>
+
+pkgbase=gap
+pkgname=(gap gap-doc gap-packages)
+pkgver=4.11.1
+pkgrel=2
+pkgdesc="Groups, Algorithms, Programming: a system for computational discrete algebra"
+arch=(x86_64)
+url="https://www.gap-system.org/"
+license=(GPL)
+source=(https://github.com/gap-system/gap/releases/download/v$pkgver/$pkgbase-$pkgver.tar.gz
+        gap.sh
+        gap-libsemigroups-1.3.4.patch)
+sha256sums=('6635c5da7d82755f8339486b9cac33766f58712f297e8234fba40818902ea304'
+            '143fb8a79a52c007903cce13407850df309ef803a9b00398d05169355917de46'
+            'b24cda7763bbdf249f4693c22231c17a682aacdc4bc5754e88e0ace9700af7e7')
+makedepends=(libxaw givaro mpfi cddlib boost libsemigroups c-xsc zeromq fplll wget chrpath fmt)
+# TODO: unbundle normaliz
+
+prepare() {
+  cd gap-$pkgver
+
+# 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
+
+  cd pkg/semigroups-* 
+  patch -p1 -i "$srcdir"/gap-libsemigroups-1.3.4.patch # Fix build with libsemigroups 1.3.4
+
+  cd ../CddInterface-*
+  sed -e 's|/usr/include/cdd|/usr/include/cddlib|' -i configure.ac # Fix build with cddlib 0.94k
+  rm configure
+}
+
+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
+  rm "$srcdir"/gap-$pkgver/tmp-install/libgap.la
+
+  cd pkg
+  export CFLAGS+=" -fcommon" # Fix anupq and cohomolo build with GCC 10
+  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
+  ../bin/BuildPackages.sh --strict
+}
+
+_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
+
+  mkdir -p "$pkgdir"/usr/share
+  ln -s /usr/lib/gap -t "$pkgdir"/usr/share # expected by sagemath
+}
+
+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=('libxaw: xgap package' 'c-xsc: float package' 'mpfi: float package'
+              'libmpc: float package' 'fplll: float package' 'zeromq: ZeroMQ interface package' 'planarity: digraph package'
+              'curl: curl interface package' 'libsemigroups: semigroups package' 'cddlib: CddLib interface package')
+  pkgdesc="Extra packages for GAP"
+  cd gap-$pkgver
+
+  mkdir -p "$pkgdir"/usr/{bin,lib/gap}
+  cp -r pkg "$pkgdir"/usr/lib/gap
+
+# fix xgap launch script
+  sed -e "s|/build/gap/src/gap-$pkgver|/usr/lib/gap|g" -e 's|^GAP=.*|GAP=/usr/lib/gap/gap|g' \
+    "$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*
+
+# 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 -r "$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 -r "$pkgdir"/usr/lib/gap/pkg/digraphs*/extern
+  rm -r "$pkgdir"/usr/lib/gap/pkg/semigroups*/libsemigroups
+  rm -r "$pkgdir"/usr/lib/gap/pkg/log
+}

Copied: gap/repos/community-staging-x86_64/gap-libsemigroups-1.3.4.patch (from rev 1058912, gap/trunk/gap-libsemigroups-1.3.4.patch)
===================================================================
--- community-staging-x86_64/gap-libsemigroups-1.3.4.patch	                        (rev 0)
+++ community-staging-x86_64/gap-libsemigroups-1.3.4.patch	2021-11-30 21:30:31 UTC (rev 1058913)
@@ -0,0 +1,153 @@
+diff --git a/src/semigrp.h b/src/semigrp.h
+index f2d5463a..327a7f14 100644
+--- a/src/semigrp.h
++++ b/src/semigrp.h
+@@ -23,6 +23,7 @@
+ 
+ #include "compiled.h"  // GAP headers
+ 
++#include "libsemigroups/element-adapters.hpp"
+ #include "libsemigroups/froidure-pin.hpp"
+ 
+ #include "converter.h"
+diff --git a/src/pkg.cc b/src/pkg.cc
+index 31987a1c..cd94e0d9 100644
+--- a/src/pkg.cc
++++ b/src/pkg.cc
+@@ -35,10 +35,10 @@
+ #include "libsemigroups/blocks.hpp"
+ #include "libsemigroups/cong.hpp"
+ #include "libsemigroups/froidure-pin.hpp"
+-#include "libsemigroups/uf.hpp"
++#include "libsemigroups/uf-old.hpp"
+ 
+ using libsemigroups::Congruence;
+-using libsemigroups::detail::UF;
++using libsemigroups::detail::UFOld;
+ 
+ #if !defined(SIZEOF_VOID_P)
+ #error Something is wrong with this GAP installation: SIZEOF_VOID_P not defined
+@@ -102,7 +102,7 @@ void TSemiObjFreeFunc(Obj o) {
+   SEMIGROUPS_ASSERT(TNUM_OBJ(o) == T_SEMI);
+   switch (SUBTYPE_OF_T_SEMI(o)) {
+     case T_SEMI_SUBTYPE_UF: {
+-      delete CLASS_OBJ<UF*>(o);
++      delete CLASS_OBJ<UFOld*>(o);
+       break;
+     }
+     case T_SEMI_SUBTYPE_CONG: {
+@@ -157,7 +157,7 @@ void TSemiObjSaveFunc(Obj o) {
+ 
+   switch (SUBTYPE_OF_T_SEMI(o)) {
+     case T_SEMI_SUBTYPE_UF: {
+-      UF* uf = CLASS_OBJ<UF*>(o);
++      UFOld* uf = CLASS_OBJ<UFOld*>(o);
+       SaveUInt(uf->get_size());
+       for (size_t i = 0; i < uf->get_size(); i++) {
+         SaveUInt(uf->find(i));
+@@ -196,7 +196,7 @@ void TSemiObjLoadFunc(Obj o) {
+       for (size_t i = 0; i < size; i++) {
+         table->push_back(LoadUInt());
+       }
+-      ADDR_OBJ(o)[1] = reinterpret_cast<Obj>(new UF(*table));
++      ADDR_OBJ(o)[1] = reinterpret_cast<Obj>(new UFOld(*table));
+       break;
+     }
+     case T_SEMI_SUBTYPE_CONG: {
+diff --git a/src/uf.cc b/src/uf.cc
+index b7fd7c96..7fa34162 100644
+--- a/src/uf.cc
++++ b/src/uf.cc
+@@ -26,28 +26,28 @@
+ #include "semigroups-debug.h"
+ #include "src/compiled.h"
+ 
+-#include "libsemigroups/uf.hpp"
++#include "libsemigroups/uf-old.hpp"
+ 
+-using libsemigroups::detail::UF;
++using libsemigroups::detail::UFOld;
+ 
+ // GAP level functions
+ 
+ Obj UF_NEW(Obj self, Obj size) {
+   SEMIGROUPS_ASSERT(IS_INTOBJ(size) && INT_INTOBJ(size) > 0);
+-  return OBJ_CLASS(new UF(INT_INTOBJ(size)), T_SEMI_SUBTYPE_UF);
++  return OBJ_CLASS(new UFOld(INT_INTOBJ(size)), T_SEMI_SUBTYPE_UF);
+ }
+ 
+ Obj UF_COPY(Obj self, Obj uf) {
+-  return OBJ_CLASS(new UF(*CLASS_OBJ<UF*>(uf)), T_SEMI_SUBTYPE_UF);
++  return OBJ_CLASS(new UFOld(*CLASS_OBJ<UFOld*>(uf)), T_SEMI_SUBTYPE_UF);
+ }
+ 
+ Obj UF_SIZE(Obj self, Obj uf) {
+-  return INTOBJ_INT(CLASS_OBJ<UF*>(uf)->get_size());
++  return INTOBJ_INT(CLASS_OBJ<UFOld*>(uf)->get_size());
+ }
+ 
+ Obj UF_FIND(Obj self, Obj uf, Obj i) {
+   SEMIGROUPS_ASSERT(IS_INTOBJ(i) && INT_INTOBJ(i) > 0);
+-  return INTOBJ_INT(CLASS_OBJ<UF*>(uf)->find(INT_INTOBJ(i) - 1) + 1);
++  return INTOBJ_INT(CLASS_OBJ<UFOld*>(uf)->find(INT_INTOBJ(i) - 1) + 1);
+ }
+ 
+ Obj UF_UNION(Obj self, Obj uf, Obj pair) {
+@@ -56,18 +56,18 @@ Obj UF_UNION(Obj self, Obj uf, Obj pair) {
+                     && INT_INTOBJ(ELM_PLIST(pair, 1)) > 0);
+   SEMIGROUPS_ASSERT(IS_INTOBJ(ELM_PLIST(pair, 2))
+                     && INT_INTOBJ(ELM_PLIST(pair, 2)) > 0);
+-  CLASS_OBJ<UF*>(uf)->unite(INT_INTOBJ(ELM_PLIST(pair, 1)) - 1,
++  CLASS_OBJ<UFOld*>(uf)->unite(INT_INTOBJ(ELM_PLIST(pair, 1)) - 1,
+                             INT_INTOBJ(ELM_PLIST(pair, 2)) - 1);
+   return 0L;
+ }
+ 
+ Obj UF_FLATTEN(Obj self, Obj uf) {
+-  CLASS_OBJ<UF*>(uf)->flatten();
++  CLASS_OBJ<UFOld*>(uf)->flatten();
+   return 0L;
+ }
+ 
+ Obj UF_TABLE(Obj self, Obj uf) {
+-  UF::table_type* table     = CLASS_OBJ<UF*>(uf)->get_table();
++  UFOld::table_type* table     = CLASS_OBJ<UFOld*>(uf)->get_table();
+   size_t          size      = table->size();
+   Obj             gap_table = NEW_PLIST_IMM(T_PLIST_CYC, size);
+   // IMMUTABLE since it should not be altered on the GAP level
+@@ -79,7 +79,7 @@ Obj UF_TABLE(Obj self, Obj uf) {
+ }
+ 
+ Obj UF_BLOCKS(Obj self, Obj uf) {
+-  UF::blocks_type const* blocks = CLASS_OBJ<UF*>(uf)->get_blocks();
++  UFOld::blocks_type const* blocks = CLASS_OBJ<UFOld*>(uf)->get_blocks();
+   size_t                 size   = blocks->size();
+   size_t                 i, j;
+ 
+@@ -105,13 +105,13 @@ Obj UF_BLOCKS(Obj self, Obj uf) {
+ gap_int_t UF_NR_BLOCKS(Obj self, Obj uf) {
+   SEMIGROUPS_ASSERT(TNUM_OBJ(uf) == T_SEMI
+                     && SUBTYPE_OF_T_SEMI(uf) == T_SEMI_SUBTYPE_UF);
+-  return INTOBJ_INT(CLASS_OBJ<UF*>(uf)->nr_blocks());
++  return INTOBJ_INT(CLASS_OBJ<UFOld*>(uf)->nr_blocks());
+ }
+ 
+ gap_list_t UF_BLOCK_REPS(Obj self, Obj uf) {
+   SEMIGROUPS_ASSERT(TNUM_OBJ(uf) == T_SEMI
+                     && SUBTYPE_OF_T_SEMI(uf) == T_SEMI_SUBTYPE_UF);
+-  UF* uf_cpp = CLASS_OBJ<UF*>(uf);
++  UFOld* uf_cpp = CLASS_OBJ<UFOld*>(uf);
+   uf_cpp->reset_next_rep();
+   size_t next_rep = uf_cpp->next_rep();
+ 
+@@ -132,8 +132,8 @@ Obj UF_JOIN(Obj self, Obj uf1, Obj uf2) {
+   SEMIGROUPS_ASSERT(TNUM_OBJ(uf2) == T_SEMI
+                     && SUBTYPE_OF_T_SEMI(uf2) == T_SEMI_SUBTYPE_UF);
+   SEMIGROUPS_ASSERT(CLASS_OBJ<UF*>(uf1)->get_size()
+-                    == CLASS_OBJ<UF*>(uf2)->get_size());
++                    == CLASS_OBJ<UFOld*>(uf2)->get_size());
+   Obj uf_join = UF_COPY(self, uf1);
+-  CLASS_OBJ<UF*>(uf_join)->join(CLASS_OBJ<UF*>(uf2));
++  CLASS_OBJ<UFOld*>(uf_join)->join(CLASS_OBJ<UFOld*>(uf2));
+   return uf_join;
+ }

Copied: gap/repos/community-staging-x86_64/gap.sh (from rev 1058912, gap/trunk/gap.sh)
===================================================================
--- community-staging-x86_64/gap.sh	                        (rev 0)
+++ community-staging-x86_64/gap.sh	2021-11-30 21:30:31 UTC (rev 1058913)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+GAP_ROOT="/usr/lib/gap"
+GAP_DIR=$GAP_ROOT
+GAP_EXE=$GAP_ROOT
+
+exec "$GAP_EXE/gap" -l "$GAP_DIR" "$@"



More information about the arch-commits mailing list