From af17b754c04607c4d73aefbdb67a83280ab151b4 Mon Sep 17 00:00:00 2001 From: Sebastien Fabbro Date: Wed, 26 Aug 2009 18:28:40 +0000 Subject: Version bump. Now gmp and gf2x are forced. Fixed parallel building, and hopefully as-needed issues (bug #282174). Simplified the shared lib patch. Added sci-mathematics herd as co-maintainer. Package-Manager: portage-2.2_rc38/cvs/Linux x86_64 --- dev-libs/ntl/ChangeLog | 13 +- dev-libs/ntl/Manifest | 19 +-- dev-libs/ntl/files/linux.mk | 3 - dev-libs/ntl/files/ntl-5.5.1-sage-tools.patch | 53 ------- dev-libs/ntl/files/ntl-5.5.1-shared.patch | 191 -------------------------- dev-libs/ntl/files/ntl-5.5.1-singular.patch | 12 -- dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch | 53 +++++++ dev-libs/ntl/files/ntl-5.5.2-shared.patch | 162 ++++++++++++++++++++++ dev-libs/ntl/files/ntl-5.5.2-singular.patch | 12 ++ dev-libs/ntl/metadata.xml | 1 + dev-libs/ntl/ntl-5.5.2.ebuild | 68 +++++++++ 11 files changed, 318 insertions(+), 269 deletions(-) delete mode 100644 dev-libs/ntl/files/linux.mk delete mode 100644 dev-libs/ntl/files/ntl-5.5.1-sage-tools.patch delete mode 100644 dev-libs/ntl/files/ntl-5.5.1-shared.patch delete mode 100644 dev-libs/ntl/files/ntl-5.5.1-singular.patch create mode 100644 dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch create mode 100644 dev-libs/ntl/files/ntl-5.5.2-shared.patch create mode 100644 dev-libs/ntl/files/ntl-5.5.2-singular.patch create mode 100644 dev-libs/ntl/ntl-5.5.2.ebuild (limited to 'dev-libs/ntl') diff --git a/dev-libs/ntl/ChangeLog b/dev-libs/ntl/ChangeLog index 3f0aee68d842..0b386a4ded2a 100644 --- a/dev-libs/ntl/ChangeLog +++ b/dev-libs/ntl/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-libs/ntl # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ChangeLog,v 1.14 2009/08/10 23:22:39 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ChangeLog,v 1.15 2009/08/26 18:28:40 bicatali Exp $ + +*ntl-5.5.2 (26 Aug 2009) + + 26 Aug 2009; Sébastien Fabbro + -files/ntl-5.5.1-sage-tools.patch, -files/ntl-5.5.1-shared.patch, + -files/ntl-5.5.1-singular.patch, +ntl-5.5.2.ebuild, + +files/ntl-5.5.2-sage-tools.patch, +files/ntl-5.5.2-shared.patch, + +files/ntl-5.5.2-singular.patch, -files/linux.mk, metadata.xml: + Version bump. Now gmp and gf2x are forced. Fixed parallel building, and + hopefully as-needed issues (bug #282174). Simplified the shared lib patch. + Added sci-mathematics herd as co-maintainer. *ntl-5.5.1 (10 Aug 2009) diff --git a/dev-libs/ntl/Manifest b/dev-libs/ntl/Manifest index 2736ff2ff0ce..4d7850554127 100644 --- a/dev-libs/ntl/Manifest +++ b/dev-libs/ntl/Manifest @@ -1,25 +1,26 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -AUX linux.mk 191 RMD160 808b1ffeb5644e0cd40cd92e3a50e6d05205b80c SHA1 f6d54c0fb910cbe19b1695c1b9366a361ade407c SHA256 f60d24eb8eb56091cf8fde8fd2bb6aa6314c22275ab43050f5eb4c36fef4ee06 AUX ntl-5.4-endless_testrun.patch 553 RMD160 8ceec8cd9a045cdcd1ccbe292505cf1fc61ecfd1 SHA1 4762cb521d2d79f75a9c7a9179814ac19f1b378e SHA256 0c136339945a59983b1bd284825443e543f77d8111fa645c32ed6cf00795f1c7 -AUX ntl-5.5.1-sage-tools.patch 1425 RMD160 6aeda2881371064f8227a2f4c76e5d9bb8f668b8 SHA1 00276e8c150f6860fa5a5afe705215564c2e594e SHA256 241fae4b90fd763ff2e0d2baad62f174df2cc82801912d2e71649e8b4a0e4466 -AUX ntl-5.5.1-shared.patch 5577 RMD160 5b92623b3c03beb9b5897099f6c9723c15d6a7d4 SHA1 9da2cdd1099205b97de5ea2bc3ab99d27909832a SHA256 361952f59c6c3d542317df3c02339d3064b1cb72055aad45976e813cdc9b0ec6 -AUX ntl-5.5.1-singular.patch 324 RMD160 72995f19869a21384e6c3750f4630415263c0187 SHA1 4e11406616217bcf6619221108a4b595483ba090 SHA256 2b9c1b1504ede6d9332fcb6e63bba93f81d528f0d035ebdbd8f32b2085c1f110 +AUX ntl-5.5.2-sage-tools.patch 1411 RMD160 b02476fed551c847dc44e11f5f24a60c48248e74 SHA1 a4edfaa1357317f223f58ada12bb3ea995c602b0 SHA256 ca3ab5d6fc295d8825c32e307086b686ccc56f58d3aa69bb810d1a50c4f05a27 +AUX ntl-5.5.2-shared.patch 4074 RMD160 91412eba5a5fd5e629f242c4bbe51f37fc919f5e SHA1 2babf60d8693d184e97b9fe96227bf1a4fc1f68b SHA256 bbfb89a154f1762cf2a7ae71860a66e6ef3fbed0362d8179056855512862f48e +AUX ntl-5.5.2-singular.patch 324 RMD160 72995f19869a21384e6c3750f4630415263c0187 SHA1 4e11406616217bcf6619221108a4b595483ba090 SHA256 2b9c1b1504ede6d9332fcb6e63bba93f81d528f0d035ebdbd8f32b2085c1f110 DIST ntl-5.3.2.tar.gz 669944 RMD160 981fa271f607aa30603084abcff25f055c267daa SHA1 6fa67ab5ca5d228938a62d3a069d9163492cbcee SHA256 a8d140f30657a7554a0d984d18cf057312f0f77d8da05ea11a50b8a2701d7c32 DIST ntl-5.3.tar.gz 670004 RMD160 0dcbc7fec88b7be9189a7b9717f75e4bf9c73b94 SHA1 e38628c3aa8bcc17460e652344af7f7c8a21b96d SHA256 8cf6284f251063eb8b13767b0d63fec8888ac96ffc9239bf6df6f787a414333f DIST ntl-5.4.tar.gz 681173 RMD160 4bb73568aaaa13a861df62e0b6d8470d70ce96ad SHA1 a39542a3df1d29c51923a22700e1b40680ba0d19 SHA256 aa24084151235932c29d08377c2c1b2a8a907d1aa1b608103cc4dc42f38bb9bd DIST ntl-5.5.1.tar.gz 704256 RMD160 cd80d09e2405899229812d5c26a6d79ac5fc11d2 SHA1 14e8353a5d31e38da0771c740a164fe0680dc527 SHA256 0ba5047aae4522b0f342fe32a2b529fc29a7e0eb4818b5a7274ab7a6d6684f70 +DIST ntl-5.5.2.tar.gz 707247 RMD160 3ba508219276b3922ec6def391100a23b79f6193 SHA1 b45e3858f7f351afeb7fbb831b256befc4892b06 SHA256 ef7fe7c8b60ec6e05b2a279caad0081263f7fb68b7360120846644cde726ff56 EBUILD ntl-5.3.2.ebuild 900 RMD160 50888985c7476775bac81b7aa7d51b52327c93e4 SHA1 f331bca4f0d6934a582c8e00670d99a86a2f72a3 SHA256 f93730d36a0178c5b0ec6eed6ae1ff72875683f46c2e4c2d5e6992bfe7110b70 EBUILD ntl-5.3.ebuild 875 RMD160 c7a700f0c9a7d2a4eab8e69c6026d36597f586d1 SHA1 ec9fc1e9e1c5bb8ea5ad491c07610f41426df050 SHA256 ec52d42245d87a0a53b0928c65c5994a1970d3415c69583671515ff7613a2702 EBUILD ntl-5.4-r1.ebuild 1226 RMD160 0bcfd914be46a714c109edb2a7e9b246ffa5a1e4 SHA1 d4cb8ab675e62643c0a12c2254b03e5b6e1a7b5d SHA256 ac61a4d20b9b9d3fdcb1b0a766f017e09a03b81abb695612db0ffaca48802d4e EBUILD ntl-5.5.1.ebuild 1814 RMD160 836c6690246945ec33a5327388d9c51c5c204cc6 SHA1 ae20b52d97f2ce0f241ccd993e86dcc7558d0e4f SHA256 58a77dbef5285b3f83b6542f3dfe67cd831d137015b1c76aa148815cc680cb03 -MISC ChangeLog 2123 RMD160 fe7e0c0bd61a9ffb9b8c92b284355198a1ed8e33 SHA1 636a7b33945db75d1e81c2cfce8d3e99dfdb9d94 SHA256 a38bd8d9dee3115a6668b0828902987395392575ffb385ac75188947c445d6b7 -MISC metadata.xml 550 RMD160 563fb54e3174caa7368ad7b7cc6a39662b5701d2 SHA1 ff89a8b2869d856bdd4fd18a31ae725a18a4599c SHA256 6cdd7918a3a5bd3746db180dfd5c195a9214558d78a75447ea64f21766b73b10 +EBUILD ntl-5.5.2.ebuild 1879 RMD160 8df14eda7cb5af405288dd69d95874a74444cb9b SHA1 0e41496cb1f19314e04782a4f8e491233811411d SHA256 bb1e9a088ca0a654d0423501343c36e05707e9383a3a62328605ed10cd6f39d3 +MISC ChangeLog 2659 RMD160 9ccc6c905645769351f6018dfdd8ce3fbc96151c SHA1 d3ce83af12b91a887cf8aca27b18520c2842a5c4 SHA256 2b27a7187d64af89b398d2b5d150a66e2bc3aa1463f3bc6f374c6bcb0f9356f1 +MISC metadata.xml 579 RMD160 17662be54af2cb99612a3deed5f83901bcaf01b2 SHA1 5abfde20af7fa46f05eea5d67e0615bf7d78e4df SHA256 32fdc1246df231a1a9f6d987a7ce83e20c6dd77f1bdbc103dd803a4cbd37ab7a -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkqAq8kACgkQ1ycZbhPLE2A8wgCgp5c78mZeJFyxAehtdmtE3LID -yVIAoK18w0lVEufsy5v04RDuMaQ7vPek -=QmvZ +iEYEARECAAYFAkqVfuQACgkQ1ycZbhPLE2BWFgCdHWyPddOddpznHQYwXtOD8fix +sBoAnjGYeHmqIItxhqEbam6KZkGGU+ct +=MXj9 -----END PGP SIGNATURE----- diff --git a/dev-libs/ntl/files/linux.mk b/dev-libs/ntl/files/linux.mk deleted file mode 100644 index 5df3673c3018..000000000000 --- a/dev-libs/ntl/files/linux.mk +++ /dev/null @@ -1,3 +0,0 @@ -shared: DIRNAME $(SHOBJ) - $(LINK_CXX) $(PICFLAG) -shared -Wl,-soname,lib`cat DIRNAME`.so -o lib`cat DIRNAME`.so $(SHOBJ) $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) - ln -s lib`cat DIRNAME`.so libntl.so diff --git a/dev-libs/ntl/files/ntl-5.5.1-sage-tools.patch b/dev-libs/ntl/files/ntl-5.5.1-sage-tools.patch deleted file mode 100644 index 28914b95b959..000000000000 --- a/dev-libs/ntl/files/ntl-5.5.1-sage-tools.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- include/NTL/tools.h.orig 2008-05-06 22:14:06.000000000 +1200 -+++ include/NTL/tools.h 2008-05-06 22:14:23.000000000 +1200 -@@ -249,6 +249,12 @@ - char IntValToChar(long a); - - -+/* -+ This function is not present in vanilla NTL 5.4.2. -+ 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 2008-05-06 22:15:32.000000000 +1200 -+++ src/tools.c 2008-05-06 22:15:45.000000000 +1200 -@@ -8,8 +8,35 @@ - NTL_START_IMPL - - -+/* -+ The following code differs from vanilla NTL 5.4.2. -+ -+ 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"; - abort(); - } diff --git a/dev-libs/ntl/files/ntl-5.5.1-shared.patch b/dev-libs/ntl/files/ntl-5.5.1-shared.patch deleted file mode 100644 index 91c0bdd6ecde..000000000000 --- a/dev-libs/ntl/files/ntl-5.5.1-shared.patch +++ /dev/null @@ -1,191 +0,0 @@ ---- src/DoConfig.orig 2009-05-05 07:46:39.000000000 +0100 -+++ src/DoConfig 2009-08-10 19:24:43.000000000 +0100 -@@ -25,14 +25,16 @@ - 'LDFLAGS_CXX' => '$(LDFLAGS)', - 'LDLIBS' => '-lm', - 'LDLIBS_CXX' => '$(LDLIBS)', -+'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', -@@ -87,11 +89,6 @@ - - foreach $arg (@ARGV) { - -- if ($arg =~ '-h|help|-help|--help') { -- system("more ../doc/config.txt"); -- exit; -- } -- - if (($name, $val) = ($arg =~ /(.*?)=(.*)/)) { - - if (exists($MakeFlag{$name}) && ($val =~ 'on|off')) { - - - ---- src/mfile.orig 2009-05-05 07:46:39.000000000 +0100 -+++ src/mfile 2009-08-10 20:31:36.000000000 +0100 -@@ -77,6 +77,11 @@ - # where to install NTL - - ############################################################### -+# choose the appropriate shared object makefile -+############################################################### -+SHMAKE=@{SHMAKE} -+ -+############################################################### - # - # Second, if you want to use GMP (the GNU Multi-Precision library), - # define the variables GMP_OPT_INCDIR, GMP_OPT_LIBDIR, GMP_OPT_LIB below. -@@ -141,6 +146,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} - - ################################################################# - # -@@ -173,6 +188,27 @@ - - OBJ=$(O19) - -+SHOBJ=FFT.lo FacVec.lo GF2.lo GF2E.lo GF2EX.lo GF2EXFactoring.lo GF2X.lo GF2X1.lo \ -+ GF2XFactoring.lo GF2XVec.lo GetTime.lo HNF.lo ctools.lo LLL.lo LLL_FP.lo \ -+ LLL_QP.lo LLL_RR.lo LLL_XD.lo RR.lo WordVector.lo ZZ.lo ZZVec.lo \ -+ ZZX.lo ZZX1.lo ZZXCharPoly.lo ZZXFactoring.lo ZZ_p.lo ZZ_pE.lo ZZ_pEX.lo \ -+ ZZ_pEXFactoring.lo ZZ_pX.lo ZZ_pX1.lo ZZ_pXCharPoly.lo ZZ_pXFactoring.lo \ -+ fileio.lo lip.lo lzz_p.lo lzz_pE.lo lzz_pEX.lo lzz_pEXFactoring.lo \ -+ lzz_pX.lo lzz_pX1.lo lzz_pXCharPoly.lo lzz_pXFactoring.lo \ -+ mat_GF2.lo mat_GF2E.lo mat_RR.lo mat_ZZ.lo mat_ZZ_p.lo \ -+ mat_ZZ_pE.lo mat_lzz_p.lo mat_lzz_pE.lo mat_poly_ZZ.lo \ -+ mat_poly_ZZ_p.lo mat_poly_lzz_p.lo pair_GF2EX_long.lo \ -+ pair_GF2X_long.lo pair_ZZX_long.lo pair_ZZ_pEX_long.lo \ -+ pair_ZZ_pX_long.lo pair_lzz_pEX_long.lo pair_lzz_pX_long.lo \ -+ quad_float.lo tools.lo vec_GF2.lo vec_GF2E.lo vec_GF2XVec.lo \ -+ vec_RR.lo vec_ZZ.lo vec_ZZVec.lo vec_ZZ_p.lo vec_ZZ_pE.lo \ -+ vec_double.lo vec_long.lo vec_lzz_p.lo vec_lzz_pE.lo vec_quad_float.lo \ -+ vec_vec_GF2.lo vec_vec_GF2E.lo vec_vec_RR.lo vec_vec_ZZ.lo \ -+ vec_vec_ZZ_p.lo vec_vec_ZZ_pE.lo vec_vec_long.lo vec_vec_lzz_p.lo \ -+ vec_vec_lzz_pE.lo vec_xdouble.lo xdouble.lo \ -+ G_LLL_FP.lo G_LLL_QP.lo G_LLL_XD.lo G_LLL_RR.lo vec_ulong.lo vec_vec_ulong.lo -+ -+ - # library source files - - -@@ -320,7 +356,7 @@ - LINK = $(CC) $(NTL_INCLUDE) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) - LINK_CXX = $(CXX) $(NTL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS_CXX) - -- -+.SUFFIXES: .lo - - # 'make all' does a complete make, including all setup. - # It also creates the file 'all', which means you should -@@ -328,11 +364,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 - - -@@ -378,18 +414,31 @@ - lip.o: lip.c g_lip_impl.h c_lip_impl.h lip_gmp_aux_impl.h - $(LCOMP) $(COMPILE) $(GMP_OPT_INCDIR) lip.c - -+lip.lo: lip.c g_lip_impl.h c_lip_impl.h lip_gmp_aux_impl.h -+ $(LCOMP) $(COMPILE) $(PICFLAG) $(GMP_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 - - .c.o: - $(LCOMP) $(COMPILE_CXX) $(GF2X_OPT_INCDIR) $< - -+.c.lo: -+ $(LCOMP) $(COMPILE_CXX) $(PICFLAG) $(GF2X_OPT_INCDIR) -o $@ $< -+ -+ - .c: - @{LSTAT} $(LINK_CXX) -o $@ $< ntl.a $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB) $(LDLIBS_CXX) #LSTAT - @{LSHAR} $(LIBTOOL) --mode=link $(LINK_CXX) -o $@ $< libntl.la #LSHAR -@@ -403,7 +452,7 @@ - - check: - sh RemoveProg $(PROGS) -- make QuickTest -+ $(MAKE) QuickTest - ./QuickTest - sh RemoveProg QuickTest - sh TestScript -@@ -460,19 +509,18 @@ - # - ################################################################# - --clobber: -+clobber: clean - rm -f ntl.a mach_desc.h ../include/NTL/mach_desc.h GetTime.c - rm -f lip_gmp_aux_impl.h ../include/NTL/gmp_aux.h -- sh RemoveProg $(PROGS) MakeDesc TestGetTime gen_lip_gmp_aux gen_gmp_aux -- rm -f *.o -- rm -rf small -+ sh RemoveProg $(PROGS) -+ rm -f libntl*.so* - rm -f cfileout mfileout - rm -rf .libs *.lo libntl.la - rm -f all - - clean: - sh RemoveProg MakeDesc TestGetTime gen_lip_gmp_aux gen_gmp_aux -- rm -f *.o -+ rm -f *.o *.lo - rm -rf small - @{LSHAR} - $(LIBTOOL) --mode=clean rm -f libntl.la *.lo #LSHAR - -@@ -549,3 +597,4 @@ - - - -+sinclude $(SHMAKE).mk diff --git a/dev-libs/ntl/files/ntl-5.5.1-singular.patch b/dev-libs/ntl/files/ntl-5.5.1-singular.patch deleted file mode 100644 index 9f0d13140cee..000000000000 --- a/dev-libs/ntl/files/ntl-5.5.1-singular.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- include/NTL/new.h.orig 2008-05-06 21:56:16.000000000 +1200 -+++ include/NTL/new.h 2008-05-06 21:56:33.000000000 +1200 -@@ -12,7 +12,8 @@ - - #include - --#define NTL_NEW_OP new (std::nothrow) -+// uncommenting std::nothrow makes this ntl work properly with Singular -+#define NTL_NEW_OP new //(std::nothrow) - - - #else diff --git a/dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch b/dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch new file mode 100644 index 000000000000..fafa97356cd8 --- /dev/null +++ b/dev-libs/ntl/files/ntl-5.5.2-sage-tools.patch @@ -0,0 +1,53 @@ +--- include/NTL/tools.h.orig 2008-05-06 22:14:06.000000000 +1200 ++++ include/NTL/tools.h 2008-05-06 22:14:23.000000000 +1200 +@@ -249,6 +249,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); + +--- src/tools.c.orig 2008-05-06 22:15:32.000000000 +1200 ++++ src/tools.c 2008-05-06 22:15:45.000000000 +1200 +@@ -8,8 +8,35 @@ + NTL_START_IMPL + + ++/* ++ 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"; + abort(); + } diff --git a/dev-libs/ntl/files/ntl-5.5.2-shared.patch b/dev-libs/ntl/files/ntl-5.5.2-shared.patch new file mode 100644 index 000000000000..cd832792e0d1 --- /dev/null +++ b/dev-libs/ntl/files/ntl-5.5.2-shared.patch @@ -0,0 +1,162 @@ +--- src/DoConfig.orig 2009-05-05 07:46:39.000000000 +0100 ++++ src/DoConfig 2009-08-10 19:24:43.000000000 +0100 +@@ -25,14 +25,16 @@ + 'LDFLAGS_CXX' => '$(LDFLAGS)', + 'LDLIBS' => '-lm', + 'LDLIBS_CXX' => '$(LDLIBS)', ++'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', +@@ -87,11 +89,6 @@ + + foreach $arg (@ARGV) { + +- if ($arg =~ '-h|help|-help|--help') { +- system("more ../doc/config.txt"); +- exit; +- } +- + if (($name, $val) = ($arg =~ /(.*?)=(.*)/)) { + + if (exists($MakeFlag{$name}) && ($val =~ 'on|off')) { + + + +--- src/mfile.orig 2009-05-05 07:46:39.000000000 +0100 ++++ src/mfile 2009-08-10 20:31:36.000000000 +0100 +@@ -141,6 +146,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} + + ################################################################# + # +@@ -173,6 +188,8 @@ + + OBJ=$(O19) + ++SHOBJ=$(subst .o,.lo,$(OBJ)) ++ + # library source files + + +@@ -320,7 +356,7 @@ + LINK = $(CC) $(NTL_INCLUDE) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) + LINK_CXX = $(CXX) $(NTL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS_CXX) + +- ++.SUFFIXES: .lo + + # 'make all' does a complete make, including all setup. + # It also creates the file 'all', which means you should +@@ -328,11 +364,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 + + +@@ -378,18 +414,31 @@ + lip.o: lip.c g_lip_impl.h c_lip_impl.h lip_gmp_aux_impl.h + $(LCOMP) $(COMPILE) $(GMP_OPT_INCDIR) lip.c + ++lip.lo: lip.c g_lip_impl.h c_lip_impl.h lip_gmp_aux_impl.h ++ $(LCOMP) $(COMPILE) $(PICFLAG) $(GMP_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 + + .c.o: + $(LCOMP) $(COMPILE_CXX) $(GF2X_OPT_INCDIR) $< + ++.c.lo: ++ $(LCOMP) $(COMPILE_CXX) $(PICFLAG) $(GF2X_OPT_INCDIR) -o $@ $< ++ ++ + .c: + @{LSTAT} $(LINK_CXX) -o $@ $< ntl.a $(GMP_OPT_LIBDIR) $(GMP_OPT_LIB) $(GF2X_OPT_LIBDIR) $(GF2X_OPT_LIB) $(LDLIBS_CXX) #LSTAT + @{LSHAR} $(LIBTOOL) --mode=link $(LINK_CXX) -o $@ $< libntl.la #LSHAR +@@ -403,7 +452,7 @@ + + check: + sh RemoveProg $(PROGS) +- make QuickTest ++ $(MAKE) QuickTest + ./QuickTest + sh RemoveProg QuickTest + sh TestScript +@@ -460,19 +509,18 @@ + # + ################################################################# + +-clobber: ++clobber: clean + rm -f ntl.a mach_desc.h ../include/NTL/mach_desc.h GetTime.c + rm -f lip_gmp_aux_impl.h ../include/NTL/gmp_aux.h +- sh RemoveProg $(PROGS) MakeDesc TestGetTime gen_lip_gmp_aux gen_gmp_aux +- rm -f *.o +- rm -rf small ++ sh RemoveProg $(PROGS) ++ rm -f libntl*.so* + rm -f cfileout mfileout + rm -rf .libs *.lo libntl.la + rm -f all + + clean: + sh RemoveProg MakeDesc TestGetTime gen_lip_gmp_aux gen_gmp_aux +- rm -f *.o ++ rm -f *.o *.lo + rm -rf small + @{LSHAR} - $(LIBTOOL) --mode=clean rm -f libntl.la *.lo #LSHAR + +@@ -549,3 +597,6 @@ + + + ++shared: DIRNAME $(SHOBJ) ++ $(LINK_CXX) $(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 diff --git a/dev-libs/ntl/files/ntl-5.5.2-singular.patch b/dev-libs/ntl/files/ntl-5.5.2-singular.patch new file mode 100644 index 000000000000..9f0d13140cee --- /dev/null +++ b/dev-libs/ntl/files/ntl-5.5.2-singular.patch @@ -0,0 +1,12 @@ +--- include/NTL/new.h.orig 2008-05-06 21:56:16.000000000 +1200 ++++ include/NTL/new.h 2008-05-06 21:56:33.000000000 +1200 +@@ -12,7 +12,8 @@ + + #include + +-#define NTL_NEW_OP new (std::nothrow) ++// uncommenting std::nothrow makes this ntl work properly with Singular ++#define NTL_NEW_OP new //(std::nothrow) + + + #else diff --git a/dev-libs/ntl/metadata.xml b/dev-libs/ntl/metadata.xml index 261aa0426845..4c8dcf7542ff 100644 --- a/dev-libs/ntl/metadata.xml +++ b/dev-libs/ntl/metadata.xml @@ -1,6 +1,7 @@ +sci-mathematics cpp NTL is a high-performance, portable C++ library providing data diff --git a/dev-libs/ntl/ntl-5.5.2.ebuild b/dev-libs/ntl/ntl-5.5.2.ebuild new file mode 100644 index 000000000000..9d67de351e50 --- /dev/null +++ b/dev-libs/ntl/ntl-5.5.2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/ntl/ntl-5.5.2.ebuild,v 1.1 2009/08/26 18:28:40 bicatali Exp $ + +EAPI=2 +inherit toolchain-funcs eutils + +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 ~x86" +IUSE="doc" + +RDEPEND=">=dev-libs/gmp-4.3 + >=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 .. + # enable compatibility with singular + epatch "$FILESDIR/${P}-singular.patch" + # implement a call back framework ( submitted upstream) + epatch "$FILESDIR/${P}-sage-tools.patch" + # sanitize the makefile and allow the building of shared library + epatch "$FILESDIR/${P}-shared.patch" +} + +src_configure() { + perl DoConfig \ + PREFIX=/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 || die "emake setup failed" + emake setup3 || die "emake setup failed" + sh Wizard on || die "Tuning wizard failed" + emake ntl.a || die "emake static failed" + emake shared || die "emake shared failed" +} + +src_install() { + newlib.a ntl.a libntl.a || die "installation of static library failed" + dolib.so lib*.so || die "installation of shared library failed" + + cd .. + insinto /usr/include + doins -r include/NTL || die "installation of the headers failed" + + dodoc README + if use doc ; then + dodoc doc/*.txt || die + dohtml doc/* || die + fi +} -- cgit v1.2.3-65-gdbad