sci-mathematics/polymake: new upstream version 4.5.

Lots of ebuild improvements (EAPI=8,...) in this one. Several bugs
have been fixed, and some new ones likely introduced; best not to
dwell. Now that we have something passable in the tree, it will be a
lot easier to make incremental improvements.

Closes: https://bugs.gentoo.org/618332
Closes: https://bugs.gentoo.org/625512
Closes: https://bugs.gentoo.org/648804
Closes: https://github.com/gentoo/gentoo/pull/17925
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
Michael Orlitzky 2021-10-21 19:34:01 -04:00
parent 27637d308f
commit db8613a7ef
No known key found for this signature in database
GPG Key ID: 6F48D3DA05C2DADB
4 changed files with 158 additions and 103 deletions

View File

@ -1 +1 @@
DIST polymake-3.0r2.tar.bz2 37695790 BLAKE2B 101dda48128b51737b81d3dc09a8ef32d07c5f67605370c5ef0d5638ee6de427c6e8ff66094f96593ad21fa937ca5890af772f6e877fab0e31f4c98ec7c6730b SHA512 b4c22b2c6da8ef597dc05a44a30c7a55fd924a96854cde3f725095465972eabe1e24508f8e5d544f3131c82c973117b15983c38a0242fc7f1d4a4a8ecddb1d46
DIST polymake-4.5-minimal.tar.bz2 5634046 BLAKE2B dc8a10885b23f8c690e9b8e36d6b55193bbc6d77d56c3b2facea70221860c33d2df58a8a693b9d43c0f613962ce2bd1b3258f1a558af8335297092a60876054a SHA512 07fcc9c20c4e48fc6d83845c50c12b2cadeaf55f74619985d21e252970ad76d6ee8cc528cd419e71ed5927d83758e5d6862e41c1610f93ea95127ad9115a333b

View File

@ -6,19 +6,47 @@
<name>Gentoo Mathematics Project</name>
</maintainer>
<use>
<flag name="cdd">Enable sci-libs/cddlib interface for convex hull
computations (Should be kept enabled).</flag>
<flag name="lrs">Enable sci-libs/lrslib interface for convex hull computations.</flag>
<flag name="ppl">Enable dev-libs/ppl interface for convex hull computations.</flag>
<flag name="bliss">Enable sci-libs/bliss interface for graph and face lattice isomorphism computations.</flag>
<flag name="group">Build extension for dealing with permutation groups and symmetric objects.</flag>
<flag name="libnormaliz">Build the bundled extension for lattice related computations.</flag>
<flag name="singular">Enable the interface to sci-mathematics/singular for ideal related computations.</flag>
<flag name="libpolymake">Build the polymake library to build applications using the C++ interface.</flag>
<flag name="bliss">
Enable <pkg>sci-libs/bliss</pkg> interface for graph and face lattice
isomorphism computations.
</flag>
<flag name="cdd">
Enable <pkg>sci-libs/cddlib</pkg> interface for convex hull
computations (Should be kept enabled).
</flag>
<flag name="flint">
Build with "strongly recommended" support for
<pkg>sci-mathematics/flint</pkg>.
</flag>
<flag name="libpolymake">
Build the polymake library to build applications using the C++
interface.
</flag>
<flag name="lrs">
Enable <pkg>sci-libs/lrslib</pkg> interface for convex hull
computations.
</flag>
<flag name="nauty">
Build the extension for graph automorphism computations using
<pkg>sci-mathematics/nauty</pkg>.
</flag>
<flag name="normaliz">
Build the bundled extension for lattice computations using
<pkg>sci-mathematics/normaliz</pkg>.
</flag>
<flag name="ppl">
Enable <pkg>dev-libs/ppl</pkg> interface for convex hull computations.
</flag>
<flag name="singular">
Enable the interface to <pkg>sci-mathematics/singular</pkg> for
ideal related computations.
</flag>
</use>
<longdescription lang="en">
Polymake started out as a tool for the algorithmic treatment of convex
polyhedra. By now it also deals with finite simplicial complexes,
tight spans of finite metric spaces, and other objects.
Polymake is open source software for research in polyhedral
geometry. It deals with polytopes, polyhedra, and fans as well as
simplicial complexes, matroids, graphs, tropical hypersurfaces, and
other objects. Supported platforms include various flavors of Linux,
FreeBSD, and Mac OS.
</longdescription>
</pkgmetadata>

