summaryrefslogtreecommitdiff
path: root/sci-mathematics/maxima
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
commit8d5dbd847cbc704a6a06405856e94b461011afe3 (patch)
tree4d26462d027b14926335894749d2e01d982234d0 /sci-mathematics/maxima
parent5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (diff)
gentoo resync : 27.03.2021
Diffstat (limited to 'sci-mathematics/maxima')
-rw-r--r--sci-mathematics/maxima/Manifest7
-rw-r--r--sci-mathematics/maxima/files/dont-hardcode-python.patch38
-rw-r--r--sci-mathematics/maxima/files/ecls-4.patch16
-rw-r--r--sci-mathematics/maxima/files/support-new-vtk.patch26
-rw-r--r--sci-mathematics/maxima/maxima-5.44.0-r4.ebuild (renamed from sci-mathematics/maxima/maxima-5.44.0.ebuild)75
-rw-r--r--sci-mathematics/maxima/metadata.xml3
6 files changed, 148 insertions, 17 deletions
diff --git a/sci-mathematics/maxima/Manifest b/sci-mathematics/maxima/Manifest
index b1bcc5966933..1dbaad4eddca 100644
--- a/sci-mathematics/maxima/Manifest
+++ b/sci-mathematics/maxima/Manifest
@@ -3,14 +3,17 @@ AUX clisp-1.patch 1194 BLAKE2B b64764d80b5908a35081b9bb7114e18de266156cb80bae1c7
AUX clozurecl-2.patch 1505 BLAKE2B c5550f79e67dd007c970759c5e734009d1cb4fa0af728d414ce271175770ed32bd2cf5e58c9738e32afa76b0053b2eee77c886650b0ba99c7e0e3176bc946d69 SHA512 41664b77eae0f2c3cc0e551bd2c26c02769faed339b5725dc790691929094cd5d5008169eba9788515392d9fed00919aaacbb24ee91b76f5d51eb6468335cf9c
AUX clozurecl-3.patch 1499 BLAKE2B 080d9bdd90ba34f9b63e9a3409da90ec84e4de7f35dd0c1aff3be431a6b11c515e10c310a43f987f933d70923a21a5ee63920f88174eb840e2b653975e6512ef SHA512 c5f31f515e1a13d4e0f251e52d2f96142ff917c03e12c52c3463bc576a1add783d2cd4239f8f321495f0c4de5f93e0d4174a95e3c2bc0d63c88683250ac9cf18
AUX cmucl-1.patch 1336 BLAKE2B 59767907f9f2734fa43e8d9c0e876cf2bf1f2cb0e360976ddd08b4eda9685cd1b862aa072a2f0202733db5ab91958bf0d6b48af3d20e6748f4de2e6b366f49ed SHA512 3b8c01ecbbcd87101e4e31356293216d9c2a018ddabc076905a8b87eeda27bea6cd36242ab6b9caf7553fb9187544beb620b739211c63e21afa1b2f050ef318e
+AUX dont-hardcode-python.patch 1702 BLAKE2B 8d784d665840325f40db95c0f50158e1c89e90d1266b9ac41f7f1020c125a285d5b79281b8374d1b46dc153491b0ca13ed62ac5aade2bff9bfe19a569e8ab2b7 SHA512 c6100cca8bf0e652a7a4b4533558ada6193991a53f847662028056624937a3e4c583c20f1509a0f9e4e35bda3a49d913e0be2c56a602ec550210b1403e64af1c
AUX ecls-3.patch 2147 BLAKE2B d454b620f01d734d6a774f64dbac67f0996aeacc2a029225cc8a9269211169e7b69237f8b734b92b1f037b5abdcd7ec3ba374924b498fdc63025a1eca5a0d9e6 SHA512 1fcaa4a79d4aaf08dd4162c6d59f8f168909320575a43dcb435cbd758338244ac3b89888501f4cb1fc0f9d8d43b3abe587bc898aacb45c19ba0858f74512366e
+AUX ecls-4.patch 726 BLAKE2B 7aa2520c10b1c142297791c0d87c9e65578ba6b2f3c7402f2c4bb2474fc1c22f85f0f27bed0530bd711e785a0bec500ef6a57b53d9481300901d11f1131126c9 SHA512 0d1616aba389a43e646ef99dd5d9176b2e49ad0569d9a63dea5562b829748f1a1e0d599fb0b359ffc7031ed43c7f08c4cea2ab9a3a97be49f09a7394a280aa15
AUX emacs-0.patch 807 BLAKE2B 82c879f9c252c4efefb007f8553e845ddc52d76af5cbeab740a1f2bde459b5e87957e0f3e5a9d76d5c1e879ddbebdfb9a6d6b80745cc40e3ddc4379887f4e9b2 SHA512 f62d364651838ed196a2e8965930b42313cb73f912b898b953b526ffc5dc0135841b53618fbbb6a32d21d3412ba5f2bfb253bf41c640a136f68d830f43628ac4
AUX rmaxima-0.patch 552 BLAKE2B 8b8ceb5ea671049490ab006be31f6e81f85d9e43950296db920b3a0d4eb8b19cd14b8b599c98e1dc82f69d441d04c631c4aec2315eaee68f791ddce75dc7ed56 SHA512 a60c8c5ac23b0342823fbcd15e27f44ea85652640271ea845e383796422fa416b221dd036eb0a1639f70f9b09473471657612c7a5f99892cfb214d52156a6907
AUX sbcl-2.patch 1072 BLAKE2B 3e16339b7b9acbbfcd424780432be4a4267b994c3a7a8774c95ff8335d48565d15dae3cba16b127a9184e4fe20b5d6930df2e385c2a15b9f58e2d0fa597665a1 SHA512 b8df0b53f4ae04e175dfab8889206ea8ffa83c51b2408322423d5f52cf956b1084e7d1ba0c054032f9121cb1684fcc6bb9d48b1a967f9e01492ad25c035b1c62
+AUX support-new-vtk.patch 924 BLAKE2B 960c3342ca4374c03aff30d7d2326c6e826ffb2cb025952c8af381102ef2556b21e78ec9a4316740871ebf7afea1c8053f50342a7a66ad897fa6b79ac29b30fe SHA512 6cc8b0a67d6aa6bc87f003181a891c480420bed228ede8cd9f7143c5473f8e11a4fceb405e182ac00ce26f7380d714c6487ebb9fe4603d94e7e0111cbef68f75
AUX wish-2.patch 662 BLAKE2B ccc3879c7445fd916c921857ea9642fb54cc6b8eb647cb23c3f93b949a05de9226d19d7898daf998cbedc61a77556c923f3f6f8e57508b73f3cae117f62d214d SHA512 110db85899241e1f9ea8427ffb397737aefe0bb6286d037c2c04cfad9726838521ef6403242aeb1e4246d06f13cf83af84bba38567a99b00ed6a081f17b38ead
AUX xdg-utils-1.patch 1313 BLAKE2B 35d6f88c505c5b1bb5ecf5691e17522b427a3f035f64de095ba088fa9c6a6076e4c0f7f57794804b588798c2289d36397a95101bde890c363aee9675bf8401e7 SHA512 5e5ab3196cf012ee768d108cc47da25c5afbaffca6f9a1aed9338a7154d377e6baf791d2c7bbe9191b823e056056379f190d8bf7b8ce689f44db892f5e375116
DIST maxima-5.42.1.tar.gz 41865510 BLAKE2B d3b8a50594dc0cef0c354c42be1aee96df77a4e222dbe457edeb47d7fe77a8fe376b10ce8da9e4ff6c447242e9c53a32286d09a64d8600112f6feda92f1fb58d SHA512 79c5e70119b0384d9dd8aa47c7e96a0ccb7e6367526b8a14d21f00137a1c2f0c8b7990bb7231d7c90ffa0090f67c1fa30a418d013d9c5982030ae68de9717f48
DIST maxima-5.44.0.tar.gz 34976354 BLAKE2B d6870b6fb0581d9e60d6ed97c7daed8ce12b8b1ae49d0edb7b8d31dd723f9b879eb70440659ff958f53cee16d8d2a92f80dcaa3898d9f6dbabd79a5059073a65 SHA512 1e043bebb7c6d002c113d8de20a98d58d1a8e7bedfc9bcf52819e7c7554655991dc2f42f0333889706574249736db833a237b3e59b967e7e42ede28262e31f2f
EBUILD maxima-5.42.1.ebuild 4895 BLAKE2B dd388cfe14cef36137a91ff71912c23390e176d796ce02c36f59cbb1e8993a03b16ee32b4e6d792e59d95bad3bcd90e3e9ded23abb1e3c371f466bd53f44502c SHA512 64c8a759525fff99c99831be56ea268b213392c65b1ef2e9db133addfaefead39710264c6a599eee7c53262ef16f75fbdbb35a9516a7054f0934d6fd46303520
-EBUILD maxima-5.44.0.ebuild 4734 BLAKE2B dcd011520dd59a9d31f0e652c8f6c2d71ab8d4b60ba188c85f87a5c95dc2585edaa9338c8e841c819e5ffc1185e7e5c9817097ac0bebb206105528263efe6435 SHA512 0a996621e2ac31d3104690d1184e18493095f709de2fab773f7a0147cfdbedb4570c8afdfaee4564ad6677ec2076626d7c2a056b17787d4e2ee6e65dc7faba3e
-MISC metadata.xml 1521 BLAKE2B 5b42a6b4f68699a032b2a1cc43a34b8b7a1050e41b1875f758eb8ffd82151825d3f920587cf89e25f4f692c8fc587e5b405ca8e2fb3e842b7d7ce61e068f0dc4 SHA512 d2db86fcab10cabb9533954838babc9cee4ebb26b99604ebe0cb995b1239ac2a462455cc72d6311dab142290fbf460eaec920138c09045003b46dd382ed8cbf3
+EBUILD maxima-5.44.0-r4.ebuild 6278 BLAKE2B 9da7f0e09a3b6f370b20ce11915e4d9e893c1e1ea499ebfcf22d81ee2a0c17053b1e38450551855ac62356e3d4b8201f9a067ff94e169a00eb6c5a42ed73d82d SHA512 03083941bd72b72341edd0d5b35501b309a62d14bde6be6555d670e6a21b85ed800c35810dec1a713d6ffc59e0b8279a4daa4fb85385676412d0bff877d94dd4
+MISC metadata.xml 1607 BLAKE2B 04e6a57fb68b1c61027a4cd5b1605347c48e989c246e6f5a8c3587d17778d7c55b6cb5a6ab81dee7c21d0597953d2e90211f6d16b565dae602cfe22021a8f89b SHA512 bab36eab986e0a8619e9409d63af9103bce52bb08d75bde6c6d7a92cf1c856ad7c4d462dcb65bbde141a4d62ee024414186533db1e0e5f0bebb62f0623de55e3
diff --git a/sci-mathematics/maxima/files/dont-hardcode-python.patch b/sci-mathematics/maxima/files/dont-hardcode-python.patch
new file mode 100644
index 000000000000..63dea1ea1de7
--- /dev/null
+++ b/sci-mathematics/maxima/files/dont-hardcode-python.patch
@@ -0,0 +1,38 @@
+From a640c5e357ce2aafb6edcba9b6c641cbc7753880 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Wed, 24 Mar 2021 20:57:44 -0400
+Subject: [PATCH 1/1] doc/info/build_html.sh.in: use @PYTHON@ for the python
+ interpreter.
+
+Maxima's ./configure script already detects (or is prodded to use) a
+certain python interpreter. The build_html.sh script, however, is
+still using a hard-coded "python" command. On many systems, "python"
+will be different from the python interpreter that we want to use; for
+example when "python" is python-2.7.x and "python3" is what we want to
+use with Maxima.
+
+This commit tweaks doc/info/build_html.sh.in to use the value of the
+$PYTHON variable instead.
+
+Maxima-Bug: https://sourceforge.net/p/maxima/bugs/3754
+Gentoo-Bug: https://bugs.gentoo.org/766291
+---
+ doc/info/build_html.sh.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/info/build_html.sh.in b/doc/info/build_html.sh.in
+index 37930e9..c10e38d 100755
+--- a/doc/info/build_html.sh.in
++++ b/doc/info/build_html.sh.in
+@@ -46,7 +46,7 @@ do
+ echo "filenamebase = \"$filenamebase\""
+ cat $f
+ done | @AWK@ '!/^@c / && !/^@c$/ && (/^@deffn/ || /^@defvr/ || /^@end deffn/ || /^@end defvr/ || /@category/ || /@node/ || /^filenamebase/)' | @SED@ -f @abs_srcdir@/extract_categories1.sed | @AWK@ -f @abs_srcdir@/extract_categories1.awk > make-categories.py
+-python make-categories.py
++@PYTHON@ make-categories.py
+ @SED@ -e 's/^@bye/@node Documentation Categories, , Function and Variable Index\n@chapter Documentation Categories/' @abs_srcdir@/maxima.texi > maxima.texi
+ ( for f in Category-*.texi; do echo '@include' $f; done ; echo @bye ) >> maxima.texi
+
+--
+2.26.2
+
diff --git a/sci-mathematics/maxima/files/ecls-4.patch b/sci-mathematics/maxima/files/ecls-4.patch
new file mode 100644
index 000000000000..7c597c223333
--- /dev/null
+++ b/sci-mathematics/maxima/files/ecls-4.patch
@@ -0,0 +1,16 @@
+diff --git a/src/maxima.system b/src/maxima.system
+index ee7ca0f..85ec36f 100644
+--- a/src/maxima.system
++++ b/src/maxima.system
+@@ -75,6 +75,11 @@
+ ;; Convert dir/foo.fas to dir/foo.o
+ (make-pathname :type "o" :defaults p))
+ files)))
++ (c::build-fasl "binary-ecl/maxima" :lisp-files obj
++ :ld-flags
++ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
++ (find-package "MAXIMA")))))
++ (if (and x (not (string= x ""))) (list x))))
+ (c::build-program "binary-ecl/maxima" :lisp-files obj
+ :ld-flags
+ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
diff --git a/sci-mathematics/maxima/files/support-new-vtk.patch b/sci-mathematics/maxima/files/support-new-vtk.patch
new file mode 100644
index 000000000000..3296ce276467
--- /dev/null
+++ b/sci-mathematics/maxima/files/support-new-vtk.patch
@@ -0,0 +1,26 @@
+commit c21598340008892173578718afa577f93ebfdd45
+Author: Leo Butler <l_butler@users.sourceforge.net>
+Date: Sat Feb 13 16:16:20 2021 -0600
+
+ Fix SF Bug #3714, Update maxima to use vtk-8.2.0
+
+ The GlobalImmediateModeRenderingOn method was deprecated in the VTK
+ codebase in 2017,
+
+ https://github.com/Kitware/VTK/commit/67e054c91063be30e8e991de489fdda3af668e22
+
+ This commit may change or break draw-vtk user code that relies on
+ older versions of vtk.
+
+diff --git a/share/draw/vtk.lisp b/share/draw/vtk.lisp
+index 6ff0f9586..1964048d2 100644
+--- a/share/draw/vtk.lisp
++++ b/share/draw/vtk.lisp
+@@ -224,7 +224,6 @@
+ (defun vtkpolydatamapper-code (mn fn con)
+ (concatenate 'string
+ (format nil "~a=vtk.vtkPolyDataMapper()~%" mn)
+- (format nil "~a.GlobalImmediateModeRenderingOn()~%" mn)
+ (if con
+ (format nil "~a.SetInputConnection(~a.GetOutputPort())~%" mn fn)
+ "") ))
diff --git a/sci-mathematics/maxima/maxima-5.44.0.ebuild b/sci-mathematics/maxima/maxima-5.44.0-r4.ebuild
index 6588716b4947..3babe7349ba0 100644
--- a/sci-mathematics/maxima/maxima-5.44.0.ebuild
+++ b/sci-mathematics/maxima/maxima-5.44.0-r4.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
-inherit autotools elisp-common eutils xdg-utils
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit autotools elisp-common eutils flag-o-matic python-single-r1 xdg-utils
DESCRIPTION="Free computer algebra environment based on Macsyma"
HOMEPAGE="http://maxima.sourceforge.net/"
@@ -11,7 +13,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2 GPL-2+"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
# Supported lisps
LISPS=( sbcl cmucl gcl ecls clozurecl clisp )
@@ -20,9 +22,9 @@ SUPP_RL=( . . y . . y )
# . - just --enable-<lisp>, <flag> - --enable-<flag>
CONF_FLAG=( . . . ecl ccl . )
# patch file version; . - no patch
-PATCH_V=( 2 1 . . 3 1 )
+PATCH_V=( 2 1 . 4 3 1 )
-IUSE="emacs tk nls unicode X test ${LISPS[*]}"
+IUSE="emacs gui nls unicode vtk X test ${LISPS[*]}"
RESTRICT="!test? ( test )"
# Languages
@@ -32,15 +34,30 @@ for lang in ${LANGS}; do
done
# 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.
RDEPEND="
- X? ( x11-misc/xdg-utils
- sci-visualization/gnuplot[gd]
- tk? ( dev-lang/tk:0 ) )
- emacs? ( >=app-editors/emacs-23.1:*
+ X? (
+ x11-misc/xdg-utils
+ sci-visualization/gnuplot[gd]
+ vtk? (
+ ${PYTHON_DEPS}
+ sci-libs/vtk[python,rendering,${PYTHON_SINGLE_USEDEP}]
+ )
+ )
+ emacs? (
+ >=app-editors/emacs-23.1:*
virtual/latex-base
app-emacs/auctex
app-text/ghostscript-gpl
- dev-texlive/texlive-latexrecommended )"
+ dev-texlive/texlive-latexrecommended
+ )
+ gui? ( dev-lang/tk:0 )"
# generating lisp dependencies
depends() {
@@ -72,16 +89,25 @@ done
unset LISP
+# 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="${PYTHON_REQUIRED_USE} gui? ( X )"
+
RDEPEND="${RDEPEND}
${DEF_DEP}"
-DEPEND="${RDEPEND}
+# Python is used in e.g. doc/info/build_html.sh to build the docs.
+DEPEND="${PYTHON_DEPS}
+ ${RDEPEND}
test? ( sci-visualization/gnuplot )
sys-apps/texinfo"
TEXMF="${EPREFIX}"/usr/share/texmf-site
pkg_setup() {
+ # Set the PYTHON variable to whatever it should be.
+ python-single-r1_pkg_setup
+
local n=${#LISPS[*]}
for ((n--; n >= 0; n--)); do
@@ -97,7 +123,8 @@ pkg_setup() {
src_prepare() {
local n PATCHES v
- PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-1 )
+ PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-1
+ dont-hardcode-python support-new-vtk )
n=${#PATCHES[*]}
for ((n--; n >= 0; n--)); do
@@ -142,14 +169,25 @@ src_configure() {
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.
+ #
econf ${CONFS} \
- $(use_with tk wish) \
+ LDFLAGS="$(raw-ldflags)" \
+ $(use_with gui wish) \
$(use_enable emacs) \
--with-lispdir="${EPREFIX}/${SITELISP}/${PN}"
}
src_compile() {
- emake
+ # The variable PYTHONBIN is used in one place while building the
+ # German documentation. Some day that script should be converted
+ # to use the value of @PYTHON@ obtained during ./configure.
+ emake PYTHONBIN="${PYTHON}"
if use emacs; then
pushd interfaces/emacs/emaxima > /dev/null
elisp-compile *.el
@@ -165,7 +203,7 @@ src_install() {
docompress -x /usr/share/info
emake DESTDIR="${D}" emacsdir="${EPREFIX}/${SITELISP}/${PN}" install
- use tk && make_desktop_entry xmaxima xmaxima \
+ use gui && make_desktop_entry xmaxima xmaxima \
/usr/share/${PN}/${PV}/xmaxima/maxima-new.png \
"Science;Math;Education"
@@ -188,6 +226,13 @@ src_install() {
doins interfaces/emacs/imaxima/README
doins -r interfaces/emacs/imaxima/imath-example
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() {
diff --git a/sci-mathematics/maxima/metadata.xml b/sci-mathematics/maxima/metadata.xml
index 2ee0d1e396a8..d87f8aea9f05 100644
--- a/sci-mathematics/maxima/metadata.xml
+++ b/sci-mathematics/maxima/metadata.xml
@@ -28,6 +28,9 @@
(<pkg>dev-lisp/gcl</pkg>)</flag>
<flag name="sbcl">Compile maxima with Steel Bank Common Lisp
(<pkg>dev-lisp/sbcl</pkg>)</flag>
+ <flag name="vtk">
+ Support plotting with <pkg>sci-libs/vtk</pkg>
+ </flag>
</use>
<upstream>
<remote-id type="sourceforge">maxima</remote-id>