diff options
author | Thomas Kahle <tomka@gentoo.org> | 2015-03-26 12:44:41 +0000 |
---|---|---|
committer | Thomas Kahle <tomka@gentoo.org> | 2015-03-26 12:44:41 +0000 |
commit | 2b0a3a2a66a04493fe4dc92eaa733101c65d20d4 (patch) | |
tree | f31c54ea1ceb18452560b6044eae60a833cfcf6a /sci-mathematics/singular | |
parent | version bump (diff) | |
download | gentoo-2-2b0a3a2a66a04493fe4dc92eaa733101c65d20d4.tar.gz gentoo-2-2b0a3a2a66a04493fe4dc92eaa733101c65d20d4.tar.bz2 gentoo-2-2b0a3a2a66a04493fe4dc92eaa733101c65d20d4.zip |
Fix ntl8 compatibility
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 565C32BC)
Diffstat (limited to 'sci-mathematics/singular')
-rw-r--r-- | sci-mathematics/singular/ChangeLog | 6 | ||||
-rw-r--r-- | sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch | 38 | ||||
-rw-r--r-- | sci-mathematics/singular/singular-4.0.2.ebuild | 5 |
3 files changed, 46 insertions, 3 deletions
diff --git a/sci-mathematics/singular/ChangeLog b/sci-mathematics/singular/ChangeLog index a194ec944fc2..aaba7b6b44a0 100644 --- a/sci-mathematics/singular/ChangeLog +++ b/sci-mathematics/singular/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-mathematics/singular # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.63 2015/03/26 10:16:33 tomka Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.64 2015/03/26 12:44:41 tomka Exp $ + + 26 Mar 2015; Thomas Kahle <tomka@gentoo.org> + +files/singular-4.0.2-ntl8-compat.patch, singular-4.0.2.ebuild: + Fix ntl8 compatibility 26 Mar 2015; Thomas Kahle <tomka@gentoo.org> singular-4.0.2.ebuild: Restrict ntl dep diff --git a/sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch b/sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch new file mode 100644 index 000000000000..d3e6b77a28e9 --- /dev/null +++ b/sci-mathematics/singular/files/singular-4.0.2-ntl8-compat.patch @@ -0,0 +1,38 @@ +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) diff --git a/sci-mathematics/singular/singular-4.0.2.ebuild b/sci-mathematics/singular/singular-4.0.2.ebuild index 1b52f4ba1e8f..c9f58d3c7388 100644 --- a/sci-mathematics/singular/singular-4.0.2.ebuild +++ b/sci-mathematics/singular/singular-4.0.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/singular-4.0.2.ebuild,v 1.3 2015/03/26 10:16:33 tomka Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/singular-4.0.2.ebuild,v 1.4 2015/03/26 12:44:41 tomka Exp $ EAPI=5 @@ -26,7 +26,6 @@ IUSE="boost doc emacs examples python +readline" RDEPEND="dev-libs/gmp >=dev-libs/ntl-5.5.1 - <dev-libs/ntl-7 emacs? ( >=virtual/emacs-22 ) sci-mathematics/flint sci-mathematics/4ti2 @@ -59,6 +58,8 @@ src_prepare () { # omalloc's old configure will fail if ar is not exactly 'ar'. epatch "${FILESDIR}"/${PN}-4.0.0-fix-omalloc-ar-detection.patch + epatch "${FILESDIR}"/${PN}-4.0.2-ntl8-compat.patch + cd "${S}"/omalloc || die "failed to cd into omalloc directory" eautoreconf } |