Normalize ASDF definitions to follow best practices

c.f. <https://gitlab.common-lisp.net/asdf/asdf/blob/master/doc/best_practices.md>
parent 247a6de5
;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
(require :asdf)
(in-package :asdf)
(defsystem abcl
:version "1.5.0"
:in-order-to ((test-op (test-op "abcl/test/lisp"))))
......
;;;; -*- Mode: LISP -*-
(in-package :cl-user)
(asdf:defsystem :abcl-asdf-tests
(defsystem abcl-asdf-tests
:author "Mark Evenson"
:long-description "<urn:abcl.org/release/1.5.0/contrib/abcl-asdf/test#>"
:version "1.6.0"
......
;;;; -*- Mode: LISP -*-
(in-package :cl-user)
(asdf:defsystem :abcl-asdf
(defsystem abcl-asdf
:author "Mark Evenson"
:description "Extensions to ASDF for handling Java binary artifacts."
:long-description "<urn:abcl.org/release/1.5.0/contrib/abcl-asdf#>"
......@@ -9,15 +7,13 @@
:depends-on (jss)
:components
((:module package :pathname ""
:components
((:file "package")))
:components ((:file "package")))
(:module base :pathname ""
:components
((:file "abcl-asdf")
(:file "asdf-jar"
:depends-on ("abcl-asdf"))
(:file "maven-embedder"
:depends-on ("abcl-asdf" "asdf-jar")))
:components ((:file "abcl-asdf")
(:file "asdf-jar"
:depends-on ("abcl-asdf"))
(:file "maven-embedder"
:depends-on ("abcl-asdf" "asdf-jar")))
:depends-on (package)))
:in-order-to ((asdf:test-op (asdf:test-op abcl-asdf-tests))))
:in-order-to ((test-op (test-op abcl-asdf-tests))))
......@@ -54,9 +54,8 @@
(defmethod operation-done-p ((operation compile-op) (c jar-directory))
t)
(defclass jar-file (static-file) ())
(defmethod source-file-type ((c jar-file) (s module)) "jar")
(defclass jar-file (static-file)
((type :initform "jar")))
(defmethod perform ((operation compile-op) (c jar-file))
(java:add-to-classpath (component-pathname c)))
......
;;;; -*- Mode: LISP -*-
(in-package :cl-user)
(asdf:defsystem :abcl-introspect
(defsystem abcl-introspect
:author "Alan Ruttenberg"
:description "Introspection on compiled function to aid source location and other debugging functions."
:long-description "<urn:abcl.org/release/1.5.0/contrib/abcl-introspect#>"
......
;;;; -*- Mode: LISP -*-
(in-package :asdf)
(defsystem :asdf-jar
(defsystem asdf-jar
:author "Mark Evenson"
:description "Packaging ASDF systems into jar files"
:long-description "<urn:abcl.org/release/1.5.0/contrib/asdf-jar#>"
:version "0.3.2"
:components
((:module base :pathname "" :components
((:file "asdf-jar")
(:static-file "README.markdown")))))
:components ((:module base
:pathname ""
:components ((:file "asdf-jar")
(:static-file "README.markdown")))))
(require :asdf)
(asdf:defsystem jfli
;;;; -*- Mode: LISP -*-
(defsystem jfli
:long-description "<urn:abcl.org/release/1.5.0/contrib/jfli#>"
:version "0.2.0"
:components ((:file "jfli")))
;;; Requires integration with IntelliJ IDEA editor (free download)
(asdf:defsystem jfli/intellij-tests
(defsystem jfli/intellij-tests
:version "0.2.0"
:depends-on (jfli)
:components ((:module test
:components ((:file "yanking")))))
:components ((:file "yanking")))))
(require :asdf)
(in-package :cl-user)
(asdf:defsystem jss-tests
;;;; -*- Mode: LISP -*-
(defsystem jss-tests
:defsystem-depends-on (quicklisp-abcl
prove-asdf)
:depends-on (jss
......
(require :asdf)
(in-package :cl-user)
(asdf:defsystem jss
;;;; -*- Mode: LISP -*-
(defsystem jss
:author "Alan Ruttenberg, Mark Evenson"
:long-description "<urn:abcl.org/release/1.5.0/contrib/jss#>"
:version "3.2.3"
......
(in-package :cl-user)
(defpackage jna
(:nicknames :jna)
(:use :cl
:asdf))
(in-package :jna)
(defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system :jna))))
(when (jss:find-java-class "com.sun.jna.Native")
(provide :jna)))
;;;; -*- Mode: LISP -*-
(require :asdf)
(in-package :cl-user)
;;;; Need to have jna.jar present for CFFI to work.
(asdf:defsystem :jna
(defsystem jna
:long-description "<urn:abcl.org/release/1.5.0/contrib/jna#4.2.2>"
:version "4.2.2"
:defsystem-depends-on (jss abcl-asdf)
:components ((:mvn "net.java.dev.jna/jna/4.2.2"
:alternate-uri "http://repo1.maven.org/maven2/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar"
:classname "com.sun.jna.Native")))
(defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system :jna))))
(when (jss:find-java-class "com.sun.jna.Native")
(provide :jna)))
:alternate-uri "http://repo1.maven.org/maven2/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar"
:classname "com.sun.jna.Native")))
;;;; -*- Mode: LISP -*-
(require :asdf)
(in-package :cl-user)
(asdf:defsystem :log4j
(defsystem log4j
:defsystem-depends-on (abcl-asdf)
:components ((:module log4j.jar
:components ((:mvn "log4j/log4j")))))
......
;;;; -*- Mode: LISP -*-
(require :asdf)
(in-package :cl-user)
(asdf:defsystem quicklisp-abcl
(defsystem quicklisp-abcl
:description "Load Quicklisp from the network if it isn't already installed."
:long-name "<urn:abcl.org/release/1.5.0/contrib/quicklisp-abcl#>"
:version "0.5.1"
:components nil)
:components ((:file "quicklisp-abcl")))
(defvar cl-user::*quicklisp-parent-dir* (user-homedir-pathname)
"Pathname reference to the parent directory of the local Quicklisp installation")
(defmethod asdf:perform ((o asdf:load-op) (c (eql (asdf:find-system :quicklisp-abcl))))
(let* ((setup-base (merge-pathnames "quicklisp/setup"
cl-user::*quicklisp-parent-dir*))
(setup-source (probe-file (make-pathname :defaults setup-base
:type "lisp")))
(setup-fasl (probe-file (make-pathname :defaults setup-base
:type "abcl"))))
(if setup-source
;;; First try loading the Quicklisp setup as compiled fasl if it exists
(if setup-fasl
(handler-case
(load setup-fasl)
;; Sometimes the fasl is invalid; if so, load source, and recompile
(error (e)
(when setup-source
(load setup-source)
(compile-file setup-source))))
;; compilation only succeeds after QUICKLISP has been loaded fully
(when setup-source
(load setup-source)
(compile-file setup-source)))
;;; Otherwise execute the quicklisp startup sequence
(progn
(handler-case
(load "https://beta.quicklisp.org/quicklisp.lisp")
(error (e)
(warn "Using insecure transport for remote installation of Quicklisp:~&~A~&." e)
(load "http://beta.quicklisp.org/quicklisp.lisp")))))
(unless (find-package :quicklisp)
(uiop:symbol-call :quicklisp-quickstart '#:install
:path (merge-pathnames "quicklisp/" cl-user::*quicklisp-parent-dir*)))))
......
(in-package :cl-user)
(defpackage quicklisp-abcl
(:nicknames :quicklisp-abcl)
(:use :cl
:asdf)
(:export :*quicklisp-parent-dir*))
(in-package :quicklisp-abcl)
(defvar *quicklisp-parent-dir* (user-homedir-pathname)
"Pathname reference to the parent directory of the local Quicklisp installation")
(defmethod asdf:perform ((o asdf:load-op) (c (eql (asdf:find-system :quicklisp-abcl))))
(when (find :quicklisp *features*)
(return-from asdf:perform))
(let* ((setup-base
(merge-pathnames "quicklisp/setup"
*quicklisp-parent-dir*))
(setup-source
(probe-file (make-pathname :defaults setup-base
:type "lisp")))
(setup-fasl
(probe-file (make-pathname :defaults setup-base
:type "abcl"))))
(if setup-source
;;; First try loading the Quicklisp setup as a compiled fasl if it exists
(if setup-fasl
(handler-case
(load setup-fasl)
;; The fasl may be invalid (i.e. between abcl versions); if so, load source, and recompile
(error (e)
(declare (ignore e))
(when setup-source
(load setup-source)
(compile-file setup-source))))
;; compilation only succeeds after QUICKLISP has been loaded fully
(when setup-source
(load setup-source)
(compile-file setup-source)))
;;; Otherwise download Quicklisp and run its installation sequence
(progn
(handler-case
(load "https://beta.quicklisp.org/quicklisp.lisp")
(error (e)
(warn "Using insecure transport for remote installation of Quicklisp:~&~A~&." e)
(load "http://beta.quicklisp.org/quicklisp.lisp")))
(uiop:symbol-call :quicklisp-quickstart '#:install
:path (merge-pathnames "quicklisp/" *quicklisp-parent-dir*))))))
;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
(require 'asdf)
(in-package :asdf)
(defsystem :abcl-tools :version "0.1.0" :components
((:module src :pathname "" :components
((:file "digest")
(:file "code-grapher")))))
\ No newline at end of file
(defsystem abcl-tools
:version "0.1.0"
:components ((:module src
:pathname ""
:components ((:file "digest")
(:file "code-grapher")))))
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 sign in to comment