sci-mathematics/gmp-ecm: new EAPI=7 revision.
authorMichael Orlitzky <mjo@gentoo.org>
Fri, 28 Feb 2020 13:34:04 +0000 (08:34 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Fri, 28 Feb 2020 13:36:47 +0000 (08:36 -0500)
The dependencies and build system of gmp-ecm have been improved over
the years, and much of the cruft in the ebuild could simply be
deleted. This commit adds an -r2, based on François Bissey's ebuild in
the sage-on-gentoo overlay, to modernize things. I've manually verified
the diff for sanity, and the test suite passes for me on amd64.

Closes: https://bugs.gentoo.org/466498
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r2.ebuild [new file with mode: 0644]

diff --git a/sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r2.ebuild b/sci-mathematics/gmp-ecm/gmp-ecm-7.0.4-r2.ebuild
new file mode 100644 (file)
index 0000000..98a9718
--- /dev/null
@@ -0,0 +1,36 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Elliptic Curve Method for Integer Factorization"
+HOMEPAGE="http://ecm.gforge.inria.fr/"
+SRC_URI="https://gforge.inria.fr/frs/download.php/file/36224/${P}.tar.gz"
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="+custom-tune -openmp static-libs cpu_flags_x86_sse2"
+
+DEPEND="dev-libs/gmp:="
+RDEPEND="${DEPEND}"
+
+# Can't both be enabled.
+REQUIRED_USE="x86-macos? ( !custom-tune )"
+
+S="${WORKDIR}/ecm-${PV}"
+
+pkg_pretend() {
+       tc-check-openmp
+}
+
+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)
+}