[arch-commits] Commit in singular/repos (8 files)
Bartłomiej Piotrowski
bpiotrowski at archlinux.org
Sun Dec 6 03:24:52 UTC 2015
Date: Sunday, December 6, 2015 @ 04:24:51
Author: bpiotrowski
Revision: 148796
archrelease: copy trunk to community-staging-i686, community-staging-x86_64
Added:
singular/repos/community-staging-i686/
singular/repos/community-staging-i686/PKGBUILD
(from rev 148795, singular/trunk/PKGBUILD)
singular/repos/community-staging-i686/ntl8.patch
(from rev 148795, singular/trunk/ntl8.patch)
singular/repos/community-staging-i686/templates.patch
(from rev 148795, singular/trunk/templates.patch)
singular/repos/community-staging-x86_64/
singular/repos/community-staging-x86_64/PKGBUILD
(from rev 148795, singular/trunk/PKGBUILD)
singular/repos/community-staging-x86_64/ntl8.patch
(from rev 148795, singular/trunk/ntl8.patch)
singular/repos/community-staging-x86_64/templates.patch
(from rev 148795, singular/trunk/templates.patch)
------------------------------------------+
community-staging-i686/PKGBUILD | 82 +++++++++++++++++++++++++++++
community-staging-i686/ntl8.patch | 47 ++++++++++++++++
community-staging-i686/templates.patch | 60 +++++++++++++++++++++
community-staging-x86_64/PKGBUILD | 82 +++++++++++++++++++++++++++++
community-staging-x86_64/ntl8.patch | 47 ++++++++++++++++
community-staging-x86_64/templates.patch | 60 +++++++++++++++++++++
6 files changed, 378 insertions(+)
Copied: singular/repos/community-staging-i686/PKGBUILD (from rev 148795, singular/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD (rev 0)
+++ community-staging-i686/PKGBUILD 2015-12-06 03:24:51 UTC (rev 148796)
@@ -0,0 +1,82 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Rémy Oudompheng <oudomphe at clipper.ens.fr>
+
+pkgname=singular
+pkgver=3.1.7.p1
+_majver=3-1-7
+pkgrel=13
+pkgdesc="Computer Algebra System for polynomial computations"
+arch=(i686 x86_64)
+url="http://www.singular.uni-kl.de/"
+license=(GPL)
+depends=(flint cddlib) # polymake
+options=(!buildflags)
+source=("http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/$_majver/Singular-${_majver}p1.tar.gz"
+"http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/$_majver/Singular-${_majver}-share.tar.gz" 'templates.patch' 'ntl8.patch'
+"http://git.sagemath.org/sage.git/plain/build/pkgs/singular/patches/currring.patch")
+md5sums=('ce369519d1c5d07342722e78240ea044'
+ 'b9177c00e95ee21b137984bade9fc481'
+ '8ca8ba06c846a8de189fff322d557705'
+ '2c028bbda467b437d5598ac07cd7211f'
+ '1fe968092b5e98878cd9b47c7d9acc81')
+
+prepare() {
+ cd Singular-$_majver
+ patch -p1 -i ../templates.patch
+# fix build against NTL 8
+ patch -p1 -i ../ntl8.patch
+# fix flint detection
+ sed -e 's|-lmpir|-lgmp|' -i factory/configure -i Singular/configure
+# fix segfault
+ patch -p1 -i ../currring.patch
+}
+
+build() {
+ cd Singular-$_majver
+
+ export CPP=/usr/bin/cpp
+ export CXXCPP=/usr/bin/cpp
+ export CFLAGS="-fPIC"
+ export CXXFLAGS="-fPIC"
+
+# force using system ntl
+ rm -r ntl
+
+ mkdir -p build
+
+ ./configure --prefix=$PWD/build/usr/lib/Singular \
+ --bindir=$PWD/build/usr/lib/Singular --libdir=$PWD/build/usr/lib/Singular \ # --includedir=$PWD/build/usr/include \
+ --with-apint=gmp --with-gmp=/usr --with-malloc=system --with-ntl=/usr --with-flint=/usr --disable-doc --with-NTL --without-MP --without-lex \
+ --enable-Singular --enable-factory --enable-libfac --enable-IntegerProgramming --enable-gfanlib
+ make install
+
+ export CFLAGS="$CFLAGS -DPIC -DLIBSINGULAR"
+ export CXXFLAGS="$CXXFLAGS -DPIC -DLIBSINGULAR"
+
+ ./configure --prefix=$PWD/build/usr/lib/Singular \
+ --bindir=$PWD/build/usr/lib/Singular --libdir=$PWD/build/usr/lib/Singular --includedir=$PWD/build/usr/include \
+ --with-apint=gmp --with-gmp=/usr --with-malloc=system --with-ntl=/usr --with-flint=/usr --disable-doc --with-NTL --without-MP \
+ --enable-Singular --enable-factory --enable-libfac --enable-IntegerProgramming
+ make clean
+ make install-libsingular
+
+# needed by Sage, not installed by default
+ cp Singular/sing_dbm.h build/usr/include/singular/
+}
+
+package() {
+ cd Singular-$_majver
+
+ cp -r build/* "$pkgdir"/
+
+ mkdir -p "$pkgdir"/usr/bin
+ ln -sf /usr/lib/Singular/Singular-$_majver "$pkgdir"/usr/lib/Singular/Singular
+ ln -s /usr/lib/Singular/Singular "$pkgdir"/usr/bin/
+ ln -s /usr/lib/Singular/libsingular.so "$pkgdir"/usr/lib/
+
+# Install docs
+ mkdir -p "$pkgdir"/usr/share/singular
+ install -m644 "$srcdir"/Singular/$_majver/info/singular.hlp "$pkgdir"/usr/share/singular/
+ install -m644 "$srcdir"/Singular/$_majver/doc/singular.idx "$pkgdir"/usr/share/singular/
+}
Copied: singular/repos/community-staging-i686/ntl8.patch (from rev 148795, singular/trunk/ntl8.patch)
===================================================================
--- community-staging-i686/ntl8.patch (rev 0)
+++ community-staging-i686/ntl8.patch 2015-12-06 03:24:51 UTC (rev 148796)
@@ -0,0 +1,47 @@
+From de688442dfe449992dc14a000bca0691ecc7e106 Mon Sep 17 00:00:00 2001
+From: Oleksandr Motsak <motsak at mathematik.uni-kl.de>
+Date: Sat, 14 Mar 2015 16:58:01 +0100
+Subject: [PATCH] Fixing incompatibility with NTL8
+
+---
+ factory/NTLconvert.cc | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/factory/NTLconvert.cc b/factory/NTLconvert.cc
+index 41ce9b2..e32093d 100644
+--- a/factory/NTLconvert.cc
++++ b/factory/NTLconvert.cc
+@@ -30,6 +30,7 @@
+ #include <NTL/GF2EXFactoring.h>
+ #include <NTL/tools.h>
+ #include <NTL/mat_ZZ.h>
++#include <NTL/version.h>
+ #include "int_int.h"
+ #include <limits.h>
+ #include "NTLconvert.h"
+@@ -500,8 +501,14 @@ convertZZ2CF (const ZZ & a)
+ return CanonicalForm(coeff_long);
+ }
+ else
+- {
+- long sizeofrep= ((long *) a.rep) [1];
++ {
++ const long * rep =
++#if NTL_MAJOR_VERSION <= 6
++ static_cast<long *>( a.rep );
++#else
++ static_cast<long *>( a.rep.rep ); // what about NTL7?
++#endif
++ long sizeofrep= rep[1];
+ bool lessZero= false;
+ if (sizeofrep < 0)
+ {
+@@ -519,7 +526,7 @@ convertZZ2CF (const ZZ & a)
+ cf_stringtemp_l= sizeofrep*sizeof(mp_limb_t)*2;
+ cf_stringtemp= (unsigned char*) Alloc (cf_stringtemp_l);
+ }
+- int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) (((long *) (a.rep)) + 2), sizeofrep);
++ int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) ((rep) + 2), sizeofrep);
+
+ char* cf_stringtemp2;
+ if (lessZero)
Copied: singular/repos/community-staging-i686/templates.patch (from rev 148795, singular/trunk/templates.patch)
===================================================================
--- community-staging-i686/templates.patch (rev 0)
+++ community-staging-i686/templates.patch 2015-12-06 03:24:51 UTC (rev 148796)
@@ -0,0 +1,60 @@
+diff -druN latest.orig/factory/GNUmakefile.in latest/factory/GNUmakefile.in
+--- latest.orig/factory/GNUmakefile.in 2014-08-06 08:59:15.000000000 -0700
++++ latest/factory/GNUmakefile.in 2014-10-20 04:21:24.914606325 -0700
+@@ -98,11 +98,13 @@
+ @FLINT_CFLAGS@ $(DEFS) $(CPPFLAGS) $(CFLAGS)
+
+ # flags to translate library c++ files
+-LIBCXXFLAGS = $(WARNFLAGS) -fno-implicit-templates \
++#LIBCXXFLAGS = $(WARNFLAGS) -fno-implicit-templates
++LIBCXXFLAGS = $(WARNFLAGS) \
+ -I. -I.. -I$(srcdir) -I${prefix} -I$(includedir) \
+ @FLINT_CFLAGS@ $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
+
+-LIBCGGFLAGS = $(WARNFLAGS) -fno-implicit-templates \
++#LIBCGGFLAGS = $(WARNFLAGS) -fno-implicit-templates
++LIBCGGFLAGS = $(WARNFLAGS) \
+ -I. -I.. -I$(srcdir) -I${prefix} -I$(includedir) \
+ @FLINT_CFLAGS@ $(DEFS) $(CPPFLAGS)
+
+diff -druN latest.orig/Singular/claptmpl.cc latest.new/Singular/claptmpl.cc
+--- latest.orig/Singular/claptmpl.cc 2014-11-19 05:06:05.000000000 -0800
++++ latest.new/Singular/claptmpl.cc 2014-11-21 08:58:02.514808678 -0800
+@@ -122,37 +122,3 @@
+ template class std::list<PolyMinorValue>;
+ template class Cache<MinorKey, IntMinorValue>;
+ template class Cache<MinorKey, PolyMinorValue>;
+-
+-#ifdef HAVE_NTL
+-#include<NTL/version.h>
+-#if NTL_MAJOR_VERSION == 6
+-
+-#include<NTL/tools.h>
+-#include<NTL/lzz_pE.h>
+-#include<NTL/lzz_pEX.h>
+-#include<NTL/lzz_p.h>
+-#include<NTL/vector.h>
+-#include<NTL/pair.h>
+-#include<NTL/GF2X.h>
+-#include<NTL/GF2EX.h>
+-#include<NTL/ZZ.h>
+-#include<NTL/ZZX.h>
+-#include<NTL/ZZ_pX.h>
+-#ifdef NTL_CLIENT // in <NTL/tools.h>: using of name space NTL
+-NTL_CLIENT
+-#endif
+-//template class Vec<zz_p>;
+-//template class Vec<zz_pE>;
+-template class Mat<zz_p>;
+-template class Mat<zz_pE>;
+-template class Mat<ZZ>;
+-template class Vec<Pair<zz_pEX, long> >;
+-template class Vec<Pair<GF2EX, long> >;
+-//template class Vec<Pair<ZZX, long> >;
+-//template class Vec<Pair<ZZ_pX, long> >;
+-//template class Vec<Pair<GF2X, long> >;
+-//template void swap<zz_pE>(Vec<zz_pE>&, Vec<zz_pE>&);
+-//template long operator==<zz_p>(Vec<zz_p> const&, Vec<zz_p> const&);
+-#endif
+-
+-#endif
Copied: singular/repos/community-staging-x86_64/PKGBUILD (from rev 148795, singular/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2015-12-06 03:24:51 UTC (rev 148796)
@@ -0,0 +1,82 @@
+# $Id$
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Rémy Oudompheng <oudomphe at clipper.ens.fr>
+
+pkgname=singular
+pkgver=3.1.7.p1
+_majver=3-1-7
+pkgrel=13
+pkgdesc="Computer Algebra System for polynomial computations"
+arch=(i686 x86_64)
+url="http://www.singular.uni-kl.de/"
+license=(GPL)
+depends=(flint cddlib) # polymake
+options=(!buildflags)
+source=("http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/$_majver/Singular-${_majver}p1.tar.gz"
+"http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/src/$_majver/Singular-${_majver}-share.tar.gz" 'templates.patch' 'ntl8.patch'
+"http://git.sagemath.org/sage.git/plain/build/pkgs/singular/patches/currring.patch")
+md5sums=('ce369519d1c5d07342722e78240ea044'
+ 'b9177c00e95ee21b137984bade9fc481'
+ '8ca8ba06c846a8de189fff322d557705'
+ '2c028bbda467b437d5598ac07cd7211f'
+ '1fe968092b5e98878cd9b47c7d9acc81')
+
+prepare() {
+ cd Singular-$_majver
+ patch -p1 -i ../templates.patch
+# fix build against NTL 8
+ patch -p1 -i ../ntl8.patch
+# fix flint detection
+ sed -e 's|-lmpir|-lgmp|' -i factory/configure -i Singular/configure
+# fix segfault
+ patch -p1 -i ../currring.patch
+}
+
+build() {
+ cd Singular-$_majver
+
+ export CPP=/usr/bin/cpp
+ export CXXCPP=/usr/bin/cpp
+ export CFLAGS="-fPIC"
+ export CXXFLAGS="-fPIC"
+
+# force using system ntl
+ rm -r ntl
+
+ mkdir -p build
+
+ ./configure --prefix=$PWD/build/usr/lib/Singular \
+ --bindir=$PWD/build/usr/lib/Singular --libdir=$PWD/build/usr/lib/Singular \ # --includedir=$PWD/build/usr/include \
+ --with-apint=gmp --with-gmp=/usr --with-malloc=system --with-ntl=/usr --with-flint=/usr --disable-doc --with-NTL --without-MP --without-lex \
+ --enable-Singular --enable-factory --enable-libfac --enable-IntegerProgramming --enable-gfanlib
+ make install
+
+ export CFLAGS="$CFLAGS -DPIC -DLIBSINGULAR"
+ export CXXFLAGS="$CXXFLAGS -DPIC -DLIBSINGULAR"
+
+ ./configure --prefix=$PWD/build/usr/lib/Singular \
+ --bindir=$PWD/build/usr/lib/Singular --libdir=$PWD/build/usr/lib/Singular --includedir=$PWD/build/usr/include \
+ --with-apint=gmp --with-gmp=/usr --with-malloc=system --with-ntl=/usr --with-flint=/usr --disable-doc --with-NTL --without-MP \
+ --enable-Singular --enable-factory --enable-libfac --enable-IntegerProgramming
+ make clean
+ make install-libsingular
+
+# needed by Sage, not installed by default
+ cp Singular/sing_dbm.h build/usr/include/singular/
+}
+
+package() {
+ cd Singular-$_majver
+
+ cp -r build/* "$pkgdir"/
+
+ mkdir -p "$pkgdir"/usr/bin
+ ln -sf /usr/lib/Singular/Singular-$_majver "$pkgdir"/usr/lib/Singular/Singular
+ ln -s /usr/lib/Singular/Singular "$pkgdir"/usr/bin/
+ ln -s /usr/lib/Singular/libsingular.so "$pkgdir"/usr/lib/
+
+# Install docs
+ mkdir -p "$pkgdir"/usr/share/singular
+ install -m644 "$srcdir"/Singular/$_majver/info/singular.hlp "$pkgdir"/usr/share/singular/
+ install -m644 "$srcdir"/Singular/$_majver/doc/singular.idx "$pkgdir"/usr/share/singular/
+}
Copied: singular/repos/community-staging-x86_64/ntl8.patch (from rev 148795, singular/trunk/ntl8.patch)
===================================================================
--- community-staging-x86_64/ntl8.patch (rev 0)
+++ community-staging-x86_64/ntl8.patch 2015-12-06 03:24:51 UTC (rev 148796)
@@ -0,0 +1,47 @@
+From de688442dfe449992dc14a000bca0691ecc7e106 Mon Sep 17 00:00:00 2001
+From: Oleksandr Motsak <motsak at mathematik.uni-kl.de>
+Date: Sat, 14 Mar 2015 16:58:01 +0100
+Subject: [PATCH] Fixing incompatibility with NTL8
+
+---
+ factory/NTLconvert.cc | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/factory/NTLconvert.cc b/factory/NTLconvert.cc
+index 41ce9b2..e32093d 100644
+--- a/factory/NTLconvert.cc
++++ b/factory/NTLconvert.cc
+@@ -30,6 +30,7 @@
+ #include <NTL/GF2EXFactoring.h>
+ #include <NTL/tools.h>
+ #include <NTL/mat_ZZ.h>
++#include <NTL/version.h>
+ #include "int_int.h"
+ #include <limits.h>
+ #include "NTLconvert.h"
+@@ -500,8 +501,14 @@ convertZZ2CF (const ZZ & a)
+ return CanonicalForm(coeff_long);
+ }
+ else
+- {
+- long sizeofrep= ((long *) a.rep) [1];
++ {
++ const long * rep =
++#if NTL_MAJOR_VERSION <= 6
++ static_cast<long *>( a.rep );
++#else
++ static_cast<long *>( a.rep.rep ); // what about NTL7?
++#endif
++ long sizeofrep= rep[1];
+ bool lessZero= false;
+ if (sizeofrep < 0)
+ {
+@@ -519,7 +526,7 @@ convertZZ2CF (const ZZ & a)
+ cf_stringtemp_l= sizeofrep*sizeof(mp_limb_t)*2;
+ cf_stringtemp= (unsigned char*) Alloc (cf_stringtemp_l);
+ }
+- int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) (((long *) (a.rep)) + 2), sizeofrep);
++ int cc= mpn_get_str (cf_stringtemp, 16, (mp_limb_t *) ((rep) + 2), sizeofrep);
+
+ char* cf_stringtemp2;
+ if (lessZero)
Copied: singular/repos/community-staging-x86_64/templates.patch (from rev 148795, singular/trunk/templates.patch)
===================================================================
--- community-staging-x86_64/templates.patch (rev 0)
+++ community-staging-x86_64/templates.patch 2015-12-06 03:24:51 UTC (rev 148796)
@@ -0,0 +1,60 @@
+diff -druN latest.orig/factory/GNUmakefile.in latest/factory/GNUmakefile.in
+--- latest.orig/factory/GNUmakefile.in 2014-08-06 08:59:15.000000000 -0700
++++ latest/factory/GNUmakefile.in 2014-10-20 04:21:24.914606325 -0700
+@@ -98,11 +98,13 @@
+ @FLINT_CFLAGS@ $(DEFS) $(CPPFLAGS) $(CFLAGS)
+
+ # flags to translate library c++ files
+-LIBCXXFLAGS = $(WARNFLAGS) -fno-implicit-templates \
++#LIBCXXFLAGS = $(WARNFLAGS) -fno-implicit-templates
++LIBCXXFLAGS = $(WARNFLAGS) \
+ -I. -I.. -I$(srcdir) -I${prefix} -I$(includedir) \
+ @FLINT_CFLAGS@ $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
+
+-LIBCGGFLAGS = $(WARNFLAGS) -fno-implicit-templates \
++#LIBCGGFLAGS = $(WARNFLAGS) -fno-implicit-templates
++LIBCGGFLAGS = $(WARNFLAGS) \
+ -I. -I.. -I$(srcdir) -I${prefix} -I$(includedir) \
+ @FLINT_CFLAGS@ $(DEFS) $(CPPFLAGS)
+
+diff -druN latest.orig/Singular/claptmpl.cc latest.new/Singular/claptmpl.cc
+--- latest.orig/Singular/claptmpl.cc 2014-11-19 05:06:05.000000000 -0800
++++ latest.new/Singular/claptmpl.cc 2014-11-21 08:58:02.514808678 -0800
+@@ -122,37 +122,3 @@
+ template class std::list<PolyMinorValue>;
+ template class Cache<MinorKey, IntMinorValue>;
+ template class Cache<MinorKey, PolyMinorValue>;
+-
+-#ifdef HAVE_NTL
+-#include<NTL/version.h>
+-#if NTL_MAJOR_VERSION == 6
+-
+-#include<NTL/tools.h>
+-#include<NTL/lzz_pE.h>
+-#include<NTL/lzz_pEX.h>
+-#include<NTL/lzz_p.h>
+-#include<NTL/vector.h>
+-#include<NTL/pair.h>
+-#include<NTL/GF2X.h>
+-#include<NTL/GF2EX.h>
+-#include<NTL/ZZ.h>
+-#include<NTL/ZZX.h>
+-#include<NTL/ZZ_pX.h>
+-#ifdef NTL_CLIENT // in <NTL/tools.h>: using of name space NTL
+-NTL_CLIENT
+-#endif
+-//template class Vec<zz_p>;
+-//template class Vec<zz_pE>;
+-template class Mat<zz_p>;
+-template class Mat<zz_pE>;
+-template class Mat<ZZ>;
+-template class Vec<Pair<zz_pEX, long> >;
+-template class Vec<Pair<GF2EX, long> >;
+-//template class Vec<Pair<ZZX, long> >;
+-//template class Vec<Pair<ZZ_pX, long> >;
+-//template class Vec<Pair<GF2X, long> >;
+-//template void swap<zz_pE>(Vec<zz_pE>&, Vec<zz_pE>&);
+-//template long operator==<zz_p>(Vec<zz_p> const&, Vec<zz_p> const&);
+-#endif
+-
+-#endif
More information about the arch-commits
mailing list