summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Bissey <frp.bissey@gmail.com>2020-10-27 13:32:14 +1300
committerSam James <sam@gentoo.org>2021-01-22 04:28:24 +0000
commitcafe8af137d1a9e2bfa62e9ebfb20df5cb6e2831 (patch)
tree2009b299cb9bc632cc5e689293b531678ac7540d /sci-mathematics/gmp-ecm
parentdev-python/plotly: version bump to 4.14.3 (diff)
downloadgentoo-cafe8af137d1a9e2bfa62e9ebfb20df5cb6e2831.tar.gz
gentoo-cafe8af137d1a9e2bfa62e9ebfb20df5cb6e2831.tar.bz2
gentoo-cafe8af137d1a9e2bfa62e9ebfb20df5cb6e2831.zip
sci-mathematics/gmp-ecm: fix #732032, #750716 and update HOME and SRC_URI
Package-Manager: Portage-3.0.8, Repoman-3.0.2 Closes: https://bugs.gentoo.org/732032 Closes: https://bugs.gentoo.org/750716 Signed-off-by: François René Pierre Bissey <frp.bissey@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/18044 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-mathematics/gmp-ecm')
-rw-r--r--sci-mathematics/gmp-ecm/Manifest1
-rw-r--r--sci-mathematics/gmp-ecm/files/gmp-ecm-7.0.4-openmp.patch25
-rw-r--r--sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r3.ebuild57
3 files changed, 83 insertions, 0 deletions
diff --git a/sci-mathematics/gmp-ecm/Manifest b/sci-mathematics/gmp-ecm/Manifest
index d960832dd1a2..f0a304c3ece3 100644
--- a/sci-mathematics/gmp-ecm/Manifest
+++ b/sci-mathematics/gmp-ecm/Manifest
@@ -1 +1,2 @@
+DIST ecm-7.0.4.tar.gz 1101899 BLAKE2B 6d52364d9c752aee66510a7f6b273559bf1b7de0032fbbeff74e229ed68fd0cd1c236b480f8fc25bcad6435740e3e22b3099c8f018912918ab8f4b33dc7b8b3c SHA512 b863b9bfd26df26c3c4243686036a69110e69ca3eec5b31d4550fe713e2fac4ce70cd1d80f0614899793aa44710531aa4a21abc0fa1b99eb17f62bd92b971350
DIST gmp-ecm-7.0.4.tar.gz 1101899 BLAKE2B 6d52364d9c752aee66510a7f6b273559bf1b7de0032fbbeff74e229ed68fd0cd1c236b480f8fc25bcad6435740e3e22b3099c8f018912918ab8f4b33dc7b8b3c SHA512 b863b9bfd26df26c3c4243686036a69110e69ca3eec5b31d4550fe713e2fac4ce70cd1d80f0614899793aa44710531aa4a21abc0fa1b99eb17f62bd92b971350
diff --git a/sci-mathematics/gmp-ecm/files/gmp-ecm-7.0.4-openmp.patch b/sci-mathematics/gmp-ecm/files/gmp-ecm-7.0.4-openmp.patch
new file mode 100644
index 000000000000..e382bf4ed28b
--- /dev/null
+++ b/sci-mathematics/gmp-ecm/files/gmp-ecm-7.0.4-openmp.patch
@@ -0,0 +1,25 @@
+# fix for https://bugs.gentoo.org/732032 merged upstream
+diff --git a/pm1fs2.c b/pm1fs2.c
+index 4471bf6..89f8077 100644
+--- a/pm1fs2.c
++++ b/pm1fs2.c
+@@ -1562,17 +1562,16 @@ list_scale_V (listz_t R, const listz_t F, const mpres_t Q,
+ #pragma omp parallel if (deg > 1000)
+ {
+ mpmod_t modulus_local;
+- long i; /* OpenMP insists on signed loop iteration var :( */
+
+ mpmod_init_set (modulus_local, modulus);
+
+ #pragma omp for
+- for (i = 0; (unsigned long) i <= 2 * deg - 2; i++)
++ for (i = 0; i <= 2 * deg - 2; i++)
+ mpres_mul_z_to_z (H[i], Vt, H[i], modulus_local);
+ mpmod_clear (modulus_local);
+ }
+ #else
+- for (i = 0; (unsigned long) i <= 2 * deg - 2; i++)
++ for (i = 0; i <= 2 * deg - 2; i++)
+ mpres_mul_z_to_z (H[i], Vt, H[i], modulus);
+ #endif
+
diff --git a/sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r3.ebuild b/sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r3.ebuild
new file mode 100644
index 000000000000..acc3febe5011
--- /dev/null
+++ b/sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+MY_PN="ecm"
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="Elliptic Curve Method for Integer Factorization"
+HOMEPAGE="https://gitlab.inria.fr/zimmerma/ecm"
+SRC_URI="https://gitlab.inria.fr/zimmerma/ecm/uploads/9cd422ec80268f8a885e499e17f98056/${MY_P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos ~x64-macos"
+IUSE="+custom-tune openmp static-libs cpu_flags_x86_sse2"
+
+DEPEND="dev-libs/gmp:="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.4-openmp.patch
+)
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_pretend() {
+ use openmp && tc-check-openmp
+}
+
+src_compile() {
+ default
+ if use custom-tune; then
+ # One "emake" was needed to build the library. Now we can find
+ # the best set of parameters, and then run "emake" one more time
+ # to rebuild the library with the custom parameters. See the
+ # project's README or INSTALL-ecm. The build targets don't depend
+ # on ecm-params.h, so we need to "make clean" to force a rebuild.
+ emake ecm-params && emake clean && emake
+ fi
+}
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable openmp) \
+ $(use_enable cpu_flags_x86_sse2 sse2) \
+ $(use_enable custom-tune asm-redc)
+}
+
+src_install() {
+ default
+
+ # remove .la file
+ find "${ED}" -name '*.la' -delete || die
+}