[arch-commits] Commit in ntl (7 files)
Antonio Rojas
arojas at archlinux.org
Fri Dec 19 22:46:48 UTC 2014
Date: Friday, December 19, 2014 @ 23:46:48
Author: arojas
Revision: 124141
archrelease: copy trunk to community-i686, community-x86_64
Added:
ntl/repos/
ntl/repos/community-i686/
ntl/repos/community-i686/PKGBUILD
(from rev 124140, ntl/trunk/PKGBUILD)
ntl/repos/community-i686/ntl-sage.patch
(from rev 124140, ntl/trunk/ntl-sage.patch)
ntl/repos/community-x86_64/
ntl/repos/community-x86_64/PKGBUILD
(from rev 124140, ntl/trunk/PKGBUILD)
ntl/repos/community-x86_64/ntl-sage.patch
(from rev 124140, ntl/trunk/ntl-sage.patch)
---------------------------------+
community-i686/PKGBUILD | 38 ++++++++++++++++++++++++++++
community-i686/ntl-sage.patch | 51 ++++++++++++++++++++++++++++++++++++++
community-x86_64/PKGBUILD | 38 ++++++++++++++++++++++++++++
community-x86_64/ntl-sage.patch | 51 ++++++++++++++++++++++++++++++++++++++
4 files changed, 178 insertions(+)
Copied: ntl/repos/community-i686/PKGBUILD (from rev 124140, ntl/trunk/PKGBUILD)
===================================================================
--- repos/community-i686/PKGBUILD (rev 0)
+++ repos/community-i686/PKGBUILD 2014-12-19 22:46:48 UTC (rev 124141)
@@ -0,0 +1,38 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Brad Conte <brad AT bradconte.com>
+
+pkgname=ntl
+pkgver=6.2.1
+pkgrel=1
+pkgdesc="A Library for doing Number Theory"
+arch=('i686' 'x86_64')
+url="http://www.shoup.net/ntl/"
+license=('GPL')
+depends=('gf2x' 'gmp')
+makedepends=()
+options=('!libtool')
+source=("http://www.shoup.net/$pkgname/$pkgname-$pkgver.tar.gz" 'ntl-sage.patch')
+md5sums=('00b7e1cab9bf9b0eae2ad9beab4b0fc9'
+ 'a95cae771ac6fc823c8c09cd05d40461')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p0 -i $srcdir/ntl-sage.patch
+}
+
+build() {
+ cd $pkgname-$pkgver/src
+ ./configure DEF_PREFIX=/usr SHARED=on NTL_GF2X_LIB=on NTL_GMP_LIP=on
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver/src
+ make -k check
+}
+
+package() {
+ cd $pkgname-$pkgver/src
+ make PREFIX="$pkgdir/usr" install
+}
+
Copied: ntl/repos/community-i686/ntl-sage.patch (from rev 124140, ntl/trunk/ntl-sage.patch)
===================================================================
--- repos/community-i686/ntl-sage.patch (rev 0)
+++ repos/community-i686/ntl-sage.patch 2014-12-19 22:46:48 UTC (rev 124141)
@@ -0,0 +1,51 @@
+--- ./include/NTL/tools.h.orig 2014-08-26 11:51:43.000000000 -0600
++++ ./include/NTL/tools.h 2014-09-18 20:00:00.000000000 -0600
+@@ -310,6 +310,12 @@ long CharToIntVal(long c);
+ char IntValToChar(long a);
+
+
++/*
++ This function is not present in vanilla NTL.
++ See tools.c for documentation.
++ */
++void SetErrorCallbackFunction(void (*func)(const char *s, void *context),
++ void *context);
+
+ void Error(const char *s);
+
+--- ./src/tools.c.orig 2014-08-26 11:51:42.000000000 -0600
++++ ./src/tools.c 2014-09-18 20:00:00.000000000 -0600
+@@ -17,9 +17,33 @@ NTL_START_IMPL
+
+ NTL_THREAD_LOCAL void (*ErrorCallback)() = 0;
+
++/*
++ The following code differs from vanilla NTL.
++
++ We add a SetErrorCallbackFunction(). This sets a global callback function
++ _function_, which gets called with parameter _context_ and an error
++ message string whenever Error() gets called.
++
++ Note that if the custom error handler *returns*, then NTL will dump the
++ error message back to stderr and abort() as it habitually does.
++
++ -- David Harvey (2008-04-12)
++*/
++
++void (*ErrorCallbackFunction)(const char*, void*) = NULL;
++void *ErrorCallbackContext = NULL;
++
++void SetErrorCallbackFunction(void (*function)(const char*, void*), void *context)
++{
++ ErrorCallbackFunction = function;
++ ErrorCallbackContext = context;
++}
+
+ void Error(const char *s)
+ {
++ if (ErrorCallbackFunction != NULL)
++ ErrorCallbackFunction(s, ErrorCallbackContext);
++
+ cerr << s << "\n";
+ _ntl_abort();
+ }
\ No newline at end of file
Copied: ntl/repos/community-x86_64/PKGBUILD (from rev 124140, ntl/trunk/PKGBUILD)
===================================================================
--- repos/community-x86_64/PKGBUILD (rev 0)
+++ repos/community-x86_64/PKGBUILD 2014-12-19 22:46:48 UTC (rev 124141)
@@ -0,0 +1,38 @@
+# Maintainer: Antonio Rojas <arojas at archlinux.org>
+# Contributor: Brad Conte <brad AT bradconte.com>
+
+pkgname=ntl
+pkgver=6.2.1
+pkgrel=1
+pkgdesc="A Library for doing Number Theory"
+arch=('i686' 'x86_64')
+url="http://www.shoup.net/ntl/"
+license=('GPL')
+depends=('gf2x' 'gmp')
+makedepends=()
+options=('!libtool')
+source=("http://www.shoup.net/$pkgname/$pkgname-$pkgver.tar.gz" 'ntl-sage.patch')
+md5sums=('00b7e1cab9bf9b0eae2ad9beab4b0fc9'
+ 'a95cae771ac6fc823c8c09cd05d40461')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p0 -i $srcdir/ntl-sage.patch
+}
+
+build() {
+ cd $pkgname-$pkgver/src
+ ./configure DEF_PREFIX=/usr SHARED=on NTL_GF2X_LIB=on NTL_GMP_LIP=on
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver/src
+ make -k check
+}
+
+package() {
+ cd $pkgname-$pkgver/src
+ make PREFIX="$pkgdir/usr" install
+}
+
Copied: ntl/repos/community-x86_64/ntl-sage.patch (from rev 124140, ntl/trunk/ntl-sage.patch)
===================================================================
--- repos/community-x86_64/ntl-sage.patch (rev 0)
+++ repos/community-x86_64/ntl-sage.patch 2014-12-19 22:46:48 UTC (rev 124141)
@@ -0,0 +1,51 @@
+--- ./include/NTL/tools.h.orig 2014-08-26 11:51:43.000000000 -0600
++++ ./include/NTL/tools.h 2014-09-18 20:00:00.000000000 -0600
+@@ -310,6 +310,12 @@ long CharToIntVal(long c);
+ char IntValToChar(long a);
+
+
++/*
++ This function is not present in vanilla NTL.
++ See tools.c for documentation.
++ */
++void SetErrorCallbackFunction(void (*func)(const char *s, void *context),
++ void *context);
+
+ void Error(const char *s);
+
+--- ./src/tools.c.orig 2014-08-26 11:51:42.000000000 -0600
++++ ./src/tools.c 2014-09-18 20:00:00.000000000 -0600
+@@ -17,9 +17,33 @@ NTL_START_IMPL
+
+ NTL_THREAD_LOCAL void (*ErrorCallback)() = 0;
+
++/*
++ The following code differs from vanilla NTL.
++
++ We add a SetErrorCallbackFunction(). This sets a global callback function
++ _function_, which gets called with parameter _context_ and an error
++ message string whenever Error() gets called.
++
++ Note that if the custom error handler *returns*, then NTL will dump the
++ error message back to stderr and abort() as it habitually does.
++
++ -- David Harvey (2008-04-12)
++*/
++
++void (*ErrorCallbackFunction)(const char*, void*) = NULL;
++void *ErrorCallbackContext = NULL;
++
++void SetErrorCallbackFunction(void (*function)(const char*, void*), void *context)
++{
++ ErrorCallbackFunction = function;
++ ErrorCallbackContext = context;
++}
+
+ void Error(const char *s)
+ {
++ if (ErrorCallbackFunction != NULL)
++ ErrorCallbackFunction(s, ErrorCallbackContext);
++
+ cerr << s << "\n";
+ _ntl_abort();
+ }
\ No newline at end of file
More information about the arch-commits
mailing list