[elephant-cvs] CVS elephant
ieslick
ieslick at common-lisp.net
Mon Mar 19 20:35:31 UTC 2007
Update of /project/elephant/cvsroot/elephant
In directory clnet:/tmp/cvs-serv22128
Modified Files:
TODO config.sexp ele-bdb.asd elephant.asd
Log Message:
Path creation changes for win32 (need to remove cl-ppcre dependencies)
--- /project/elephant/cvsroot/elephant/TODO 2007/03/19 19:41:35 1.72
+++ /project/elephant/cvsroot/elephant/TODO 2007/03/19 20:35:30 1.73
@@ -11,17 +11,10 @@
TASKS TO GET TO BETA:
-Bugs:
-- Lispworks/Mac: error in finalize indexed class
-- Lispworks/Mac: %oid missing in BDB-BTREE on close
-- Lispworks/Mac: fix warning in ensure-class-using-class :around (eql nil) method
-- Fix build for Win32 (Frank)
-
Migration:
- Validate SQL migration 0.6.0->0.6.1 (Robert)
Lisp Support:
-- Validate Lispworks on Mac
- Validate Lispworks on PC
- Validate OpenMCL pre-1.1 on Mac OS X
- Validate OpenMCL 1.1 and/or 64-bit on Mac OS X?
--- /project/elephant/cvsroot/elephant/config.sexp 2007/02/22 20:19:57 1.7
+++ /project/elephant/cvsroot/elephant/config.sexp 2007/03/19 20:35:30 1.8
@@ -1,11 +1,38 @@
-((:berkeley-db-include-dir . "/opt/local/BerkeleyDB.4.5/")
+#+(or sbcl allegro)
+((:berkeley-db-include-dir . "/opt/local/include/db45/")
(:berkeley-db-lib-dir . "/opt/local/lib/db45/")
- (:berkeley-db-lib . "/opt/local/BerkeleyDB.4.5/lib/libDB-4.5.dylib")
+ (:berkeley-db-lib . "/opt/local/lib/db45/libdb-4.5.dylib")
(:berkeley-db-deadlock . "/opt/local/bin/db45_deadlock")
(:pthread-lib . nil)
(:clsql-lib . nil)
(:compiler . :gcc))
+#+openmcl
+((:berkeley-db-include-dir . "/usr/local/BerkeleyDB.4.5/include/")
+ (:berkeley-db-lib-dir . "/usr/local/BerkeleyDB.4.5/lib/")
+ (:berkeley-db-lib . "/usr/local/BerkeleyDB.4.5/lib/libdb-4.5.dylib")
+ (:pthread-lib . nil)
+ (:clsql-lib . nil)
+ (:compiler . :gcc))
+
+#+(and lispworks (not windows))
+((:berkeley-db-include-dir . "/opt/local/include/db45/")
+ (:berkeley-db-lib-dir . "/opt/local/lib/db45/")
+ (:berkeley-db-lib . "/opt/local/lib/db45/libdb-4.5.dylib")
+ (:berkeley-db-deadlock . "/opt/local/bin/db45_deadlock")
+ (:pthread-lib . nil)
+ (:clsql-lib . nil)
+ (:compiler . :gcc))
+
+#+(or mswindows windows)
+((:berkeley-db-include-dir . "C:/Programme/Oracle/Berkeley DB 4.5.20/include/")
+ (:berkeley-db-lib-dir . "C:/Programme/Oracle/Berkeley DB 4.5.20/bin/")
+ (:berkeley-db-lib . "C:/Programme/Oracle/Berkeley DB 4.5.20/bin/libdb45.dll")
+ (:berkeley-db-deadlock . "C:/Programme/Oracle/Berkeley DB 4.5.20/bin/db_deadlock.exe")
+ (:pthread-lib . nil)
+ (:clsql-lib . nil)
+ (:compiler . :cygwin))
+
;; Berkeley 4.5 is required, each system will have different settings for
;; these directories, use this as an indication of what each key means
;;
--- /project/elephant/cvsroot/elephant/ele-bdb.asd 2007/03/18 20:40:50 1.22
+++ /project/elephant/cvsroot/elephant/ele-bdb.asd 2007/03/19 20:35:30 1.23
@@ -27,6 +27,18 @@
;; Compile bdb lib and load libraries
;;
+#+(or windows mswindows)
+(defun path-for-cygwin (path)
+ "DOS pathname -> cygwin pathname. Replace backslashes with slashes and drive letter with directory.
+\"C:\\dir\\\" -> \"/C/dir\" (drive C: must be mounted as /C/ in cgwin."
+ (let ((result (namestring path)))
+ (setf result (cl-ppcre:regex-replace "([A-Z]):"
+ result
+ #'(lambda (match &rest registers)
+ (format nil "/~a" (first registers)))
+ :simple-calls t))
+ (setf result (cl-ppcre:regex-replace-all "\\" result "/"))))
+
(defclass bdb-c-source (elephant-c-source) ())
(defmethod compiler-options ((compiler (eql :gcc)) (c bdb-c-source) &key &allow-other-keys)
@@ -38,18 +50,18 @@
(subseq (pathname-name
(make-pathname :defaults (get-config-option :berkeley-db-lib c)) )
3))
-
(defmethod compiler-options ((compiler (eql :cygwin)) (c bdb-c-source) &key &allow-other-keys)
(append (library-directories c)
- (call-next-method)
- (list "-ldb45")))
+ (list "-ldb45")
+ (call-next-method)))
(defun library-directories (c)
(let ((include (make-pathname :defaults (get-config-option :berkeley-db-include-dir c)))
(lib (make-pathname :defaults (get-config-option :berkeley-db-lib-dir c))))
#+(or windows mswindows)
- (list (format nil "-L\"~A\"" lib) (format nil "-I\"~A\"" include))
+ (list (format nil "-L'~A'" (path-for-cygwin lib))
+ (format nil "-I'~A'" (path-for-cygwin include)))
#-(or windows mswindows)
(list (format nil "-L~A" lib) (format nil "-I~A" include))))
--- /project/elephant/cvsroot/elephant/elephant.asd 2007/03/16 14:44:44 1.37
+++ /project/elephant/cvsroot/elephant/elephant.asd 2007/03/19 20:35:30 1.38
@@ -97,7 +97,8 @@
#+(or mswindows windows)
(progn
(let* ((pathname (component-pathname c))
- (directory (directory-namestring pathname))
+ (directory #+lispworks (make-pathname :host (pathname-host pathname) :directory (pathname-directory pathname))
+ #-lispworks (make-pathname :device (pathname-device pathname) :directory (pathname-directory pathname)))
(stdout-lines) (stderr-lines) (exit-status))
(let ((command (format nil "~A ~{~A ~}"
(c-compiler-path c)
More information about the Elephant-cvs
mailing list