;;
;; file: vimage.cl
;; author: cyrus harmon
;; time-stamp: Fri Apr 23 12:19:55 EDT 2004
;;
(in-package :vimage)
(defun add-logical-pathname-translation (host log phy)
(let ((q (assoc log (logical-pathname-translations host) :test #'equalp)))
(if q
(rplacd q (list phy))
(setf (logical-pathname-translations host)
(append (list (list log phy))
(logical-pathname-translations host)
)))))
(defun local-directory (&rest path)
(print (merge-pathnames
(make-pathname :directory (apply 'list :relative :up :up path))
(make-pathname :directory (pathname-directory *load-truename*)))))
(print *load-truename*)
(add-logical-pathname-translation "ccl"
#4P"ccl:darwin-headers;vimage;**;*.*"
(merge-pathnames
"**/*.*"
(local-directory "darwin-headers" "vimage")))
(add-logical-pathname-translation "ccl"
#4P"ccl:darwin-headers;vimage;*.*"
(merge-pathnames
"*.*"
(local-directory "darwin-headers" "vimage")))
(open-shared-library "/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage")
(ccl:use-interface-dir :vimage)
So I used it:
CL-USER> (ccl::setenv "CCL_DEFAULT_DIRECTORY" "/Users/david/usr/src/ccl/")
0
CL-USER> (defun cl-user::set-ccl-path (path)
(setf (logical-pathname-translations "ccl")
`(("ccl;*.*" ,(merge-pathnames "*.*" path))
("**;*.*" ,(merge-pathnames "**/*.*" path)))))
SET-CCL-PATH
CL-USER> (set-ccl-path (ccl::ccl-directory))
(("ccl;*.*" #P"/Users/david/usr/src/ccl/*.*") ("**;*.*" #P"/Users/david/usr/src/ccl/**/*.*"))
CL-USER> (describe 'ccl::setenv)
Symbol: CCL::SETENV
Function
INTERNAL in package: #<Package "CCL">
Print name: "SETENV"
Value: #<Unbound>
Function: #<Compiled-function CCL::SETENV #x60E1E46>
Arglist: (CCL::KEY CCL::VALUE &OPTIONAL CCL::OVERWRITE)
Plist: NIL
; No value
CL-USER> #$kCFStringEncodingASCII
1536
I still don't really understand it, but this is what it takes for OpenMCL to find the CDB
Interface files when running from an application bundle on OS X.