summaryrefslogtreecommitdiff
path: root/sci-mathematics/maxima
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-05 00:07:53 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-05 00:07:53 +0100
commit9d1e33edaf09cde926d589461f40e378d4124be9 (patch)
treeb0a5a85acd92ce912a95245121dde9cebcf76b71 /sci-mathematics/maxima
parentdafa6f367240d1f5329ca89fb6f78985dbdc025b (diff)
gentoo auto-resync : 05:06:2024 - 00:07:52
Diffstat (limited to 'sci-mathematics/maxima')
-rw-r--r--sci-mathematics/maxima/Manifest1
-rw-r--r--sci-mathematics/maxima/maxima-5.47.0-r1.ebuild233
2 files changed, 234 insertions, 0 deletions
diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest
index b6c05774ad55..79a9f49fc081 100644
--- a/sci-mathematics/maxima/Manifest
+++ b/sci-mathematics/maxima/Manifest
@@ -11,5 +11,6 @@ AUX xdg-utils-1.patch 1313 BLAKE2B 35d6f88c505c5b1bb5ecf5691e17522b427a3f035f64d
DIST maxima-5.46.0.tar.gz 47492457 BLAKE2B 3d709c1647357477ef8c92ce1f3b0789664fcd86ebe16cf68a89b84c019cb30bc4896409fbe5236bb4dbb25cf972c17cf612c602e57c4c6100b2d86737715f48 SHA512 6c76292ac270b9d8e91d13035733d12038a69ef3510e70a28793b6116208eccd7bf6387e246e9e8c0a22a2e793b948f1233a56fc863ad8712a35e5b1b92fbeef
DIST maxima-5.47.0.tar.gz 47939891 BLAKE2B 46f97c81ff8fd227d04759103ac683c034820e29b7ecd78ad76e3a43a8911d29d1a20007fe4ccb37da88eaa3888d71c8b98a55bc4e692cf72b154391e91a4533 SHA512 953b98336eb086069edaa917981372450ce165dedd7a7b39b181d3f2d8b089551eea943e0084148eaa3ded395dcba9135509d3d11d9132ab7a3ad8bb800d3a11
EBUILD maxima-5.46.0-r1.ebuild 5974 BLAKE2B 9aef857cef47f34df04e8f7e71a54794b639702f26eb821cf135c069fb675e698f52964481d3110ce9f32f942b5471ca15af70291c7b88abc967b3245151b031 SHA512 3bd2bf13c89c947adf73affa5d81fefae8b159acdd53cfe20ac500e59b5c1e98e14e395fc5bdb4a41771ace0eea5ac3f00b96b223a9b549ed58a32dd0a263570
+EBUILD maxima-5.47.0-r1.ebuild 6331 BLAKE2B 6b554655c179ae4baedabb075b86dff969f08b0271aefa8a618bdfad3e9c8bf767da18b17b8cea1e6c39cdf29c09b37bd4939adab6a40776707d9683b2d7a65e SHA512 99ed4b75bc0f109c5144c28d5c47dc3ee9f35412f89831a517c60bd8cda5dc3f74d02956769b0713a3f145067b1aed5d2575db54b323661c57ab2c431370ec8f
EBUILD maxima-5.47.0.ebuild 6331 BLAKE2B 4ad1b4e3e7b221aac27e14f0181fb808c76fe3c2b1d3074edd33859966fd52c7af45273dfb84970f54737b389657fa7bf76312e2bd8719cf3eea6a0768a68161 SHA512 acb2aa6e17801e0b42a19abe980f5a2b80556140023a5a338fcea6e957da3ac2a6f31458ebfe8e471dcf761abd327c926d65f8885e510978c05364f940aa6643
MISC metadata.xml 1841 BLAKE2B 278e5b8e1485d3b955649fffb8ff97ba0e7ad20ab9175308313e601891a3e4c99a7d28f79dfbc8d135647056b456eb20b2035b4de3f34f5fb865a80ce4bb0e99 SHA512 f3ef4ffbfb2b200bd8567407974010de112f0fb82395cb07d7f82b4970bc9d52d91aedd8ee190706b6e9611f8d69d76ff12f89806579ab9436c51155781d88d0
diff --git a/sci-mathematics/maxima/maxima-5.47.0-r1.ebuild b/sci-mathematics/maxima/maxima-5.47.0-r1.ebuild
new file mode 100644
index 000000000000..a46260b283ef
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.47.0-r1.ebuild
@@ -0,0 +1,233 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit autotools elisp-common flag-o-matic python-single-r1 xdg-utils
+
+DESCRIPTION="Free computer algebra environment based on Macsyma"
+HOMEPAGE="http://maxima.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
+
+# Licensing is a mess. COPYING is GPL-2. A few files such as
+# src/numth.lisp explicitly mention GPL-2 without the "or later version"
+# bit. Others such as src/airy.lisp have the "or later version." Both
+# src/maxmin.lisp and src/nummod.lisp declare the LLGPL; in fact they
+# say LLGPL version 2 or later which I have approximated by LLGPL-2.1.
+LICENSE="GPL-2 GPL-2+ LLGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="clisp clozurecl clozurecl64 cmucl ecl emacs gcl gui nls +sbcl vtk X test"
+RESTRICT="test" # bug 838202
+
+# Languages
+LANGS="de es pt pt_BR"
+for lang in ${LANGS}; do
+ IUSE="${IUSE} l10n_${lang/_/-}"
+done
+
+LISP_DEPEND="
+ clisp? ( dev-lisp/clisp:= )
+ clozurecl? ( dev-lisp/clozurecl app-misc/rlwrap )
+ clozurecl64? ( dev-lisp/clozurecl app-misc/rlwrap )
+ cmucl? ( dev-lisp/cmucl app-misc/rlwrap )
+ ecl? ( dev-lisp/ecl:= app-misc/rlwrap )
+ gcl? ( >=dev-lisp/gcl-2.6.14[ansi,readline] )
+ sbcl? ( dev-lisp/sbcl:= app-misc/rlwrap )
+"
+
+# LISP_DEPEND is included in both BDEPEND and DEPEND because the various
+# lisp engines are used to both compile and run maxima. It's possible
+# that they don't (all?) need to be listed in DEPEND; who knows.
+BDEPEND="
+ ${LISP_DEPEND}
+ test? ( sci-visualization/gnuplot )
+ sys-apps/texinfo
+"
+
+DEPEND="
+ ${LISP_DEPEND}
+ virtual/libcrypt:=
+ emacs? ( >=app-editors/emacs-26:* )
+ gui? ( dev-lang/tk:0 )
+"
+
+# texlive-latexrecommended needed by imaxima for breqn.sty
+#
+# VTK is an optional plotting backend that can be enabled by
+# running "draw_renderer: 'vtk;" within maxima.
+#
+# It's NON-optional for the scene() command, but that command is
+# currently useless since Tcl/Tk support was dropped in sci-libs/vtk.
+# Thus we include VTK only as an optional dependency.
+#
+# We require app-misc/rlwrap for any lisps that don't support readline
+# themselves.
+RDEPEND="
+ ${DEPEND}
+ X? (
+ x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ vtk? (
+ ${PYTHON_DEPS}
+ sci-libs/vtk[python,rendering,${PYTHON_SINGLE_USEDEP}]
+ )
+ )
+ emacs? (
+ virtual/latex-base
+ app-emacs/auctex
+ app-text/ghostscript-gpl
+ dev-texlive/texlive-latexrecommended
+ )"
+
+# Maxima can make use of X features like plotting (and launching a PNG
+# viewer) from the console, but you can't use the xmaxima GUI without X.
+REQUIRED_USE="
+ vtk? ( ${PYTHON_REQUIRED_USE} )
+ || ( clisp clozurecl clozurecl64 cmucl ecl gcl sbcl )
+ gui? ( X )"
+
+TEXMF="${EPREFIX}"/usr/share/texmf-site
+
+pkg_setup() {
+ # Set the PYTHON variable to whatever it should be.
+ use vtk && python-single-r1_pkg_setup
+}
+
+PATCHES=(
+ "${FILESDIR}/imaxima-0.patch"
+ "${FILESDIR}/xdg-utils-1.patch"
+ "${FILESDIR}/wish-2.patch"
+ "${FILESDIR}/rmaxima-0.patch"
+ "${FILESDIR}/emacs-0.patch"
+ "${FILESDIR}/clisp-1.patch"
+ "${FILESDIR}/clozurecl-3.patch"
+ "${FILESDIR}/cmucl-1.patch"
+ "${FILESDIR}/sbcl-2.patch"
+)
+
+src_prepare() {
+ default
+
+ # bug #343331
+ rm share/Makefile.in || die
+ rm src/Makefile.in || die
+ touch src/*.mk
+ touch src/Makefile.am
+
+ eautoreconf
+}
+
+src_configure() {
+ local CONFS=""
+
+ # enable existing translated doc
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use "l10n_${lang/_/-}"; then
+ CONFS="${CONFS} --enable-lang-${lang}"
+ fi
+ done
+ fi
+
+ # Using raw-ldflags fixes the error,
+ #
+ # x86_64-pc-linux-gnu/bin/ld: fatal error: -O1 -Wl: invalid option
+ # value (expected an integer): 1 -Wl
+ #
+ # when building the maxima.fas library for ECL. See upstream bugs:
+ #
+ # * https://sourceforge.net/p/maxima/bugs/3759/
+ # * https://gitlab.com/embeddable-common-lisp/ecl/-/issues/636
+ #
+ # The 32-bit and 64-bit version of the clozurecl executable
+ # are both called "ccl" on Gentoo, so we need the additional
+ # use_with for clozurecl64. See bugs 665364 and 715278....
+ #
+ # The usex works around https://sourceforge.net/p/maxima/bugs/3757/
+ #
+ econf ${CONFS} \
+ LDFLAGS="$(raw-ldflags)" \
+ $(use_enable clisp) \
+ $(use_enable clozurecl ccl) \
+ $(use_enable clozurecl64 ccl64) \
+ $(usex clozurecl64 "--with-ccl64=ccl" "") \
+ $(use_enable cmucl) \
+ $(use_enable ecl) \
+ $(use_enable emacs) \
+ $(use_enable gcl) \
+ $(use_with gui wish) \
+ $(use_enable sbcl) \
+ --with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
+}
+
+src_compile() {
+ emake
+ if use emacs; then
+ pushd interfaces/emacs/emaxima > /dev/null
+ elisp-compile *.el
+ popd > /dev/null
+ pushd interfaces/emacs/imaxima > /dev/null
+ BYTECOMPFLAGS="-L . -L ../emaxima"
+ elisp-compile *.el
+ popd > /dev/null
+ fi
+}
+
+src_install() {
+ docompress -x /usr/share/info
+ emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
+
+ # do not use dodoc because interfaces can't read compressed files
+ # read COPYING before attempt to remove it from dodoc
+ insinto /usr/share/${PN}/${PV}/doc
+ doins AUTHORS COPYING README README-lisps.md
+ dodir /usr/share/doc
+ dosym ../${PN}/${PV}/doc /usr/share/doc/${PF}
+
+ if use emacs; then
+ elisp-install ${PN} interfaces/emacs/{emaxima,imaxima}/*.{el,elc,lisp}
+ elisp-site-file-install "${FILESDIR}"/50maxima-gentoo-1.el
+
+ rm "${ED}"/${SITELISP}/${PN}/emaxima.sty || die
+ insinto ${TEXMF}/tex/latex/emaxima
+ doins interfaces/emacs/emaxima/emaxima.sty
+
+ insinto /usr/share/${PN}/${PV}/doc/imaxima
+ doins interfaces/emacs/imaxima/README
+ doins -r interfaces/emacs/imaxima/imath-example
+
+ if ! use gcl; then
+ # This emacs package is used to run gcl, maxima, gdb, etc.
+ # all at once and possibly in the same buffer. As such, it's
+ # no use without gcl (more to the point: it requires gcl.el).
+ find "${ED}" -name 'dbl.el' -type f -delete || die
+ fi
+ fi
+
+ if use ecl; then
+ # Use ECL to find the path where it expects to load packages from.
+ ECLLIB=$(ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")
+ insinto "${ECLLIB#${EPREFIX}}"
+ doins src/binary-ecl/maxima.fas
+ fi
+}
+
+pkg_postinst() {
+ xdg_mimeinfo_database_update
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}
+
+pkg_postrm() {
+ xdg_mimeinfo_database_update
+ if use emacs; then
+ elisp-site-regen
+ mktexlsr
+ fi
+}