summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-mathematics/maxima/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-mathematics/maxima/files')
-rw-r--r--sci-mathematics/maxima/files/50maxima-gentoo.el12
-rw-r--r--sci-mathematics/maxima/files/clisp-0.patch19
-rw-r--r--sci-mathematics/maxima/files/clozurecl-0.patch27
-rw-r--r--sci-mathematics/maxima/files/clozurecl-1.patch28
-rw-r--r--sci-mathematics/maxima/files/cmucl-0.patch27
-rw-r--r--sci-mathematics/maxima/files/ecls-0.patch27
-rw-r--r--sci-mathematics/maxima/files/ecls-1.patch37
-rw-r--r--sci-mathematics/maxima/files/imaxima-0.patch5
-rw-r--r--sci-mathematics/maxima/files/maxima-5.26.0-ecls-12.2.1.patch8
-rw-r--r--sci-mathematics/maxima/files/maxima-5.26.0-wish.patch28
-rw-r--r--sci-mathematics/maxima/files/maxima-5.26.0.patch37
-rw-r--r--sci-mathematics/maxima/files/maxima-5.27.0-inhibit-sys_usr-inits.patch24
-rw-r--r--sci-mathematics/maxima/files/maxima-5.27.0-wish.patch28
-rw-r--r--sci-mathematics/maxima/files/maxima-5.27.0.patch37
-rw-r--r--sci-mathematics/maxima/files/maxima-5.28.0-sbcl.patch8
-rw-r--r--sci-mathematics/maxima/files/maxima-5.28.0-wish.patch28
-rw-r--r--sci-mathematics/maxima/files/maxima-5.28.0.patch51
-rw-r--r--sci-mathematics/maxima/files/maxima-5.29.1-sbcl.patch8
-rw-r--r--sci-mathematics/maxima/files/maxima-5.29.1-wish.patch28
-rw-r--r--sci-mathematics/maxima/files/maxima-5.29.1.patch51
-rw-r--r--sci-mathematics/maxima/files/maxima-ccl.patch8
-rw-r--r--sci-mathematics/maxima/files/maxima-ecl-ldflags.patch27
-rw-r--r--sci-mathematics/maxima/files/maxima-imaxima.patch5
-rw-r--r--sci-mathematics/maxima/files/maxima-no-init-files.patch31
-rw-r--r--sci-mathematics/maxima/files/maxima-rmaxima.patch25
-rw-r--r--sci-mathematics/maxima/files/maxima-xdg-utils.patch35
-rw-r--r--sci-mathematics/maxima/files/rmaxima-0.patch25
-rw-r--r--sci-mathematics/maxima/files/sbcl-0.patch26
-rw-r--r--sci-mathematics/maxima/files/wish-0.patch28
-rw-r--r--sci-mathematics/maxima/files/wish-1.patch28
-rw-r--r--sci-mathematics/maxima/files/xdg-utils-0.patch35
31 files changed, 791 insertions, 0 deletions
diff --git a/sci-mathematics/maxima/files/50maxima-gentoo.el b/sci-mathematics/maxima/files/50maxima-gentoo.el
new file mode 100644
index 000000000000..20c7399164f7
--- /dev/null
+++ b/sci-mathematics/maxima/files/50maxima-gentoo.el
@@ -0,0 +1,12 @@
+
+;;; maxima site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'maxima-mode "maxima" "Maxima mode" t)
+(autoload 'maxima "maxima" "Maxima interactive" t)
+(autoload 'dbl "dbl" "Make a debugger to run lisp, maxima and or gdb in" t)
+(add-to-list 'auto-mode-alist '("\\.ma?[cx]\\'" . maxima-mode))
+
+;; emaxima mode
+(autoload 'emaxima-mode "emaxima" "EMaxima" t)
+(add-hook 'emaxima-mode-hook 'emaxima-mark-file-as-emaxima)
diff --git a/sci-mathematics/maxima/files/clisp-0.patch b/sci-mathematics/maxima/files/clisp-0.patch
new file mode 100644
index 000000000000..7e65c40b58f7
--- /dev/null
+++ b/sci-mathematics/maxima/files/clisp-0.patch
@@ -0,0 +1,19 @@
+diff -r -U1 maxima-5.30.0.orig/src/maxima.in maxima-5.30.0/src/maxima.in
+--- maxima-5.30.0.orig/src/maxima.in 2012-12-04 12:54:50.000000000 +0700
++++ maxima-5.30.0/src/maxima.in 2013-04-13 13:07:03.094128196 +0700
+@@ -138,5 +138,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -144,5 +144,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
diff --git a/sci-mathematics/maxima/files/clozurecl-0.patch b/sci-mathematics/maxima/files/clozurecl-0.patch
new file mode 100644
index 000000000000..d5afe951eb53
--- /dev/null
+++ b/sci-mathematics/maxima/files/clozurecl-0.patch
@@ -0,0 +1,27 @@
+diff -r -U1 maxima-5.30.0.orig/configure.in maxima-5.30.0/configure.in
+--- maxima-5.30.0.orig/configure.in 2013-04-03 02:13:30.000000000 +0700
++++ maxima-5.30.0/configure.in 2013-04-13 12:42:16.645751903 +0700
+@@ -351,3 +351,3 @@
+ dnl n.b. openmcl_default_name is hardcoded in "with" message
+-openmcl_default_name=openmcl
++openmcl_default_name=ccl
+ AC_ARG_ENABLE(openmcl,
+diff -r -U1 maxima-5.30.0.orig/src/Makefile.am maxima-5.30.0/src/Makefile.am
+--- maxima-5.30.0.orig/src/Makefile.am 2013-03-23 08:32:07.000000000 +0700
++++ maxima-5.30.0/src/Makefile.am 2013-04-13 12:49:34.911159093 +0700
+@@ -304,3 +304,3 @@
+ if OPENMCL
+-EXECUTEOPENMCL = $(OPENMCL_NAME) -e
++EXECUTEOPENMCL = $(OPENMCL_NAME) --no-init -e
+ all-local: sharefiles.mk $(OPENMCL_MAXIMA)
+diff -r -U1 maxima-5.30.0.orig/src/maxima.in maxima-5.30.0/src/maxima.in
+--- maxima-5.30.0.orig/src/maxima.in 2012-12-04 12:54:50.000000000 +0700
++++ maxima-5.30.0/src/maxima.in 2013-04-13 12:46:59.247013957 +0700
+@@ -185,5 +185,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
diff --git a/sci-mathematics/maxima/files/clozurecl-1.patch b/sci-mathematics/maxima/files/clozurecl-1.patch
new file mode 100644
index 000000000000..07203a2f828d
--- /dev/null
+++ b/sci-mathematics/maxima/files/clozurecl-1.patch
@@ -0,0 +1,28 @@
+diff -r -U1 maxima-5.35.1.orig/configure.ac maxima-5.35.1/configure.ac
+--- maxima-5.35.1.orig/configure.ac 2014-12-13 06:44:51.000000000 +0600
++++ maxima-5.35.1/configure.ac 2014-12-20 20:43:04.713305777 +0600
+@@ -379,3 +379,3 @@
+ dnl n.b. openmcl_default_name is hardcoded in "with" message
+-openmcl_default_name=openmcl
++openmcl_default_name=ccl
+ AC_ARG_ENABLE(openmcl,
+diff -r -U1 maxima-5.35.1.orig/src/Makefile.am maxima-5.35.1/src/Makefile.am
+--- maxima-5.35.1.orig/src/Makefile.am 2014-09-24 00:02:16.000000000 +0700
++++ maxima-5.35.1/src/Makefile.am 2014-12-20 20:43:04.713305777 +0600
+@@ -359,3 +359,3 @@
+
+-EXECUTEOPENMCL = $(OPENMCL_NAME) -e
++EXECUTEOPENMCL = $(OPENMCL_NAME) --no-init -e
+ BUILT_FILES += $(OPENMCL_MAXIMA)
+Только в maxima-5.35.1/src: Makefile.am.orig
+diff -r -U1 maxima-5.35.1.orig/src/maxima.in maxima-5.35.1/src/maxima.in
+--- maxima-5.35.1.orig/src/maxima.in 2014-12-03 04:17:05.000000000 +0600
++++ maxima-5.35.1/src/maxima.in 2014-12-20 20:43:04.713305777 +0600
+@@ -185,5 +185,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
diff --git a/sci-mathematics/maxima/files/cmucl-0.patch b/sci-mathematics/maxima/files/cmucl-0.patch
new file mode 100644
index 000000000000..73ebd3445b48
--- /dev/null
+++ b/sci-mathematics/maxima/files/cmucl-0.patch
@@ -0,0 +1,27 @@
+diff -r -U1 maxima-5.30.0.orig/src/Makefile.am maxima-5.30.0/src/Makefile.am
+--- maxima-5.30.0.orig/src/Makefile.am 2013-03-23 08:32:07.000000000 +0700
++++ maxima-5.30.0/src/Makefile.am 2013-04-13 13:12:37.521437190 +0700
+@@ -77,3 +77,3 @@
+ if CMUCL
+-EXECUTECMUCL = $(CMUCL_NAME) -noinit -batch
++EXECUTECMUCL = $(CMUCL_NAME) -nositeinit -noinit -batch
+ # Newer versions of CMUCL have an INTL package that is compatible with
+diff -r -U1 maxima-5.30.0.orig/src/maxima.in maxima-5.30.0/src/maxima.in
+--- maxima-5.30.0.orig/src/maxima.in 2012-12-04 12:54:50.000000000 +0700
++++ maxima-5.30.0/src/maxima.in 2013-04-13 13:11:26.647371277 +0700
+@@ -155,5 +155,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -161,5 +161,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
diff --git a/sci-mathematics/maxima/files/ecls-0.patch b/sci-mathematics/maxima/files/ecls-0.patch
new file mode 100644
index 000000000000..df45dee0eb4a
--- /dev/null
+++ b/sci-mathematics/maxima/files/ecls-0.patch
@@ -0,0 +1,27 @@
+diff -r -U1 maxima-5.30.0.orig/src/maxima.in maxima-5.30.0/src/maxima.in
+--- maxima-5.30.0.orig/src/maxima.in 2012-12-04 12:54:50.000000000 +0700
++++ maxima-5.30.0/src/maxima.in 2013-04-13 12:57:12.037579805 +0700
+@@ -191,3 +191,3 @@
+ elif [ "$MAXIMA_LISP" = "ecl" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -norc -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+
+diff -r -U1 maxima-5.30.0.orig/src/maxima.system maxima-5.30.0/src/maxima.system
+--- maxima-5.30.0.orig/src/maxima.system 2013-03-23 08:32:08.000000000 +0700
++++ maxima-5.30.0/src/maxima.system 2013-04-13 12:59:54.086730845 +0700
+@@ -61,2 +61,10 @@
+ #+ecl
++(defun split-ld-flags-for-ecl (string &aux space)
++ (setf string (string-trim '(#\Space) string))
++ (if (setf space (position #\Space string))
++ (cons (subseq string 0 space)
++ (split-ld-flags-for-ecl (subseq string (1+ space))))
++ (cons string nil)))
++
++#+ecl
+ (defun build-maxima-lib ()
+@@ -81,3 +89,3 @@
+ (find-package "MAXIMA")))))
+- (if (and x (not (string= x ""))) (list x)))
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x)))
+ :epilogue-code '(progn (require :defsystem)
diff --git a/sci-mathematics/maxima/files/ecls-1.patch b/sci-mathematics/maxima/files/ecls-1.patch
new file mode 100644
index 000000000000..36e9af17bb6f
--- /dev/null
+++ b/sci-mathematics/maxima/files/ecls-1.patch
@@ -0,0 +1,37 @@
+diff -r -U1 maxima-5.30.0.orig/src/maxima.in maxima-5.30.0/src/maxima.in
+--- maxima-5.30.0.orig/src/maxima.in 2012-12-04 12:54:50.000000000 +0700
++++ maxima-5.30.0/src/maxima.in 2013-04-13 12:57:12.037579805 +0700
+@@ -191,3 +191,3 @@
+ elif [ "$MAXIMA_LISP" = "ecl" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -norc -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+
+diff -r -U1 maxima-5.30.0.orig/src/maxima.system maxima-5.30.0/src/maxima.system
+--- maxima-5.30.0.orig/src/maxima.system 2013-03-23 08:32:08.000000000 +0700
++++ maxima-5.30.0/src/maxima.system 2013-04-13 12:59:54.086730845 +0700
+@@ -61,2 +61,10 @@
+ #+ecl
++(defun split-ld-flags-for-ecl (string &aux space)
++ (setf string (string-trim '(#\Space) string))
++ (if (setf space (position #\Space string))
++ (cons (subseq string 0 space)
++ (split-ld-flags-for-ecl (subseq string (1+ space))))
++ (cons string nil)))
++
++#+ecl
+ (defun build-maxima-lib ()
+@@ -77,7 +85,12 @@
+ 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 ""))) (split-ld-flags-for-ecl x))))
+ (c::build-program "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)))
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x)))
+ :epilogue-code '(progn (require :defsystem)
+
diff --git a/sci-mathematics/maxima/files/imaxima-0.patch b/sci-mathematics/maxima/files/imaxima-0.patch
new file mode 100644
index 000000000000..fe607b240d13
--- /dev/null
+++ b/sci-mathematics/maxima/files/imaxima-0.patch
@@ -0,0 +1,5 @@
+--- interfaces/emacs/Makefile.am.orig 2010-02-01 22:11:44.809941160 +1300
++++ interfaces/emacs/Makefile.am 2010-02-01 22:12:06.608062346 +1300
+@@ -1 +1 @@
+-SUBDIRS = emaxima misc imaxima
++SUBDIRS = emaxima misc
diff --git a/sci-mathematics/maxima/files/maxima-5.26.0-ecls-12.2.1.patch b/sci-mathematics/maxima/files/maxima-5.26.0-ecls-12.2.1.patch
new file mode 100644
index 000000000000..4fde880acf03
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.26.0-ecls-12.2.1.patch
@@ -0,0 +1,8 @@
+diff -r -U1 maxima-5.26.0.orig/src/numerical/slatec/xerprn.lisp maxima-5.26.0/src/numerical/slatec/xerprn.lisp
+--- maxima-5.26.0.orig/src/numerical/slatec/xerprn.lisp 2011-08-01 11:39:52.000000000 +0700
++++ maxima-5.26.0/src/numerical/slatec/xerprn.lisp 2012-02-13 18:49:21.000000000 +0700
+@@ -20,3 +20,3 @@
+ (let* ((newlin "$$"))
+- (declare (type (simple-array character (2)) newlin) (ignorable newlin))
++ (declare (ignorable newlin))
+ (defun xerprn (prefix npref messg nwrap)
diff --git a/sci-mathematics/maxima/files/maxima-5.26.0-wish.patch b/sci-mathematics/maxima/files/maxima-5.26.0-wish.patch
new file mode 100644
index 000000000000..6fcb0d9ec8e9
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.26.0-wish.patch
@@ -0,0 +1,28 @@
+diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in
+--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600
++++ maxima-5.23.1//configure.in 2011-01-16 21:00:16.000000000 +0600
+@@ -777,6 +777,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+diff -r -U1 maxima-5.23.1.orig//interfaces/Makefile.am maxima-5.23.1//interfaces/Makefile.am
+--- maxima-5.23.1.orig//interfaces/Makefile.am 2004-04-28 23:34:59.000000000 +0700
++++ maxima-5.23.1//interfaces/Makefile.am 2011-01-16 20:41:38.000000000 +0600
+@@ -1,2 +1,6 @@
++if WANT_TK
+ SUBDIRS = emacs xmaxima
++else
++SUBDIRS = emacs
++endif
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/maxima-5.26.0.patch b/sci-mathematics/maxima/files/maxima-5.26.0.patch
new file mode 100644
index 000000000000..6309653d6e87
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.26.0.patch
@@ -0,0 +1,37 @@
+diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in
+--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600
++++ maxima-5.23.1//configure.in 2011-01-16 19:50:55.000000000 +0600
+@@ -294,3 +294,3 @@
+ dnl n.b. openmcl_default_name is hardcoded in "with" message
+-openmcl_default_name=openmcl
++openmcl_default_name=ccl
+ AC_ARG_ENABLE(openmcl,
+diff -r -U1 maxima-5.23.1.orig//src/maxima.in maxima-5.23.1//src/maxima.in
+--- maxima-5.23.1.orig//src/maxima.in 2010-12-05 08:06:03.000000000 +0600
++++ maxima-5.23.1//src/maxima.in 2011-01-16 20:07:27.000000000 +0600
+@@ -137,5 +137,5 @@
+ if [ "$layout_autotools" = "true" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -147,5 +147,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -155,3 +155,3 @@
+ else
+- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -177,3 +177,3 @@
+ elif [ "$MAXIMA_LISP" = "sbcl" ]; then
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
diff --git a/sci-mathematics/maxima/files/maxima-5.27.0-inhibit-sys_usr-inits.patch b/sci-mathematics/maxima/files/maxima-5.27.0-inhibit-sys_usr-inits.patch
new file mode 100644
index 000000000000..a86a4ed06a69
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.27.0-inhibit-sys_usr-inits.patch
@@ -0,0 +1,24 @@
+diff -uNr maxima-5.27.0.org/src/Makefile.am maxima-5.27.0/src/Makefile.am
+--- maxima-5.27.0.org/src/Makefile.am 2012-05-07 08:04:23.000000000 -0400
++++ maxima-5.27.0/src/Makefile.am 2012-05-07 08:04:56.000000000 -0400
+@@ -176,7 +176,7 @@
+
+
+ if SBCL
+-EXECUTESBCL = $(SBCL_NAME) --noinform --noprint --eval
++EXECUTESBCL = $(SBCL_NAME) --sysinit /dev/null --userinit /dev/null --eval
+ all-local: sharefiles.mk binary-sbcl/maxima.core
+ install-exec-local: install-sbcl
+ uninstall-hook: uninstall-sbcl
+diff -uNr maxima-5.27.0.org/src/Makefile.in maxima-5.27.0/src/Makefile.in
+--- maxima-5.27.0.org/src/Makefile.in 2012-05-07 08:04:23.000000000 -0400
++++ maxima-5.27.0/src/Makefile.in 2012-05-07 08:05:14.000000000 -0400
+@@ -240,7 +240,7 @@
+ @CMUCL_TRUE@INITINTL = (when (find-package "INTL") (set (find-symbol "*DEFAULT-DOMAIN*" "INTL") "maxima"))
+ @SCL_TRUE@EXECUTESCL = $(SCL_NAME) -noinit -batch
+ @ACL_TRUE@EXECUTEACL = $(ACL_NAME) -batch
+-@SBCL_TRUE@EXECUTESBCL = $(SBCL_NAME) --noinform --noprint --eval
++@SBCL_TRUE@EXECUTESBCL = $(SBCL_NAME) --sysinit /dev/null --userinit /dev/null --eval
+ @GCL_TRUE@EXECUTEGCL = $(GCL_NAME) -batch -eval
+ @OPENMCL_TRUE@EXECUTEOPENMCL = $(OPENMCL_NAME) -e
+ @ECL_TRUE@EXECUTEECL = $(ECL_NAME) -norc
diff --git a/sci-mathematics/maxima/files/maxima-5.27.0-wish.patch b/sci-mathematics/maxima/files/maxima-5.27.0-wish.patch
new file mode 100644
index 000000000000..6fcb0d9ec8e9
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.27.0-wish.patch
@@ -0,0 +1,28 @@
+diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in
+--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600
++++ maxima-5.23.1//configure.in 2011-01-16 21:00:16.000000000 +0600
+@@ -777,6 +777,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+diff -r -U1 maxima-5.23.1.orig//interfaces/Makefile.am maxima-5.23.1//interfaces/Makefile.am
+--- maxima-5.23.1.orig//interfaces/Makefile.am 2004-04-28 23:34:59.000000000 +0700
++++ maxima-5.23.1//interfaces/Makefile.am 2011-01-16 20:41:38.000000000 +0600
+@@ -1,2 +1,6 @@
++if WANT_TK
+ SUBDIRS = emacs xmaxima
++else
++SUBDIRS = emacs
++endif
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/maxima-5.27.0.patch b/sci-mathematics/maxima/files/maxima-5.27.0.patch
new file mode 100644
index 000000000000..6309653d6e87
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.27.0.patch
@@ -0,0 +1,37 @@
+diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in
+--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600
++++ maxima-5.23.1//configure.in 2011-01-16 19:50:55.000000000 +0600
+@@ -294,3 +294,3 @@
+ dnl n.b. openmcl_default_name is hardcoded in "with" message
+-openmcl_default_name=openmcl
++openmcl_default_name=ccl
+ AC_ARG_ENABLE(openmcl,
+diff -r -U1 maxima-5.23.1.orig//src/maxima.in maxima-5.23.1//src/maxima.in
+--- maxima-5.23.1.orig//src/maxima.in 2010-12-05 08:06:03.000000000 +0600
++++ maxima-5.23.1//src/maxima.in 2011-01-16 20:07:27.000000000 +0600
+@@ -137,5 +137,5 @@
+ if [ "$layout_autotools" = "true" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -147,5 +147,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -155,3 +155,3 @@
+ else
+- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -177,3 +177,3 @@
+ elif [ "$MAXIMA_LISP" = "sbcl" ]; then
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
diff --git a/sci-mathematics/maxima/files/maxima-5.28.0-sbcl.patch b/sci-mathematics/maxima/files/maxima-5.28.0-sbcl.patch
new file mode 100644
index 000000000000..66a583e0adba
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.28.0-sbcl.patch
@@ -0,0 +1,8 @@
+diff -r -U1 maxima-5.28.0.orig/src/Makefile.am maxima-5.28.0/src/Makefile.am
+--- maxima-5.28.0.orig/src/Makefile.am 2012-06-15 12:21:34.000000000 +0700
++++ maxima-5.28.0/src/Makefile.am 2012-08-25 09:32:26.000000000 +0700
+@@ -199,3 +199,3 @@
+ if SBCL
+-EXECUTESBCL = "$(SBCL_NAME)" --noinform --noprint --eval
++EXECUTESBCL = "$(SBCL_NAME)" --noinform --noprint --no-sysinit --no-userinit --eval
+ all-local: sharefiles.mk $(SBCL_MAXIMA)
diff --git a/sci-mathematics/maxima/files/maxima-5.28.0-wish.patch b/sci-mathematics/maxima/files/maxima-5.28.0-wish.patch
new file mode 100644
index 000000000000..6fcb0d9ec8e9
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.28.0-wish.patch
@@ -0,0 +1,28 @@
+diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in
+--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600
++++ maxima-5.23.1//configure.in 2011-01-16 21:00:16.000000000 +0600
+@@ -777,6 +777,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+diff -r -U1 maxima-5.23.1.orig//interfaces/Makefile.am maxima-5.23.1//interfaces/Makefile.am
+--- maxima-5.23.1.orig//interfaces/Makefile.am 2004-04-28 23:34:59.000000000 +0700
++++ maxima-5.23.1//interfaces/Makefile.am 2011-01-16 20:41:38.000000000 +0600
+@@ -1,2 +1,6 @@
++if WANT_TK
+ SUBDIRS = emacs xmaxima
++else
++SUBDIRS = emacs
++endif
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/maxima-5.28.0.patch b/sci-mathematics/maxima/files/maxima-5.28.0.patch
new file mode 100644
index 000000000000..c8bd4191dda8
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.28.0.patch
@@ -0,0 +1,51 @@
+diff -r -U1 maxima-5.28.0.orig/src/maxima.in maxima-5.28.0/src/maxima.in
+--- maxima-5.28.0.orig/src/maxima.in 2012-06-15 12:21:34.000000000 +0700
++++ maxima-5.28.0/src/maxima.in 2012-08-15 21:46:37.000000000 +0700
+@@ -138,5 +138,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -144,5 +144,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -155,5 +155,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -161,5 +161,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -183,5 +183,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -196,5 +196,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
diff --git a/sci-mathematics/maxima/files/maxima-5.29.1-sbcl.patch b/sci-mathematics/maxima/files/maxima-5.29.1-sbcl.patch
new file mode 100644
index 000000000000..66a583e0adba
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.29.1-sbcl.patch
@@ -0,0 +1,8 @@
+diff -r -U1 maxima-5.28.0.orig/src/Makefile.am maxima-5.28.0/src/Makefile.am
+--- maxima-5.28.0.orig/src/Makefile.am 2012-06-15 12:21:34.000000000 +0700
++++ maxima-5.28.0/src/Makefile.am 2012-08-25 09:32:26.000000000 +0700
+@@ -199,3 +199,3 @@
+ if SBCL
+-EXECUTESBCL = "$(SBCL_NAME)" --noinform --noprint --eval
++EXECUTESBCL = "$(SBCL_NAME)" --noinform --noprint --no-sysinit --no-userinit --eval
+ all-local: sharefiles.mk $(SBCL_MAXIMA)
diff --git a/sci-mathematics/maxima/files/maxima-5.29.1-wish.patch b/sci-mathematics/maxima/files/maxima-5.29.1-wish.patch
new file mode 100644
index 000000000000..6fcb0d9ec8e9
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.29.1-wish.patch
@@ -0,0 +1,28 @@
+diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in
+--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600
++++ maxima-5.23.1//configure.in 2011-01-16 21:00:16.000000000 +0600
+@@ -777,6 +777,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+diff -r -U1 maxima-5.23.1.orig//interfaces/Makefile.am maxima-5.23.1//interfaces/Makefile.am
+--- maxima-5.23.1.orig//interfaces/Makefile.am 2004-04-28 23:34:59.000000000 +0700
++++ maxima-5.23.1//interfaces/Makefile.am 2011-01-16 20:41:38.000000000 +0600
+@@ -1,2 +1,6 @@
++if WANT_TK
+ SUBDIRS = emacs xmaxima
++else
++SUBDIRS = emacs
++endif
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/maxima-5.29.1.patch b/sci-mathematics/maxima/files/maxima-5.29.1.patch
new file mode 100644
index 000000000000..c8bd4191dda8
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-5.29.1.patch
@@ -0,0 +1,51 @@
+diff -r -U1 maxima-5.28.0.orig/src/maxima.in maxima-5.28.0/src/maxima.in
+--- maxima-5.28.0.orig/src/maxima.in 2012-06-15 12:21:34.000000000 +0700
++++ maxima-5.28.0/src/maxima.in 2012-08-15 21:46:37.000000000 +0700
+@@ -138,5 +138,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -144,5 +144,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -q -norc "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CLISP_NAME@" $MAXIMA_LISP_OPTIONS -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -155,5 +155,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -161,5 +161,5 @@
+ if [ -x "$maxima_image_base" ]; then
+- exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$maxima_image_base" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CMUCL_NAME@" $MAXIMA_LISP_OPTIONS -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -183,5 +183,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" $MAXIMA_LISP_OPTIONS --no-init -e '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+@@ -196,5 +196,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
diff --git a/sci-mathematics/maxima/files/maxima-ccl.patch b/sci-mathematics/maxima/files/maxima-ccl.patch
new file mode 100644
index 000000000000..6e746740b0af
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-ccl.patch
@@ -0,0 +1,8 @@
+diff -r -U1 maxima-5.28.0.orig/configure.in maxima-5.28.0/configure.in
+--- maxima-5.28.0.orig/configure.in 2012-08-12 23:17:53.000000000 +0700
++++ maxima-5.28.0/configure.in 2012-08-15 21:47:42.000000000 +0700
+@@ -350,3 +350,3 @@
+ dnl n.b. openmcl_default_name is hardcoded in "with" message
+-openmcl_default_name=openmcl
++openmcl_default_name=ccl
+ AC_ARG_ENABLE(openmcl,
diff --git a/sci-mathematics/maxima/files/maxima-ecl-ldflags.patch b/sci-mathematics/maxima/files/maxima-ecl-ldflags.patch
new file mode 100644
index 000000000000..e71486fcf736
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-ecl-ldflags.patch
@@ -0,0 +1,27 @@
+diff -p -up maxima-5.20.1/src/maxima.system.orig maxima-5.20.1/src/maxima.system
+--- maxima-5.20.1/src/maxima.system.orig 2010-03-04 17:25:38.708483072 -0300
++++ maxima-5.20.1/src/maxima.system 2010-03-04 17:27:27.150481620 -0300
+@@ -44,6 +44,14 @@
+ (c:build-fasl output :lisp-files (list object-output)))))
+
+ #+ecl
++(defun split-ld-flags-for-ecl (string &aux space)
++ (setf string (string-trim '(#\Space) string))
++ (if (setf space (position #\Space string))
++ (cons (subseq string 0 space)
++ (split-ld-flags-for-ecl (subseq string (1+ space))))
++ (cons string nil)))
++
++#+ecl
+ (defun build-maxima-lib ()
+ (labels ((list-all-objects (module)
+ (if (eql (mk::component-type module) :file)
+@@ -66,7 +74,7 @@
+ :ld-flags
+ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*"
+ (find-package "MAXIMA")))))
+- (if (and x (not (string= x ""))) (list x)))
++ (if (and x (not (string= x ""))) (split-ld-flags-for-ecl x)))
+ :epilogue-code '(progn (require :defsystem)
+ (cl-user::run)))))))
+
diff --git a/sci-mathematics/maxima/files/maxima-imaxima.patch b/sci-mathematics/maxima/files/maxima-imaxima.patch
new file mode 100644
index 000000000000..fe607b240d13
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-imaxima.patch
@@ -0,0 +1,5 @@
+--- interfaces/emacs/Makefile.am.orig 2010-02-01 22:11:44.809941160 +1300
++++ interfaces/emacs/Makefile.am 2010-02-01 22:12:06.608062346 +1300
+@@ -1 +1 @@
+-SUBDIRS = emaxima misc imaxima
++SUBDIRS = emaxima misc
diff --git a/sci-mathematics/maxima/files/maxima-no-init-files.patch b/sci-mathematics/maxima/files/maxima-no-init-files.patch
new file mode 100644
index 000000000000..2e49a2bad895
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-no-init-files.patch
@@ -0,0 +1,31 @@
+--- src/maxima.in.orig 2008-02-07 11:53:43.006379528 +0000
++++ src/maxima.in 2008-02-07 11:55:02.278897011 +0000
+@@ -111,15 +111,15 @@
+ fi
+ if [ "$MAXIMA_LISP" = "clisp" ]; then
+ if [ "$layout_autotools" = "true" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CLISP_RUNTIME@" -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CLISP_NAME@" -q -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CLISP_NAME@" -q -norc -M "$maxima_image_base.mem" "" -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+ elif [ "$MAXIMA_LISP" = "cmucl" ]; then
+ if [ "$layout_autotools" = "true" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/@CMUCL_RUNTIME@" -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@CMUCL_NAME@" -quiet -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@CMUCL_NAME@" -quiet -nositeinit -noinit -core "$maxima_image_base.core" -eval '(cl-user::run)' -- "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+ elif [ "$MAXIMA_LISP" = "scl" ]; then
+ if [ "$layout_autotools" = "true" ]; then
+@@ -138,7 +138,7 @@
+ # in the function get-application-args in command-line.lisp
+ exec "@OPENMCL_NAME@" -I "$maxima_image_base.image" "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ elif [ "$MAXIMA_LISP" = "sbcl" ]; then
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+ echo "$0: lisp=\"$MAXIMA_LISP\" not known. Use --list-avail to see possible options." >&2
+ exit 1
diff --git a/sci-mathematics/maxima/files/maxima-rmaxima.patch b/sci-mathematics/maxima/files/maxima-rmaxima.patch
new file mode 100644
index 000000000000..712cbda19d45
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-rmaxima.patch
@@ -0,0 +1,25 @@
+diff -r -U2 maxima-5.28.0.orig/src/Makefile.am maxima-5.28.0/src/Makefile.am
+--- maxima-5.28.0.orig/src/Makefile.am 2012-06-15 12:21:34.000000000 +0700
++++ maxima-5.28.0/src/Makefile.am 2012-10-30 22:22:29.000000000 +0700
+@@ -4,5 +4,21 @@
+ bin_SCRIPTS = maxima maxima-command.ico maxima.bat set_lang.vbs
+ else
++if SBCL
+ bin_SCRIPTS = maxima rmaxima
++else
++if CMUCL
++bin_SCRIPTS = maxima rmaxima
++else
++if ECL
++bin_SCRIPTS = maxima rmaxima
++else
++if OPENMCL
++bin_SCRIPTS = maxima rmaxima
++else
++bin_SCRIPTS = maxima
++endif
++endif
++endif
++endif
+ endif
+
diff --git a/sci-mathematics/maxima/files/maxima-xdg-utils.patch b/sci-mathematics/maxima/files/maxima-xdg-utils.patch
new file mode 100644
index 000000000000..876fe6fcd469
--- /dev/null
+++ b/sci-mathematics/maxima/files/maxima-xdg-utils.patch
@@ -0,0 +1,35 @@
+--- interfaces/emacs/misc/bookmode.el.orig 2008-02-07 12:42:18.008472937 +0000
++++ interfaces/emacs/misc/bookmode.el 2008-02-07 12:43:02.531010132 +0000
+@@ -680,7 +680,7 @@
+
+ (and tem
+ (list (concat "View "(nth 1 tem))
+- 'call-process "ghostview" nil nil nil
++ 'call-process "xdg-open" nil nil nil
+ (expand-file-name(nth 1 tem))
+ ))
+ (list "Cancel")
+@@ -705,7 +705,7 @@
+ (concat
+ (cond ((looking-at "%PS") "")
+ (t "gzip -dc | "))
+- "ghostview -")
++ "xdg-open -")
+
+ )))
+
+--- interfaces/xmaxima/Tkmaxima/Constants.tcl.orig 2008-02-07 12:42:47.294141832 +0000
++++ interfaces/xmaxima/Tkmaxima/Constants.tcl 2008-02-07 12:43:02.539010587 +0000
+@@ -143,9 +143,9 @@
+ image/gif netmath
+ image/png netmath
+ image/jpeg netmath
+- application/postscript "ghostview -safer %s"
+- application/pdf "acroread %s"
+- application/x-dvi "xdvi %s"
++ application/postscript "xdg-open -safer %s"
++ application/pdf "xdg-open %s"
++ application/x-dvi "xdg-open %s"
+ }
+ set maxima_priv(imagecounter) 0
+
diff --git a/sci-mathematics/maxima/files/rmaxima-0.patch b/sci-mathematics/maxima/files/rmaxima-0.patch
new file mode 100644
index 000000000000..712cbda19d45
--- /dev/null
+++ b/sci-mathematics/maxima/files/rmaxima-0.patch
@@ -0,0 +1,25 @@
+diff -r -U2 maxima-5.28.0.orig/src/Makefile.am maxima-5.28.0/src/Makefile.am
+--- maxima-5.28.0.orig/src/Makefile.am 2012-06-15 12:21:34.000000000 +0700
++++ maxima-5.28.0/src/Makefile.am 2012-10-30 22:22:29.000000000 +0700
+@@ -4,5 +4,21 @@
+ bin_SCRIPTS = maxima maxima-command.ico maxima.bat set_lang.vbs
+ else
++if SBCL
+ bin_SCRIPTS = maxima rmaxima
++else
++if CMUCL
++bin_SCRIPTS = maxima rmaxima
++else
++if ECL
++bin_SCRIPTS = maxima rmaxima
++else
++if OPENMCL
++bin_SCRIPTS = maxima rmaxima
++else
++bin_SCRIPTS = maxima
++endif
++endif
++endif
++endif
+ endif
+
diff --git a/sci-mathematics/maxima/files/sbcl-0.patch b/sci-mathematics/maxima/files/sbcl-0.patch
new file mode 100644
index 000000000000..5c2bdf7b509e
--- /dev/null
+++ b/sci-mathematics/maxima/files/sbcl-0.patch
@@ -0,0 +1,26 @@
+diff -r -U1 maxima-5.30.0.orig/src/Makefile.am maxima-5.30.0/src/Makefile.am
+--- maxima-5.30.0.orig/src/Makefile.am 2013-03-23 08:32:07.000000000 +0700
++++ maxima-5.30.0/src/Makefile.am 2013-04-13 14:36:39.977014432 +0700
+@@ -199,3 +199,3 @@
+ if SBCL
+-EXECUTESBCL = "$(SBCL_NAME)" --noinform --noprint --eval
++EXECUTESBCL = "$(SBCL_NAME)" --noinform --noprint --no-sysinit --no-userinit --eval
+ all-local: sharefiles.mk $(SBCL_MAXIMA)
+diff -r -U1 maxima-5.30.0.orig/src/maxima.in maxima-5.30.0/src/maxima.in
+--- maxima-5.30.0.orig/src/maxima.in 2012-12-04 12:54:50.000000000 +0700
++++ maxima-5.30.0/src/maxima.in 2013-04-13 14:36:39.977014432 +0700
+@@ -196,5 +196,5 @@
+ if [ -x "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" ]; then
+- exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "$MAXIMA_IMAGESDIR/binary-$MAXIMA_LISP/maxima" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ else
+- exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
++ exec "@SBCL_NAME@" --core "$maxima_image_base.core" --noinform $MAXIMA_LISP_OPTIONS --end-runtime-options --no-sysinit --no-userinit --eval '(cl-user::run)' --end-toplevel-options "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" "$arg6" "$arg7" "$arg8" "$arg9"
+ fi
+diff -r -U1 maxima-5.30.0.orig/src/server.lisp maxima-5.30.0/src/server.lisp
+--- maxima-5.30.0.orig/src/server.lisp 2012-11-19 04:40:51.000000000 +0700
++++ maxima-5.30.0/src/server.lisp 2013-04-13 14:37:19.937051659 +0700
+@@ -10,3 +10,2 @@
+ (eval-when (:compile-toplevel :load-toplevel :execute)
+- #+sbcl (require 'asdf) ;not needed here for a recent SBCL
+ #+sbcl (require 'sb-posix)
diff --git a/sci-mathematics/maxima/files/wish-0.patch b/sci-mathematics/maxima/files/wish-0.patch
new file mode 100644
index 000000000000..6fcb0d9ec8e9
--- /dev/null
+++ b/sci-mathematics/maxima/files/wish-0.patch
@@ -0,0 +1,28 @@
+diff -r -U1 maxima-5.23.1.orig//configure.in maxima-5.23.1//configure.in
+--- maxima-5.23.1.orig//configure.in 2011-01-15 21:54:46.000000000 +0600
++++ maxima-5.23.1//configure.in 2011-01-16 21:00:16.000000000 +0600
+@@ -777,6 +777,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+diff -r -U1 maxima-5.23.1.orig//interfaces/Makefile.am maxima-5.23.1//interfaces/Makefile.am
+--- maxima-5.23.1.orig//interfaces/Makefile.am 2004-04-28 23:34:59.000000000 +0700
++++ maxima-5.23.1//interfaces/Makefile.am 2011-01-16 20:41:38.000000000 +0600
+@@ -1,2 +1,6 @@
++if WANT_TK
+ SUBDIRS = emacs xmaxima
++else
++SUBDIRS = emacs
++endif
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/wish-1.patch b/sci-mathematics/maxima/files/wish-1.patch
new file mode 100644
index 000000000000..6e002d99267d
--- /dev/null
+++ b/sci-mathematics/maxima/files/wish-1.patch
@@ -0,0 +1,28 @@
+diff -r -U1 maxima-5.35.1.orig/configure.ac maxima-5.35.1/configure.ac
+--- maxima-5.35.1.orig/configure.ac 2014-12-13 06:44:51.000000000 +0600
++++ maxima-5.35.1/configure.ac 2014-12-15 16:30:07.574773386 +0600
+@@ -989,6 +989,11 @@
+ [ --with-wish=<prog> Use <prog> for Tk wish shell (default wish)],
+- [WISH="${withval}"],
+- [WISH="wish"])
++ [],
++ [with_wish="wish"])
++case "${with_wish}" in
++ no) WISH="none" ;;
++ yes) WISH="wish" ;;
++ *) WISH="${with_wish}" ;;
++esac
+ AC_SUBST(WISH)
+-
++AM_CONDITIONAL(WANT_TK, test x"${with_wish}" != xno)
+
+diff -r -U1 maxima-5.35.1.orig/interfaces/Makefile.am maxima-5.35.1/interfaces/Makefile.am
+--- maxima-5.35.1.orig/interfaces/Makefile.am 2013-10-07 10:37:11.000000000 +0700
++++ maxima-5.35.1/interfaces/Makefile.am 2014-12-15 16:31:18.056770422 +0600
+@@ -1,2 +1,6 @@
++if WANT_TK
+ SUBDIRS = emacs xmaxima
++else
++SUBDIRS = emacs
++endif
+ EXTRA_DIST = bin/xmaxima.iss
diff --git a/sci-mathematics/maxima/files/xdg-utils-0.patch b/sci-mathematics/maxima/files/xdg-utils-0.patch
new file mode 100644
index 000000000000..876fe6fcd469
--- /dev/null
+++ b/sci-mathematics/maxima/files/xdg-utils-0.patch
@@ -0,0 +1,35 @@
+--- interfaces/emacs/misc/bookmode.el.orig 2008-02-07 12:42:18.008472937 +0000
++++ interfaces/emacs/misc/bookmode.el 2008-02-07 12:43:02.531010132 +0000
+@@ -680,7 +680,7 @@
+
+ (and tem
+ (list (concat "View "(nth 1 tem))
+- 'call-process "ghostview" nil nil nil
++ 'call-process "xdg-open" nil nil nil
+ (expand-file-name(nth 1 tem))
+ ))
+ (list "Cancel")
+@@ -705,7 +705,7 @@
+ (concat
+ (cond ((looking-at "%PS") "")
+ (t "gzip -dc | "))
+- "ghostview -")
++ "xdg-open -")
+
+ )))
+
+--- interfaces/xmaxima/Tkmaxima/Constants.tcl.orig 2008-02-07 12:42:47.294141832 +0000
++++ interfaces/xmaxima/Tkmaxima/Constants.tcl 2008-02-07 12:43:02.539010587 +0000
+@@ -143,9 +143,9 @@
+ image/gif netmath
+ image/png netmath
+ image/jpeg netmath
+- application/postscript "ghostview -safer %s"
+- application/pdf "acroread %s"
+- application/x-dvi "xdvi %s"
++ application/postscript "xdg-open -safer %s"
++ application/pdf "xdg-open %s"
++ application/x-dvi "xdg-open %s"
+ }
+ set maxima_priv(imagecounter) 0
+