summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2015-07-10 14:16:04 +0000
committerThomas Kahle <tomka@gentoo.org>2015-07-10 14:16:04 +0000
commit5a6f84c50882cc848b2cf375b125ec63e3a4ef1f (patch)
tree37ea6840362002d50dfeb224fec5737fecebe5dc /dev-libs/ntl
parentCopy ~hppa keyword from udev, bug 554406. (diff)
downloadgentoo-2-5a6f84c50882cc848b2cf375b125ec63e3a4ef1f.tar.gz
gentoo-2-5a6f84c50882cc848b2cf375b125ec63e3a4ef1f.tar.bz2
gentoo-2-5a6f84c50882cc848b2cf375b125ec63e3a4ef1f.zip
bump to 9.3, thanks Francois Bissey
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 565C32BC)
Diffstat (limited to 'dev-libs/ntl')
-rw-r--r--dev-libs/ntl/ChangeLog9
-rw-r--r--dev-libs/ntl/files/ntl-9.2.0-sanitize-makefile.patch160
-rw-r--r--dev-libs/ntl/files/ntl-9.2.0-singular.patch13
-rw-r--r--dev-libs/ntl/ntl-9.3.0.ebuild82
4 files changed, 263 insertions, 1 deletions
diff --git a/dev-libs/ntl/ChangeLog b/dev-libs/ntl/ChangeLog
index 604ccf24789b..c92859bcde4d 100644
--- a/dev-libs/ntl/ChangeLog
+++ b/dev-libs/ntl/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/ntl
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ChangeLog,v 1.27 2015/04/02 12:29:55 tomka Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ChangeLog,v 1.28 2015/07/10 14:16:04 tomka Exp $
+
+*ntl-9.3.0 (10 Jul 2015)
+
+ 10 Jul 2015; Thomas Kahle <tomka@gentoo.org>
+ +files/ntl-9.2.0-sanitize-makefile.patch, +files/ntl-9.2.0-singular.patch,
+ +ntl-9.3.0.ebuild:
+ bump to 9.3, thanks Francois Bissey
*ntl-9.0.2 (02 Apr 2015)
diff --git a/dev-libs/ntl/files/ntl-9.2.0-sanitize-makefile.patch b/dev-libs/ntl/files/ntl-9.2.0-sanitize-makefile.patch
new file mode 100644
index 000000000000..2e8b77ae4b92
--- /dev/null
+++ b/dev-libs/ntl/files/ntl-9.2.0-sanitize-makefile.patch
@@ -0,0 +1,160 @@
+diff -Naur ntl-9.2.0.orig/src/DoConfig ntl-9.2.0/src/DoConfig
+--- ntl-9.2.0.orig/src/DoConfig 2015-07-09 21:45:26.959930693 +1200
++++ ntl-9.2.0/src/DoConfig 2015-07-09 21:46:52.250122780 +1200
+@@ -38,14 +38,16 @@
+
+ 'LDFLAGS' => '',
+ 'LDLIBS' => '-lm',
++'PICFLAG' => '-fPIC',
+ 'CPPFLAGS' => '',
+
+-'DEF_PREFIX' => '/usr/local',
++'DEF_PREFIX' => '/usr',
+
+ 'PREFIX' => '$(DEF_PREFIX)',
+ 'LIBDIR' => '$(PREFIX)/lib',
+ 'INCLUDEDIR' => '$(PREFIX)/include',
+ 'DOCDIR' => '$(PREFIX)/share/doc',
++'SHMAKE' => 'non-gld',
+
+ 'GMP_PREFIX' => '$(DEF_PREFIX)',
+ 'GMP_INCDIR' => '$(GMP_PREFIX)/include',
+diff -Naur ntl-9.2.0.orig/src/mfile ntl-9.2.0/src/mfile
+--- ntl-9.2.0.orig/src/mfile 2015-07-09 21:45:26.959930693 +1200
++++ ntl-9.2.0/src/mfile 2015-07-09 21:57:40.631583489 +1200
+@@ -109,6 +109,16 @@
+ WIZARD=@{WIZARD}
+ # Set to off if you want to bypass the wizard; otherwise, set to on.
+
++###############################################################
++#
++# New addition for shared library building. With gcc you need to
++# choose the Position Indepent Code flag. You have a choice of
++# -fpic better code but in rare case not available (ppc)
++# -fPIC slightly slower code but guaranted to work anywhere.
++#
++###############################################################
++
++PICFLAG=@{PICFLAG}
+
+ #################################################################
+ #
+@@ -141,6 +151,8 @@
+
+ OBJ=$(O19)
+
++SHOBJ=$(subst .o,.lo,$(OBJ))
++
+ # library source files
+
+
+@@ -314,6 +326,8 @@
+
+ LINK = $(CXX) $(NTL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS)
+
++.SUFFIXES: .lo
++
+
+
+ # 'make all' does a complete make, including all setup.
+@@ -322,11 +336,11 @@
+ # again.
+
+ all:
+- make setup1
+- make setup2
+- make setup3
+- make setup4
+- make ntl.a
++ ${MAKE} setup1
++ ${MAKE} setup2
++ ${MAKE} setup3
++ ${MAKE} setup4
++ ${MAKE} ntl.a
+ touch all
+
+
+@@ -373,22 +387,37 @@
+ lip.o: lip.c g_lip_impl.h c_lip_impl.h
+ $(LCOMP) $(COMPILE) $(GMP_OPT_INCDIR) lip.c
+
++lip.lo: lip.c g_lip_impl.h c_lip_impl.h
++ $(LCOMP) $(COMPILE) $(PICFLAG) $(GMP_OPT_INCDIR) lip.c -o lip.lo
++
+ ctools.o: ctools.c
+ $(LCOMP) $(COMPILE) ctools.c
+
++ctools.lo: ctools.c
++ $(LCOMP) $(COMPILE) $(PICFLAG) ctools.c -o ctools.lo
++
+
+ GetTime.o: GetTime.c
+ $(LCOMP) $(COMPILE) GetTime.c
+
++GetTime.lo: GetTime.c
++ $(LCOMP) $(COMPILE) $(PICFLAG) GetTime.c -o GetTime.lo
++
+ GetPID.o: GetPID.c
+ $(LCOMP) $(COMPILE) GetPID.c
+
++GetPID.lo: GetPID.c
++ $(LCOMP) $(COMPILE) $(PICFLAG) GetPID.c -o GetPID.lo
++
+ CheckPCLMUL: CheckPCLMUL.c
+ $(LINK) -o CheckPCLMUL CheckPCLMUL.c $(LDLIBS)
+
+ .c.o:
+ $(LCOMP) $(COMPILE) $(GF2X_OPT_INCDIR) $<
+
++.c.lo:
++ $(LCOMP) $(COMPILE) $(PICFLAG) $(GF2X_OPT_INCDIR) -o $@ $<
++
+ .c:
+ @{LSTAT} $(LINK) -o $@ $< ntl.a $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB) $(LDLIBS) #LSTAT
+ @{LSHAR} $(LIBTOOL) --tag=CXX --mode=link $(LINK) -o $@ $< libntl.la #LSHAR
+@@ -402,7 +431,7 @@
+
+ check:
+ sh RemoveProg $(PROGS)
+- make QuickTest
++ ${MAKE} QuickTest
+ ./QuickTest
+ sh RemoveProg QuickTest
+ sh TestScript
+@@ -459,21 +488,19 @@
+ #
+ #################################################################
+
+-clobber:
++clobber: clean
+ rm -f ntl.a mach_desc.h ../include/NTL/mach_desc.h GetTime.c GetPID.c
+ cp ../include/NTL/have_LL_no.h ../include/NTL/have_LL.h
+ cp ../include/NTL/have_builtin_clzl_no.h ../include/NTL/have_builtin_clzl.h
+ rm -f ../include/NTL/gmp_aux.h
+- sh RemoveProg $(PROGS) MakeDesc TestGetTime TestGetPID gen_gmp_aux
+- rm -f *.o
+- rm -rf small
++ sh RemoveProg $(PROGS)
+ rm -f cfileout mfileout
+ rm -rf .libs *.lo libntl.la
+ rm -f all
+
+ clean:
+ sh RemoveProg MakeDesc TestGetTime TestGetPID gen_gmp_aux
+- rm -f *.o
++ rm -f *.o *.lo
+ rm -rf small
+ @{LSHAR} - $(LIBTOOL) --mode=clean rm -f libntl.la *.lo #LSHAR
+
+@@ -558,4 +585,11 @@
+
+
+
++sharedso: DIRNAME $(SHOBJ)
++ $(LINK) $(PICFLAG) -shared -Wl,-soname,lib`cat DIRNAME`.so -o lib`cat DIRNAME`.so $(SHOBJ) $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB)
++ ln -s lib`cat DIRNAME`.so libntl.so
++
++shareddylib: DIRNAME $(SHOBJ)
++ $(LINK) $(PICFLAG) -dynamiclib -install_name $(LIBDIR)/lib`cat DIRNAME`.dylib -o lib`cat DIRNAME`.dylib $(SHOBJ) $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB)
++ ln -s lib`cat DIRNAME`.dylib libntl.dylib
+
diff --git a/dev-libs/ntl/files/ntl-9.2.0-singular.patch b/dev-libs/ntl/files/ntl-9.2.0-singular.patch
new file mode 100644
index 000000000000..58f9491c12a0
--- /dev/null
+++ b/dev-libs/ntl/files/ntl-9.2.0-singular.patch
@@ -0,0 +1,13 @@
+Modfiy new.h to accomodate Singular.
+--- 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 <NTL/config.h>
+ #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)
+
+
+ #endif
diff --git a/dev-libs/ntl/ntl-9.3.0.ebuild b/dev-libs/ntl/ntl-9.3.0.ebuild
new file mode 100644
index 000000000000..30a1edb05408
--- /dev/null
+++ b/dev-libs/ntl/ntl-9.3.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ntl-9.3.0.ebuild,v 1.1 2015/07/10 14:16:04 tomka 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:=
+ >=dev-libs/gf2x-0.9"
+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 ..
+ # sanitize the makefile and allow the building of shared library
+ epatch "${FILESDIR}"/${PN}-9.2.0-sanitize-makefile.patch
+ # enable compatibility with singular
+ epatch "${FILESDIR}"/${PN}-9.2.0-singular.patch
+ replace-flags -O[3-9] -O2
+}
+
+src_configure() {
+ perl DoConfig \
+ PREFIX="${EPREFIX}"/usr \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ NTL_GMP_LIP=on NTL_GF2X_LIB=on NTL_LEGACY_SP_MULMOD=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; then
+ emake ntl.a
+ fi
+ local trg=so
+ [[ ${CHOST} == *-darwin* ]] && trg=dylib
+ emake shared${trg}
+}
+
+src_install() {
+ if use static-libs; then
+ newlib.a ntl.a libntl.a
+ fi
+ dolib.so lib*$(get_libname)
+
+ cd ..
+ insinto /usr/include
+ doins -r include/NTL
+
+ dodoc README
+ if use doc ; then
+ dodoc doc/*.txt
+ dohtml doc/*
+ fi
+}
+
+src_test(){
+ # the current ebuild need static library to run tests
+ emake ntl.a
+
+ default
+}