Start sketching out what it would take to download Ant

ABCL-BUILD:INSTALL will unpack various formats.

ABCL only implementation for now.

The ASDF system ABCL/T introduces a PROVE testing framework, which the
author finds much more useful than RT.  An eventual migration is
planned for ABCL/TEST/LISP.
parent 063e6a3a
This diff is collapsed.
......@@ -3,14 +3,6 @@
#+abcl
(require 'format)
(defpackage build-abcl
(:use "COMMON-LISP")
(:export #:build-abcl #:make-dist)
#+abcl (:import-from #:extensions #:run-shell-command #:probe-directory)
#+allegro (:import-from #:excl #:probe-directory)
#+clisp (:import-from #:ext #:probe-directory)
)
(in-package #:build-abcl)
(defun comp (string char)
......@@ -51,32 +43,6 @@ is infact a child of it while being rooted at the same root as `parent'."
;; Platform detection.
(defun platform ()
#-clisp
(let ((software-type (software-type)))
(cond ((search "Linux" software-type)
:linux)
((or (search "Mac OS X" software-type) ; abcl
(search "Darwin" software-type)) ; sbcl
:darwin)
((search "Windows" software-type)
:windows)
(t
:unknown)))
#+clisp
(cond ((member :win32 *features*)
:windows)
((equal 0 (ext:run-shell-command "uname | grep -i darwin" :output nil))
:darwin)
((equal 0 (ext:run-shell-command "uname | grep -i linux" :output nil))
:linux)
(t
:unknown)))
(defparameter *platform* (platform))
(defparameter *file-separator-char*
(if (eq *platform* :windows) #\\ #\/))
......
......@@ -19,20 +19,8 @@
(in-package "BUILD-ABCL")
;; Standard compiler options.
(setq *javac-options* "-g")
(setq *jikes-options* "+D -g")
;; *PLATFORM* will be either :WINDOWS, :DARWIN, :LINUX, or :UNKNOWN.
(case *platform*
(:windows
(setq *jdk* "C:\\Program Files\\Java\\jdk1.5.0_16\\")
#+nil (setq *java-compiler* "jikes")
)
(:darwin
(setq *jdk* "/usr/")
#+nil (setq *java-compiler* "jikes")
#+nil (setq *jar* "jar"))
((:linux :unknown)
(setq *jdk* "/home/peter/sun/jdk1.5.0_16/")
(setq *jar* "fastjar")))
#-abcl (error "Sorry, but this only currently works with the Bear.")
(in-package :abcl-build)
(require :asdf)
(defgeneric install ((uri pathname) &key
(type :unpack/zip)))
(defmethod install ((uri pathname) &key
(type :unpack/zip))
(install-zip uri type))
(defun install-zip (uri binary-unzip)
(let ((directory (make-pathname :defaults uri :host nil :device nil :name nil :version nil))
(archive (make-pathname :defaults uri :host nil :device nil :directory nil)))
(ensure-directories-exist directory)
(uiop:copy-file
(open uri :direction :input)
(merge-pathnames archive directory))))
(defpackage build-abcl
(:use "COMMON-LISP")
(:nicknames "ABCL-BUILD" "ABCL/BUILD")
(:export
#:install
#:platform
;; Deprecated
#:build-abcl
#:make-dist)
#+abcl
(:import-from #:extensions #:run-shell-command #:probe-directory)
#+allegro
(:import-from #:excl #:probe-directory)
#+clisp
(:import-from #:ext #:probe-directory))
(require :asdf)
(in-package abcl/build)
;; Platform detection.
(defun platform ()
#-clisp
(let ((software-type (software-type)))
(cond ((search "Linux" software-type)
:linux)
((or (search "Mac OS X" software-type) ; abcl
(search "Darwin" software-type)) ; sbcl
:darwin)
((search "Windows" software-type)
:windows)
(t
:unknown)))
#+clisp
(cond ((member :win32 *features*)
:windows)
((equal 0 (ext:run-shell-command "uname | grep -i darwin" :output nil))
:darwin)
((equal 0 (ext:run-shell-command "uname | grep -i linux" :output nil))
:linux)
(t
:unknown)))
(defparameter *platform* (platform))
;; *PLATFORM* will be either :WINDOWS, :DARWIN, :LINUX, or :UNKNOWN.
(case *platform*
(:windows
(setq *jdk* "C:\\Program Files\\Java\\jdk1.5.0_16\\")
#+nil (setq *java-compiler* "jikes")
)
(:darwin
(setq *jdk* "/usr/")
#+nil (setq *java-compiler* "jikes")
#+nil (setq *jar* "jar"))
((:linux :unknown)
(setq *jdk* "/home/peter/sun/jdk1.5.0_16/")
(setq *jar* "fastjar")))
(in-package abcl/test/t)
(plan 1)
(let ((path (ext:make-temp-directory))
(uri #p"http://www-eu.apache.org/dist/ant/binaries/apache-ant-1.10.1-bin.zip"))
(diag (format nil "Testing binary unzip installation of <~a> to '~a'." uri path))
(build-abcl:install uri :type :unpack/zip)
(ok
(directory (merge-pathnames "*.*" path))))
(finalize)
(defpackage abcl/test/t
(:use :cl :prove)
(:export
#:install))
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