diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2014-03-10 18:29:06 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2014-03-10 18:29:06 +0000 |
commit | 50e8699e747e485454232be2a979ec45379138f6 (patch) | |
tree | 9e7ec9ead5845f1310883bf3b789317a195dcf66 /dev-libs | |
parent | x86 stable, bug #493400 (diff) | |
download | gentoo-2-50e8699e747e485454232be2a979ec45379138f6.tar.gz gentoo-2-50e8699e747e485454232be2a979ec45379138f6.tar.bz2 gentoo-2-50e8699e747e485454232be2a979ec45379138f6.zip |
Version bump, mostly taken from sage-on-gentoo
(Portage version: 2.2.8-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/ntl/ChangeLog | 11 | ||||
-rw-r--r-- | dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch | 61 | ||||
-rw-r--r-- | dev-libs/ntl/files/ntl-6.0.0-singular.patch | 12 | ||||
-rw-r--r-- | dev-libs/ntl/ntl-6.0.0.ebuild | 75 |
4 files changed, 157 insertions, 2 deletions
diff --git a/dev-libs/ntl/ChangeLog b/dev-libs/ntl/ChangeLog index 61f12e4fbfdd..d71700058438 100644 --- a/dev-libs/ntl/ChangeLog +++ b/dev-libs/ntl/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-libs/ntl -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ChangeLog,v 1.22 2011/02/24 04:56:07 bicatali Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ChangeLog,v 1.23 2014/03/10 18:29:06 bicatali Exp $ + +*ntl-6.0.0 (10 Mar 2014) + + 10 Mar 2014; Sébastien Fabbro <bicatali@gentoo.org> + +files/ntl-6.0.0-sage-tools.patch, +files/ntl-6.0.0-singular.patch, + +ntl-6.0.0.ebuild: + Version bump, mostly taken from sage-on-gentoo 24 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> -ntl-5.3.ebuild, -ntl-5.3.2.ebuild, -ntl-5.4-r1.ebuild, -files/ntl-5.4-endless_testrun.patch, diff --git a/dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch b/dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch new file mode 100644 index 000000000000..e79731fc2fce --- /dev/null +++ b/dev-libs/ntl/files/ntl-6.0.0-sage-tools.patch @@ -0,0 +1,61 @@ +--- src.orig/src/tools.c 2012-08-06 11:54:53.652334400 +0200 ++++ src/src/tools.c 2012-08-06 11:59:18.183993600 +0200 +@@ -18,8 +18,35 @@ + 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(); + } +--- src.orig/include/NTL/tools.h 2012-08-06 11:54:52.830333000 +0200 ++++ src/include/NTL/tools.h 2012-08-06 11:59:18.143993600 +0200 +@@ -10,6 +10,7 @@ + + #include <cstdlib> + #include <cmath> ++#include <cstdio> + #include <iostream> + + #else +@@ -252,6 +253,12 @@ + 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); + diff --git a/dev-libs/ntl/files/ntl-6.0.0-singular.patch b/dev-libs/ntl/files/ntl-6.0.0-singular.patch new file mode 100644 index 000000000000..c172386f3102 --- /dev/null +++ b/dev-libs/ntl/files/ntl-6.0.0-singular.patch @@ -0,0 +1,12 @@ +--- src.orig/include/NTL/new.h 2012-08-06 17:12:25.658913083 +0200 ++++ src/include/NTL/new.h 2012-08-06 17:11:15.002915713 +0200 +@@ -12,7 +12,8 @@ + + #include <new> + +-#define NTL_NEW_OP new (std::nothrow) ++// commenting std::nothrow makes this ntl work properly with Singular ++#define NTL_NEW_OP new //(std::nothrow) + + + #else diff --git a/dev-libs/ntl/ntl-6.0.0.ebuild b/dev-libs/ntl/ntl-6.0.0.ebuild new file mode 100644 index 000000000000..8a12dc1f7b0b --- /dev/null +++ b/dev-libs/ntl/ntl-6.0.0.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ntl-6.0.0.ebuild,v 1.1 2014/03/10 18:29:06 bicatali Exp $ + +EAPI=5 +inherit toolchain-funcs eutils multilib flag-o-matic + +DESCRIPTION="High-performance and portable Number Theory C++ library" +HOMEPAGE="http://shoup.net/ntl/" +SRC_URI="http://www.shoup.net/ntl/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x64-macos" +IUSE="doc static-libs test" + +RDEPEND=" + dev-libs/gmp:0= + dev-libs/gf2x:0=" +DEPEND="${RDEPEND} + dev-lang/perl" + +S="${WORKDIR}/${P}/src" + +src_prepare() { + # fix parallel make + sed -i -e "s/make/make ${MAKEOPTS}/g" WizardAux || die + cd .. + # enable compatibility with singular + # implement a call back framework (submitted upstream) + # sanitize the makefile and allow the building of shared library + epatch \ + "${FILESDIR}"/${PN}-6.0.0-singular.patch \ + "${FILESDIR}"/${PN}-6.0.0-sage-tools.patch \ + "${FILESDIR}"/${PN}-5.5.2-shared.patch + replace-flags -O[3-9] -O2 +} + +src_configure() { + perl DoConfig \ + PREFIX="${EPREFIX}"/usr \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" \ + AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" \ + NTL_STD_CXX=on NTL_GMP_LIP=on NTL_GF2X_LIB=on \ + || die "DoConfig failed" +} + +src_compile() { + # split the targets to allow parallel make to run properly + emake setup1 setup2 + emake setup3 + sh Wizard on || die "Tuning wizard failed" + if use static-libs || use test; then + emake ntl.a + fi + local trg=so + [[ ${CHOST} == *-darwin* ]] && trg=dylib + emake shared${trg} +} + +src_install() { + dolib.so lib*$(get_libname) + use static-libs && newlib.a ntl.a libntl.a + + cd .. + insinto /usr/include + doins -r include/NTL + + dodoc README + if use doc ; then + dodoc doc/*.txt + dohtml doc/* + fi +} |