summaryrefslogtreecommitdiff
path: root/sci-mathematics/maxima
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-16 14:04:41 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-16 14:04:41 +0000
commitb18dbdc69b2be6f0ac0db668b0bc57fb6f766afc (patch)
treee77939b82c93b9689bc1bb0bc8a55132c509cb44 /sci-mathematics/maxima
parent97f40b36b1afa9726e32962d11f3ac2d0bc5792e (diff)
gentoo auto-resync : 16:02:2023 - 14:04:41
Diffstat (limited to 'sci-mathematics/maxima')
-rw-r--r--sci-mathematics/maxima/Manifest1
-rw-r--r--sci-mathematics/maxima/maxima-5.46.0-r1.ebuild228
2 files changed, 229 insertions, 0 deletions
diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest
index 831a45393041..03134ba30055 100644
--- a/sci-mathematics/maxima/Manifest
+++ b/sci-mathematics/maxima/Manifest
@@ -9,5 +9,6 @@ AUX sbcl-2.patch 1072 BLAKE2B 3e16339b7b9acbbfcd424780432be4a4267b994c3a7a8774c9
AUX wish-2.patch 662 BLAKE2B ccc3879c7445fd916c921857ea9642fb54cc6b8eb647cb23c3f93b949a05de9226d19d7898daf998cbedc61a77556c923f3f6f8e57508b73f3cae117f62d214d SHA512 110db85899241e1f9ea8427ffb397737aefe0bb6286d037c2c04cfad9726838521ef6403242aeb1e4246d06f13cf83af84bba38567a99b00ed6a081f17b38ead
AUX xdg-utils-1.patch 1313 BLAKE2B 35d6f88c505c5b1bb5ecf5691e17522b427a3f035f64de095ba088fa9c6a6076e4c0f7f57794804b588798c2289d36397a95101bde890c363aee9675bf8401e7 SHA512 5e5ab3196cf012ee768d108cc47da25c5afbaffca6f9a1aed9338a7154d377e6baf791d2c7bbe9191b823e056056379f190d8bf7b8ce689f44db892f5e375116
DIST maxima-5.46.0.tar.gz 47492457 BLAKE2B 3d709c1647357477ef8c92ce1f3b0789664fcd86ebe16cf68a89b84c019cb30bc4896409fbe5236bb4dbb25cf972c17cf612c602e57c4c6100b2d86737715f48 SHA512 6c76292ac270b9d8e91d13035733d12038a69ef3510e70a28793b6116208eccd7bf6387e246e9e8c0a22a2e793b948f1233a56fc863ad8712a35e5b1b92fbeef
+EBUILD maxima-5.46.0-r1.ebuild 5971 BLAKE2B 13ea5cbd3a61c839208a35604c8179666e51e4fb9378dbdbf8a7a1748ff2632e9ec6fb1fd3a68401871ab10989da086f68f2b0facb48e44cb6a963930ea4f0cc SHA512 df5d0612e10d197ccd9155d28be9c36babdbc356672fb766e081faf240119cfc00c3cc4d56564d45aacc5ce65ebc231be8f74f3aa99979ad1a34180da2f3fe27
EBUILD maxima-5.46.0.ebuild 5969 BLAKE2B 9a4bee7cb52eff0e41e2456418efb318601ec4a613c4e8daf23141903577f73b893fe77e46a52d350b9ea3fdf6848d80c54e3c05dcd806670449c064de6606e9 SHA512 dea407c64fc8d4b1287e7c728ffc7c8680ec6aa08d0b5850a2c0d2000afeab77539d31f4a250076e56a41540bbe301d21cb2ac2d9fa4716f11e7a590c86161fd
MISC metadata.xml 1736 BLAKE2B 0ad2ee8af914d2de42315204dc73650507abab4d671b1d531f426aa5d5ce7c9ebfb2815592327efab62768659ba7037419285f242adf4c453117836930fb0a95 SHA512 399a8f29bc3f1a3c4c2c1c926f979fb65c517ed165b95dd4b9585004d45c0075761a278ac928fa03ee7523262ddb930952775dc98b092425c89c1c7ee41293f1
diff --git a/sci-mathematics/maxima/maxima-5.46.0-r1.ebuild b/sci-mathematics/maxima/maxima-5.46.0-r1.ebuild
new file mode 100644
index 000000000000..22da4534cb1e
--- /dev/null
+++ b/sci-mathematics/maxima/maxima-5.46.0-r1.ebuild
@@ -0,0 +1,228 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+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="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="clisp clozurecl clozurecl64 cmucl ecls 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 )
+ ecls? ( dev-lisp/ecls:= 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 ecls 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 ecls 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 ecls; 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
+}