summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2021-03-25 17:09:28 -0400
committerMichael Orlitzky <mjo@gentoo.org>2021-03-25 20:56:25 -0400
commit16f964dc700f819d2182707cfc49fd0bb71987b9 (patch)
tree33e46fbc842404dcdab95209ac737912e7398af9 /sci-mathematics/maxima
parentsci-mathematics/maxima: rename USE=tk to USE=gui. (diff)
downloadgentoo-16f964dc700f819d2182707cfc49fd0bb71987b9.tar.gz
gentoo-16f964dc700f819d2182707cfc49fd0bb71987b9.tar.bz2
gentoo-16f964dc700f819d2182707cfc49fd0bb71987b9.zip
sci-mathematics/maxima: new USE-controlled dependency on sci-libs/vtk.
VTK is an optional backend for plotting in Maxima that you can enable with "draw_renderer: 'vtk;". It is also NON-optional when drawing with the scene() command; however, scene() is presently broken after VTK dropped its Tcl/Tk interface. As a result, we add sci-libs/vtk only as an optional dependency to Maxima, behind USE=vtk. This requires dropping ~ppc for now. Closes: https://bugs.gentoo.org/769899 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'sci-mathematics/maxima')
-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-r3.ebuild)29
-rw-r--r--sci-mathematics/maxima/metadata.xml3
3 files changed, 51 insertions, 7 deletions
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-r3.ebuild b/sci-mathematics/maxima/maxima-5.44.0-r4.ebuild
index 57a63d133ccf..3babe7349ba0 100644
--- a/sci-mathematics/maxima/maxima-5.44.0-r3.ebuild
+++ b/sci-mathematics/maxima/maxima-5.44.0-r4.ebuild
@@ -13,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 )
@@ -24,7 +24,7 @@ CONF_FLAG=( . . . ecl ccl . )
# patch file version; . - no patch
PATCH_V=( 2 1 . 4 3 1 )
-IUSE="emacs gui nls unicode X test ${LISPS[*]}"
+IUSE="emacs gui nls unicode vtk X test ${LISPS[*]}"
RESTRICT="!test? ( test )"
# Languages
@@ -34,14 +34,29 @@ 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] )
- 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
@@ -109,7 +124,7 @@ pkg_setup() {
src_prepare() {
local n PATCHES v
PATCHES=( emacs-0 rmaxima-0 wish-2 xdg-utils-1
- dont-hardcode-python )
+ dont-hardcode-python support-new-vtk )
n=${#PATCHES[*]}
for ((n--; n >= 0; n--)); do
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>