[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/msieve/, sci-mathematics/msieve/files/
commit: b14e522ffe5eead45d8850b08c329126d0ec1a09 Author: David Seifert gentoo org> AuthorDate: Wed Mar 31 10:17:17 2021 + Commit: David Seifert gentoo org> CommitDate: Wed Mar 31 10:17:17 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b14e522f sci-mathematics/msieve: Clean up ebuild Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: David Seifert gentoo.org> sci-mathematics/msieve/files/fix-version.patch | 15 -- sci-mathematics/msieve/files/reduce-printf.patch | 62 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 748a7ae8c68..000 --- a/sci-mathematics/msieve/files/fix-version.patch +++ /dev/null @@ -1,15 +0,0 @@ common/driver.c2011-05-02 09:10:50.0 +0800 -+++ common/driver.c.new2012-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(_time)); diff --git a/sci-mathematics/msieve/files/reduce-printf.patch b/sci-mathematics/msieve/files/reduce-printf.patch deleted file mode 100644 index dad1dc7db8f..000 --- 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.0 +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.c2011-10-15 23:03:39.0 +0800 -+++ msieve-copy/gnfs/poly/stage2/optimize.c2012-11-26 23:14:36.243232414 +0800 -@@ -390,7 +390,7 @@ - score = minimize(best, num_vars, tol, 40, - objective, _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.0 +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 5df9a95f4e7..4cf9b2d6dce 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
[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/msieve/, sci-mathematics/msieve/files/
commit: c87d0d60f8bb736c00e00b00137c89c23fc193ac Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Jan 6 21:40:02 2019 + Commit: Thomas Deutschmann gentoo org> CommitDate: Sun Jan 6 21:57:04 2019 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c87d0d60 sci-mathematics/msieve: bump to v1.53 Package-Manager: Portage-2.3.53, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann gentoo.org> sci-mathematics/msieve/Manifest| 1 + .../msieve/files/msieve-1.53-fix-version.patch | 33 + sci-mathematics/msieve/msieve-1.53.ebuild | 57 ++ 3 files changed, 91 insertions(+) diff --git a/sci-mathematics/msieve/Manifest b/sci-mathematics/msieve/Manifest index 517117fcc83..b17c16504f0 100644 --- a/sci-mathematics/msieve/Manifest +++ b/sci-mathematics/msieve/Manifest @@ -1 +1,2 @@ +DIST msieve-1.53.tar.gz 976135 BLAKE2B 587007c4273b9e0ceb6dd17fb9310070b760f68f8f1c56014a168242d0989069a5257de39cba30c939b3b7e02918635d12b3153d05cd2abb9e4a6445c7ef1886 SHA512 e50e8913d38ed4108f5f2ecdbb338968edd416c56c5b7a92d8598b81fc16014ce7c7df963101c65f5bc88d1c7b2d8dbaa572efbecf53d720430a327929c9ce12 DIST msieve151.tar.gz 623885 BLAKE2B a222f49fb1c6a411e1e46a7ed153e1ba24bbb604b70034c2c0632f69096e6a08a6783b25a44ffcd2d6b6962a8713455c893eb9514fb54a13f28a5b6a9aea3867 SHA512 79c03b5d669de7f05e27fc59fa999f416f513e41cba822376b862c31439fc66cf8749034c1f8f967f745955a5271a484b23e950ffede23d3fa2737ae26dbb0d4 diff --git a/sci-mathematics/msieve/files/msieve-1.53-fix-version.patch b/sci-mathematics/msieve/files/msieve-1.53-fix-version.patch new file mode 100644 index 000..eb9a8d7ac2d --- /dev/null +++ b/sci-mathematics/msieve/files/msieve-1.53-fix-version.patch @@ -0,0 +1,33 @@ +diff --git a/common/driver.c b/common/driver.c +index ffecfa9..3e1da78 100644 +--- a/common/driver.c b/common/driver.c +@@ -189,10 +189,9 @@ void msieve_run(msieve_obj *obj) { + + 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(_time)); +diff --git a/demo.c b/demo.c +index a882732..ec3e869 100644 +--- a/demo.c b/demo.c +@@ -81,9 +81,8 @@ void get_random_seeds(uint32 *seed1, uint32 *seed2) { + /**/ + void print_usage(char *progname) { + +- printf("\nMsieve v. %d.%02d (SVN %s)\n", MSIEVE_MAJOR_VERSION, +- MSIEVE_MINOR_VERSION, +- MSIEVE_SVN_VERSION); ++ printf("\nMsieve v. %d.%02d\n", MSIEVE_MAJOR_VERSION, ++ MSIEVE_MINOR_VERSION); + + printf("\nusage: %s [options] [one_number]\n", progname); + printf("\nnumbers starting with '0' are treated as octal,\n" diff --git a/sci-mathematics/msieve/msieve-1.53.ebuild b/sci-mathematics/msieve/msieve-1.53.ebuild new file mode 100644 index 000..534207e16fb --- /dev/null +++ b/sci-mathematics/msieve/msieve-1.53.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit toolchain-funcs + +DESCRIPTION="A C library implementing a suite of algorithms to factor large integers" +HOMEPAGE="https://sourceforge.net/projects/msieve/; +SRC_URI="mirror://sourceforge/${PN}/${PN}/Msieve%20v${PV}/${PN}${PV/./}_src.tar.gz -> ${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="zlib +ecm mpi" + +# some linking troubles with gwnum +DEPEND=" + ecm? ( sci-mathematics/gmp-ecm[-gwnum] ) + mpi? ( virtual/mpi ) + zlib? ( sys-libs/zlib:= )" +RDEPEND="${DEPEND}" + +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/LIBS += -lecm/LIBS += -lecm -lgomp/' Makefile || die +} + +src_compile() { + use ecm && export "ECM=1" + use mpi && export "MPI=1" + use zlib && export "ZLIB=1" + emake \ + CC=$(tc-getCC) \ + AR=$(tc-getAR) \ + OPT_FLAGS="${CFLAGS}" \ + all +} + +src_install() { + mkdir -p "${ED%/}/usr/include/msieve" + mkdir -p "${ED%/}/usr/lib/" + mkdir -p