public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/polymake/files/, sci-mathematics/polymake/
@ 2022-06-15 19:30 Michael Orlitzky
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Orlitzky @ 2022-06-15 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     a5f294bb04f044d59923b582e097257559283028
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 15:56:50 2022 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 19:29:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5f294bb

sci-mathematics/polymake: new revision with a few fixes.

  * Build with perl-5.36. Thanks to Alessandro Barbieri for pointing out
    the Fedora patch.
  * Added a lower bound on sci-mathematics/normaliz (with USE=normaliz).
  * Fixed a missing sci-mathematics/flint dependency that Toralf caught.

Closes: https://bugs.gentoo.org/839255
Closes: https://bugs.gentoo.org/851693
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../polymake/files/polymake-4.6-perl-5.36.patch    |  15 +++
 sci-mathematics/polymake/polymake-4.6-r1.ebuild    | 124 +++++++++++++++++++++
 2 files changed, 139 insertions(+)

diff --git a/sci-mathematics/polymake/files/polymake-4.6-perl-5.36.patch b/sci-mathematics/polymake/files/polymake-4.6-perl-5.36.patch
new file mode 100644
index 000000000000..4a9d349ccb9a
--- /dev/null
+++ b/sci-mathematics/polymake/files/polymake-4.6-perl-5.36.patch
@@ -0,0 +1,15 @@
+diff -up lib/core/src/perl/RefHash.xxs.orig lib/core/src/perl/RefHash.xxs
+--- a/lib/core/src/perl/RefHash.xxs	2022-06-06 10:35:17.689807548 +0200
++++ b/lib/core/src/perl/RefHash.xxs	2022-06-06 10:37:12.935663947 +0200
+@@ -71,7 +71,11 @@ SV* tmp_keysv::set(SV* keysv)
+    Copy(obj.keyp, HEK_KEY(hekp), sizeof(SV*), char);
+    HEK_LEN(hekp) = sizeof(SV*);
+    HEK_HASH(hekp) = U32(obj.keyl >> 4);          // hash value
++#if PerlVersion < 5360
+    HEK_FLAGS(hekp) = HVhek_UNSHARED;
++#else
++   HEK_FLAGS(hekp) = HVhek_NOTSHARED;
++#endif
+    sv.sv_any = &xpv;
+    sv.sv_refcnt = 1;
+    sv.sv_flags = SVt_PVIV | SVf_IVisUV | SVf_POK | SVp_POK | PmFlagsForHashKey;

