summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-mathematics/msieve
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-mathematics/msieve')
-rw-r--r--sci-mathematics/msieve/Manifest1
-rw-r--r--sci-mathematics/msieve/files/fix-version.patch15
-rw-r--r--sci-mathematics/msieve/files/fix-version2.patch14
-rw-r--r--sci-mathematics/msieve/files/msieve-1.51-reduce-printf.patch44
-rw-r--r--sci-mathematics/msieve/files/reduce-printf.patch62
-rw-r--r--sci-mathematics/msieve/files/reduce-printf2.patch52
-rw-r--r--sci-mathematics/msieve/files/reduce-printf3.patch31
-rw-r--r--sci-mathematics/msieve/metadata.xml11
-rw-r--r--sci-mathematics/msieve/msieve-1.51.ebuild56
-rw-r--r--sci-mathematics/msieve/msieve-9999.ebuild55
10 files changed, 341 insertions, 0 deletions
diff --git a/sci-mathematics/msieve/Manifest b/sci-mathematics/msieve/Manifest
new file mode 100644
index 000000000000..7516dd9c86e2
--- /dev/null
+++ b/sci-mathematics/msieve/Manifest
@@ -0,0 +1 @@
+DIST msieve151.tar.gz 623885 SHA256 26bc1d0d89325986aacfbafb687451f3de5da1bd388e087ec3ac24813e9dc948 SHA512 79c03b5d669de7f05e27fc59fa999f416f513e41cba822376b862c31439fc66cf8749034c1f8f967f745955a5271a484b23e950ffede23d3fa2737ae26dbb0d4 WHIRLPOOL 237f3f1e872b05890e008f8261e0ba5c7621ef7bfa3e78305c17076496ad87d281497e4cf9ee79d2b275a65e86f7c84fa3897697ef823c2e1ffe9725d3b08b9b
diff --git a/sci-mathematics/msieve/files/fix-version.patch b/sci-mathematics/msieve/files/fix-version.patch
new file mode 100644
index 000000000000..748a7ae8c68c
--- /dev/null
+++ b/sci-mathematics/msieve/files/fix-version.patch
@@ -0,0 +1,15 @@
+--- 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/fix-version2.patch b/sci-mathematics/msieve/files/fix-version2.patch
new file mode 100644
index 000000000000..6e956897bdf0
--- /dev/null
+++ b/sci-mathematics/msieve/files/fix-version2.patch
@@ -0,0 +1,14 @@
+--- demo.c 2011-11-25 00:25:28.000000000 +0800
++++ demo.c.new 2012-11-30 16:46:50.417333847 +0800
+@@ -81,9 +81,8 @@
+ /*--------------------------------------------------------------------*/
+ 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/files/msieve-1.51-reduce-printf.patch b/sci-mathematics/msieve/files/msieve-1.51-reduce-printf.patch
new file mode 100644
index 000000000000..39892716716a
--- /dev/null
+++ b/sci-mathematics/msieve/files/msieve-1.51-reduce-printf.patch
@@ -0,0 +1,44 @@
+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
+@@ -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/files/reduce-printf.patch b/sci-mathematics/msieve/files/reduce-printf.patch
new file mode 100644
index 000000000000..dad1dc7db8f3
--- /dev/null
+++ b/sci-mathematics/msieve/files/reduce-printf.patch
@@ -0,0 +1,62 @@
+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/files/reduce-printf2.patch b/sci-mathematics/msieve/files/reduce-printf2.patch
new file mode 100644
index 000000000000..fdaa344a3a07
--- /dev/null
+++ b/sci-mathematics/msieve/files/reduce-printf2.patch
@@ -0,0 +1,52 @@
+--- gnfs/poly/stage2/root_sieve_deg45_x.c 2011-08-23 20:59:59.000000000 +0800
++++ gnfs/poly/stage2/root_sieve_deg45_x.c.new 2012-11-30 17:09:22.553116526 +0800
+ return;
+ }
+
+@@ -585,7 +585,7 @@
+ if (obj->flags & MSIEVE_FLAG_STOP_SIEVING)
+ break;
+ }
+- printf("\n");
++ printf(",");
+ }
+
+ /*-------------------------------------------------------------------------*/
+@@ -604,7 +604,7 @@
+ xline_heap_t xline_heap;
+ uint32 cutoff_score;
+
+- printf("L %u\n", (uint32)lattice_size);
++ /* printf("L %u\n", (uint32)lattice_size); */
+
+ mpz_set_ui(xy->y_base, (unsigned long)0);
+ xy->y_blocks = 0;
+@@ -621,7 +621,7 @@
+ x->x_blocks = line_max - line_min;
+ x->curr_score = 0;
+ root_sieve_line(rs);
+- printf("\n");
++ printf("_");
+ return;
+ }
+
+@@ -664,5 +664,5 @@
+ break;
+ }
+
+- printf("\n");
++ printf("*");
+ }
+--- gnfs/poly/stage2/root_sieve_deg5_xy.c 2011-07-15 09:49:00.000000000 +0800
++++ gnfs/poly/stage2/root_sieve_deg5_xy.c.new 2012-11-30 17:09:51.462454813 +0800
+@@ -290,8 +290,8 @@
+ }
+ xy->y_blocks = y_blocks;
+
+- printf("\n%.0lf %u %u\n", (double)lattice_size,
+- y_blocks, num_lattices);
++ /* printf("\n%.0lf %u %u\n", (double)lattice_size,
++ y_blocks, num_lattices); */
+
+ sieve_x_run_deg5(rs);
+ }
diff --git a/sci-mathematics/msieve/files/reduce-printf3.patch b/sci-mathematics/msieve/files/reduce-printf3.patch
new file mode 100644
index 000000000000..dedadde51d42
--- /dev/null
+++ b/sci-mathematics/msieve/files/reduce-printf3.patch
@@ -0,0 +1,31 @@
+--- gnfs/poly/poly_skew.c 2011-12-23 03:48:49.000000000 +0800
++++ gnfs/poly/poly_skew.c.new 2012-11-30 17:14:29.802747785 +0800
+@@ -221,7 +221,7 @@
+ static void stage1_callback(mpz_t high_coeff, mpz_t p, mpz_t m,
+ double coeff_bound, void *extra) {
+
+- gmp_printf("%Zd %Zd %Zd\n", high_coeff, p, m);
++ /* gmp_printf("%Zd %Zd %Zd\n", high_coeff, p, m); */
+ poly_stage2_run((poly_stage2_t *)extra, high_coeff, p, m,
+ coeff_bound, NULL);
+ }
+@@ -231,7 +231,7 @@
+ double coeff_bound, void *extra) {
+
+ FILE *mfile = (FILE *)extra;
+- gmp_printf("%Zd %Zd %Zd\n", high_coeff, p, m);
++ /* gmp_printf("%Zd %Zd %Zd\n", high_coeff, p, m); */
+ gmp_fprintf(mfile, "%Zd %Zd %Zd\n",
+ high_coeff, p, m);
+ fflush(mfile);
+--- gnfs/poly/stage2/root_sieve_line.c 2011-11-25 00:25:28.000000000 +0800
++++ gnfs/poly/stage2/root_sieve_line.c.new 2012-11-30 17:18:19.887475567 +0800
+@@ -402,7 +402,7 @@
+ uint32 num_primes = rs->num_primes;
+ uint16 *block = rs->sieve_block;
+
+- printf("%u ", num_blocks); fflush(stdout);
++ /* printf("%u ", num_blocks); fflush(stdout); */
+
+ if (mpz_cmp_ui(x->mp_lattice_size, 1) == 0)
+ prepare_sieve_line(rs);
diff --git a/sci-mathematics/msieve/metadata.xml b/sci-mathematics/msieve/metadata.xml
new file mode 100644
index 000000000000..d77356350e30
--- /dev/null
+++ b/sci-mathematics/msieve/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <use>
+ <flag name="ecm">Enable support for the GMP-ECM library</flag>
+ </use>
+</pkgmetadata>
diff --git a/sci-mathematics/msieve/msieve-1.51.ebuild b/sci-mathematics/msieve/msieve-1.51.ebuild
new file mode 100644
index 000000000000..09e724f0b866
--- /dev/null
+++ b/sci-mathematics/msieve/msieve-1.51.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A C library implementing a suite of algorithms to factor large integers"
+HOMEPAGE="http://sourceforge.net/projects/msieve/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}/Msieve%20v${PV}/${PN}${PV/./}.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() {
+ # TODO: Integrate ggnfs properly
+ epatch \
+ "${FILESDIR}"/${P}-reduce-printf.patch \
+ "${FILESDIR}"/fix-version.patch \
+ "${FILESDIR}"/fix-version2.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 "${D}/usr/include/msieve"
+ mkdir -p "${D}/usr/lib/"
+ mkdir -p "${D}/usr/share/doc/${P}/"
+ cp include/* "${D}/usr/include/msieve" || die "Failed to install"
+ cp libmsieve.a "${D}/usr/lib/" || die "Failed to install"
+ dobin msieve || die "Failed to install"
+ cp Readme* "${D}/usr/share/doc/${P}/" || die "Failed to install"
+}
diff --git a/sci-mathematics/msieve/msieve-9999.ebuild b/sci-mathematics/msieve/msieve-9999.ebuild
new file mode 100644
index 000000000000..8f9b32b35195
--- /dev/null
+++ b/sci-mathematics/msieve/msieve-9999.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils subversion toolchain-funcs
+
+DESCRIPTION="A C library implementing a suite of algorithms to factor large integers"
+HOMEPAGE="http://sourceforge.net/projects/msieve/"
+#SRC_URI="mirror://sourceforge/${PN}/${PN}/Msieve%20v${PV}/${PN}${PV/./}src.tar.gz"
+ESVN_REPO_URI="https://msieve.svn.sourceforge.net/svnroot/msieve"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS=""
+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() {
+ cd trunk
+ # TODO: Integrate ggnfs properly
+ sed -i -e 's/-march=k8//' Makefile || die
+ sed -i -e 's/CC =/#CC =/' Makefile || die
+ sed -i -e 's/CFLAGS =/CFLAGS +=/' Makefile || die
+}
+
+src_compile() {
+ cd trunk
+ 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() {
+ cd trunk
+ mkdir -p "${D}/usr/include/msieve"
+ mkdir -p "${D}/usr/lib/"
+ mkdir -p "${D}/usr/share/doc/${P}/"
+ cp include/* "${D}/usr/include/msieve" || die "Failed to install"
+ cp libmsieve.a "${D}/usr/lib/" || die "Failed to install"
+ dobin msieve || die "Failed to install"
+ cp Readme* "${D}/usr/share/doc/${P}/" || die "Failed to install"
+}