[arch-commits] Commit in gap/trunk (PKGBUILD gap-libsemigroups-1.3.4.patch)

Antonio Rojas arojas at archlinux.org
Sat Dec 5 11:34:18 UTC 2020


    Date: Saturday, December 5, 2020 @ 11:34:18
  Author: arojas
Revision: 770495

fplll 5.4 rebuild, fix build of semigroups package with libsemigroups 1.3.4

Added:
  gap/trunk/gap-libsemigroups-1.3.4.patch
Modified:
  gap/trunk/PKGBUILD

-------------------------------+
 PKGBUILD                      |    9 +-
 gap-libsemigroups-1.3.4.patch |  141 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 147 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-05 10:51:15 UTC (rev 770494)
+++ PKGBUILD	2020-12-05 11:34:18 UTC (rev 770495)
@@ -5,7 +5,7 @@
 pkgbase=gap
 pkgname=(gap gap-doc gap-packages)
 pkgver=4.11.0
-pkgrel=5
+pkgrel=6
 pkgdesc="Groups, Algorithms, Programming: a system for computational discrete algebra"
 arch=(x86_64)
 url="https://www.gap-system.org/"
@@ -15,7 +15,8 @@
          gap-polymake-4.0.patch
          gap-cddlib-0.94k.patch
          gap-normaliz-3.8.8.patch
-         gap-libsemigroups-1.3.patch)
+         gap-libsemigroups-1.3.patch
+         gap-libsemigroups-1.3.4.patch)
 sha256sums=('6fda7af23394708aeb3b4bca8885f5fdcb7c3ae4419639dfb2d9f67d3f590abb'
             '143fb8a79a52c007903cce13407850df309ef803a9b00398d05169355917de46'
             'SKIP'
@@ -22,7 +23,8 @@
             'e3f6d671c8df9acb6143a7c279391957967cd44f0a00b949323401d5b54ed685'
             '151ddbd7cf234158c8bd79153ac0ded3076f103859a65b238dd5c86084be3d98'
             '4023aaf1617d653f84d711d5642485984395a01464d64ded0a7e884c48b2a332'
-            'c69c35293c194528a0beeeea533d3bae93208cc6a6bed9ffab2c2ebdb1c6d444')
+            'c69c35293c194528a0beeeea533d3bae93208cc6a6bed9ffab2c2ebdb1c6d444'
+            'e4024342332fd583967b2797627dfae61eb6ebcb5b73baced1e2a464be4d679b')
 makedepends=(libxaw givaro mpfi normaliz polymake boost libsemigroups c-xsc zeromq fplll wget chrpath fmt git)
 
 prepare() {
@@ -42,6 +44,7 @@
 
   cd pkg/semigroups-* 
   patch -p1 -i "$srcdir"/gap-libsemigroups-1.3.patch # Fix build with libsemigroups 1.3
+  patch -p1 -i "$srcdir"/gap-libsemigroups-1.3.4.patch # Fix build with libsemigroups 1.3.4
 
   cd ../PolymakeInterface-*
   patch -p2 -i "$srcdir"/gap-polymake-4.0.patch # Fix build with polymake 4.0

Added: gap-libsemigroups-1.3.4.patch
===================================================================
--- gap-libsemigroups-1.3.4.patch	                        (rev 0)
+++ gap-libsemigroups-1.3.4.patch	2020-12-05 11:34:18 UTC (rev 770495)
@@ -0,0 +1,141 @@
+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;
+ }



More information about the arch-commits mailing list