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

Antonio Rojas arojas at archlinux.org
Sat Mar 9 13:01:08 UTC 2019


    Date: Saturday, March 9, 2019 @ 13:01:08
  Author: arojas
Revision: 438244

archrelease: copy trunk to community-staging-x86_64

Added:
  gap/repos/community-staging-x86_64/
  gap/repos/community-staging-x86_64/PKGBUILD
    (from rev 438243, gap/trunk/PKGBUILD)
  gap/repos/community-staging-x86_64/gap-polymake-3.3.patch
    (from rev 438243, gap/trunk/gap-polymake-3.3.patch)
  gap/repos/community-staging-x86_64/gap.sh
    (from rev 438243, gap/trunk/gap.sh)

------------------------+
 PKGBUILD               |  117 +++++++++++++++++++++++++++++++++++++++++++++++
 gap-polymake-3.3.patch |   26 ++++++++++
 gap.sh                 |    7 ++
 3 files changed, 150 insertions(+)

Copied: gap/repos/community-staging-x86_64/PKGBUILD (from rev 438243, gap/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2019-03-09 13:01:08 UTC (rev 438244)
@@ -0,0 +1,117 @@
+# 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.10.1
+pkgrel=1
+pkgdesc="Groups, Algorithms, Programming: a system for computational discrete algebra"
+arch=(x86_64)
+url="https://www.gap-system.org/"
+license=(GPL)
+source=("https://www.gap-system.org/pub/gap/gap-${pkgver%.*}/tar.gz/gap-$pkgver.tar.gz" gap.sh
+        gap-polymake-3.3.patch)
+sha256sums=('b2d8800e338a6a9afdf92b06368c2e1a16b8adebffcd4c10319c1b3a4e827e45'
+            '143fb8a79a52c007903cce13407850df309ef803a9b00398d05169355917de46'
+            'c92849b2643e0e21ffdcfa230fb23fe4a276ec15402f178d5d69ddb0e537fbbe')
+makedepends=(libxaw givaro mpfi normaliz boost c-xsc zeromq fplll polymake wget chrpath)
+
+prepare() {
+  cd gap-$pkgver
+
+# Use system normaliz
+  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
+
+  cd pkg/PolymakeInterface*
+  patch -p2 -i "$srcdir"/gap-polymake-3.3.patch # Fix build of PolymakeInterface with polymake 3.3
+}
+
+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 MAKEFLAGS='-j1' # Fix build of carat package
+  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
+}
+
+_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
+}
+
+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'
+              'polymake: Polymake interface package' 'curl: curl interface package')
+  pkgdesc="Extra packages for GAP"
+  cd gap-$pkgver
+
+  mkdir -p "$pkgdir"/usr/lib/gap
+  cp -r pkg "$pkgdir"/usr/lib/gap
+
+# provided by main gap package
+  for _pkg in ${_standardpkgs[@]}; do
+    rm -r "$pkgdir"/usr/lib/gap/pkg/$_pkg
+  done
+
+# fix RPATH
+  chrpath -r \$ORIGIN/../lib/ "$pkgdir"/usr/lib/gap/pkg/semigroups-*/bin/x86_64-*/semigroups.so
+  chrpath -d "$pkgdir"/usr/lib/gap/pkg/NormalizInterface-*/bin/x86_64-*/NormalizInterface.so
+
+# 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
+}

Copied: gap/repos/community-staging-x86_64/gap-polymake-3.3.patch (from rev 438243, gap/trunk/gap-polymake-3.3.patch)
===================================================================
--- community-staging-x86_64/gap-polymake-3.3.patch	                        (rev 0)
+++ community-staging-x86_64/gap-polymake-3.3.patch	2019-03-09 13:01:08 UTC (rev 438244)
@@ -0,0 +1,26 @@
+diff --git a/PolymakeInterface/src/polymake_fan.cpp b/PolymakeInterface/src/polymake_fan.cpp
+index e3914d7b..9e1b164b 100644
+--- a/PolymakeInterface/src/polymake_fan.cpp
++++ b/PolymakeInterface/src/polymake_fan.cpp
+@@ -93,7 +93,7 @@ Obj REAL_FAN_BY_RAYS_AND_CONES( Polymake_Data* data, Obj rays, Obj cones ){
+           return NULL;
+         }
+ #endif
+-        incMatr[i] += INT_INTOBJ( numb ) - 1;
++        incMatr[i] += (pm::Set<int>)pm::scalar2set(INT_INTOBJ( numb ) - 1);
+       }
+   }
+ 
+diff --git a/PolymakeInterface/src/polymake_matroid.cpp b/PolymakeInterface/src/polymake_matroid.cpp
+index 4f33795b..5ea2e8d2 100644
+--- a/PolymakeInterface/src/polymake_matroid.cpp
++++ b/PolymakeInterface/src/polymake_matroid.cpp
+@@ -52,7 +52,7 @@ Obj REAL_CREATE_MATROID_ABSTRACT( Polymake_Data* data, Obj size, Obj elements ){
+       int current_length = LEN_PLIST( current_basis_list );
+       
+       for( int i=1;i<=current_length;i++){
+-          incMatr[current_basis] += INT_INTOBJ( ELM_PLIST( current_basis_list, i ) ) - 1;
++          incMatr[current_basis] += (pm::Set<int>)pm::scalar2set(INT_INTOBJ( ELM_PLIST( current_basis_list, i ) ) - 1);
+       }
+       
+   }

Copied: gap/repos/community-staging-x86_64/gap.sh (from rev 438243, gap/trunk/gap.sh)
===================================================================
--- community-staging-x86_64/gap.sh	                        (rev 0)
+++ community-staging-x86_64/gap.sh	2019-03-09 13:01:08 UTC (rev 438244)
@@ -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