commit:     27637d308fadfeddcfc5af7f528feaa91a3da98e
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 22 17:44:28 2021 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Oct 23 00:09:39 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27637d30

sci-libs/lrslib: new upstream version 071b.

The existing lrslib-071 fails to install an important header,
and is therefore unusable as a library. This should fix it.

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-libs/lrslib/Manifest           |  1 +
 sci-libs/lrslib/lrslib-071b.ebuild | 58 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)

diff --git a/sci-libs/lrslib/Manifest b/sci-libs/lrslib/Manifest
index 65d38903cb3..86388f6e102 100644
--- a/sci-libs/lrslib/Manifest
+++ b/sci-libs/lrslib/Manifest
@@ -1,2 +1,3 @@
 DIST lrslib-062.tar.gz 292745 BLAKE2B 
1a2c0e264d590c38d83ee35616b1ec36d8a093b5c7f08179019261d8b321d5b95d8889ca6555ae69853f919d6d66358a865a8a2002516dfd560bec6658f3913d
 SHA512 
1d644a7798580457ff266730f42f6fac317ec8cdf2509ad6028e7a838e5c4c948bd0f9499b840c227bad4269f7144ff72b87fe3a19bdb9ad0925ebe4a7bc4f9f
 DIST lrslib-071.tar.gz 460165 BLAKE2B 
67be1ffac1c09a94773c69fc2215db19623bc8bc78be74342a1eda497b70eed2d8cb8e9b34ce269177154a4aed6f7bde02f632a536999b24f3116b3e69be456e
 SHA512 
451aa5dada106516aeed1688c1e939a2e216ac760addb483f9cc1d5d4ac62e88af2772a6fa589b217b544621d041d94386a79502483db2eeaf04e90c4a3fd78e
+DIST lrslib-071b.tar.gz 466789 BLAKE2B 
57a8abd9d203b1cdc62d6848afa77aa6912d9d720a0dedfbe72ca602ad8ba36d13160f7da7d719e3fa140ba2cb6432d20590ae9ea9b1f66bc2e24c393d9fe1bd
 SHA512 
feafc5726e66c977e917f0b59ae950cdb98dbd84639885b487930aab2a89a7f067a3f39c381acc3eae7206b91255e1befa5551488d8816afc0f8054d801eb539

diff --git a/sci-libs/lrslib/lrslib-071b.ebuild 
b/sci-libs/lrslib/lrslib-071b.ebuild
new file mode 100644
index 00000000000..9d8a4220b86
--- /dev/null
+++ b/sci-libs/lrslib/lrslib-071b.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Reverse-search algorithm for vertex enumeration problems"
+HOMEPAGE="http://cgm.cs.mcgill.ca/~avis/C/lrs.html";
+SRC_URI="http://cgm.cs.mcgill.ca/~avis/C/lrslib/archive/${P}.tar.gz";
+
+# COPYING is GPL-2, but e.g. lrslib.h says "or ... any later version."
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE="gmp mpi"
+
+BDEPEND=""
+RDEPEND="
+       gmp? (
+               dev-libs/gmp:0=
+               mpi? ( virtual/mpi )
+       )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+       default
+       tc-export CC
+
+       # The "makefile" sort-of supports CFLAGS as of lrslib-071b, but
+       # "-O3" is still included verbatim in many targets. Likewise, a
+       # LIBDIR variable exists but "lib" remains hard-coded in the install
+       # targets.
+       sed -e "s/-O3/${CFLAGS}/g" \
+               -e 's/$(CC) -shared/$(CC) $(LDFLAGS) -shared/' \
+               -e "s,/usr/local,${EPREFIX}/usr,g" \
+               -e "s,/lib,/$(get_libdir),g" \
+               -i makefile || die
+}
+
+src_compile() {
+       if use gmp ; then
+               emake
+               emake all-shared
+               use mpi && emake mplrs
+       else
+               emake allmp
+       fi
+}
+
+src_install() {
+       emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install-common
+       if use gmp; then
+               emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
+               use mpi && dobin mplrs
+       fi
+       dodoc README
+}

Reply via email to