sci-mathematics/eclib: new package for rational elliptic curves.
authorMichael Orlitzky <mjo@gentoo.org>
Mon, 30 Dec 2019 14:09:52 +0000 (09:09 -0500)
committerMichael Orlitzky <mjo@gentoo.org>
Mon, 30 Dec 2019 14:33:59 +0000 (09:33 -0500)
This commit imports eclib-20190909 from the sage-on-gentoo overlay
where François Bissey has been maintaining it for use with SageMath.
I've made a few changes on top of the overlay version:

  * Enabled the test suite (it passes for me).
  * Put the "--disable-allprogs" configure flag behind USE=minimal.
  * Put the "--with-boost" configure flag behind USE=boost.
  * Inlined the SRC_URI which was using a custom thirdpartymirror.
  * Dropped obsolete autotools.eclass and RESTRICT=mirror.

The SageMath build system can detect eclib on the system now, so having
this package installed will save users time when rebuilding SageMath.

Closes: https://bugs.gentoo.org/704096
Package-Manager: Portage-2.3.79, Repoman-2.3.16
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
sci-mathematics/eclib/Manifest [new file with mode: 0644]
sci-mathematics/eclib/eclib-20190909.ebuild [new file with mode: 0644]
sci-mathematics/eclib/metadata.xml [new file with mode: 0644]

diff --git a/sci-mathematics/eclib/Manifest b/sci-mathematics/eclib/Manifest
new file mode 100644 (file)
index 0000000..176b940
--- /dev/null
@@ -0,0 +1 @@
+DIST eclib-20190909.tar.bz2 914900 BLAKE2B df57972792f96e65b25db5a2ab1063d5a8f1ad05edbed77d9ca2632ddfb4af2cb8586e572155beec09cc0c03472300d1e6fcbdda3527c36e9106006239f50600 SHA512 df829b10c353f528f2040b55d6198e3a48eba179b9a80e71794e4c6d46ee9bb13b3eccec15c7d286ec5d8252e6ba91157c2a08ac4e2da86969a4158450a41960
diff --git a/sci-mathematics/eclib/eclib-20190909.ebuild b/sci-mathematics/eclib/eclib-20190909.ebuild
new file mode 100644 (file)
index 0000000..e30f083
--- /dev/null
@@ -0,0 +1,37 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Programs for elliptic curves defined over the rational numbers"
+HOMEPAGE="https://www.warwick.ac.uk/~masgaj/mwrank/index.html"
+
+# We use the SageMath tarball instead of the one from github because
+# the github releases don't contain the "make dist" stuff and we would
+# need autotools.eclass to generate it.
+SRC_URI="http://files.sagemath.org/spkg/upstream/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0/6"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="boost flint minimal static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sci-mathematics/pari:=
+       dev-libs/ntl:=
+       boost? ( dev-libs/boost:= )
+       flint? ( sci-mathematics/flint:= )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+       econf \
+               $(usex minimal --disable-allprogs "" "" "") \
+               $(use_with boost) \
+               $(use_with flint) \
+               $(use_enable static-libs static)
+}
+
+src_install(){
+       default
+       find "${ED}" -name '*.la' -delete || die
+}
diff --git a/sci-mathematics/eclib/metadata.xml b/sci-mathematics/eclib/metadata.xml
new file mode 100644 (file)
index 0000000..9561ac3
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>mjo@gentoo.org</email>
+  </maintainer>
+  <!--
+      mjo: François maintained this package in the sage-on-gentoo overlay
+      long before I moved it into ::gentoo. You don't need an ACK from me
+      to merge his changes.
+  -->
+  <maintainer type="person">
+    <email>frp.bissey@gmail.com</email>
+    <name>François Bissey</name>
+  </maintainer>
+  <maintainer type="project">
+    <email>proxy-maint@gentoo.org</email>
+    <name>Proxy Maintainers</name>
+  </maintainer>
+
+  <use>
+    <flag name="boost">
+      Add parallel capabilities using <pkg>dev-libs/boost</pkg>.
+    </flag>
+
+    <flag name="flint">
+      Enable the use of <pkg>sci-mathematics/flint</pkg> for certain
+      operations.
+    </flag>
+
+    <flag name="minimal">
+      Build only the "mwrank" program.
+    </flag>
+  </use>
+
+  <upstream>
+    <remote-id type="github">JohnCremona/eclib</remote-id>
+  </upstream>
+</pkgmetadata>