summaryrefslogtreecommitdiff
path: root/sci-mathematics/gmp-ecm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
commitabaa75b10f899ada8dd05b23cc03205064394bc6 (patch)
treeeca3dd248b73b92013cba00a0fcc1edf2696e19a /sci-mathematics/gmp-ecm
parent24fd814c326e282c4321965c31f341dad77e270d (diff)
gentoo resync : 22.01.2021
Diffstat (limited to 'sci-mathematics/gmp-ecm')
-rw-r--r--sci-mathematics/gmp-ecm/Manifest3
-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, 85 insertions, 0 deletions
diff --git a/sci-mathematics/gmp-ecm/Manifest b/sci-mathematics/gmp-ecm/Manifest
index da8282b2070d..1ee29d1385b4 100644
--- a/sci-mathematics/gmp-ecm/Manifest
+++ b/sci-mathematics/gmp-ecm/Manifest
@@ -1,4 +1,7 @@
+AUX gmp-ecm-7.0.4-openmp.patch 795 BLAKE2B 2a857cba5e0bc4e7dfe710c250bcb721dd2fd5e0c9c049987f8505d2efc758ff026b313bc92a2b18472bbebc320c8d1187c8506eaea6d2f1f6d51da284bca3ae SHA512 063d20e5a4cf088aaed31eb79c6b253ef4747d3d449c70936b4079c519480767f4f19dc259894422dc6d5783c9c360fc2c3a9fda4bb9b2a124a0e7bd90c08554
+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
EBUILD gmp-ecm-7.0.4-r2.ebuild 1215 BLAKE2B c018b48131e2baeb0f373993b32c2a1e05b9669932ac54ece52ba30b8e0b63a6e59ff4506cbcd85bcb1d7e3ace665d993d4bae830ecb9f2909530fc41d3a78db SHA512 912183343a5a87f9fb27934de2e729a4eef66dec2a72ef6afbdb59eff91da2e2222647976b4304d186c40ef65a79a3536103527fbf0d9346419a46ddc3e5b476
+EBUILD gmp-ecm-7.0.4-r3.ebuild 1418 BLAKE2B fc3696d5bf04b0263bb3a66f233c53fb969508f1a1ac5e8ac74f6839b8dc20979c82ef61896fc3e9de821c14e498de45b9caff8ddf127f556fdc34842b9c742f SHA512 038497d4f87b17645c9d018b88839c7c1834e7114d270bb0396af13f5601c789ddf44bf34ef88472b8523d616d7f7c36c6490c3ebe3a58bc83d95bc93c3bf3d7
EBUILD gmp-ecm-9999.ebuild 1053 BLAKE2B eab97fcb27a1ac30898000ea06ba6d8e5279e979b2b85141ce86494fabf3fb6066c8449292620816ee17822b12564c248705bbbe6ecb4f64a622d8c84b25c4a5 SHA512 2d5f6ebbb57d8cf98e479021d9b345ca00d41dbffef357d0ddfdc40ef6c9f4bf159527ad0b1a37e18deb33051796408456f72ebb2b0bc3c47651a6a374f4ebe4
MISC metadata.xml 384 BLAKE2B 168807abd87bddc88522015f01126d5ec0bde8716aa38b6e619054d39e9bb12a6ffdaa3082328ecb56c0398b498c964c8e28c818d3887919fbe3065a28673f2a SHA512 a8a7aa64869c88ac293347281a80158cbd3cc84fc9f5ca56531d3d53b33601f9baa5c4f66c93508d6763dc54779a563faa09c4a473c670a9b217610efecca25c
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
+}