summaryrefslogtreecommitdiff
path: root/sci-mathematics/maxima/files/ecls-1.patch
blob: 36e9af17bb6fcb4154dfff5272fcab9f15c79494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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)