commit:     f3db973365e1e4e2b8c421c67a7c453987417828
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 26 03:28:45 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 26 03:28:45 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3db9733

sci-mathematics/polymake: add 4.15

Closes: https://bugs.gentoo.org/961157
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/polymake/Manifest             |   1 +
 sci-mathematics/polymake/polymake-4.15.ebuild | 117 ++++++++++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/sci-mathematics/polymake/Manifest 
b/sci-mathematics/polymake/Manifest
index 743035af980f..479ddb270af0 100644
--- a/sci-mathematics/polymake/Manifest
+++ b/sci-mathematics/polymake/Manifest
@@ -1,2 +1,3 @@
 DIST polymake-4.13-minimal.tar.bz2 7338096 BLAKE2B 
c4d60ab48cb4fd21e6ea38ccdf85086e92c1ad2b80434180c07da036de9e462439e73f05d271d1c0aa150a8eeda59b20d5314fbf8fd7b17c2eb3f0e0b0384c78
 SHA512 
cd281a1f293434d96efceeb02e25d23fb334fa0c0ecdf5af10489d12850dca43c05eaa36e86fbd4a0b1fab9e83b03ad694d655a8710ea5ed9f000297a4d86d50
 DIST polymake-4.14-minimal.tar.bz2 7337590 BLAKE2B 
0c293b3b184fd2a854f31967427eeca0675ef707a3c36e7b1d90b2a59c68f9fafbddabd61e7d7540596ca6df3378924e32887fbcb27bc97b3b7c1001e3dacaed
 SHA512 
d4deb0c72613090867f123915f5de4b865477d31778fdf212ea233c196307d22047f7a718bf7b21609155a75aa0a4021bc68a8e1f6085b7c8131cdeec1ae87ac
+DIST polymake-4.15-minimal.tar.bz2 7338374 BLAKE2B 
3f57b48a938848161de99d9805d3afc34dbc492df539c57035b02a01045d99f8121ada49da637ca894054f44504171bdc460a7733bef8e1c7898826d18919aaf
 SHA512 
c5c296b5d3768c4df846731d641572ea7871db1f6cca4f9228861865bbd6827b53447e41c31497174c9cfb1e64db5845a35de179ea5ef79fa803637c5073a919

diff --git a/sci-mathematics/polymake/polymake-4.15.ebuild 
b/sci-mathematics/polymake/polymake-4.15.ebuild
new file mode 100644
index 000000000000..26da78bc8c7d
--- /dev/null
+++ b/sci-mathematics/polymake/polymake-4.15.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2025 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"
+HOMEPAGE="https://polymake.org/";
+SRC_URI="https://polymake.org/lib/exe/fetch.php/download/${P}-minimal.tar.bz2";
+
+# 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 ~riscv ~amd64-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-lang/perl
+       ${NINJA_DEPEND}"
+
+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:= )
+       flint? ( sci-mathematics/flint:= )
+       lrs? ( >=sci-libs/lrslib-051:=[gmp] )
+       nauty? ( sci-mathematics/nauty:= )
+       normaliz? ( >=sci-mathematics/normaliz-3.8:= )
+       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"
+
+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=""
+
+       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. We disable openmp unconditionally
+       # because it's only supposedly only used for building the bundled
+       # libnormaliz (we unbundle it) and for something called to_simplex
+       # that I can't find anywhere in the polymake source.
+       ./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 \
+               --without-openmp \
+               $(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_test() {
+       perl/polymake --script run_testcases --emacs-style \
+               || die "test suite failed"
+}
+
+src_install() {
+       # DESTDIR needs to find its way into the real install script,
+       # support/install.pl.
+       export DESTDIR="${D}"
+       eninja -C build/Opt install
+}
+
+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'."
+}

Reply via email to