Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/msieve/, sci-mathematics/msieve/files/
Date: Sun, 06 Jan 2019 21:57:23
Message-Id: 1546811824.c87d0d60f8bb736c00e00b00137c89c23fc193ac.whissi@gentoo
1 commit: c87d0d60f8bb736c00e00b00137c89c23fc193ac
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 6 21:40:02 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 6 21:57:04 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c87d0d60
7
8 sci-mathematics/msieve: bump to v1.53
9
10 Package-Manager: Portage-2.3.53, Repoman-2.3.12
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sci-mathematics/msieve/Manifest | 1 +
14 .../msieve/files/msieve-1.53-fix-version.patch | 33 +++++++++++++
15 sci-mathematics/msieve/msieve-1.53.ebuild | 57 ++++++++++++++++++++++
16 3 files changed, 91 insertions(+)
17
18 diff --git a/sci-mathematics/msieve/Manifest b/sci-mathematics/msieve/Manifest
19 index 517117fcc83..b17c16504f0 100644
20 --- a/sci-mathematics/msieve/Manifest
21 +++ b/sci-mathematics/msieve/Manifest
22 @@ -1 +1,2 @@
23 +DIST msieve-1.53.tar.gz 976135 BLAKE2B 587007c4273b9e0ceb6dd17fb9310070b760f68f8f1c56014a168242d0989069a5257de39cba30c939b3b7e02918635d12b3153d05cd2abb9e4a6445c7ef1886 SHA512 e50e8913d38ed4108f5f2ecdbb338968edd416c56c5b7a92d8598b81fc16014ce7c7df963101c65f5bc88d1c7b2d8dbaa572efbecf53d720430a327929c9ce12
24 DIST msieve151.tar.gz 623885 BLAKE2B a222f49fb1c6a411e1e46a7ed153e1ba24bbb604b70034c2c0632f69096e6a08a6783b25a44ffcd2d6b6962a8713455c893eb9514fb54a13f28a5b6a9aea3867 SHA512 79c03b5d669de7f05e27fc59fa999f416f513e41cba822376b862c31439fc66cf8749034c1f8f967f745955a5271a484b23e950ffede23d3fa2737ae26dbb0d4
25
26 diff --git a/sci-mathematics/msieve/files/msieve-1.53-fix-version.patch b/sci-mathematics/msieve/files/msieve-1.53-fix-version.patch
27 new file mode 100644
28 index 00000000000..eb9a8d7ac2d
29 --- /dev/null
30 +++ b/sci-mathematics/msieve/files/msieve-1.53-fix-version.patch
31 @@ -0,0 +1,33 @@
32 +diff --git a/common/driver.c b/common/driver.c
33 +index ffecfa9..3e1da78 100644
34 +--- a/common/driver.c
35 ++++ b/common/driver.c
36 +@@ -189,10 +189,9 @@ void msieve_run(msieve_obj *obj) {
37 +
38 + logprintf(obj, "\n");
39 + logprintf(obj, "\n");
40 +- logprintf(obj, "Msieve v. %d.%02d (SVN %s)\n",
41 ++ logprintf(obj, "Msieve v. %d.%02d\n",
42 + MSIEVE_MAJOR_VERSION,
43 +- MSIEVE_MINOR_VERSION,
44 +- MSIEVE_SVN_VERSION);
45 ++ MSIEVE_MINOR_VERSION);
46 + start_time = time(NULL);
47 + if (obj->flags & MSIEVE_FLAG_LOG_TO_STDOUT) {
48 + printf("%s", ctime(&start_time));
49 +diff --git a/demo.c b/demo.c
50 +index a882732..ec3e869 100644
51 +--- a/demo.c
52 ++++ b/demo.c
53 +@@ -81,9 +81,8 @@ void get_random_seeds(uint32 *seed1, uint32 *seed2) {
54 + /*--------------------------------------------------------------------*/
55 + void print_usage(char *progname) {
56 +
57 +- printf("\nMsieve v. %d.%02d (SVN %s)\n", MSIEVE_MAJOR_VERSION,
58 +- MSIEVE_MINOR_VERSION,
59 +- MSIEVE_SVN_VERSION);
60 ++ printf("\nMsieve v. %d.%02d\n", MSIEVE_MAJOR_VERSION,
61 ++ MSIEVE_MINOR_VERSION);
62 +
63 + printf("\nusage: %s [options] [one_number]\n", progname);
64 + printf("\nnumbers starting with '0' are treated as octal,\n"
65
66 diff --git a/sci-mathematics/msieve/msieve-1.53.ebuild b/sci-mathematics/msieve/msieve-1.53.ebuild
67 new file mode 100644
68 index 00000000000..534207e16fb
69 --- /dev/null
70 +++ b/sci-mathematics/msieve/msieve-1.53.ebuild
71 @@ -0,0 +1,57 @@
72 +# Copyright 1999-2019 Gentoo Authors
73 +# Distributed under the terms of the GNU General Public License v2
74 +
75 +EAPI="7"
76 +
77 +inherit toolchain-funcs
78 +
79 +DESCRIPTION="A C library implementing a suite of algorithms to factor large integers"
80 +HOMEPAGE="https://sourceforge.net/projects/msieve/"
81 +SRC_URI="mirror://sourceforge/${PN}/${PN}/Msieve%20v${PV}/${PN}${PV/./}_src.tar.gz -> ${P}.tar.gz"
82 +
83 +LICENSE="public-domain"
84 +SLOT="0"
85 +KEYWORDS="~amd64 ~x86"
86 +IUSE="zlib +ecm mpi"
87 +
88 +# some linking troubles with gwnum
89 +DEPEND="
90 + ecm? ( sci-mathematics/gmp-ecm[-gwnum] )
91 + mpi? ( virtual/mpi )
92 + zlib? ( sys-libs/zlib:= )"
93 +RDEPEND="${DEPEND}"
94 +
95 +src_prepare() {
96 + default
97 +
98 + # TODO: Integrate ggnfs properly
99 + eapply \
100 + "${FILESDIR}"/${PN}-1.51-reduce-printf.patch \
101 + "${FILESDIR}"/${PN}-1.53-fix-version.patch
102 +
103 + sed -i -e 's/-march=k8//' Makefile || die
104 + sed -i -e 's/CC =/#CC =/' Makefile || die
105 + sed -i -e 's/CFLAGS =/CFLAGS +=/' Makefile || die
106 + sed -i -e 's/LIBS += -lecm/LIBS += -lecm -lgomp/' Makefile || die
107 +}
108 +
109 +src_compile() {
110 + use ecm && export "ECM=1"
111 + use mpi && export "MPI=1"
112 + use zlib && export "ZLIB=1"
113 + emake \
114 + CC=$(tc-getCC) \
115 + AR=$(tc-getAR) \
116 + OPT_FLAGS="${CFLAGS}" \
117 + all
118 +}
119 +
120 +src_install() {
121 + mkdir -p "${ED%/}/usr/include/msieve"
122 + mkdir -p "${ED%/}/usr/lib/"
123 + mkdir -p "${ED%/}/usr/share/doc/${P}/"
124 + cp include/* "${ED%/}/usr/include/msieve" || die "Failed to install"
125 + cp libmsieve.a "${ED%/}/usr/lib/" || die "Failed to install"
126 + dobin msieve || die "Failed to install"
127 + cp Readme* "${ED%/}/usr/share/doc/${P}/" || die "Failed to install"
128 +}