diff --git a/sci-mathematics/polymake/polymake-4.6-r1.ebuild b/sci-mathematics/polymake/polymake-4.6-r1.ebuild
new file mode 100644
index 000000000000..446fedbda04a
--- /dev/null
+++ b/sci-mathematics/polymake/polymake-4.6-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2022 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 ~riscv ~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:= )
+	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"
+
+# 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
+
+PATCHES=( "${FILESDIR}/${P}-perl-5.36.patch" )
+
+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_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'."
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/polymake/files/, sci-mathematics/polymake/
@ 2023-11-13 22:19 Michael Orlitzky
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Orlitzky @ 2023-11-13 22:19 UTC (permalink / raw
  To: gentoo-commits

commit:     c5e5ffa9e5052ad286c2ed2e5fee818bd9630686
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 13 19:36:06 2023 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Nov 13 22:17:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5e5ffa9

sci-mathematics/polymake: new old package, add 4.11

This is back from the dead after being removed for lack of perl-5.38
support. Only a month ago, upstream's opinion was that "any hacks we
would try here will be in vain," but it looks like they've decided to
adopt a short-term fix for perl-5.38. We bring it back, and make use
of $NINJA_DEPEND while we're at it (samurai works fine).

The new patch (and a short explanation from upstream) can be found
on Debian bug 1042521.

Bug: https://bugs.gentoo.org/909570
Closes: https://bugs.gentoo.org/917155
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-mathematics/polymake/Manifest                  |   1 +
 .../files/polymake-4.11-singular-sat.patch         |  53 +++++++++
 sci-mathematics/polymake/metadata.xml              |  54 +++++++++
 sci-mathematics/polymake/polymake-4.11.ebuild      | 124 +++++++++++++++++++++
 4 files changed, 232 insertions(+)

diff --git a/sci-mathematics/polymake/Manifest b/sci-mathematics/polymake/Manifest
new file mode 100644
index 000000000000..64de0ecea8e1
--- /dev/null
+++ b/sci-mathematics/polymake/Manifest
@@ -0,0 +1 @@
+DIST polymake-4.11-minimal.tar.bz2 7325783 BLAKE2B 87e62741e4e44c5fea7454d5cc8cb205cf13f8ee743c1d72100f937d0677505ce0c5c8f5b37c118f89079ca88f313991eaefb2ea02c49b6c7b45c438c6f9e13b SHA512 94adf3fcec21de50451091a04ca17010f5e71b44e3dcd4e2d52b9f952b94ee0cf3f6df15657b761b0bda20eb47cbdc0cb2481bb440c7243442be34f913292246

diff --git a/sci-mathematics/polymake/files/polymake-4.11-singular-sat.patch b/sci-mathematics/polymake/files/polymake-4.11-singular-sat.patch
new file mode 100644
index 000000000000..739e503ac246
--- /dev/null
+++ b/sci-mathematics/polymake/files/polymake-4.11-singular-sat.patch
@@ -0,0 +1,53 @@
+commit 4ce0549f510d246c8f69c85c509fc2d13d882442
+Author: Benjamin Lorenz <lorenz@math.tu-berlin.de>
+Date:   Thu Nov 9 11:15:06 2023 +0100
+
+    singular: support new return types for saturation command
+    
+    This was changed from (ideal, exponent) to just the ideal in singular 4-3-2p5.
+    To allow older versions we keep using sat but support both return types
+    instead of switching to the new sat_with_exp.
+
+diff --git a/bundled/singular/apps/ideal/src/singularIdeal.cc b/bundled/singular/apps/ideal/src/singularIdeal.cc
+index 4cbc00a6f4..bdade5c29d 100644
+--- a/bundled/singular/apps/ideal/src/singularIdeal.cc
++++ b/bundled/singular/apps/ideal/src/singularIdeal.cc
+@@ -236,22 +236,24 @@ public:
+       arg.next->data=(void *)idCopy(J);
+       // call primdecSY
+       BOOLEAN res=iiMake_proc(sathdl, nullptr ,&arg);
+-      if(!res && (iiRETURNEXPR.Typ() == LIST_CMD)){
+-         lists L = (lists)iiRETURNEXPR.Data();
+-         SingularIdeal_wrap* result;
+-         if(L->m[0].Typ() == IDEAL_CMD){
+-            result = new SingularIdeal_impl((::ideal) (L->m[0].Data()),singRing);
+-         } else {
+-            throw std::runtime_error("Something went wrong for the primary decomposition");
++      if(!res) {
++         ::ideal iddata = nullptr;
++         if (iiRETURNEXPR.Typ() == LIST_CMD) {
++            lists L = (lists)iiRETURNEXPR.Data();
++            if(L->m[0].Typ() == IDEAL_CMD)
++               iddata = (::ideal) L->m[0].Data();
++         } else if (iiRETURNEXPR.Typ() == IDEAL_CMD) {
++            iddata = (::ideal) iiRETURNEXPR.Data();
++         }
++         if (iddata != nullptr) {
++            SingularIdeal_wrap* result = new SingularIdeal_impl(iddata, singRing);
++            iiRETURNEXPR.CleanUp();
++            iiRETURNEXPR.Init();
++            return result;
+          }
+-         iiRETURNEXPR.CleanUp();
+-         iiRETURNEXPR.Init();
+-         return result;
+-      } else {
+-         iiRETURNEXPR.Init();
+-         throw std::runtime_error("Something went wrong for the saturation");
+       }
+-
++      iiRETURNEXPR.Init();
++      throw std::runtime_error("saturation: unable to parse ideal from return value");
+    }
+ 
+    Array<SingularIdeal_wrap*> primary_decomposition() const

diff --git a/sci-mathematics/polymake/metadata.xml b/sci-mathematics/polymake/metadata.xml
new file mode 100644
index 000000000000..e8e79ebd3fc8
--- /dev/null
+++ b/sci-mathematics/polymake/metadata.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+  <email>sci-mathematics@gentoo.org</email>
+  <name>Gentoo Mathematics Project</name>
+</maintainer>
+<use>
+  <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 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.
+</longdescription>
+<upstream>
+  <remote-id type="github">polymake/polymake</remote-id>
+</upstream>
+</pkgmetadata>

diff --git a/sci-mathematics/polymake/polymake-4.11.ebuild b/sci-mathematics/polymake/polymake-4.11.ebuild
new file mode 100644
index 000000000000..56790dcb5cc9
--- /dev/null
+++ b/sci-mathematics/polymake/polymake-4.11.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2023 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 ~riscv ~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-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"
+
+# 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
+
+PATCHES=( "${FILESDIR}/${P}-singular-sat.patch" )
+
+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_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'."
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/polymake/files/, sci-mathematics/polymake/
@ 2024-08-29 14:03 Michael Orlitzky
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Orlitzky @ 2024-08-29 14:03 UTC (permalink / raw
  To: gentoo-commits

commit:     7948c96a8b537b9e95f5f92854eca406dafa0882
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 28 14:43:32 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Aug 29 14:03:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7948c96a

sci-mathematics/polymake: add 4.12

Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 sci-mathematics/polymake/Manifest                  |   1 +
 .../files/polymake-4.12-no-perl-constraints.patch  |  62 +++++++++++
 sci-mathematics/polymake/polymake-4.12.ebuild      | 119 +++++++++++++++++++++
 3 files changed, 182 insertions(+)

diff --git a/sci-mathematics/polymake/Manifest b/sci-mathematics/polymake/Manifest
index 64de0ecea8e1..cb4b81dbdabb 100644
--- a/sci-mathematics/polymake/Manifest
+++ b/sci-mathematics/polymake/Manifest
@@ -1 +1,2 @@
 DIST polymake-4.11-minimal.tar.bz2 7325783 BLAKE2B 87e62741e4e44c5fea7454d5cc8cb205cf13f8ee743c1d72100f937d0677505ce0c5c8f5b37c118f89079ca88f313991eaefb2ea02c49b6c7b45c438c6f9e13b SHA512 94adf3fcec21de50451091a04ca17010f5e71b44e3dcd4e2d52b9f952b94ee0cf3f6df15657b761b0bda20eb47cbdc0cb2481bb440c7243442be34f913292246
+DIST polymake-4.12-minimal.tar.bz2 7337552 BLAKE2B 4893be1f04ace2c4eb95ed01bc55e62e2187e10b5b10c1d274b2d4e771e1d863b2eb7adeb9a05b2f4c14466cdce1c0d223cfcf35c125d9989ab3825a88e46464 SHA512 127d4058148fdac05fb83a3ab893edfe5c0ab6865f9745d1e709396c23af9762574616f0466adcee59d35646d807621a090a41e8cc693b1fca1f5f6cd5d01054

diff --git a/sci-mathematics/polymake/files/polymake-4.12-no-perl-constraints.patch b/sci-mathematics/polymake/files/polymake-4.12-no-perl-constraints.patch
new file mode 100644
index 000000000000..54cbb1ee0324
--- /dev/null
+++ b/sci-mathematics/polymake/files/polymake-4.12-no-perl-constraints.patch
@@ -0,0 +1,62 @@
+From b0639eca089256c1d816b62c0e2b901cc14a5f7c Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 28 Aug 2024 10:57:17 -0400
+Subject: [PATCH] support/configure.pl: disable perl version check
+
+The test suite apparently passes with perl-5.40, and that's what
+we have in ~arch on Gentoo, so let's accept it.
+---
+ support/configure.pl | 37 -------------------------------------
+ 1 file changed, 37 deletions(-)
+
+diff --git a/support/configure.pl b/support/configure.pl
+index 5615c65..95f66de 100644
+--- a/support/configure.pl
++++ b/support/configure.pl
+@@ -14,43 +14,6 @@
+ #  GNU General Public License for more details.
+ #-------------------------------------------------------------------------------
+ 
+-BEGIN {
+-   if ($] < 5.016) {
+-      print STDERR <<".";
+-polymake requires perl version not lower than 5.16;
+-your perl interpreter says it is $].
+-
+-Please upgrade your perl installation;
+-if you already have an up-to-date perl interpreter somewhere else,
+-you can specify its location on the command line:
+-
+-./configure PERL=/path/to/my/new/perl [other options ...]
+-.
+-      exit(1);
+-   } elsif ($] >= 5.040) {
+-      print STDERR <<".";
+-*************
+-*** ERROR ***
+-*************
+-
+-polymake has not been checkced for compatibility with perl 5.40 or newer;
+-your perl interpreter says it is $].
+-
+-If you already have another (older) perl interpreter somewhere else, you can
+-specify its location on the command line:
+-
+-./configure PERL=/path/to/my/new/perl [other options ...]
+-
+-You can install a custom perl version in your home directory using perlbrew
+-(https://perlbrew.pl). Make sure to append '-Duseshrplib' to the install
+-command if you want to use libpolymake (e.g. for the jupyter interface) and to
+-install all required perl modules which are listed after running configure
+-again with the new perl.
+-.
+-      exit(1);
+-   }
+-}
+-
+ use Config;
+ use Cwd;
+ use File::Path;
+-- 
+2.46.0
+

diff --git a/sci-mathematics/polymake/polymake-4.12.ebuild b/sci-mathematics/polymake/polymake-4.12.ebuild
new file mode 100644
index 000000000000..a4232f80fa1b
--- /dev/null
+++ b/sci-mathematics/polymake/polymake-4.12.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2024 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 ~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-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"
+
+PATCHES=( "${FILESDIR}/${P}-no-perl-constraints.patch" )
+
+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_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'."
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-08-29 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-15 19:30 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/polymake/files/, sci-mathematics/polymake/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2023-11-13 22:19 Michael Orlitzky
2024-08-29 14:03 Michael Orlitzky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox