* [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-06 17:48 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 03/22] gnu: Add groovy-tests-bootstrap Julien Lepiller
` (21 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-bootstrap): New variable.
---
gnu/packages/groovy.scm | 75 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index ee2894e30..016d7e66b 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -93,3 +93,78 @@
groovy submodules.")
(license (list license:gpl2
license:cddl1.1))))
+
+(define groovy-bootstrap
+ (package
+ (inherit groovy-java-bootstrap)
+ (name "groovy-bootstrap")
+ (arguments
+ `(#:jar-name "groovy.jar"
+ #:jdk ,icedtea-8
+ ;Requires groovy-xml and logback-classic which are circular dependencies
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-java8
+ ;; Fix "Reference to plus is ambiguous"
+ (lambda _
+ (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java"
+ (("toList\\(left\\)")
+ "(List<T>)toList(left)"))))
+ (add-before 'build 'generate-parser
+ (lambda _
+ (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java"
+ (zero? (system* "antlr" "java.g")))
+ (with-directory-excursion "src/main/org/codehaus/groovy/antlr"
+ (mkdir "parser")
+ (with-directory-excursion "parser"
+ (zero? (system* "antlr" "../groovy.g"))))))
+ (add-before 'build 'generate-exception-utils
+ (lambda _
+ (system* "javac" "-cp" (getenv "CLASSPATH")
+ "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java")
+ (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":config/ant/src")
+ "org.codehaus.groovy.ExceptionUtilsGenerator"
+ "target/classes/org/codehaus/groovy/runtime/ExceptionUtils.class"))))
+ (add-before 'build 'generate-dgminfo
+ (lambda _
+ (mkdir-p "target/classes/org/codehaus/groovy/runtime")
+ (mkdir-p "target/classes/META-INF")
+ (system* "javac" "-cp" (getenv "CLASSPATH")
+ "src/main/org/codehaus/groovy/tools/DgmConverter.java")
+ (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":src/main")
+ "org.codehaus.groovy.tools.DgmConverter"))))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (with-directory-excursion "src/main"
+ (for-each (lambda (file)
+ (mkdir-p (string-append "../../target/classes/"
+ (dirname file)))
+ (copy-file file
+ (string-append "../../target/classes/"
+ file)))
+ (find-files "." ".*.(txt|properties|xml|html)")))))
+ (replace 'build
+ (lambda _
+ (mkdir-p "build/jar")
+ (and
+ (zero? (apply system* "java" "-cp" (getenv "CLASSPATH")
+ "org.codehaus.groovy.tools.FileSystemCompiler"
+ "-d" "target/classes"
+ "-j"; joint compilation
+ (find-files "src/main"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "jar" "-cf" "build/jar/groovy.jar"
+ "-C" "target/classes" "."))))))))
+ (inputs
+ `(("java-apache-ivy" ,java-apache-ivy)
+ ,@(package-inputs groovy-java-bootstrap)))
+ (native-inputs
+ `(("groovy-java-bootstrap" ,groovy-java-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy compiler")
+ (description "This package contains the first version of the Groovy compiler.
+Although already usable, it doesn't contain the groovy library yet. This package
+is used to build the groovy submodules written in groovy.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap.
2018-05-01 15:44 ` [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap Julien Lepiller
@ 2018-05-06 17:48 ` Danny Milosavljevic
2018-05-06 18:12 ` Julien Lepiller
0 siblings, 1 reply; 49+ messages in thread
From: Danny Milosavljevic @ 2018-05-06 17:48 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 31333
[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]
Hi Julien,
> + (add-before 'build 'fix-java8
> + ;; Fix "Reference to plus is ambiguous"
> + (lambda _
> + (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java"
> + (("toList\\(left\\)")
> + "(List<T>)toList(left)"))))
#t
Also, is it possible to eventually upstream this fix?
> + (add-before 'build 'generate-exception-utils
> + (lambda _
> + (system* "javac" "-cp" (getenv "CLASSPATH")
> + "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java")
Hmm, is ignoring the exit status intentional?
> + (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
> + ":config/ant/src")
> + "org.codehaus.groovy.ExceptionUtilsGenerator"
> + "target/classes/org/codehaus/groovy/runtime/ExceptionUtils.class"))))
> + (add-before 'build 'generate-dgminfo
> + (lambda _
> + (mkdir-p "target/classes/org/codehaus/groovy/runtime")
> + (mkdir-p "target/classes/META-INF")
> + (system* "javac" "-cp" (getenv "CLASSPATH")
> + "src/main/org/codehaus/groovy/tools/DgmConverter.java")
Exit status ignored
> + (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
> + ":src/main")
> + "org.codehaus.groovy.tools.DgmConverter"))))
> + (add-before 'build 'copy-resources
> + (lambda _
> + (with-directory-excursion "src/main"
> + (for-each (lambda (file)
> + (mkdir-p (string-append "../../target/classes/"
> + (dirname file)))
> + (copy-file file
> + (string-append "../../target/classes/"
> + file)))
> + (find-files "." ".*.(txt|properties|xml|html)")))))
#t
Otherwise LGTM!
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap.
2018-05-06 17:48 ` Danny Milosavljevic
@ 2018-05-06 18:12 ` Julien Lepiller
0 siblings, 0 replies; 49+ messages in thread
From: Julien Lepiller @ 2018-05-06 18:12 UTC (permalink / raw)
To: 31333
Le Sun, 6 May 2018 19:48:02 +0200,
Danny Milosavljevic <dannym@scratchpost.org> a écrit :
> Hi Julien,
Hi Danny, thank you for your review!
>
>
> Hmm, is ignoring the exit status intentional?
no it's not. But reading my patch again, I think I'll use invoke
instead of system*, so the exit status will not be ignored (it applies
to others patches too). So if you intend to review other patches,
please ignore this issue.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 03/22] gnu: Add groovy-tests-bootstrap.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
2018-05-01 15:44 ` [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:01 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 04/22] gnu: Add groovy-test Julien Lepiller
` (20 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-tests-bootstrap): New variable.
---
gnu/packages/groovy.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 016d7e66b..97944e1ef 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -168,3 +168,38 @@ groovy submodules.")
(description "This package contains the first version of the Groovy compiler.
Although already usable, it doesn't contain the groovy library yet. This package
is used to build the groovy submodules written in groovy.")))
+
+(define groovy-tests-bootstrap
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-tests-bootstrap")
+ (arguments
+ `(#:jar-name "groovy-tests-bootstrap.jar"
+ #:jdk ,icedtea-8
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (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
+ (append
+ (find-files "src/test" "TestSupport.java")
+ (find-files "src/test" "HeadlessTestSupport.java")
+ (find-files "src/test" "XmlAssert.java"))))
+ (zero? (system* "jar" "-cf" "build/jar/groovy-tests-bootstrap.jar"
+ "-C" "build/classes" "."))))))))
+ (inputs
+ `(("groovy-test" ,groovy-test)
+ ,@(package-inputs groovy-bootstrap)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy test classes")
+ (description "This package contains three classes required for testing
+other groovy submodules.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 04/22] gnu: Add groovy-test.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
2018-05-01 15:44 ` [bug#31333] [PATCH 02/22] gnu: Add groovy-bootstrap Julien Lepiller
2018-05-01 15:44 ` [bug#31333] [PATCH 03/22] gnu: Add groovy-tests-bootstrap Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:01 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 05/22] gnu: Add groovy-xml Julien Lepiller
` (19 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-test): New variable.
---
gnu/packages/groovy.scm | 45 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 97944e1ef..ff777a01d 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -203,3 +203,48 @@ is used to build the groovy submodules written in groovy.")))
(synopsis "Groovy test classes")
(description "This package contains three classes required for testing
other groovy submodules.")))
+
+(define groovy-test
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-test")
+ (arguments
+ `(#:jar-name "groovy-test.jar"
+ #:jdk ,icedtea-8
+ #:test-dir "subprojects/groovy-test/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (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 "subprojects/groovy-test/src/main"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "jar" "-cf" "build/jar/groovy-test.jar"
+ "-C" "build/classes" ".")))))
+ (replace 'check
+ (lambda _
+ (mkdir-p "build/test-classes")
+ (substitute* "build.xml"
+ (("depends=\"compile-tests\"") "depends=\"\"")
+ (("}/java") "}/groovy"))
+ (zero? (apply system* "java" "-cp"
+ (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.groovy.tools.FileSystemCompiler"
+ "-d" "build/test-classes"
+ "-j"
+ (append
+ (find-files "subprojects/groovy-test/src/test"
+ ".*\\.(groovy|java)$"))))
+ (zero? (system* "ant" "check")))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy test submodule")
+ (description "This package contains the test submodules used to test
+other groovy submodules.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 05/22] gnu: Add groovy-xml.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (2 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 04/22] gnu: Add groovy-test Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:03 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 06/22] gnu: Add groovy-templates Julien Lepiller
` (18 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-xml): New variable.
---
gnu/packages/groovy.scm | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index ff777a01d..ba1c30505 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -248,3 +248,53 @@ other groovy submodules.")))
(synopsis "Groovy test submodule")
(description "This package contains the test submodules used to test
other groovy submodules.")))
+
+(define groovy-xml
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-xml")
+ (arguments
+ `(#:jar-name "groovy-xml.jar"
+ #:jdk ,icedtea-8
+ #:test-dir "src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-xml")))
+ (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-xml.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"))))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy XML")
+ (description "This package contains XML-related utilities for groovy.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 06/22] gnu: Add groovy-templates.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (3 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 05/22] gnu: Add groovy-xml Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:03 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 07/22] gnu: Add groovy-groovydoc Julien Lepiller
` (17 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-templates): New variable.
---
gnu/packages/groovy.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index ba1c30505..53319a82b 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -298,3 +298,40 @@ other groovy submodules.")))
,@(package-native-inputs groovy-java-bootstrap)))
(synopsis "Groovy XML")
(description "This package contains XML-related utilities for groovy.")))
+
+(define groovy-templates
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-templates")
+ (arguments
+ `(#:jar-name "groovy-templates.jar"
+ #:jdk ,icedtea-8
+ #:test-dir "subprojects/groovy-templates/src/test"
+ #:tests? #f;Requires spock-framework which is a circular dependency
+ #:phases
+ (modify-phases %standard-phases
+ (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 "subprojects/groovy-templates/src/main"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "jar" "-cf" "build/jar/groovy-templates.jar"
+ "-C" "build/classes" "."))))))))
+ (inputs
+ `(("groovy-xml" ,groovy-xml)
+ ,@(package-inputs groovy-bootstrap)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy template engine")
+ (description "This package contains a template framework which is
+well-suited to applications where the text to be generated follows the form of
+a static template.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 07/22] gnu: Add groovy-groovydoc.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (4 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 06/22] gnu: Add groovy-templates Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:04 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 08/22] gnu: Add groovy-ant Julien Lepiller
` (16 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-groovydoc): New variable.
---
gnu/packages/groovy.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 53319a82b..e176c9b44 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -335,3 +335,43 @@ other groovy submodules.")))
(description "This package contains a template framework which is
well-suited to applications where the text to be generated follows the form of
a static template.")))
+
+(define groovy-groovydoc
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-groovydoc")
+ (arguments
+ `(#:jar-name "groovy-groovydoc.jar"
+ #:jdk ,icedtea-8
+ #:test-dir "subprojects/groovy-groovydoc/src/test"
+ #:tests? #f; Requires groovy-ant which is a circular dependency
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "subprojects/groovy-groovydoc/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 "subprojects/groovy-groovydoc/src/main"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "jar" "-cf" "build/jar/groovy-groovydoc.jar"
+ "-C" "build/classes" "."))))))))
+ (inputs
+ `(("groovy-templates" ,groovy-templates)
+ ,@(package-inputs groovy-bootstrap)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy documentation generation")
+ (description "This package contains the groovy documentation generator,
+similar to javadoc.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 08/22] gnu: Add groovy-ant.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (5 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 07/22] gnu: Add groovy-groovydoc Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:05 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 09/22] gnu: Add groovy-bsf Julien Lepiller
` (15 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-ant): New variable.
---
gnu/packages/groovy.scm | 60 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index e176c9b44..180d1c2d0 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -375,3 +375,63 @@ a static template.")))
(synopsis "Groovy documentation generation")
(description "This package contains the groovy documentation generator,
similar to javadoc.")))
+
+(define groovy-ant
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-ant")
+ (arguments
+ `(#:jar-name "groovy-ant.jar"
+ #:jdk ,icedtea-8
+ #:test-dir "src/test"
+ ;; FIXME: Excluding all tests because they fail
+ #:test-exclude (list
+ "**/GroovyTest.java"
+ "**/GroovycTest.java")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-ant")))
+ (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-ant.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"
+ (find-files "src/test"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "ant" "check"))))))))
+ (inputs
+ `(("groovy-groovydoc" ,groovy-groovydoc)
+ ,@(package-inputs groovy-bootstrap)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-xml" ,groovy-xml)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy ant tasks")
+ (description "This package contains groovy-related ant tasks definitions.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 08/22] gnu: Add groovy-ant.
2018-05-01 15:44 ` [bug#31333] [PATCH 08/22] gnu: Add groovy-ant Julien Lepiller
@ 2018-05-07 18:05 ` Danny Milosavljevic
2018-05-07 19:04 ` Julien Lepiller
0 siblings, 1 reply; 49+ messages in thread
From: Danny Milosavljevic @ 2018-05-07 18:05 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 31333
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
> + (add-before 'configure 'chdir
> + (lambda _
> + (chdir "subprojects/groovy-ant")))
#t
> + (add-before 'build 'copy-resources
> + (lambda _
> + (copy-recursively "src/main/resources" "build/classes")))
#t
>(input
> + `(("groovy-groovydoc" ,groovy-groovydoc)
Hmm, regular input? Not either native or propagated? How does it work?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 08/22] gnu: Add groovy-ant.
2018-05-07 18:05 ` Danny Milosavljevic
@ 2018-05-07 19:04 ` Julien Lepiller
0 siblings, 0 replies; 49+ messages in thread
From: Julien Lepiller @ 2018-05-07 19:04 UTC (permalink / raw)
To: 31333
Le Mon, 7 May 2018 20:05:52 +0200,
Danny Milosavljevic <dannym@scratchpost.org> a écrit :
> > + (add-before 'configure 'chdir
> > + (lambda _
> > + (chdir "subprojects/groovy-ant")))
>
> #t
>
> > + (add-before 'build 'copy-resources
> > + (lambda _
> > + (copy-recursively "src/main/resources"
> > "build/classes")))
>
> #t
>
> >(input
> > + `(("groovy-groovydoc" ,groovy-groovydoc)
>
> Hmm, regular input? Not either native or propagated? How does it
> work?
>
I haven't tested groovy-ant, but you are supposed to use it as part of
the groovy package. It's included there with a symbolic link.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 09/22] gnu: Add groovy-bsf.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (6 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 08/22] gnu: Add groovy-ant Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:07 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 10/22] gnu: Add groovy-swing Julien Lepiller
` (14 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-bsf): New variable.
---
gnu/packages/groovy.scm | 60 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 180d1c2d0..232137d29 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -435,3 +435,63 @@ similar to javadoc.")))
,@(package-native-inputs groovy-java-bootstrap)))
(synopsis "Groovy ant tasks")
(description "This package contains groovy-related ant tasks definitions.")))
+
+(define groovy-bsf
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-bsf")
+ (arguments
+ `(#:jar-name "groovy-bsf.jar"
+ #:jdk ,icedtea-8
+ #:test-dir "src/test"
+ #:test-exclude (list
+;; exception from Groovy: org.codehaus.groovy.runtime.InvokerInvocationException:
+;; groovy.lang.MissingMethodException: No signature of method:
+;; java.util.ArrayList.each() is applicable for argument types:
+;; (groovy.script.MapFromList$_doit_closure1) values:
+;; [groovy.script.MapFromList$_doit_closure1@17e554d5]
+ "**/BSFTest.java")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-bsf")))
+ (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-bsf.jar"
+ "-C" "build/classes" ".")))))
+ (replace 'check
+ (lambda _
+ (mkdir-p "build/test-classes")
+ (substitute* "build.xml"
+ (("depends=\"compile-tests\"") "depends=\"\""))
+ (and
+ (zero? (apply system* "java" "-cp"
+ (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.groovy.tools.FileSystemCompiler"
+ "-d" "build/test-classes"
+ "-j"
+ (find-files "src/test"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "ant" "check"))))))))
+ (inputs
+ `(("java-commons-bsf" ,java-commons-bsf)
+ ,@(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 BSF engine")
+ (description "This package defines the BSF engine for using Groovy inside
+any @dfn{Bean Scripting Framework} (BSF) application.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 09/22] gnu: Add groovy-bsf.
2018-05-01 15:44 ` [bug#31333] [PATCH 09/22] gnu: Add groovy-bsf Julien Lepiller
@ 2018-05-07 18:07 ` Danny Milosavljevic
0 siblings, 0 replies; 49+ messages in thread
From: Danny Milosavljevic @ 2018-05-07 18:07 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 31333
[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]
> + #:test-exclude (list
> +;; exception from Groovy: org.codehaus.groovy.runtime.InvokerInvocationException:
> +;; groovy.lang.MissingMethodException: No signature of method:
> +;; java.util.ArrayList.each() is applicable for argument types:
> +;; (groovy.script.MapFromList$_doit_closure1) values:
> +;; [groovy.script.MapFromList$_doit_closure1@17e554d5]
> + "**/BSFTest.java")
If not already known upstream, could you report it there?
> + (lambda _
> + (chdir "subprojects/groovy-bsf")))
#t
> + (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-bsf.jar"
> + "-C" "build/classes" ".")))))
If these are always exactly the same we can think about adding a build system for groovy in the future. Doesn't have to be complicated or anything, just so it does this phase (and "check") automatically.
LGTM!
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 10/22] gnu: Add groovy-swing.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (7 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 09/22] gnu: Add groovy-bsf Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:09 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 11/22] gnu: Add groovy-console Julien Lepiller
` (13 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-swing): New variable.
---
gnu/packages/groovy.scm | 54 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 232137d29..dcca41eae 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -495,3 +495,57 @@ similar to javadoc.")))
(synopsis "Groovy BSF engine")
(description "This package defines the BSF engine for using Groovy inside
any @dfn{Bean Scripting Framework} (BSF) application.")))
+
+(define groovy-swing
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-swing")
+ (arguments
+ `(#:jar-name "groovy-swing.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-swing")))
+ (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-swing.jar"
+ "-C" "build/classes" ".")))))
+ (replace 'check
+ (lambda _
+ (mkdir-p "build/test-classes")
+ (substitute* "src/test/groovy/groovy/util/GroovySwingTestCase.groovy"
+ (("HeadlessTestSupport.headless") "isHeadless()"))
+ (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"
+ (find-files "src/test"
+ ".*\\.(groovy|java)$")))
+ (zero? (system* "ant" "check"))))))))
+ (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 library")
+ (description "This package contains the groovy bindings to Java Swing, a
+library used to build graphical interfaces.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 11/22] gnu: Add groovy-console.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (8 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 10/22] gnu: Add groovy-swing Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:10 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 12/22] gnu: Add groovy-docgenerator Julien Lepiller
` (12 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* 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
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 12/22] gnu: Add groovy-docgenerator.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (9 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 11/22] gnu: Add groovy-console Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:10 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 13/22] gnu: Add groovy-groovysh Julien Lepiller
` (11 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-docgenerator): New variable.
---
gnu/packages/groovy.scm | 43 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 6fad640a8..d211384ba 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -613,3 +613,46 @@ library used to build graphical interfaces.")))
,@(package-native-inputs groovy-java-bootstrap)))
(synopsis "Groovy graphical interface")
(description "This package contains a graphical interface to run groovy.")))
+
+(define groovy-docgenerator
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-docgenerator")
+ (arguments
+ `(#:jar-name "groovy-docgenerator.jar"
+ #:jdk ,icedtea-8
+ #:tests? #f; No tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-docgenerator")))
+ (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-docgenerator.jar"
+ "-C" "build/classes" "."))))))))
+ (inputs
+ `(("groovy-templates" ,groovy-templates)
+ ("groovy-swing" ,groovy-swing)
+ ("java-qdox-1.12" ,java-qdox-1.12)
+ ,@(package-inputs groovy-bootstrap)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy documentation generation")
+ (description "This package contains a command line tool to generate
+documentation for groovy applications.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 13/22] gnu: Add groovy-groovysh.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (10 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 12/22] gnu: Add groovy-docgenerator Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:11 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 14/22] gnu: Add groovy-jmx Julien Lepiller
` (10 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-groovysh): New variable.
---
gnu/packages/groovy.scm | 57 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index d211384ba..63a05f933 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -656,3 +656,60 @@ library used to build graphical interfaces.")))
(synopsis "Groovy documentation generation")
(description "This package contains a command line tool to generate
documentation for groovy applications.")))
+
+(define groovy-groovysh
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-groovysh")
+ (arguments
+ `(#:jar-name "groovy-groovysh.jar"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-groovysh")))
+ (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-groovysh.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-xml" ,groovy-xml)
+ ("groovy-console" ,groovy-console)
+ ,@(package-inputs groovy-bootstrap)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy REPL")
+ (description "This package contains the Groovy REPL.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 14/22] gnu: Add groovy-jmx.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (11 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 13/22] gnu: Add groovy-groovysh Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:13 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 15/22] gnu: Add groovy-json Julien Lepiller
` (9 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-jmx): New variable.
---
gnu/packages/groovy.scm | 51 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 63a05f933..c2b076bd6 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -713,3 +713,54 @@ documentation for groovy applications.")))
,@(package-native-inputs groovy-java-bootstrap)))
(synopsis "Groovy REPL")
(description "This package contains the Groovy REPL.")))
+
+(define groovy-jmx
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-jmx")
+ (arguments
+ `(#:jar-name "groovy-jmx.jar"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-jmx")))
+ (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-jmx.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"))))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy JMX extension")
+ (description "This package contains the JMX extension of Groovy, for
+management and monitoring JVM-based solutions.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 15/22] gnu: Add groovy-json.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (12 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 14/22] gnu: Add groovy-jmx Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:13 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 16/22] gnu: Add groovy-jsr223 Julien Lepiller
` (8 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-json): New variable.
---
gnu/packages/groovy.scm | 50 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index c2b076bd6..c0853bdc8 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -764,3 +764,53 @@ documentation for groovy applications.")))
(synopsis "Groovy JMX extension")
(description "This package contains the JMX extension of Groovy, for
management and monitoring JVM-based solutions.")))
+
+(define groovy-json
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-json")
+ (arguments
+ `(#:jar-name "groovy-json.jar"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-json")))
+ (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-json.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"))))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy JSON")
+ (description "This package contains JSON-related utilities for groovy.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 16/22] gnu: Add groovy-jsr223.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (13 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 15/22] gnu: Add groovy-json Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:14 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 17/22] gnu: Add groovy-nio Julien Lepiller
` (7 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-jsr223): New variable.
---
gnu/packages/groovy.scm | 54 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index c0853bdc8..f38e35a9a 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -814,3 +814,57 @@ management and monitoring JVM-based solutions.")))
,@(package-native-inputs groovy-java-bootstrap)))
(synopsis "Groovy JSON")
(description "This package contains JSON-related utilities for groovy.")))
+
+(define groovy-jsr223
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-jsr223")
+ (arguments
+ `(#:jar-name "groovy-jsr223.jar"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-jsr223")))
+ (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-jsr223.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"))))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy's own JSR223 implementation")
+ (description "This package contains Groovy's own JSR223 implementation. This
+module is used for interaction between Groovy and Java code.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 17/22] gnu: Add groovy-nio.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (14 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 16/22] gnu: Add groovy-jsr223 Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:15 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 18/22] gnu: Add groovy-servlet Julien Lepiller
` (6 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-nio): New variable.
---
gnu/packages/groovy.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index f38e35a9a..8f50ee023 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -868,3 +868,39 @@ management and monitoring JVM-based solutions.")))
(synopsis "Groovy's own JSR223 implementation")
(description "This package contains Groovy's own JSR223 implementation. This
module is used for interaction between Groovy and Java code.")))
+
+(define groovy-nio
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-nio")
+ (arguments
+ `(#:jar-name "groovy-nio.jar"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:tests? #f; Requires spock-framework
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-nio")))
+ (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-nio.jar"
+ "-C" "build/classes" "."))))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy input-output library")
+ (description "This package implements an input/output library that extends
+the functionnality of the common library of Java.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 18/22] gnu: Add groovy-servlet.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (15 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 17/22] gnu: Add groovy-nio Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:15 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 19/22] gnu: Add groovy-sql Julien Lepiller
` (5 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-servlet): 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 8f50ee023..c6a7dcaca 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -904,3 +904,59 @@ module is used for interaction between Groovy and Java code.")))
(synopsis "Groovy input-output library")
(description "This package implements an input/output library that extends
the functionnality of the common library of Java.")))
+
+(define groovy-servlet
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-servlet")
+ (arguments
+ `(#:jar-name "groovy-servlet.jar"
+ #:test-dir "src/test"
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-servlet")))
+ (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-servlet.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's servlet implementation")
+ (description "This package contains a library to create groovlets, Groovy's
+version of Java servlets.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 19/22] gnu: Add groovy-sql.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (16 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 18/22] gnu: Add groovy-servlet Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:16 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 20/22] gnu: Add groovy-testng Julien Lepiller
` (4 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-sql): New variable.
---
gnu/packages/groovy.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index c6a7dcaca..25a0cd24f 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -960,3 +960,39 @@ the functionnality of the common library of Java.")))
(synopsis "Groovy's servlet implementation")
(description "This package contains a library to create groovlets, Groovy's
version of Java servlets.")))
+
+(define groovy-sql
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-sql")
+ (arguments
+ `(#:jar-name "groovy-sql.jar"
+ #:test-dir "src/test"
+ #:tests? #f;TODO: Requires hsqldb
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-sql")))
+ (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-sql.jar"
+ "-C" "build/classes" "."))))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy SQL library")
+ (description "This package contains a facade over Java's normal JDBC APIs
+providing greatly simplified resource management and result set handling.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 20/22] gnu: Add groovy-testng.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (17 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 19/22] gnu: Add groovy-sql Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:16 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 21/22] gnu: Add groovy-macro Julien Lepiller
` (3 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy-testng): New variable.
---
gnu/packages/groovy.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 25a0cd24f..8723ffdd2 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -996,3 +996,41 @@ version of Java servlets.")))
(synopsis "Groovy SQL library")
(description "This package contains a facade over Java's normal JDBC APIs
providing greatly simplified resource management and result set handling.")))
+
+(define groovy-testng
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy-testng")
+ (arguments
+ `(#:jar-name "groovy-testng.jar"
+ #:tests? #f; No tests
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "subprojects/groovy-testng")))
+ (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-testng.jar"
+ "-C" "build/classes" "."))))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs groovy-java-bootstrap)))
+ (synopsis "Groovy testing framework")
+ (description "This package contains integration code for running TestNG
+tests in Groovy.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 21/22] gnu: Add groovy-macro.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (18 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 20/22] gnu: Add groovy-testng Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 18:17 ` Danny Milosavljevic
2018-05-01 15:44 ` [bug#31333] [PATCH 22/22] gnu: Add groovy Julien Lepiller
` (2 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* 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
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 22/22] gnu: Add groovy.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (19 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 21/22] gnu: Add groovy-macro Julien Lepiller
@ 2018-05-01 15:44 ` Julien Lepiller
2018-05-07 19:23 ` Danny Milosavljevic
2018-05-07 17:58 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Danny Milosavljevic
2018-05-07 19:25 ` Björn Höfling
22 siblings, 1 reply; 49+ messages in thread
From: Julien Lepiller @ 2018-05-01 15:44 UTC (permalink / raw)
To: 31333
* gnu/packages/groovy.scm (groovy): New variable.
---
gnu/packages/groovy.scm | 93 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index 89a1e7e8d..981f42b6a 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -1090,3 +1090,96 @@ tests in Groovy.")))
(synopsis "Groovy macro processor")
(description "This package contains a high-level library to create macro
and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
+
+(define-public groovy
+ (package
+ (inherit groovy-bootstrap)
+ (name "groovy")
+ (arguments
+ `(#:tests? #f; No tests
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (out-bin (string-append out "/bin"))
+ (out-lib (string-append out "/lib")))
+ (with-directory-excursion "src/bin"
+ (substitute* "startGroovy"
+ (("\"\\\\\"") "\"")
+ (("\\\\\"\"") "\"")
+ (("\\\\\\$") "$")
+ (("@GROOVYJAR@") "groovy.jar")
+ (("MAX_FD=\"maximum\"")
+ (string-append
+ "MAX_FD=\"maximum\"\nJAVAHOME="
+ (assoc-ref inputs "jdk"))))
+ ;; Groovy uses class loading. It's not enough to put the class
+ ;; in the loader's classpath, as it causes breakages:
+ ;; the compiler would give this error:
+ ;; "Prohibited package name: java.lang"
+ ;; So we symlink dependencies in this package's output. The
+ ;; starter class (in groovy-bootstrap) is where the class loader
+ ;; will look for dependencies, so we put it there too.
+ (mkdir-p out-lib)
+ (for-each
+ (lambda (input)
+ (for-each
+ (lambda (jar)
+ (symlink jar (string-append out-lib "/" (basename jar))))
+ (find-files (assoc-ref inputs input) ".*.jar")))
+ '("groovy-bootstrap" "groovy-ant" "groovy-bsf"
+ "groovy-console" "groovy-docgenerator"
+ "groovy-groovydoc" "groovy-groovysh"
+ "groovy-jmx" "groovy-json" "groovy-jsr223"
+ "groovy-nio" "groovy-servlet" "groovy-sql"
+ "groovy-swing" "groovy-templates" "groovy-testng"
+ "java-commons-cli" "java-asm"
+ "java-classpathx-servletapi" "java-xstream"
+ "java-jansi" "java-jline-2"))
+ ;; antlr.jar is present twice in antlr2. Symlink doesn't like
+ ;; it, so we symlink it here.
+ (symlink (string-append (assoc-ref inputs "antlr2") "/lib/antlr.jar")
+ (string-append out-lib "/antlr.jar"))
+ (for-each
+ (lambda (tool)
+ (install-file tool out-bin)
+ (chmod (string-append out-bin "/" tool) #o755))
+ '("grape" "groovy" "groovyc" "groovyConsole" "groovydoc"
+ "groovysh" "java2groovy" "startGroovy")))
+ (install-file "src/conf/groovy-starter.conf"
+ (string-append out "/conf"))))))))
+ (inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-ant" ,groovy-ant)
+ ("groovy-bsf" ,groovy-bsf)
+ ("groovy-console" ,groovy-console)
+ ("groovy-docgenerator" ,groovy-docgenerator)
+ ("groovy-groovydoc" ,groovy-groovydoc)
+ ("groovy-groovysh" ,groovy-groovysh)
+ ("groovy-jmx" ,groovy-jmx)
+ ("groovy-json" ,groovy-json)
+ ("groovy-jsr223" ,groovy-jsr223)
+ ("groovy-nio" ,groovy-nio)
+ ("groovy-servlet" ,groovy-servlet)
+ ("groovy-sql" ,groovy-sql)
+ ("groovy-swing" ,groovy-swing)
+ ("groovy-templates" ,groovy-templates)
+ ("groovy-testng" ,groovy-testng)
+ ("java-commons-cli" ,java-commons-cli)
+ ("java-asm" ,java-asm)
+ ("java-classpathx-servletapi" ,java-classpathx-servletapi)
+ ("java-xstream" ,java-xstream)
+ ("java-jansi" ,java-jansi)
+ ("java-jline-2" ,java-jline-2)
+ ("antlr2" ,antlr2)))
+ (synopsis "Programming language for the JVM")
+ (description "Apache Groovy is a powerful, optionally typed and dynamic
+language, with static-typing and static compilation capabilities, for the Java
+platform. It integrates smoothly with any Java program, and immediately
+delivers to your application powerful features, including scripting
+capabilities, Domain-Specific Language authoring, runtime and compile-time
+meta-programming and functional programming.")))
--
2.17.0
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (20 preceding siblings ...)
2018-05-01 15:44 ` [bug#31333] [PATCH 22/22] gnu: Add groovy Julien Lepiller
@ 2018-05-07 17:58 ` Danny Milosavljevic
2018-05-07 19:25 ` Björn Höfling
22 siblings, 0 replies; 49+ messages in thread
From: Danny Milosavljevic @ 2018-05-07 17:58 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 31333
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
Hi Julien,
On Tue, 1 May 2018 17:44:28 +0200
Julien Lepiller <julien@lepiller.eu> wrote:
> + %D%/packages/patches/groovy-Add-exceptionutilsgenerator.patch \
Capital letter? Ok I guess, just uncommon.
> + (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_"
> + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
> + ".tar.gz"))
Hmm, is testing using "eq?" safe? I'd prefer "char=?". Even more, I'd prefer using (match ...).
> + (license (list license:gpl2
> + license:cddl1.1))))
Does that mean "AND" or "OR"? Please add a comment.
> diff --git a/gnu/packages/patches/groovy-Add-exceptionutilsgenerator.patch b/gnu/packages/patches/groovy-Add-exceptionutilsgenerator.patch
> new file mode 100644
> index 000000000..3c81f28cf
> --- /dev/null
> +++ b/gnu/packages/patches/groovy-Add-exceptionutilsgenerator.patch
> @@ -0,0 +1,96 @@
> +From 3dbdc68093e90f0ef9b77b70490d8e0b1dcfbf8f Mon Sep 17 00:00:00 2001
> +From: Julien Lepiller <julien@lepiller.eu>
> +Date: Sun, 17 Sep 2017 21:08:45 +0200
> +Subject: [PATCH] Add ExceptionUtilsGenerator.java from previous versions
> +
> +This is replaced by a gradle task, but gradle depends on groovy, so we
> +need so way to generate the file without gradle.
It might make sense to add a comment which version exactly this was copied from.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 49+ messages in thread
* [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap.
2018-05-01 15:44 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Julien Lepiller
` (21 preceding siblings ...)
2018-05-07 17:58 ` [bug#31333] [PATCH 01/22] gnu: Add groovy-java-bootstrap Danny Milosavljevic
@ 2018-05-07 19:25 ` Björn Höfling
22 siblings, 0 replies; 49+ messages in thread
From: Björn Höfling @ 2018-05-07 19:25 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 31333
[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]
On Tue, 1 May 2018 17:44:28 +0200
Julien Lepiller <julien@lepiller.eu> wrote:
[..]
> diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm new
> file mode 100644 index 000000000..ee2894e30
> --- /dev/null
> +++ b/gnu/packages/groovy.scm
[..]
> +(define groovy-java-bootstrap
> + (package
> + (name "groovy-java-bootstrap")
I would suggest "java-groovy-bootstrap", because it is the
groovy-bootstrap, written in Java. Convention for programs in language
x is to prefix the name with "x-".
> + (version "2.4.15")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> "https://github.com/apache/groovy/archive/GROOVY_"
> + (string-map (lambda (x) (if (eq? x
> #\.) #\_ x)) version)
> + ".tar.gz"))
Snippet missing:
(snippet
'(begin
(delete-file-recursively
"gradle/wrapper/gradle-wrapper.jar") #t))
I tried it out, it still builds the whole series until groovy.
Otherwise, LGTM.
Björn
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 49+ messages in thread