diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2021-03-22 15:08:48 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2021-03-22 15:46:34 -0400 |
commit | 533d3a72e06349a1ee683ba8c451b3a546e97a7b (patch) | |
tree | 3d6ad8a3e24667f5f6bbbf26347661a030c34194 /sci-mathematics/singular | |
parent | x11-misc/py3status: version bump (diff) | |
download | gentoo-533d3a72e06349a1ee683ba8c451b3a546e97a7b.tar.gz gentoo-533d3a72e06349a1ee683ba8c451b3a546e97a7b.tar.bz2 gentoo-533d3a72e06349a1ee683ba8c451b3a546e97a7b.zip |
sci-mathematics/singular: new version 4.2.0p1.
Taken from the sage-on-gentoo overlay with minor tweaks and a new
patch. Many, many thanks to François Bissey for his work on this.
Closes: https://bugs.gentoo.org/712004
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics/singular')
5 files changed, 249 insertions, 0 deletions
diff --git a/sci-mathematics/singular/Manifest b/sci-mathematics/singular/Manifest index 5cb78241d614..a0d12ebf4970 100644 --- a/sci-mathematics/singular/Manifest +++ b/sci-mathematics/singular/Manifest @@ -2,3 +2,4 @@ DIST singular-4.0.2-share.tar.gz 8789162 BLAKE2B 357a68f68cc0508e4e197427c56232d DIST singular-4.0.2.tar.gz 8635172 BLAKE2B 5f565bf14677d8414300d7a5602aa96c8cef7e863fd858083fe4561742b545d74a5fc4de95ef0c63acf4f78c66405bac7ba77a954e42b2e87a6da608e4732bcd SHA512 4543a45839ce8adc45e3b2edd84a6e398b7ba157da1eda050dbce2a8b20333eb0c63433e3e7eaf59d76bf6bcb65c1b1611bfc08c25fd493c88e2f06624898e3d DIST singular-4.0.3-share.tar.gz 6633256 BLAKE2B c137b72aaa0926eb006624e03fe938678acb94a41da525de1ca4f7711985d253926788b550d2d98b8def15fb0cb60b2527c1c04566a29a28135fcb1a70246025 SHA512 5f8ae4ecd22a3470e5f00393e03079936d7ed334f44ae056ed1eb1719054afc4371b03e920b598033605600c843dc39cb6b01308505323e2c084dfe1f7a1b94a DIST singular-4.0.3.tar.gz 12615042 BLAKE2B b3c63434974bb8b5fdef86cbcbe73b76a47503b28dcae6bfc6e4210e1ab1c14224ac0f6eeefa9d8004450f6d9a26843368a9b2ea16bca68bf1215ce33e83df0d SHA512 781227997c510829b02c969259d627572c0b62aa152c9ef623ff27de5b2df0c8e024f086740b89ca8f96b6e3f7def04f8d62ca79adb199d6249ade9b8cbb06ab +DIST singular-4.2.0p1.tar.gz 14155171 BLAKE2B 444553f87d7ca8d6a62e4519c9857a6892757e92285df7c3b686913a9b51c9ae8d802c41382b0b2b6e37dc2dc496d4a10f262c98407470219cdce131e8baf127 SHA512 2ecd8940c9e8d70a93dbdb4df6da313c00151e5cb959f8eed5856e8df99089b5a03e514fbcdc70903c77df8b59fa7ef9f3b134f1de510b795fa6ea0341089bd8 diff --git a/sci-mathematics/singular/files/singular-4.0.3-gfan_linking.patch b/sci-mathematics/singular/files/singular-4.0.3-gfan_linking.patch new file mode 100644 index 000000000000..f228d980ffcf --- /dev/null +++ b/sci-mathematics/singular/files/singular-4.0.3-gfan_linking.patch @@ -0,0 +1,13 @@ +diff --git a/gfanlib/Makefile.am b/gfanlib/Makefile.am +index 2039af0..a1b7dce 100644 +--- a/gfanlib/Makefile.am ++++ b/gfanlib/Makefile.am +@@ -20,6 +20,8 @@ libgfan_la_SOURCES = $(SOURCES) + libgfan_includedir =$(includedir)/gfanlib + libgfan_include_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 + ++libgfan_la_LIBADD = $(CDDGMPLDFLAGS) ++ + DISTCLEANFILES = config.h + + moduledir = $(libexecdir)/singular/MOD diff --git a/sci-mathematics/singular/files/singular-4.1.3-doc_install.patch b/sci-mathematics/singular/files/singular-4.1.3-doc_install.patch new file mode 100644 index 000000000000..10e831bea701 --- /dev/null +++ b/sci-mathematics/singular/files/singular-4.1.3-doc_install.patch @@ -0,0 +1,62 @@ +diff --git a/Makefile.am b/Makefile.am +index c21b6ba..ea61758 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -14,10 +14,11 @@ dist-hook: + + install-data-local: + if test -e $(srcdir)/doc/doc.tbz2; then\ +- (cat ${top_srcdir}/doc/doc.tbz2| (cd $(DESTDIR)$(datadir)/singular; tar jxf -));\ + mkdir $(DESTDIR)$(datadir)/info;\ +- mkdir $(DESTDIR)$(datadir)/doc;\ +- mv $(DESTDIR)$(datadir)/singular/singular.hlp $(DESTDIR)$(datadir)/info/.;\ ++ mkdir -p $(DESTDIR)$(docdir);\ ++ (cat ${top_srcdir}/doc/doc.tbz2| (cd $(DESTDIR)$(docdir); tar -jx --no-same-owner -f -));\ ++ mv $(DESTDIR)$(docdir)/singular.hlp $(DESTDIR)$(datadir)/info/.;\ ++ @INSTALL_DATA@ doc/singular.idx $(DESTDIR)$(datadir)/singular/.;\ + fi + + uninstall-local: +diff --git a/configure.ac b/configure.ac +index 2d53a55..d43b5fe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -248,6 +248,11 @@ AX_NORMALIZE_PATH([config_datadir],['/']) + AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir]) + AC_SUBST(DATA_DIR, "$config_datadir") + ++AX_RECURSIVE_EVAL([[$]docdir], [config_docdir]) ++AX_NORMALIZE_PATH([config_docdir],['/']) ++AC_DEFINE_UNQUOTED([DOC_DIR],"$config_docdir",[docdir]) ++AC_SUBST(DOC_DIR, "$config_docdir") ++ + SING_SHOW_FLAGS([Compiler/linker flags: ]) + + +diff --git a/resources/configure.ac b/resources/configure.ac +index cf6720f..ac5f2d0 100644 +--- a/resources/configure.ac ++++ b/resources/configure.ac +@@ -72,5 +72,9 @@ AX_RECURSIVE_EVAL([[$]datadir], [config_datadir]) + AX_NORMALIZE_PATH([config_datadir],['/']) + AC_DEFINE_UNQUOTED([DATA_DIR],"$config_datadir",[datadir]) + ++AX_RECURSIVE_EVAL([[$]htmldir], [config_htmldir]) ++AX_NORMALIZE_PATH([config_htmldir],['/']) ++AC_DEFINE_UNQUOTED([HTML_DIR],"$config_datadir",[htmldir]) ++ + AC_CONFIG_FILES([singular_resources.pc Makefile]) + AC_OUTPUT +diff --git a/resources/feResource.cc b/resources/feResource.cc +index 3d75bc9..7e4fc8c 100644 +--- a/resources/feResource.cc ++++ b/resources/feResource.cc +@@ -85,7 +85,7 @@ VAR feResourceConfig_s feResourceConfigs[] = + {"DefaultDir",'d', feResDir, "SINGULAR_DEFAULT_DIR", SINGULAR_DEFAULT_DIR, (char *)""}, + {"InfoFile", 'i', feResFile, "SINGULAR_INFO_FILE", "%D/info/singular.hlp", (char *)""}, + {"IdxFile", 'x', feResFile, "SINGULAR_IDX_FILE", "%D/singular/singular.idx", (char *)""}, +- {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", "%D/singular/html", (char *)""}, ++ {"HtmlDir", 'h', feResDir, "SINGULAR_HTML_DIR", HTML_DIR, (char *)""}, + {"ManualUrl", 'u', feResUrl, "SINGULAR_URL", "https://www.singular.uni-kl.de/Manual/", (char *)""}, + {"ExDir", 'm', feResDir, "SINGULAR_EXAMPLES_DIR","%r/examples", (char *)""}, + {"Path", 'p', feResPath, NULL, "%b;%P;$PATH", (char *)""}, diff --git a/sci-mathematics/singular/files/singular-4.2.0-no-static.patch b/sci-mathematics/singular/files/singular-4.2.0-no-static.patch new file mode 100644 index 000000000000..5509c58bd6b6 --- /dev/null +++ b/sci-mathematics/singular/files/singular-4.2.0-no-static.patch @@ -0,0 +1,69 @@ +From ef9d66230f9697caaa77dbfc275650412d0d9c0d Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Mon, 22 Mar 2021 09:02:58 -0400 +Subject: [PATCH 1/1] Singular/Makefile.am: drop -static linker flags. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There are a few hard-coded "-static" flags in the Makefile.am for +Singular that are causing weird problems for shared builds. The +visible symptom on Gentoo was a few insecure rpaths being stripped +from the "Singular" executable, but François Bissey was able to track +down the root cause, namely the "-static" that is causing libtool to +act weird. + +In retrospect, this problem was also reported on Stack Overflow at, + + https://stackoverflow.com/questions/17905121 + +The Gentoo bug is, + + https://bugs.gentoo.org/712004 + +If we experience no problems with this patch, it will be sent upstream. +--- + Singular/Makefile.am | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/Singular/Makefile.am b/Singular/Makefile.am +index 7fe43bffb..1e440765d 100644 +--- a/Singular/Makefile.am ++++ b/Singular/Makefile.am +@@ -153,7 +153,7 @@ Singular_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h + + Singular_LDADD = libSingular.la ${OMALLOC_LIBS} ${BUILTIN_FLAGS} + +-Singular_LDFLAGS = -static ${AM_LDFLAGS} ${BUILTIN_FLAGS} ++Singular_LDFLAGS = ${AM_LDFLAGS} ${BUILTIN_FLAGS} + + Singulard_SOURCES = tesths.cc fegetopt.c fegetopt.h utils.cc utils.h + +@@ -166,7 +166,6 @@ dist_script_SCRIPTS = singularsurf singularsurf_jupyter singularsurf_win surfex + + #### ESingular + ESingular_CPPFLAGS = ${AM_CPPFLAGS} -DESINGULAR -DPROTO +-# ESingular_LDFLAGS = -static ${AM_LDFLAGS} + ESingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \ + ${top_builddir}/libpolys/misc/libmisc.la ${OMALLOC_LIBS} \ + ${top_builddir}/resources/libsingular_resources.la +@@ -176,7 +175,6 @@ ESingular_SOURCES = emacs.cc fegetopt.c fegetopt.h feOptES.inc feOpt.cc + + #### same for TSingular + TSingular_CPPFLAGS = ${AM_CPPFLAGS} -DTSINGULAR -DPROTO +-# TSingular_LDFLAGS = -static ${AM_LDFLAGS} + TSingular_LDADD = ${top_builddir}/libpolys/reporter/libreporter.la \ + ${top_builddir}/libpolys/misc/libmisc.la ${OMALLOC_LIBS} \ + ${top_builddir}/resources/libsingular_resources.la +@@ -191,7 +189,7 @@ libparse_CPPFLAGS = ${AM_CPPFLAGS} -DSTANDALONE_PARSER + libparse_SOURCES = libparse.cc fegetopt.c fegetopt.h utils.cc utils.h + + libparse_LDADD = +-libparse_LDFLAGS = -static ${AM_LDFLAGS} ++libparse_LDFLAGS = ${AM_LDFLAGS} + + ######################################################### + # the Singular library (*.lib files) +-- +2.26.2 + diff --git a/sci-mathematics/singular/singular-4.2.0_p1.ebuild b/sci-mathematics/singular/singular-4.2.0_p1.ebuild new file mode 100644 index 000000000000..b015ba5fee61 --- /dev/null +++ b/sci-mathematics/singular/singular-4.2.0_p1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools elisp-common + +MY_PN=Singular +MY_PV=$(ver_rs 3 '') +# Consistency is different... +MY_DIR2=$(ver_cut 1-3 ${PV}) +MY_DIR=$(ver_rs 1- '-' ${MY_DIR2}) + +DESCRIPTION="Computer algebra system for polynomial computations" +HOMEPAGE="https://www.singular.uni-kl.de/ https://github.com/Singular/Sources" +SRC_URI="ftp://jim.mathematik.uni-kl.de/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}.tar.gz" + +LICENSE="BSD GPL-2 GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux" +IUSE="emacs examples +readline static-libs" + +RDEPEND="dev-libs/gmp:0 + dev-libs/ntl:= + emacs? ( >=app-editors/emacs-23.1:* ) + sci-mathematics/flint + sci-libs/cddlib + dev-lang/perl + readline? ( sys-libs/readline )" + +DEPEND="${RDEPEND}" + +SITEFILE=60${PN}-gentoo.el + +S="${WORKDIR}/${PN}-${MY_DIR2}" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.3-gfan_linking.patch" + "${FILESDIR}/${PN}-4.1.3-doc_install.patch" + "${FILESDIR}/${PN}-4.2.0-no-static.patch" +) + +src_prepare() { + default + + eautoreconf +} + +src_configure() { + econf --with-gmp \ + --with-ntl="${EPREFIX}"/usr \ + --with-flint \ + --enable-gfanlib \ + --disable-debug \ + --disable-doc \ + --enable-factory \ + --enable-libfac \ + --enable-IntegerProgramming \ + --disable-polymake \ + $(use_enable static-libs static) \ + $(use_enable emacs) \ + $(use_with readline) +} + +src_compile() { + default + + if use emacs; then + pushd "${S}"/emacs + elisp-compile *.el || die "elisp-compile failed" + popd + fi +} + +src_install() { + # Do not compress singular's info file (singular.hlp) + # some consumer of that file do not know how to deal with compression + docompress -x /usr/share/info + + default + + dosym Singular /usr/bin/"${PN}" + + # purge .la file + find "${ED}" -name '*.la' -delete || die +} + +src_test() { + # SINGULAR_PROCS_DIR need to be set to "" otherwise plugins from + # an already installed version of singular may be used and cause segfault + # See https://github.com/Singular/Sources/issues/980 + SINGULAR_PROCS_DIR="" emake check +} + +pkg_postinst() { + einfo "Additional functionality can be enabled by installing" + einfo "sci-mathematics/4ti2" + + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |