Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/singular/, sci-mathematics/singular/files/
Date: Sun, 30 May 2021 14:25:31
Message-Id: 1622384643.5399f4f40e04ef04fef15df3039b60b749158f5e.mjo@gentoo
1 commit: 5399f4f40e04ef04fef15df3039b60b749158f5e
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 30 14:10:26 2021 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sun May 30 14:24:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5399f4f4
7
8 sci-mathematics/singular: new upstream version 4.2.0_p3.
9
10 Nothing exciting here except rebased patches.
11
12 Package-Manager: Portage-3.0.18, Repoman-3.0.2
13 Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
14
15 sci-mathematics/singular/Manifest | 1 +
16 .../files/singular-4.2.0-doc_install.patch | 79 ++++++++++++++++
17 .../files/singular-4.2.0-gfan_linking.patch | 38 ++++++++
18 sci-mathematics/singular/singular-4.2.0_p3.ebuild | 104 +++++++++++++++++++++
19 4 files changed, 222 insertions(+)
20
21 diff --git a/sci-mathematics/singular/Manifest b/sci-mathematics/singular/Manifest
22 index 6b537a9d225..13b96e74c09 100644
23 --- a/sci-mathematics/singular/Manifest
24 +++ b/sci-mathematics/singular/Manifest
25 @@ -1 +1,2 @@
26 DIST singular-4.2.0p1.tar.gz 14155171 BLAKE2B 444553f87d7ca8d6a62e4519c9857a6892757e92285df7c3b686913a9b51c9ae8d802c41382b0b2b6e37dc2dc496d4a10f262c98407470219cdce131e8baf127 SHA512 2ecd8940c9e8d70a93dbdb4df6da313c00151e5cb959f8eed5856e8df99089b5a03e514fbcdc70903c77df8b59fa7ef9f3b134f1de510b795fa6ea0341089bd8
27 +DIST singular-4.2.0p3.tar.gz 16641923 BLAKE2B 4dd7e1a42c71bbba625e171aee656580b443656f50458909ffae1af81b1413d5330aa032656032ea365225eb088491fe2a48997895e37bc89eea5f17b8fbebb8 SHA512 b9833389b648ec4ba2bd09253f00254b9ae3dc61313fc81c9003b283fc413caab4274e55750de1c342ef24a8fc0ce817643cd31eabbb2999de7f5017dfa1411f
28
29 diff --git a/sci-mathematics/singular/files/singular-4.2.0-doc_install.patch b/sci-mathematics/singular/files/singular-4.2.0-doc_install.patch
30 new file mode 100644
31 index 00000000000..b0656d9fb67
32 --- /dev/null
33 +++ b/sci-mathematics/singular/files/singular-4.2.0-doc_install.patch
34 @@ -0,0 +1,79 @@
35 +From 74ec250d3d89d0125c409b3340aca50a00b067ad Mon Sep 17 00:00:00 2001
36 +From: Michael Orlitzky <michael@××××××××.com>
37 +Date: Sun, 30 May 2021 08:28:41 -0400
38 +Subject: [PATCH 3/3] autotools: support docdir and htmldir.
39 +
40 +Instead of hard-coding the "doc" and "html" subdirectories,
41 +allow them to be ./configured.
42 +---
43 + Makefile.am | 8 ++++----
44 + configure.ac | 5 +++++
45 + resources/configure.ac | 4 ++++
46 + resources/feResource.cc | 2 +-
47 + 4 files changed, 14 insertions(+), 5 deletions(-)
48 +
49 +diff --git a/Makefile.am b/Makefile.am
50 +index fbea51d..c5d78a7 100644
51 +--- a/Makefile.am
52 ++++ b/Makefile.am
53 +@@ -16,10 +16,10 @@ bin_SCRIPTS = libsingular-config
54 +
55 + install-data-local:
56 + if test -e $(srcdir)/doc/doc.tbz2; then\
57 +- (cat ${top_srcdir}/doc/doc.tbz2| (cd $(DESTDIR)$(datadir)/singular; tar -jx --no-same-owner -f -));\
58 +- mkdir $(DESTDIR)$(datadir)/info;\
59 +- mkdir $(DESTDIR)$(datadir)/doc;\
60 +- mv $(DESTDIR)$(datadir)/singular/singular.hlp $(DESTDIR)$(datadir)/info/.;\
61 ++ mkdir -p $(DESTDIR)$(docdir);\
62 ++ (cat ${top_srcdir}/doc/doc.tbz2| (cd $(DESTDIR)$(docdir); tar -jx --no-same-owner -f -));\
63 ++ mv $(DESTDIR)$(docdir)/singular.hlp $(DESTDIR)$(datadir)/info/.;\
64 ++ @INSTALL_DATA@ doc/singular.idx $(DESTDIR)$(datadir)/singular/.;\
65 + fi
66 +
67 + uninstall-local:
68 +diff --git a/configure.ac b/configure.ac
69 +index 490a45f..997db6c 100644
70 +--- a/configure.ac
71 ++++ b/configure.ac
72 +@@ -228,6 +228,11 @@ AX_NORMALIZE_PATH([config_datadir],['/'])
73 + AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
74 + AC_SUBST(DATA_DIR, "$config_datadir")
75 +
76 ++AX_RECURSIVE_EVAL([[$]docdir], [config_docdir])
77 ++AX_NORMALIZE_PATH([config_docdir],['/'])
78 ++AC_DEFINE_UNQUOTED([DOC_DIR],"$config_docdir",[docdir])
79 ++AC_SUBST(DOC_DIR, "$config_docdir")
80 ++
81 + SING_SHOW_FLAGS([Compiler/linker flags: ])
82 +
83 +
84 +diff --git a/resources/configure.ac b/resources/configure.ac
85 +index 0dc468f..da68144 100644
86 +--- a/resources/configure.ac
87 ++++ b/resources/configure.ac
88 +@@ -72,5 +72,9 @@ AX_RECURSIVE_EVAL([[$]datadir], [config_datadir])
89 + AX_NORMALIZE_PATH([config_datadir],['/'])
90 + AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir])
91 +
92 ++AX_RECURSIVE_EVAL([[$]htmldir], [config_htmldir])
93 ++AX_NORMALIZE_PATH([config_htmldir],['/'])
94 ++AC_DEFINE_UNQUOTED([HTML_DIR],"$config_datadir",[htmldir])
95 ++
96 + AC_CONFIG_FILES([singular_resources.pc Makefile])
97 + AC_OUTPUT
98 +diff --git a/resources/feResource.cc b/resources/feResource.cc
99 +index 3d75bc9..7e4fc8c 100644
100 +--- a/resources/feResource.cc
101 ++++ b/resources/feResource.cc
102 +@@ -85,7 +85,7 @@ VAR feResourceConfig_s feResourceConfigs[] =
103 + {"DefaultDir",'d', feResDir, "SINGULAR_DEFAULT_DIR", SINGULAR_DEFAULT_DIR, (char *)""},
104 + {"InfoFile", 'i', feResFile, "SINGULAR_INFO_FILE", "%D/info/singular.hlp", (char *)""},
105 + {"IdxFile", 'x', feResFile, "SINGULAR_IDX_FILE", "%D/singular/singular.idx", (char *)""},
106 +- {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", "%D/singular/html", (char *)""},
107 ++ {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", HTML_DIR, (char *)""},
108 + {"ManualUrl", 'u', feResUrl, "SINGULAR_URL", "https://www.singular.uni-kl.de/Manual/", (char *)""},
109 + {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/examples", (char *)""},
110 + {"Path", 'p', feResPath, NULL, "%b;%P;$PATH", (char *)""},
111 +--
112 +2.31.1
113 +
114
115 diff --git a/sci-mathematics/singular/files/singular-4.2.0-gfan_linking.patch b/sci-mathematics/singular/files/singular-4.2.0-gfan_linking.patch
116 new file mode 100644
117 index 00000000000..267bf19361a
118 --- /dev/null
119 +++ b/sci-mathematics/singular/files/singular-4.2.0-gfan_linking.patch
120 @@ -0,0 +1,38 @@
121 +From 705149b86a80dd8b53fa8c1717872e9b2e9dbbcb Mon Sep 17 00:00:00 2001
122 +From: Michael Orlitzky <michael@××××××××.com>
123 +Date: Sun, 30 May 2021 08:10:10 -0400
124 +Subject: [PATCH 1/3] gfanlib/Makefile.am: use LIBADD for additional libraries.
125 +
126 +The $GMP_LIBS and $CDDGMPLDFLAGS variables were being added to
127 +libgfan_la_LDFLAGS, which isn't quite correct. Since both contain
128 +library (-l) flags, they belong in _LIBADD rather than _LDFLAGS:
129 +
130 + https://www.gnu.org/software/automake/manual/html_node/Libtool-Flags.html
131 +
132 +This commit moves them to a new libgfan_la_LIBADD variable.
133 +---
134 + gfanlib/Makefile.am | 6 +++++-
135 + 1 file changed, 5 insertions(+), 1 deletion(-)
136 +
137 +diff --git a/gfanlib/Makefile.am b/gfanlib/Makefile.am
138 +index cec8d8f..96e1893 100644
139 +--- a/gfanlib/Makefile.am
140 ++++ b/gfanlib/Makefile.am
141 +@@ -18,9 +18,13 @@ AM_CXXFLAGS = @CXX11_FLAG@
142 +
143 + SOURCES = gfanlib_circuittableint.cpp gfanlib_mixedvolume.cpp gfanlib_paralleltraverser.cpp gfanlib_polyhedralfan.cpp gfanlib_polymakefile.cpp gfanlib_symmetriccomplex.cpp gfanlib_symmetry.cpp gfanlib_traversal.cpp gfanlib_zcone.cpp gfanlib_zfan.cpp
144 + libgfan_la_SOURCES = $(SOURCES)
145 +-libgfan_la_LDFLAGS = $(SINGULAR_LDFLAGS) $(CDDGMPLDFLAGS) $(GMP_LIBS)
146 ++libgfan_la_LDFLAGS = $(SINGULAR_LDFLAGS)
147 + libgfan_la_CPPFLAGS= $(GMP_CPPFLAGS) $(CDDGMPCPPFLAGS)
148 +
149 ++# Despite the naming convention, $CDDGMPLDFLAGS contains "-lcddgmp"
150 ++# and the rest of the $GMP_LIBS flags.
151 ++libgfan_la_LIBADD = $(CDDGMPLDFLAGS) $(GMP_LIBS)
152 ++
153 + noinst_HEADERS = config.h gfanlib_mixedvolume.h gfanlib_polymakefile.h gfanlib_symmetry.h gfanlib_vector.h gfanlib_z.h _config.h gfanlib.h gfanlib_paralleltraverser.h gfanlib_q.h gfanlib_traversal.h gfanlib_zcone.h gfanlib_circuittableint.h gfanlib_matrix.h gfanlib_polyhedralfan.h gfanlib_symmetriccomplex.h gfanlib_tropicalhomotopy.h gfanlib_zfan.h
154 +
155 + DISTCLEANFILES = config.h
156 +--
157 +2.31.1
158 +
159
160 diff --git a/sci-mathematics/singular/singular-4.2.0_p3.ebuild b/sci-mathematics/singular/singular-4.2.0_p3.ebuild
161 new file mode 100644
162 index 00000000000..df77bad38d5
163 --- /dev/null
164 +++ b/sci-mathematics/singular/singular-4.2.0_p3.ebuild
165 @@ -0,0 +1,104 @@
166 +# Copyright 1999-2021 Gentoo Authors
167 +# Distributed under the terms of the GNU General Public License v2
168 +
169 +EAPI=7
170 +
171 +inherit autotools elisp-common
172 +
173 +MY_PN=Singular
174 +MY_PV=$(ver_rs 3 '')
175 +# Consistency is different...
176 +MY_DIR2=$(ver_cut 1-3 ${PV})
177 +MY_DIR=$(ver_rs 1- '-' ${MY_DIR2})
178 +
179 +DESCRIPTION="Computer algebra system for polynomial computations"
180 +HOMEPAGE="https://www.singular.uni-kl.de/ https://github.com/Singular/Sources"
181 +SRC_URI="ftp://jim.mathematik.uni-kl.de/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}.tar.gz"
182 +
183 +LICENSE="BSD GPL-2 GPL-3"
184 +SLOT="0"
185 +KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux"
186 +IUSE="emacs examples +readline static-libs"
187 +
188 +RDEPEND="dev-libs/gmp:0
189 + dev-libs/ntl:=
190 + emacs? ( >=app-editors/emacs-23.1:* )
191 + sci-mathematics/flint
192 + sci-libs/cddlib
193 + dev-lang/perl
194 + readline? ( sys-libs/readline )"
195 +
196 +DEPEND="${RDEPEND}"
197 +
198 +SITEFILE=60${PN}-gentoo.el
199 +
200 +S="${WORKDIR}/${PN}-${MY_DIR2}"
201 +
202 +PATCHES=(
203 + "${FILESDIR}/${PN}-4.2.0-gfan_linking.patch"
204 + "${FILESDIR}/${PN}-4.2.0-doc_install.patch"
205 + "${FILESDIR}/${PN}-4.2.0-no-static.patch"
206 +)
207 +
208 +src_prepare() {
209 + default
210 +
211 + eautoreconf
212 +}
213 +
214 +src_configure() {
215 + econf --with-gmp \
216 + --with-ntl="${EPREFIX}"/usr \
217 + --with-flint \
218 + --enable-gfanlib \
219 + --disable-debug \
220 + --disable-doc \
221 + --enable-factory \
222 + --enable-libfac \
223 + --enable-IntegerProgramming \
224 + --disable-polymake \
225 + $(use_enable static-libs static) \
226 + $(use_enable emacs) \
227 + $(use_with readline)
228 +}
229 +
230 +src_compile() {
231 + default
232 +
233 + if use emacs; then
234 + pushd "${S}"/emacs
235 + elisp-compile *.el || die "elisp-compile failed"
236 + popd
237 + fi
238 +}
239 +
240 +src_install() {
241 + # Do not compress singular's info file (singular.hlp)
242 + # some consumer of that file do not know how to deal with compression
243 + docompress -x /usr/share/info
244 +
245 + default
246 +
247 + dosym Singular /usr/bin/"${PN}"
248 +
249 + # purge .la file
250 + find "${ED}" -name '*.la' -delete || die
251 +}
252 +
253 +src_test() {
254 + # SINGULAR_PROCS_DIR need to be set to "" otherwise plugins from
255 + # an already installed version of singular may be used and cause segfault
256 + # See https://github.com/Singular/Sources/issues/980
257 + SINGULAR_PROCS_DIR="" emake check
258 +}
259 +
260 +pkg_postinst() {
261 + einfo "Additional functionality can be enabled by installing"
262 + einfo "sci-mathematics/4ti2"
263 +
264 + use emacs && elisp-site-regen
265 +}
266 +
267 +pkg_postrm() {
268 + use emacs && elisp-site-regen
269 +}