guix-patches
[Top][All Lists]
Advanced

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

[bug#31333] [PATCH 11/22] gnu: Add groovy-console.


From: Julien Lepiller
Subject: [bug#31333] [PATCH 11/22] gnu: Add groovy-console.
Date: Tue, 1 May 2018 17:44:38 +0200

* gnu/packages/groovy.scm (groovy-console): New variable.
---
 gnu/packages/groovy.scm | 64 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index dcca41eae..6fad640a8 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -549,3 +549,67 @@ any @dfn{Bean Scripting Framework} (BSF) application.")))
     (synopsis "Groovy graphical library")
     (description "This package contains the groovy bindings to Java Swing, a
 library used to build graphical interfaces.")))
+
+(define groovy-console
+  (package
+    (inherit groovy-bootstrap)
+    (name "groovy-console")
+    (arguments
+     `(#:jar-name "groovy-console.jar"
+       #:jdk ,icedtea-8
+       ;; FIXME: tests are not run
+       #:test-dir "src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'chdir
+           (lambda _
+             (chdir "subprojects/groovy-console")))
+         (add-before 'build 'copy-resources
+           (lambda _
+             (copy-recursively "src/main/resources" "build/classes")))
+         (replace 'build
+           (lambda _
+             (mkdir-p "build/classes")
+             (mkdir-p "build/jar")
+             (and
+               (zero? (apply system* "java" "-cp" (getenv "CLASSPATH")
+                               "org.codehaus.groovy.tools.FileSystemCompiler"
+                               "-d" "build/classes"
+                               "-j"; joint compilation
+                               (find-files "src/main"
+                                           ".*\\.(groovy|java)$")))
+               (zero? (system* "jar" "-cf" "build/jar/groovy-console.jar"
+                               "-C" "build/classes" ".")))))
+         (replace 'check
+           (lambda _
+             (mkdir-p "build/test-classes")
+             (substitute* "build.xml"
+               (("depends=\"compile-tests\"") "depends=\"\"")
+               (("}/java") "}/groovy"))
+             (substitute*
+               
"../groovy-swing/src/test/groovy/groovy/util/GroovySwingTestCase.groovy"
+               (("HeadlessTestSupport.headless") "isHeadless()"))
+             (and
+               (zero? (apply system* "java" "-cp"
+                             (string-append (getenv "CLASSPATH") 
":build/classes")
+                             "org.codehaus.groovy.tools.FileSystemCompiler"
+                             "-d" "build/test-classes"
+                             "-j"
+                             (append
+                               (find-files "../groovy-swing/src/test"
+                                           ".*\\.(groovy|java)$")
+                               (find-files "src/test"
+                                           ".*\\.(groovy|java)$"))))
+               (zero? (system* "ant" "check"))))))))
+    (inputs
+     `(("groovy-swing" ,groovy-swing)
+       ("groovy-templates" ,groovy-templates)
+       ,@(package-inputs groovy-bootstrap)))
+    (native-inputs
+     `(("groovy-bootstrap" ,groovy-bootstrap)
+       ("groovy-test" ,groovy-test)
+       ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+       ("java-commons-logging-minimal" ,java-commons-logging-minimal)
+       ,@(package-native-inputs groovy-java-bootstrap)))
+    (synopsis "Groovy graphical interface")
+    (description "This package contains a graphical interface to run 
groovy.")))
-- 
2.17.0






reply via email to

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