From: Carlo Zancanaro <carlo@zancanaro.id.au>
To: 37439@debbugs.gnu.org
Subject: [bug#37439] [PATCH] Add abcl.
Date: Tue, 17 Sep 2019 22:29:14 +1000 [thread overview]
Message-ID: <87sgovrtr9.fsf@zancanaro.id.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 416 bytes --]
Hey Guix!
Here's another patch! This one adds a new Common Lisp
implementation: ABCL on the JVM.
When I added Kawa we ended up deciding to put it in its own
package (in kawa.scm). I wasn't sure whether it was a good idea to
do that for ABCL, too, so I just put it in java.scm for now. Feel
free to move it to its own package (or ask me to do so) if you'd
rather. It might even fit better in lisp.scm.
Carlo
[-- Attachment #2: 0001-gnu-Add-abcl.patch --]
[-- Type: text/x-diff, Size: 6736 bytes --]
From 34c731278669102b0449a4b0cad25274be0e07f2 Mon Sep 17 00:00:00 2001
From: Carlo Zancanaro <carlo@zancanaro.id.au>
Date: Tue, 17 Sep 2019 22:01:01 +1000
Subject: [PATCH] gnu: Add abcl.
* gnu/packages/java.scm (abcl): New variable.
* gnu/packages/patches/abcl-fix-build-xml.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/java.scm | 65 ++++++++++++++++++-
gnu/packages/patches/abcl-fix-build-xml.patch | 37 +++++++++++
3 files changed, 102 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/abcl-fix-build-xml.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 3f32b9cbf2..a0307b5e23 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -669,6 +669,7 @@ dist_patch_DATA = \
%D%/packages/patches/a2ps-CVE-2001-1593.patch \
%D%/packages/patches/a2ps-CVE-2014-0466.patch \
%D%/packages/patches/a2ps-CVE-2015-8107.patch \
+ %D%/packages/patches/abcl-fix-build-xml.patch \
%D%/packages/patches/abiword-explictly-cast-bools.patch \
%D%/packages/patches/abiword-black-drawing-with-gtk322.patch \
%D%/packages/patches/acl-fix-perl-regex.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 403c446a82..1999f31798 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
-;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
+;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
@@ -11109,3 +11109,66 @@ network protocols, and core version control algorithms.")
`(("java-javaewah" ,java-javaewah)
("java-jsch" ,java-jsch)
("java-slf4j-api" ,java-slf4j-api)))))
+
+(define-public abcl
+ (package
+ (name "abcl")
+ (version "1.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://abcl.org/releases/"
+ version "/abcl-src-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"))
+ (patches
+ (search-patches
+ "abcl-fix-build-xml.patch"))))
+ (build-system ant-build-system)
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (arguments
+ `(#:build-target "abcl.jar"
+ #:test-target "abcl.test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((share (string-append (assoc-ref outputs "out")
+ "/share/java/"))
+ (bin (string-append (assoc-ref outputs "out")
+ "/bin/")))
+ (mkdir-p share)
+ (install-file "dist/abcl.jar" share)
+ (install-file "dist/abcl-contrib.jar" share)
+ (mkdir-p bin)
+ (with-output-to-file (string-append bin "abcl")
+ (lambda _
+ (let ((classpath (string-append
+ share "abcl.jar"
+ ":"
+ share "abcl-contrib.jar")))
+ (display (string-append
+ "#!" (which "sh") "\n"
+ "if [[ -z $CLASSPATH ]]; then\n"
+ " cp=\"" classpath "\"\n"
+ "else\n"
+ " cp=\"" classpath ":$CLASSPATH\"\n"
+ "fi\n"
+ "exec " (which "java") " -cp $cp org.armedbear.lisp.Main $@\n")))))
+ (chmod (string-append bin "abcl") #o755)
+ #t))))))
+ (home-page "https://abcl.org/")
+ (synopsis "Common Lisp Implementation on the JVM")
+ (description
+ "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
+Lisp language featuring both an interpreter and a compiler, running in the
+JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
+in any Java application. Additionally, it can be used to implement (parts of)
+the application using Java to Lisp integration APIs.")
+ (license (list license:gpl2+
+ ;; named-readtables is released under 3 clause BSD
+ license:bsd-3
+ ;; jfli is released under CPL 1.0
+ license:cpl1.0))))
diff --git a/gnu/packages/patches/abcl-fix-build-xml.patch b/gnu/packages/patches/abcl-fix-build-xml.patch
new file mode 100644
index 0000000000..0c21491b74
--- /dev/null
+++ b/gnu/packages/patches/abcl-fix-build-xml.patch
@@ -0,0 +1,37 @@
+ABCL's build calls the hostname command, and needs the internet to download
+JUnit. Neither of these are really required, though, so we can patch them out
+to make it build.
+
+--- a/build.xml
++++ b/build2.xml
+@@ -327,7 +327,7 @@ from ${abcl.home.dir}
+ <property name="abcl.build.path"
+ value="${build.classes.dir}/org/armedbear/lisp/build"/>
+ <target name="abcl.stamp"
+- depends="abcl.compile,abcl.stamp.version,abcl.stamp.hostname">
++ depends="abcl.compile,abcl.stamp.version">
+ <mkdir dir="${abcl.build.path}/.."/>
+ <loadfile property="abcl.version"
+ srcFile="${abcl.version.path}"/>
+@@ -455,11 +455,6 @@ from ${abcl.home.dir}
+ value="${abcl.version}-${abcl.version.src}"/>
+ </target>
+
+- <target name="abcl.stamp.hostname" if="unix">
+- <exec executable="hostname" outputproperty="abcl.hostname"/>
+- <echo>abcl.hostname: ${abcl.hostname}</echo>
+- </target>
+-
+ <target name="abcl.system.uptodate">
+ <condition property="abcl.system.needs-update.p">
+ <and>
+@@ -1019,8 +1014,7 @@ ${basedir}/../cl-bench
+ </unzip>
+ </target>
+
+- <target name="abcl.test.compile"
+- depends="abcl.test.pre-compile">
++ <target name="abcl.test.compile" >
+ <mkdir dir="${abcl.test.classes.dir}"/>
+ <javac destdir="${abcl.test.classes.dir}"
+ classpathref="abcl.test.compile.classpath"
--
2.23.0
next reply other threads:[~2019-09-17 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 12:29 Carlo Zancanaro [this message]
2019-09-17 13:51 ` [bug#37439] [PATCH] Add abcl Carlo Zancanaro
2019-10-01 9:22 ` bug#37439: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgovrtr9.fsf@zancanaro.id.au \
--to=carlo@zancanaro.id.au \
--cc=37439@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).