commit:     c8370eaf284810216e07ddd9ae039fc14aa61791
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri May  2 01:23:08 2025 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri May  2 01:23:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8370eaf

sci-mathematics/singular: add 4.4.1

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

 sci-mathematics/singular/Manifest              |   1 +
 sci-mathematics/singular/singular-4.4.1.ebuild | 106 +++++++++++++++++++++++++
 2 files changed, 107 insertions(+)

diff --git a/sci-mathematics/singular/Manifest 
b/sci-mathematics/singular/Manifest
index 7e7b6a0800cf..d523fe075395 100644
--- a/sci-mathematics/singular/Manifest
+++ b/sci-mathematics/singular/Manifest
@@ -1 +1,2 @@
 DIST singular-4.4.0p6.tar.gz 21097819 BLAKE2B 
ce78f63b2f90113ba92811a1e02b568328a92dc686d86fa653209c127f8895811e87ca4684dd1df5c2a54e8952cb1b0654055653e4b4734d9729a7de6f6faaa9
 SHA512 
b88e60f5665cfab7ccb5a2620190d08c1538f876cce24a24c7baddec40554fd0093cc47db89758f0bbf24f7ca298849a9fe700ce2070c8c52861d3bd48d2cc0d
+DIST singular-4.4.1.tar.gz 21112922 BLAKE2B 
5071c545ab4919da80f779f58247113c7788d5816bbca595e72dbbd44c33f6f2055ade752f79ed6f02fc6e1a7d9d7fc7ec46ec2a890743c3168123b675135300
 SHA512 
6c3e8d1b697c75fbbc90626d90e11d3109780ef129344b63b63ecebef635ca7e7d1f93f3c843cab46fcbff75d2806b56305b287007236cc85b7145e93f0a9531

diff --git a/sci-mathematics/singular/singular-4.4.1.ebuild 
b/sci-mathematics/singular/singular-4.4.1.ebuild
new file mode 100644
index 000000000000..593d5d1f5d40
--- /dev/null
+++ b/sci-mathematics/singular/singular-4.4.1.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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/Singular";
+SRC_URI="https://www.singular.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/${MY_DIR}/${PN}-${MY_PV}.tar.gz";
+S="${WORKDIR}/${PN}-${MY_DIR2}"
+
+# Most files say "version 2 or version 3 of the License," which is not
+# quite GPL-2+, and is why we have listed GPL-2 below. But AFAIK there
+# are no GPL-2-only files.
+LICENSE="BSD GPL-2 GPL-2+ GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~riscv ~x86 ~x86-linux"
+IUSE="emacs examples polymake +readline"
+
+# The interactive help uses "info" from sys-apps/texinfo.
+RDEPEND="
+       dev-lang/perl
+       dev-libs/gmp:0=
+       dev-libs/ntl:=
+       sci-libs/cddlib
+       sci-mathematics/flint:=
+       sys-apps/texinfo
+       emacs? ( app-editors/emacs:* )
+       polymake? ( sci-mathematics/polymake )
+       readline? ( sys-libs/readline:= )
+"
+DEPEND="${RDEPEND}"
+
+SITEFILE=60${PN}-gentoo.el
+
+src_configure() {
+       local myconf=(
+               --disable-debug
+               --disable-doc
+               --disable-optimizationflags
+               --disable-pyobject-module
+               --disable-python
+               --disable-python-module
+               --disable-python_module
+               --enable-factory
+               --enable-gfanlib
+               --enable-libfac
+               --with-flint
+               --with-gmp
+               --with-libparse
+               --with-ntl
+               --without-python
+               --without-pythonmodule
+               $(use_enable emacs)
+               $(use_enable polymake polymake-module)
+               $(use_with readline)
+       )
+       econf "${myconf[@]}"
+}
+
+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}"
+
+       find "${ED}" -type f -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
+}

Reply via email to