source: trunk/abcl/contrib/mvn/jna.asd @ 14191

Last change on this file since 14191 was 14191, checked in by Mark Evenson, 8 years ago

Cut the crap.

File size: 971 bytes
Line 
1;;;; -*- Mode: LISP -*-
2
3;;;; Need to have jna.jar present for CFFI to have a chance of working.
4(asdf:defsystem :jna
5    :version "3.4.0"
6    :defsystem-depends-on (jss abcl-asdf))
7;; FIXME:  install a better handler in abcl-asdf  :components ((:mvn "net.java.dev.jna/jna/3.4.0")))
8
9(defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system :jna))))
10  (when (jss:find-java-class "com.sun.jna.Native")
11    (provide :jna)))
12
13(defmethod asdf:perform :before ((o asdf:load-op) (c (eql (asdf:find-system :jna))))
14  ;; Theoretically this should be the same thing as the MVN component.
15  (handler-case
16      (unless (jss:find-java-class "com.sun.jna.Native")
17        (unless (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0"))
18          (java:add-to-classpath "http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")))
19    (t (e)
20      (error "Failed to resolve 'jna.jar' because~&~A." e))))
21
22                         
Note: See TracBrowser for help on using the repository browser.