diff options
author | 2021-10-22 13:44:28 -0400 | |
---|---|---|
committer | 2021-10-22 20:09:39 -0400 | |
commit | 27637d308fadfeddcfc5af7f528feaa91a3da98e (patch) | |
tree | 59af350d5fe0e500b8ccd401d35cf8766f3435e1 /sci-libs/lrslib/lrslib-071b.ebuild | |
parent | dev-db/rqlite: Bump to version 6.1.0 (diff) | |
download | gentoo-27637d308fadfeddcfc5af7f528feaa91a3da98e.tar.gz gentoo-27637d308fadfeddcfc5af7f528feaa91a3da98e.tar.bz2 gentoo-27637d308fadfeddcfc5af7f528feaa91a3da98e.zip |
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@gentoo.org>
Diffstat (limited to 'sci-libs/lrslib/lrslib-071b.ebuild')
-rw-r--r-- | sci-libs/lrslib/lrslib-071b.ebuild | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/sci-libs/lrslib/lrslib-071b.ebuild b/sci-libs/lrslib/lrslib-071b.ebuild new file mode 100644 index 000000000000..9d8a4220b86b --- /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 +} |