diff options
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/msieve/files/fix-version.patch | 15 | ||||
-rw-r--r-- | sci-mathematics/msieve/files/reduce-printf.patch | 62 | ||||
-rw-r--r-- | sci-mathematics/msieve/msieve-1.53-r1.ebuild | 46 |
3 files changed, 24 insertions, 99 deletions
diff --git a/sci-mathematics/msieve/files/fix-version.patch b/sci-mathematics/msieve/files/fix-version.patch deleted file mode 100644 index 748a7ae8c68c..000000000000 --- a/sci-mathematics/msieve/files/fix-version.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- common/driver.c 2011-05-02 09:10:50.000000000 +0800 -+++ common/driver.c.new 2012-11-30 16:43:59.067925006 +0800 -@@ -191,10 +191,9 @@ - - logprintf(obj, "\n"); - logprintf(obj, "\n"); -- logprintf(obj, "Msieve v. %d.%02d (SVN %s)\n", -+ logprintf(obj, "Msieve v. %d.%02d\n", - MSIEVE_MAJOR_VERSION, -- MSIEVE_MINOR_VERSION, -- MSIEVE_SVN_VERSION); -+ MSIEVE_MINOR_VERSION); - start_time = time(NULL); - if (obj->flags & MSIEVE_FLAG_LOG_TO_STDOUT) { - printf("%s", ctime(&start_time)); diff --git a/sci-mathematics/msieve/files/reduce-printf.patch b/sci-mathematics/msieve/files/reduce-printf.patch deleted file mode 100644 index dad1dc7db8f3..000000000000 --- a/sci-mathematics/msieve/files/reduce-printf.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -Naur msieve-1.50/common/minimize.c msieve-copy/common/minimize.c ---- msieve-1.50/common/minimize.c 2011-07-04 23:32:33.000000000 +0800 -+++ msieve-copy/common/minimize.c 2012-11-26 23:09:22.889240528 +0800 -@@ -210,7 +210,7 @@ - } - } - -- printf("too many line iterations\n"); -+ //printf("too many line iterations\n"); - *min_out = x; - *status = 1; - return fx; -diff -Naur msieve-1.50/gnfs/poly/stage2/optimize.c msieve-copy/gnfs/poly/stage2/optimize.c ---- msieve-1.50/gnfs/poly/stage2/optimize.c 2011-10-15 23:03:39.000000000 +0800 -+++ msieve-copy/gnfs/poly/stage2/optimize.c 2012-11-26 23:14:36.243232414 +0800 -@@ -390,7 +390,7 @@ - score = minimize(best, num_vars, tol, 40, - objective, &opt_data); - -- printf("i %u score %le\n", i, score); -+ //printf("i %u score %le\n", i, score); - for (j = 0; j <= rotate_dim; j++) { - double cj = floor(best[ROTATE0 + j] + 0.5); - mpz_set_d(c->gmp_help1, cj); -@@ -422,7 +422,7 @@ - tol = 1e-5; - score = ifs_rectangular(apoly.coeff, apoly.degree, - best[SKEWNESS]); -- printf("transition score %le\n", score); -+ //printf("transition score %le\n", score); - } - } - -@@ -430,9 +430,9 @@ - #if 0 - printf("norm %.7e skew %lf\n", *pol_norm, best[SKEWNESS]); - for (i = 0; i < 2; i++) -- gmp_printf("%+Zd\n", c->gmp_lina[i]); -+ //gmp_printf("%+Zd\n", c->gmp_lina[i]); - for (i = 0; i <= deg; i++) -- gmp_printf("%+Zd\n", c->gmp_a[i]); -+ //gmp_printf("%+Zd\n", c->gmp_a[i]); - #endif - } - -diff -Naur msieve-1.50/gnfs/poly/stage2/stage2.c msieve-copy/gnfs/poly/stage2/stage2.c ---- msieve-1.50/gnfs/poly/stage2/stage2.c 2011-10-09 09:32:49.000000000 +0800 -+++ msieve-copy/gnfs/poly/stage2/stage2.c 2012-11-26 23:14:30.894232552 +0800 -@@ -122,10 +122,10 @@ - } - - #if 0 -- gmp_printf("%+Zd\n", c->gmp_lina[0]); -- gmp_printf("%+Zd\n", c->gmp_lina[1]); -+ //gmp_printf("%+Zd\n", c->gmp_lina[0]); -+ //gmp_printf("%+Zd\n", c->gmp_lina[1]); - for (i = 0; i <= degree; i++) -- gmp_printf("%+Zd\n", c->gmp_a[i]); -+ //gmp_printf("%+Zd\n", c->gmp_a[i]); - - printf("coeff ratio = %.5lf\n", - fabs(mpz_get_d(c->gmp_a[degree-2])) / coeff_bound); diff --git a/sci-mathematics/msieve/msieve-1.53-r1.ebuild b/sci-mathematics/msieve/msieve-1.53-r1.ebuild index 5df9a95f4e7e..4cf9b2d6dce3 100644 --- a/sci-mathematics/msieve/msieve-1.53-r1.ebuild +++ b/sci-mathematics/msieve/msieve-1.53-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="7" +EAPI=7 inherit toolchain-funcs @@ -14,30 +14,31 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="zlib +ecm mpi" -DEPEND=" +RDEPEND=" ecm? ( sci-mathematics/gmp-ecm ) mpi? ( virtual/mpi ) - zlib? ( sys-libs/zlib:= )" -RDEPEND="${DEPEND}" + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND}" + +PATCHES=( + # TODO: Integrate ggnfs properly + "${FILESDIR}"/${PN}-1.51-reduce-printf.patch + "${FILESDIR}"/${PN}-1.53-fix-version.patch +) src_prepare() { default - # TODO: Integrate ggnfs properly - eapply \ - "${FILESDIR}"/${PN}-1.51-reduce-printf.patch \ - "${FILESDIR}"/${PN}-1.53-fix-version.patch - - sed -i -e 's/-march=k8//' Makefile || die - sed -i -e 's/CC =/#CC =/' Makefile || die - sed -i -e 's/CFLAGS =/CFLAGS +=/' Makefile || die + sed -i -e 's/-march=k8//' Makefile || die + sed -i -e 's/CC =/#CC =/' Makefile || die + sed -i -e 's/CFLAGS =/CFLAGS +=/' Makefile || die sed -i -e 's/LIBS += -lecm/LIBS += -lecm -lgomp/' Makefile || die } src_compile() { - use ecm && export "ECM=1" - use mpi && export "MPI=1" - use zlib && export "ZLIB=1" + use ecm && export ECM=1 + use mpi && export MPI=1 + use zlib && export ZLIB=1 emake \ CC=$(tc-getCC) \ AR=$(tc-getAR) \ @@ -46,11 +47,12 @@ src_compile() { } src_install() { - mkdir -p "${ED}/usr/include/msieve" - mkdir -p "${ED}/usr/lib/" - mkdir -p "${ED}/usr/share/doc/${P}/" - cp include/* "${ED}/usr/include/msieve" || die "Failed to install" - cp libmsieve.a "${ED}/usr/lib/" || die "Failed to install" dobin msieve - cp Readme* "${ED}/usr/share/doc/${P}/" || die "Failed to install" + + insinto /usr/include/msieve + doins -r include/. + + dolib.a libmsieve.a + + dodoc Readme* } |