diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2021-10-21 19:34:01 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2021-10-22 20:11:23 -0400 |
commit | db8613a7ef8e28bae0e4d6002e03676110919783 (patch) | |
tree | a2b3d195e84c9ac47f10ca084d4935c7ffc4dfe1 /sci-mathematics | |
parent | sci-libs/lrslib: new upstream version 071b. (diff) | |
download | gentoo-db8613a7ef8e28bae0e4d6002e03676110919783.tar.gz gentoo-db8613a7ef8e28bae0e4d6002e03676110919783.tar.bz2 gentoo-db8613a7ef8e28bae0e4d6002e03676110919783.zip |
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>
Diffstat (limited to 'sci-mathematics')
-rw-r--r-- | sci-mathematics/polymake/Manifest | 2 | ||||
-rw-r--r-- | sci-mathematics/polymake/metadata.xml | 52 | ||||
-rw-r--r-- | sci-mathematics/polymake/polymake-3.0_p2.ebuild | 90 | ||||
-rw-r--r-- | sci-mathematics/polymake/polymake-4.5.ebuild | 117 |
4 files changed, 158 insertions, 103 deletions
diff --git a/sci-mathematics/polymake/Manifest b/sci-mathematics/polymake/Manifest index 46fae3d858fd..913e6a1540b0 100644 --- a/sci-mathematics/polymake/Manifest +++ b/sci-mathematics/polymake/Manifest @@ -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 diff --git a/sci-mathematics/polymake/metadata.xml b/sci-mathematics/polymake/metadata.xml index 8eb7d9d63199..5834e17347b0 100644 --- a/sci-mathematics/polymake/metadata.xml +++ b/sci-mathematics/polymake/metadata.xml @@ -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> diff --git a/sci-mathematics/polymake/polymake-3.0_p2.ebuild b/sci-mathematics/polymake/polymake-3.0_p2.ebuild deleted file mode 100644 index bff44f4d9bb6..000000000000 --- a/sci-mathematics/polymake/polymake-3.0_p2.ebuild +++ /dev/null @@ -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'." -} diff --git a/sci-mathematics/polymake/polymake-4.5.ebuild b/sci-mathematics/polymake/polymake-4.5.ebuild new file mode 100644 index 000000000000..0ee01c641a11 --- /dev/null +++ b/sci-mathematics/polymake/polymake-4.5.ebuild @@ -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'." +} |