View File

@ -1,90 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit flag-o-matic
DESCRIPTION="research tool for polyhedral geometry and combinatorics"
SRC_URI="https://polymake.org/lib/exe/fetch.php/download/polymake-3.0r2.tar.bz2"
HOMEPAGE="https://polymake.org"
IUSE="+cdd lrs ppl bliss group +libnormaliz singular libpolymake"
REQUIRED_USE="group? ( cdd lrs )"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
DEPEND="dev-lang/perl
dev-libs/gmp:0=
dev-libs/mpfr:0
dev-libs/libxml2:2
dev-libs/libxslt
ppl? ( dev-libs/ppl )
cdd? ( sci-libs/cddlib )
lrs? ( >=sci-libs/lrslib-051[gmp] )
bliss? ( sci-libs/bliss[gmp] )
group? ( dev-libs/boost:= )
libnormaliz? ( dev-libs/boost:= )
singular? ( >=sci-mathematics/singular-4.0.1 )"
RDEPEND="${DEPEND}
dev-perl/XML-LibXML
dev-perl/XML-LibXSLT
dev-perl/XML-Writer
dev-perl/Term-ReadLine-Gnu"
S="${WORKDIR}/${PN}-3.0"
pkg_pretend() {
einfo "During compile this package uses up to"
einfo "750MB of RAM per process. Use MAKEOPTS=\"-j1\" if"
einfo "you run into trouble."
}
src_configure() {
export CXXOPT=$(get-flag -O)
# We need to define BLISS_USE_GMP if bliss was built with gmp support.
# Therefore we require gmp support on bliss, so that the package
# manager can prevent rebuilds with changed gmp flag.
if use bliss ; then
append-cxxflags -DBLISS_USE_GMP
fi
# Configure does not accept --host, therefore econf cannot be used
# Some of the options do not support using just '--with-option'
local myconf=""
use !group && myconf="$myconf --without-group"
use !libnormaliz && myconf="$myconf --without-libnormaliz"
use !libpolymake && myconf="$myconf --without-callable"
# And many other --with-arguments expect a path: --with-option=/path
./configure --prefix="${EPREFIX}/usr" \
--libdir="${EPREFIX}/usr/$(get_libdir)" \
--libexecdir="${EPREFIX}/usr/$(get_libdir)/polymake" \
--without-prereq \
--without-java \
$(use_with cdd cdd "${EPREFIX}/usr") \
$(use_with lrs lrs "${EPREFIX}/usr") \
$(use_with ppl ppl "${EPREFIX}/usr") \
$(use_with bliss bliss "${EPREFIX}/usr") \
$(use_with singular singular "${EPREFIX}/usr") \
${myconf} || die
}
src_install() {
emake -j1 DESTDIR="${D}" install
}
pkg_postinst() {
elog "Docs can be found on https://www.polymake.org/doku.php/documentation"
elog " "
elog "Support for jreality is missing, sorry (see bug #346073)."
elog " "
elog "Additional features for polymake are available through external"
elog "software such as sci-mathematics/4ti2 and sci-mathematics/topcom."
elog "After installing new external software run 'polymake --reconfigure'."
}

View File

