You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-mathematics/maxima/files/ecls-3.patch

49 lines
2.1 KiB

diff -r -U3 maxima-5.42.0.orig/src/maxima.in maxima-5.42.0/src/maxima.in
--- maxima-5.42.0.orig/src/maxima.in 2018-09-21 08:21:11.000000000 +0700
+++ maxima-5.42.0/src/maxima.in 2018-10-01 21:49:23.551633882 +0700
@@ -236,7 +236,7 @@
fi
elif [ "$MAXIMA_LISP" = "ecl" ]; then
- exec "$maxima_image_base" --frame-stack 4096 --lisp-stack 65536 $MAXIMA_LISP_OPTIONS -- "$@"
+ exec "$maxima_image_base" --frame-stack 4096 --lisp-stack 65536 $MAXIMA_LISP_OPTIONS -norc -- "$@"
elif [ "$MAXIMA_LISP" = "sbcl" ]; then
# Use executable image if it exists.
diff -r -U3 maxima-5.42.0.orig/src/maxima.system maxima-5.42.0/src/maxima.system
--- maxima-5.42.0.orig/src/maxima.system 2016-12-04 05:27:40.000000000 +0700
+++ maxima-5.42.0/src/maxima.system 2018-10-01 22:01:08.068604254 +0700
@@ -59,6 +59,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)
@@ -75,11 +83,16 @@
;; 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 ""))) (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)
(cl-user::run)))))))