1 |
commit: dd5bbd01fd9a834477755d88f46b2d331f4bb6b4 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 9 12:38:35 2022 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 9 19:07:12 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd5bbd01 |
7 |
|
8 |
sci-mathematics/polymake: add 4.7 |
9 |
|
10 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
11 |
|
12 |
sci-mathematics/polymake/Manifest | 1 + |
13 |
sci-mathematics/polymake/polymake-4.7.ebuild | 122 +++++++++++++++++++++++++++ |
14 |
2 files changed, 123 insertions(+) |
15 |
|
16 |
diff --git a/sci-mathematics/polymake/Manifest b/sci-mathematics/polymake/Manifest |
17 |
index 2405e7d77aa0..a5a48525953a 100644 |
18 |
--- a/sci-mathematics/polymake/Manifest |
19 |
+++ b/sci-mathematics/polymake/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST polymake-4.6-minimal.tar.bz2 5634651 BLAKE2B 6ee24fa6e70fdf746ea298d78e21e17fe38c5837ae2d3153e53656b4b003555b06897f463220b59474eed1111135dfa61c080d08d6363391afca51011f331122 SHA512 90f04c67bf297fb1b9f5a51d1654ff12385860b1fc80278a8b47f65970f11a1e0f33ede8a839b54a12422e772c8b76302ff78cc467712a2486f6e76ce0d5ab20 |
22 |
+DIST polymake-4.7-minimal.tar.bz2 7258042 BLAKE2B bb6de88b9ba2c04988d18823f15b0a61ffa4699ae75b553bce2266136f4584610426d2820684f6aa553960a7159f1a2d543586fd531bb18f336e854fba451f78 SHA512 f025ae7833a5fbca7b79a3c8f6a74516a4d175054f0439f21ae8f54eefc0762f1b2abf33f484aa7f6a9a54c62dc0c476f8b3a9cfbea148c53497b62d0b0740a1 |
23 |
|
24 |
diff --git a/sci-mathematics/polymake/polymake-4.7.ebuild b/sci-mathematics/polymake/polymake-4.7.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..66795c00f8c7 |
27 |
--- /dev/null |
28 |
+++ b/sci-mathematics/polymake/polymake-4.7.ebuild |
29 |
@@ -0,0 +1,122 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=8 |
34 |
+ |
35 |
+inherit flag-o-matic ninja-utils toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="Tool for polyhedral geometry and combinatorics" |
38 |
+SRC_URI="https://polymake.org/lib/exe/fetch.php/download/${P}-minimal.tar.bz2" |
39 |
+HOMEPAGE="https://polymake.org/" |
40 |
+ |
41 |
+# polymake itself is GPL-2, but even the minimal tarball bundles a lot |
42 |
+# of other code. I've included everything that turns up with a |
43 |
+# |
44 |
+# find ./ -name 'LICENSE' -o -name 'COPYING' |
45 |
+# |
46 |
+# in the list below. If any of these bother you, you may want to take a |
47 |
+# closer look at how (or even if) the corresponding code is being used. |
48 |
+LICENSE="BSD GPL-2 GPL-2+ MIT WTFPL-2" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~amd64 ~riscv ~x86 ~amd64-linux ~x86-linux" |
51 |
+IUSE="bliss +cdd +flint +normaliz libpolymake lrs nauty ppl singular" |
52 |
+ |
53 |
+REQUIRED_USE="^^ ( bliss nauty )" |
54 |
+ |
55 |
+# The "configure" script isn't autotools; it basically exists just to |
56 |
+# exec some other perl script but using the familiar name. |
57 |
+BDEPEND="dev-util/ninja |
58 |
+ dev-lang/perl" |
59 |
+ |
60 |
+DEPEND=" |
61 |
+ libpolymake? ( dev-lang/perl ) |
62 |
+ dev-libs/boost:= |
63 |
+ dev-libs/gmp:= |
64 |
+ dev-libs/libxml2:2= |
65 |
+ dev-libs/libxslt:= |
66 |
+ dev-libs/mpfr:= |
67 |
+ sys-libs/readline:= |
68 |
+ bliss? ( sci-libs/bliss:=[gmp] ) |
69 |
+ cdd? ( sci-libs/cddlib:= ) |
70 |
+ flint? ( sci-mathematics/flint:= ) |
71 |
+ lrs? ( >=sci-libs/lrslib-051:=[gmp] ) |
72 |
+ nauty? ( sci-mathematics/nauty:= ) |
73 |
+ normaliz? ( >=sci-mathematics/normaliz-3.8:= ) |
74 |
+ ppl? ( dev-libs/ppl:= ) |
75 |
+ singular? ( sci-mathematics/singular:= )" |
76 |
+ |
77 |
+RDEPEND="${DEPEND} |
78 |
+ dev-lang/perl |
79 |
+ dev-perl/JSON |
80 |
+ dev-perl/Term-ReadLine-Gnu |
81 |
+ dev-perl/TermReadKey |
82 |
+ dev-perl/XML-SAX |
83 |
+ dev-perl/XML-Writer" |
84 |
+ |
85 |
+# Tests observed failing after upgrade to polymake-4.5. No idea if they |
86 |
+# worked prior to that. Someone who actually understands polymake will |
87 |
+# have to get these working (at least briefly) before we re-enable them. |
88 |
+RESTRICT=test |
89 |
+ |
90 |
+src_configure() { |
91 |
+ # Without this, the build system tries to use "the highest possible" |
92 |
+ # optimization level and will override what's in your CXXFLAGS. |
93 |
+ export CXXOPT="" |
94 |
+ |
95 |
+ tc-export CC CXX |
96 |
+ |
97 |
+ # We need to define BLISS_USE_GMP if bliss was built with gmp support. |
98 |
+ # Therefore we require gmp support on bliss, so that the package |
99 |
+ # manager can prevent rebuilds with changed gmp flag. Yes, this should |
100 |
+ # be append-cppflags; but the build system doesn't respect CPPFLAGS. |
101 |
+ use bliss && append-cxxflags -DBLISS_USE_GMP |
102 |
+ |
103 |
+ # This isn't an autotools ./configure script, so a lot of things |
104 |
+ # don't work the way you'd expect. We disable openmp unconditionally |
105 |
+ # because it's only supposedly only used for building the bundled |
106 |
+ # libnormaliz (we unbundle it) and for something called to_simplex |
107 |
+ # that I can't find anywhere in the polymake source. |
108 |
+ ./configure --prefix="${EPREFIX}/usr" \ |
109 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
110 |
+ --libexecdir="${EPREFIX}/usr/$(get_libdir)/polymake" \ |
111 |
+ $(usev !libpolymake "--without-callable") \ |
112 |
+ --without-java \ |
113 |
+ --without-javaview \ |
114 |
+ --without-native \ |
115 |
+ --without-scip \ |
116 |
+ --without-soplex \ |
117 |
+ --without-openmp \ |
118 |
+ $(use_with bliss bliss "${EPREFIX}/usr") \ |
119 |
+ $(use_with cdd cdd "${EPREFIX}/usr") \ |
120 |
+ $(use_with flint flint "${EPREFIX}/usr") \ |
121 |
+ $(use_with lrs lrs "${EPREFIX}/usr") \ |
122 |
+ $(use_with nauty nauty "${EPREFIX}/usr") \ |
123 |
+ $(use_with normaliz libnormaliz "${EPREFIX}/usr") \ |
124 |
+ $(use_with ppl ppl "${EPREFIX}/usr") \ |
125 |
+ $(use_with singular singular "${EPREFIX}/usr") \ |
126 |
+ || die |
127 |
+} |
128 |
+ |
129 |
+# There is a backwards-compatible Makefile that would call ninja for us |
130 |
+# in src_compile/src_install, but it doesn't handle MAKEOPTS correctly. |
131 |
+src_compile() { |
132 |
+ eninja -C build/Opt |
133 |
+} |
134 |
+ |
135 |
+src_install() { |
136 |
+ # DESTDIR needs to find its way into the real install script, |
137 |
+ # support/install.pl. |
138 |
+ export DESTDIR="${D}" |
139 |
+ eninja -C build/Opt install |
140 |
+} |
141 |
+ |
142 |
+src_test() { |
143 |
+ perl/polymake --script run_testcases --emacs-style \ |
144 |
+ || die "test suite failed" |
145 |
+} |
146 |
+ |
147 |
+pkg_postinst() { |
148 |
+ elog "Additional features for polymake are available through external" |
149 |
+ elog "software such as sci-mathematics/4ti2 and sci-mathematics/topcom." |
150 |
+ elog "After installing new external software run 'polymake --reconfigure'." |
151 |
+} |