@ -0,0 +1,117 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit flag-o-matic ninja-utils toolchain-funcs
DESCRIPTION="Tool for polyhedral geometry and combinatorics"
SRC_URI="https://polymake.org/lib/exe/fetch.php/download/${P}-minimal.tar.bz2"
HOMEPAGE="https://polymake.org/"
# polymake itself is GPL-2, but even the minimal tarball bundles a lot
# of other code. I've included everything that turns up with a
#
# find ./ -name 'LICENSE' -o -name 'COPYING'
#
# in the list below. If any of these bother you, you may want to take a
# closer look at how (or even if) the corresponding code is being used.
LICENSE="BSD GPL-2 GPL-2+ MIT WTFPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="bliss +cdd +flint +normaliz libpolymake lrs nauty ppl singular"
REQUIRED_USE="^^ ( bliss nauty )"
# The "configure" script isn't autotools; it basically exists just to
# exec some other perl script but using the familiar name.
BDEPEND="dev-util/ninja
dev-lang/perl"
DEPEND="
libpolymake? ( dev-lang/perl )
dev-libs/boost:=
dev-libs/gmp:=
dev-libs/libxml2:2=
dev-libs/libxslt:=
dev-libs/mpfr:=
sys-libs/readline:=
bliss? ( sci-libs/bliss:=[gmp] )
cdd? ( sci-libs/cddlib:= )
lrs? ( >=sci-libs/lrslib-051:=[gmp] )
nauty? ( sci-mathematics/nauty:= )
normaliz? ( sci-mathematics/normaliz:= )
ppl? ( dev-libs/ppl:= )
singular? ( sci-mathematics/singular:= )"
RDEPEND="${DEPEND}
dev-lang/perl
dev-perl/JSON
dev-perl/Term-ReadLine-Gnu
dev-perl/TermReadKey
dev-perl/XML-SAX
dev-perl/XML-Writer"
# Tests observed failing after upgrade to polymake-4.5. No idea if they
# worked prior to that. Someone who actually understands polymake will
# have to get these working (at least briefly) before we re-enable them.
RESTRICT=test
src_configure() {
# Without this, the build system tries to use "the highest possible"
# optimization level and will override what's in your CXXFLAGS.
export CXXOPT=$(get-flag -O)
tc-export CC CXX
# We need to define BLISS_USE_GMP if bliss was built with gmp support.
# Therefore we require gmp support on bliss, so that the package
# manager can prevent rebuilds with changed gmp flag. Yes, this should
# be append-cppflags; but the build system doesn't respect CPPFLAGS.
use bliss && append-cxxflags -DBLISS_USE_GMP
# This isn't an autotools ./configure script, so a lot of things
# don't work the way you'd expect.
./configure --prefix="${EPREFIX}/usr" \
--libdir="${EPREFIX}/usr/$(get_libdir)" \
--libexecdir="${EPREFIX}/usr/$(get_libdir)/polymake" \
$(usev !libpolymake "--without-callable") \
--without-java \
--without-javaview \
--without-native \
--without-scip \
--without-soplex \
$(use_with bliss bliss "${EPREFIX}/usr") \
$(use_with cdd cdd "${EPREFIX}/usr") \
$(use_with flint flint "${EPREFIX}/usr") \
$(use_with lrs lrs "${EPREFIX}/usr") \
$(use_with nauty nauty "${EPREFIX}/usr") \
$(use_with normaliz libnormaliz "${EPREFIX}/usr") \
$(use_with ppl ppl "${EPREFIX}/usr") \
$(use_with singular singular "${EPREFIX}/usr") \
|| die
}
# There is a backwards-compatible Makefile that would call ninja for us
# in src_compile/src_install, but it doesn't handle MAKEOPTS correctly.
src_compile() {
eninja -C build/Opt
}
src_install() {
# DESTDIR needs to find its way into the real install script,
# support/install.pl.
export DESTDIR="${D}"
eninja -C build/Opt install
}
src_test() {
perl/polymake --script run_testcases --emacs-style \
|| die "test suite failed"
}
pkg_postinst() {
elog "Additional features for polymake are available through external"
elog "software such as sci-mathematics/4ti2 and sci-mathematics/topcom."
elog "After installing new external software run 'polymake --reconfigure'."
}