guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: Add abcl.


From: guix-commits
Subject: 03/03: gnu: Add abcl.
Date: Tue, 1 Oct 2019 05:22:32 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 717b6ba6aa9ac876b2c2df36096e4579b19ee06c
Author: Carlo Zancanaro <address@hidden>
Date:   Tue Sep 17 22:01:01 2019 +1000

    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.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/local.mk                                  |  1 +
 gnu/packages/java.scm                         | 66 ++++++++++++++++++++++++++-
 gnu/packages/patches/abcl-fix-build-xml.patch | 50 ++++++++++++++++++++
 3 files changed, 116 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index d3e1dbc..d056a25 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -674,6 +674,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 403c446..6090dcd 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <address@hidden>
 ;;; Copyright © 2016 Leo Famulari <address@hidden>
 ;;; Copyright © 2016, 2017 Roel Janssen <address@hidden>
-;;; Copyright © 2017 Carlo Zancanaro <address@hidden>
+;;; Copyright © 2017, 2019 Carlo Zancanaro <address@hidden>
 ;;; Copyright © 2017, 2018 Julien Lepiller <address@hidden>
 ;;; Copyright © 2017 Thomas Danckaert <address@hidden>
 ;;; Copyright © 2016, 2017, 2018 Alex Vong <address@hidden>
@@ -11109,3 +11109,67 @@ 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 0000000..dd315b4
--- /dev/null
+++ b/gnu/packages/patches/abcl-fix-build-xml.patch
@@ -0,0 +1,50 @@
+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.
+
+We also remove the Implemetation-Build property that ends up in the manifest
+file, because it stores information about the time of the build, which makes
+it non-deterministic.
+
+--- a/build.xml
++++ b/build.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>
+@@ -500,8 +495,6 @@ from ${abcl.home.dir}
+                        value="ABCL"/>
+             <attribute name="Implementation-Version"  
+                        value="${abcl.implementation.version}"/>
+-            <attribute name="Implementation-Build" 
+-                       value="${build}"/>
+           </section>
+         </manifest>
+         <metainf dir="${src.dir}/META-INF"> 
+@@ -1019,8 +1012,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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]