GNU bug report logs - #31333
[PATCH] Add groovy

Previous Next

Package: guix-patches;

Reported by: Julien Lepiller <julien <at> lepiller.eu>

Date: Tue, 1 May 2018 15:42:02 UTC

Severity: normal

Tags: patch

Done: Julien Lepiller <julien <at> lepiller.eu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Julien Lepiller <julien <at> lepiller.eu>
To: 31333 <at> debbugs.gnu.org
Subject: [bug#31333] [PATCH 21/22] gnu: Add groovy-macro.
Date: Tue,  1 May 2018 17:44:48 +0200
* gnu/packages/groovy.scm (groovy-macro): New variable.
---
 gnu/packages/groovy.scm | 56 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 8723ffdd2..89a1e7e8d 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -1034,3 +1034,59 @@ providing greatly simplified resource management and result set handling.")))
     (synopsis "Groovy testing framework")
     (description "This package contains integration code for running TestNG
 tests in Groovy.")))
+
+(define groovy-macro
+  (package
+    (inherit groovy-bootstrap)
+    (name "groovy-macro")
+    (arguments
+     `(#:jar-name "groovy-macro.jar"
+       #:test-dir "src/test"
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'chdir
+           (lambda _
+             (chdir "subprojects/groovy-macro")))
+         (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-macro.jar"
+                               "-C" "build/classes" ".")))))
+         (replace 'check
+           (lambda _
+             (mkdir-p "build/test-classes")
+             (substitute* "build.xml"
+               (("depends=\"compile-tests\"") "depends=\"\"")
+               (("}/java") "}/groovy"))
+             (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 "src/test"
+                                           ".*\\.(groovy|java)$"))))
+               (zero? (system* "ant" "check"))))))))
+    (inputs
+     `(("groovy-templates" ,groovy-templates)
+       ("groovy-xml" ,groovy-xml)
+       ,@(package-inputs groovy-bootstrap)))
+    (native-inputs
+     `(("groovy-bootstrap" ,groovy-bootstrap)
+       ("groovy-json" ,groovy-json)
+       ("groovy-test" ,groovy-test)
+       ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+       ,@(package-native-inputs groovy-java-bootstrap)))
+    (synopsis "Groovy macro processor")
+    (description "This package contains a high-level library to create macro
+and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
-- 
2.17.0





This bug report was last modified 7 years and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.