Commit ad6df2d9 authored by Dave Cooper's avatar Dave Cooper
Browse files

Added directives for ABCL up thru gdl/geom-base/prereqs/source/package.lisp --...

Added directives for ABCL up thru gdl/geom-base/prereqs/source/package.lisp -- ABCL does not do package redefinition, so we have to re-work our package definitions to do explicit export's, use's,s etc instead of relying on the defpackage :export's and :use's etc having any effect for redefinitions.
parent 975275a9
......@@ -21,41 +21,59 @@
(in-package :gdl)
#+ecl (error "
#+abcl (error "GenDL is not yet supported on ABCL. The first problem is something to do with meta-object GDL-CLASS
which is supposed to be the meta-class of our VANILLA-MIXIN. To see the error, comment out this #+abcl and error
in gdl/base/common/genworks.lisp, and try (ql:quickload :gdl-base). Then you will see the error. If you know
something about it, please email open-source@genworks.com.~%")
#+ecl (error "D'oh! GenDL is not yet supported on ECL. If you would like to try porting it, start with the file
D'oh! GenDL is not yet supported on ECL. If you would like to try porting it, start with the file
gdl/base/common/genworks.lisp.
Also, PortableAllegroserve is needed for the web framework.
If you are interested in this effort we would love to hear from you at open-source@genworks.com.~%")
If you are interested in this effort we would love to hear from you at open-source@genworks.com.
")
#+clisp (error "
#+clisp (error "D'oh! GenDL is not yet supported on CLISP. If you would like to try porting it, start with the file,
D'oh! GenDL is not yet supported on CLISP. If you would like to try porting it, start with the file,
gdl/base/common/genworks.lisp.
Also, PortableAllegroserve is needed for the web framework.
If you are interested in this effort we would love to hear from you at open-source@genworks.com.~%")
If you are interested in this effort we would love to hear from you at open-source@genworks.com.
#+scl (error "D'oh! GenDL is not yet supported on Scieneer CL. If you would like to try porting it, start with the file,
")
#+scl (error "
D'oh! GenDL is not yet supported on Scieneer CL. If you would like to try porting it, start with the file,
gdl/base/common/genworks.lisp.
Also, PortableAllegroserve is needed for the web framework.
If you are interested in this effort we would love to hear from you at open-source@genworks.com.~%")
If you are interested in this effort we would love to hear from you at open-source@genworks.com.
")
#+genera (error "D'oh! GenDL is not yet supported on Genera. If you would like to try porting it, start with the file,
#+genera (error "
D'oh! GenDL is not yet supported on Genera. If you would like to try porting it, start with the file,
gdl/base/common/genworks.lisp.
Also, PortableAllegroserve is needed for the web framework.
If you are interested in this effort we would love to hear from you at open-source@genworks.com.~%")
If you are interested in this effort we would love to hear from you at open-source@genworks.com.
")
#+corman (error "
#+corman (error "D'oh! GenDL is not yet supported on Corman Lisp. If you would like to try porting it, start with the file,
D'oh! GenDL is not yet supported on Corman Lisp. If you would like to try porting it, start with the file,
gdl/base/common/genworks.lisp.
Also, PortableAllegroserve is needed for the web framework.
If you are interested in this effort we would love to hear from you at open-source@genworks.com.~%")
If you are interested in this effort we would love to hear from you at open-source@genworks.com.
")
#-(or allegro lispworks sbcl ccl abcl ecl clisp scl genera)
(error "GenDL is not yet supported on this Lisp. By the way, what Lisp
is this? Please let us know at open-source@genworks.com.~%")
(error "
GenDL is not yet supported on this Lisp. By the way, what Lisp
is this? Please let us know at open-source@genworks.com.
")
#-(or allegro lispworks sbcl ccl abcl) (error "Need package for mop:validate-superclass for currently running lisp.~%")
......
......@@ -32,16 +32,34 @@
#:temporary-folder
#:temporary-file)))
;;
;; For good meausure for e.g. ABCL which doesn't modify package definitions:
;;
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(*fasl-extension*
concatenate-fasls
directory-list
file-directory-p
temporary-folder
temporary-file) :glisp))
(defparameter *fasl-extension*
#+allegro excl:*fasl-default-type*
#+lispworks compiler:*fasl-extension-string*
#+sbcl sb-fasl:*fasl-file-type*
#+ccl ccl:*.fasl-pathname*
#-(or allegro lispworks sbcl ccl) (error "Need fasl extension string for the currently running lisp.~%"))
#+abcl "abcl"
#-(or allegro lispworks sbcl ccl abcl) (error "Need fasl extension string for the currently running lisp.~%"))
#-(or allegro lispworks sbcl ccl)
(warn "~&Please implement concatenate-fasls for the currently running lisp.~%")
(defun concatenate-fasls (files dest)
#-(or allegro lispworks sbcl ccl) (declare (ignore files dest))
#-(or allegro lispworks sbcl ccl) (error "~&Please implement concatenate-fasls for the currently running lisp.~%")
#+(or allegro sbcl)
;;
......@@ -100,8 +118,11 @@ and \"..\" entries."
(directory (merge-pathnames *wild-entry* pathspec)
:resolve-symlinks nil)
#+ccl
(directory (merge-pathnames *wild-entry* directory)
:directories t))
(directory (merge-pathnames *wild-entry* pathspec)
:directories t)
#+abcl
(directory (merge-pathnames *wild-entry* pathspec)
:resolve-symlinks nil))
(defun file-directory-p (file)
......
......@@ -10,7 +10,17 @@
#:set-gs-path)))
#-(or allegro lispworks sbcl ccl) (error "Need implementation for get-pid for currently running lisp~%")
;;
;; For good meausure for e.g. ABCL which doesn't modify package definitions:
;;
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(get-pid run-gs run-shell-command set-gs-path) :glisp))
#+abcl (use-package (list :common-lisp :gdl :geom-base) :gdl-user)
#-(or allegro lispworks sbcl ccl abcl) (error "Need implementation for get-pid for currently running lisp~%")
(defun get-pid ()
#+allegro (excl.osi:getpid)
#+lispworks (multiple-value-bind (status pid)
......@@ -19,7 +29,47 @@
(declare (ignore status))
(read-from-string pid))
#+sbcl (sb-posix:getpid)
#+ccl (ccl::getpid))
#+ccl (ccl::getpid)
;;
;; This ABCL implementation is lifted from Quicklisp's
;; slime-20121125-cvs/swank-abcl.lisp:
;;
#+abcl
(handler-case
(let* ((runtime
(java:jstatic "getRuntime" "java.lang.Runtime"))
(command
(java:jnew-array-from-array
"java.lang.String" #("sh" "-c" "echo $PPID")))
(runtime-exec-jmethod
;; Complicated because java.lang.Runtime.exec() is
;; overloaded on a non-primitive type (array of
;; java.lang.String), so we have to use the actual
;; parameter instance to get java.lang.Class
(java:jmethod "java.lang.Runtime" "exec"
(java:jcall
(java:jmethod "java.lang.Object" "getClass")
command)))
(process
(java:jcall runtime-exec-jmethod runtime command))
(output
(java:jcall (java:jmethod "java.lang.Process" "getInputStream")
process)))
(java:jcall (java:jmethod "java.lang.Process" "waitFor")
process)
(loop :with b :do
(setq b
(java:jcall (java:jmethod "java.io.InputStream" "read")
output))
:until (member b '(-1 #x0a)) ; Either EOF or LF
:collecting (code-char b) :into result
:finally (return
(parse-integer (coerce result 'string)))))
(t () 0))
)
(defun run-gs (command)
......
File mode changed from 100755 to 100644
......@@ -21,7 +21,7 @@
(in-package :geom-base)
(eval-when (compile load eval)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defmacro make-vector (&rest args)
"0D, 1D, 2D, 3D, or 4D Vector. (Internally this is the same as a Point) Returns a vector of double-floats from up to 4 numbers."
(let ((array (gensym)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment