* [bug#43639] [PATCH] [staging] gnu: groovy: Update to 3.0.5.
@ 2020-09-26 22:13 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:13 UTC (permalink / raw)
To: 43639
Hi Guix!
The following patch series updates groovy to 3.0.5. groovy-ant depends
on a newer version of ant/java8 than we have in master, so I had to
update it. This lead me to change the recipe slightly, which
propagated to ant, so I thought I could as well update it as well. The
change to ant's recipe (and version) leads to ~500 rebuilds, so this is
going to staging.
The first three patches are required, but already pushed in master.
Then, I add asm-8 and 3 subpackages. Groovy requires a fork of antlr4,
not antlr4 itself, but this fork has a cyclic dependency on itself.
antlr4 has a runtime library and a binary that generates a parser. The
binary depends on the runtime library. In that fork, the runtime
requires the binary, to generate a parser. To break the cycle, I use an
old version of antlr4 (4.1), and fix the parser (it generates the
parser for a different runtime library after all). Then, I can use this
runtime to build the binary.
Now, the binary uses a runtime that doesn't fully work, so I rebuild
the runtime with it (so this time it generates the parser properly),
and use this runtime to rebuild the final binary.
Then, there's java-javaparser and the actual update of groovy. I
changed the way groovy subprojects are built, using a procedure
(groovy-subproject) that returns a package that builds the subproject.
I also added a few additional subprojects that didn't exist in the
previous version. Unfortunately, I'm missing the junit5 and jaxb
because of missing dependencies.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 01/15] gnu: Add java-treelayout.
2020-09-26 22:13 [bug#43639] [PATCH] [staging] gnu: groovy: Update to 3.0.5 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 02/15] gnu: Add java-antlr4-runtime Julien Lepiller
` (13 more replies)
2020-09-26 22:23 ` [bug#43639] [PATCH 16/16] gnu: groovy: Update to 3.0.5 Julien Lepiller
2020-10-14 1:44 ` bug#43639: [PATCH] [staging] " Julien Lepiller
2 siblings, 14 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-treelayout): New variable.
---
gnu/packages/java.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index e8de1bc154..ad8011fbd8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8168,6 +8168,37 @@ import org.antlr.grammar.v2.ANTLRTreePrinter;"))
(propagated-inputs
`(("stringtemplate" ,java-stringtemplate-3)))))
+(define-public java-treelayout
+ (package
+ (name "java-treelayout")
+ (version "1.0.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/abego/treelayout")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name (string-append ,name "-" ,version ".jar")
+ #:source-dir "org.abego.treelayout/src/main/java"
+ #:test-dir "org.abego.treelayout/src/test"))
+ (inputs
+ `(("java-junit" ,java-junit)))
+ (native-inputs
+ `(("java-hamcrest-core" ,java-hamcrest-core)))
+ (home-page "http://treelayout.sourceforge.net")
+ (synopsis "Tree Layout Algorithm in Java")
+ (description "TreeLayout creates tree layouts for arbitrary trees. It is
+not restricted to a specific output or format, but can be used for any kind of
+two dimensional diagram. Examples are Swing based components, SVG files, etc.
+This is possible because TreeLayout separates the layout of a tree from the
+actual rendering.")
+ (license license:bsd-3)))
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 02/15] gnu: Add java-antlr4-runtime.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 03/15] gnu: Add antlr4 Julien Lepiller
` (12 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-antlr4-runtime): New variable.
* gnu/packages/patches/java-antlr4-Add-standalone-generator.patch: New
file.
* gnu/packages/patches/java-antlr4-fix-code-too-large.java: New file.
* gnu/local.mk (dist_patch_DATA): Add them.
---
gnu/local.mk | 2 +
gnu/packages/java.scm | 34 +++++++
...java-antlr4-Add-standalone-generator.patch | 52 +++++++++++
.../java-antlr4-fix-code-too-large.java | 90 +++++++++++++++++++
4 files changed, 178 insertions(+)
create mode 100644 gnu/packages/patches/java-antlr4-Add-standalone-generator.patch
create mode 100644 gnu/packages/patches/java-antlr4-fix-code-too-large.java
diff --git a/gnu/local.mk b/gnu/local.mk
index ba94adfe72..8e2f1976bf 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1159,6 +1159,8 @@ dist_patch_DATA = \
%D%/packages/patches/jamvm-2.0.0-aarch64-support.patch \
%D%/packages/patches/jamvm-2.0.0-disable-branch-patching.patch \
%D%/packages/patches/jamvm-2.0.0-opcode-guard.patch \
+ %D%/packages/patches/java-antlr4-Add-standalone-generator.patch \
+ %D%/packages/patches/java-antlr4-fix-code-too-large.java \
%D%/packages/patches/java-apache-ivy-port-to-latest-bouncycastle.patch \
%D%/packages/patches/java-commons-collections-fix-java8.patch \
%D%/packages/patches/java-jeromq-fix-tests.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index ad8011fbd8..0fd0d5e29f 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8199,6 +8199,40 @@ This is possible because TreeLayout separates the layout of a tree from the
actual rendering.")
(license license:bsd-3)))
+(define-public java-antlr4-runtime
+ (package
+ (name "java-antlr4-runtime")
+ (version "4.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/antlr/antlr4")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
+ (patches
+ (search-patches "java-antlr4-Add-standalone-generator.patch"
+ "java-antlr4-fix-code-too-large.java"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "java-antlr4-runtime.jar"
+ #:source-dir "runtime/Java/src/org"
+ #:tests? #f; tests depend on java-antlr4 itself
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "runtime/Java/src/main/dot"
+ "build/classes")
+ #t)))))
+ (home-page "https://antlr.org")
+ (synopsis "ANTLR runtime library")
+ (description "This package contains the runtime library used with generated
+sources by ANTLR.")
+ (license license:bsd-3)))
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
diff --git a/gnu/packages/patches/java-antlr4-Add-standalone-generator.patch b/gnu/packages/patches/java-antlr4-Add-standalone-generator.patch
new file mode 100644
index 0000000000..75b6dce39f
--- /dev/null
+++ b/gnu/packages/patches/java-antlr4-Add-standalone-generator.patch
@@ -0,0 +1,52 @@
+From 3b43b79da15be994348f13035474925ba592fe1f Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Fri, 15 Sep 2017 10:06:42 +0200
+Subject: [PATCH] Add standalone template generator
+
+---
+ tool/src/org/antlr/v4/unicode/UnicodeRenderer.java | 33 ++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+ create mode 100644 tool/src/org/antlr/v4/unicode/UnicodeRenderer.java
+
+diff --git a/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java b/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java
+new file mode 100644
+index 0000000..9e53213
+--- /dev/null
++++ b/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java
+@@ -0,0 +1,33 @@
++package org.antlr.v4.unicode;
++
++import org.stringtemplate.v4.*;
++import org.stringtemplate.v4.misc.ErrorBuffer;
++import org.antlr.v4.unicode.UnicodeDataTemplateController;
++
++import java.io.File;
++import java.io.FileWriter;
++import java.io.IOException;
++import java.util.Map;
++import java.util.Map.Entry;
++
++public class UnicodeRenderer extends UnicodeDataTemplateController {
++ public static void main(String[] arg)
++ throws IOException {
++ String inputdir = arg[0];
++ String input = arg[1];
++ String output = arg[2];
++
++ FileWriter fileWriter = new FileWriter(new File(output));
++ ErrorBuffer listener = new ErrorBuffer();
++
++ STGroupDir group = new STGroupDir(inputdir);
++ ST st = group.getInstanceOf(input);
++
++ for(Entry<String, Object> entry : getProperties().entrySet())
++ st.add(entry.getKey(), entry.getValue());
++
++ st.write(new AutoIndentWriter(fileWriter), listener);
++ fileWriter.flush();
++ fileWriter.close();
++ }
++}
+--
+2.13.5
+
diff --git a/gnu/packages/patches/java-antlr4-fix-code-too-large.java b/gnu/packages/patches/java-antlr4-fix-code-too-large.java
new file mode 100644
index 0000000000..9e9f92349d
--- /dev/null
+++ b/gnu/packages/patches/java-antlr4-fix-code-too-large.java
@@ -0,0 +1,90 @@
+From d22db2048534bdf3d9615117291f9d86564ff10d Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sat, 19 Sep 2020 21:05:48 +0200
+Subject: [PATCH] Separate addPropertyAliases in two methods
+
+The quantity of data used to generate addPropertyAliases creates a big
+method, that is too big for java and results in "error: code too large".
+This is most likely due to added data between the expected version of
+icu and the actual version of icu in Guix.
+---
+ .../org/antlr/v4/tool/templates/unicodedata.st | 17 ++++++++++++++---
+ .../unicode/UnicodeDataTemplateController.java | 18 ++++++++++--------
+ 2 files changed, 24 insertions(+), 11 deletions(-)
+
+diff --git a/tool/resources/org/antlr/v4/tool/templates/unicodedata.st b/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
+index 0f22c73..3573873 100644
+--- a/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
++++ b/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
+@@ -1,4 +1,4 @@
+-unicodedata(propertyCodePointRanges, propertyAliases) ::= <<
++unicodedata(propertyCodePointRanges, propertyAliasesA, propertyAliasesB) ::= <<
+ package org.antlr.v4.unicode;
+
+ import java.util.Arrays;
+@@ -15,7 +15,7 @@ import org.antlr.v4.runtime.misc.Interval;
+ */
+ public abstract class UnicodeData {
+ private static final Map\<String, IntervalSet\> propertyCodePointRanges = new HashMap\<\>(<length(propertyCodePointRanges)>);
+- private static final Map\<String, String\> propertyAliases = new HashMap\<\>(<length(propertyAliases)>);
++ private static final Map\<String, String\> propertyAliases = new HashMap\<\>(<length(propertyAliasesA)> + <length(propertyAliasesB)>);
+
+ // Work around Java 64k bytecode method limit by splitting up static
+ // initialization into one method per Unicode property
+@@ -30,9 +30,20 @@ static private void addProperty<i>() {
+ propertyCodePointRanges.put("<k>".toLowerCase(Locale.US), codePointRanges);
+ \}}; separator="\n\n">
+
++ // Property aliases
++ static private void addPropertyAliases1() {
++ <propertyAliasesA.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliasesA.(k)>".toLowerCase(Locale.US)); }; separator="\n">
++ }
++
++ // Property aliases
++ static private void addPropertyAliases2() {
++ <propertyAliasesB.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliasesB.(k)>".toLowerCase(Locale.US)); }; separator="\n">
++ }
++
+ // Property aliases
+ static private void addPropertyAliases() {
+- <propertyAliases.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliases.(k)>".toLowerCase(Locale.US)); }; separator="\n">
++ addPropertyAliases1();
++ addPropertyAliases2();
+ }
+
+ // Put it all together
+diff --git a/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java b/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
+index da244a3..dc591cb 100644
+--- a/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
++++ b/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
+@@ -78,17 +78,19 @@ public abstract class UnicodeDataTemplateController {
+ addTR35ExtendedPictographicPropertyCodesToCodePointRanges(propertyCodePointRanges);
+ addEmojiPresentationPropertyCodesToCodePointRanges(propertyCodePointRanges);
+
+- Map<String, String> propertyAliases = new LinkedHashMap<>();
+- addUnicodeCategoryCodesToNames(propertyAliases);
+- addUnicodeBinaryPropertyCodesToNames(propertyAliases);
+- addUnicodeScriptCodesToNames(propertyAliases);
+- addUnicodeBlocksToNames(propertyAliases);
+- addUnicodeIntPropertyCodesToNames(propertyAliases);
+- propertyAliases.put("EP", "Extended_Pictographic");
++ Map<String, String> propertyAliases1 = new LinkedHashMap<>();
++ Map<String, String> propertyAliases2 = new LinkedHashMap<>();
++ addUnicodeCategoryCodesToNames(propertyAliases1);
++ addUnicodeBinaryPropertyCodesToNames(propertyAliases1);
++ addUnicodeScriptCodesToNames(propertyAliases1);
++ addUnicodeBlocksToNames(propertyAliases2);
++ addUnicodeIntPropertyCodesToNames(propertyAliases2);
++ propertyAliases2.put("EP", "Extended_Pictographic");
+
+ Map<String, Object> properties = new LinkedHashMap<>();
+ properties.put("propertyCodePointRanges", propertyCodePointRanges);
+- properties.put("propertyAliases", propertyAliases);
++ properties.put("propertyAliasesA", propertyAliases1);
++ properties.put("propertyAliasesB", propertyAliases2);
+ return properties;
+ }
+
+--
+2.28.0
+
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 03/15] gnu: Add antlr4.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 02/15] gnu: Add java-antlr4-runtime Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 04/15] gnu: ant/java8: Update to 1.10.8 Julien Lepiller
` (11 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (antlr4): New variable.
---
gnu/packages/java.scm | 161 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 161 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0fd0d5e29f..674135071b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8233,6 +8233,167 @@ actual rendering.")
sources by ANTLR.")
(license license:bsd-3)))
+(define-public antlr4
+ (package
+ (inherit java-antlr4-runtime)
+ (name "antlr4")
+ (arguments
+ `(#:jar-name "antlr4.jar"
+ #:source-dir "tool/src"
+ #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
+ #:test-include (list "**/Test*.java")
+ #:test-exclude (list
+ ;; no runnable method
+ "**/TestOutputReading.java"
+ ;; no @Test methods
+ "**/TestParserErrors.java"
+ "**/TestSemPredEvalParser.java"
+ "**/TestSets.java"
+ "**/TestListeners.java"
+ "**/TestParseTrees.java"
+ "**/TestParserExec.java"
+ "**/TestLexerErrors.java"
+ "**/TestPerformance.java"
+ "**/TestCompositeParsers.java"
+ "**/TestLexerExec.java"
+ "**/TestSemPredEvalLexer.java"
+ "**/TestLeftRecursion.java"
+ "**/TestFullContextParsing.java"
+ "**/TestCompositeLexers.java"
+ ;; Null pointer exception
+ "**/TestCompositeGrammars.java"
+ ;; Wrong assumption on emoji
+ "**/TestUnicodeData.java")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-build.xml
+ (lambda _
+ ;; tests are not in a java subdirectory
+ (substitute* "build.xml"
+ (("\\$\\{test.home\\}/java") "${test.home}"))
+ #t))
+ ;; tests require to have a working antlr4 binary
+ (delete 'check)
+ (add-after 'bin-install 'check
+ (lambda _
+ (invoke "ant" "compile-tests")
+ (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
+ (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
+ (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
+ #t))
+ (add-before 'check 'remove-unrelated-languages
+ (lambda _
+ ;; There are tests for other languages that ANTLR can generate, but
+ ;; we don't have the infrastructure for that yet. Let's test Java
+ ;; generation only.
+ (for-each
+ (lambda (language)
+ (delete-file-recursively
+ (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
+ language)))
+ '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
+ "python3" "swift"))
+ #t))
+ (add-before 'check 'generate-test-parsers
+ (lambda* (#:key outputs #:allow-other-keys)
+ (define (run-antlr dir filename package)
+ (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
+ "-package" package (string-append dir "/" filename)
+ "-Xlog"))
+ (setenv "PATH" (string-append (getenv "PATH") ":"
+ (assoc-ref outputs "out") "/bin"))
+ (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
+ "Java.g4" "org.antlr.v4.test.runtime.java.api")
+ (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
+ "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
+ (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
+ "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
+ #t))
+ (add-before 'check 'remove-graphemes
+ (lambda _
+ ;; When running antlr on grahemes.g4, we get a runtime exception:
+ ;; set is empty. So delete the file that depends on it.
+ (delete-file
+ "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
+ #t))
+ (add-after 'install 'bin-install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
+ (bin (string-append (assoc-ref outputs "out") "/bin")))
+ (mkdir-p bin)
+ (with-output-to-file (string-append bin "/antlr4")
+ (lambda _
+ (display
+ (string-append "#!" (which "sh") "\n"
+ "java -cp " jar "/antlr4.jar:"
+ (string-join
+ (apply
+ append
+ (map
+ (lambda (input)
+ (find-files (assoc-ref inputs input)
+ ".*\\.jar"))
+ '("antlr3" "java-stringtemplate"
+ "java-antlr4-runtime" "java-treelayout"
+ "java-jsonp-api" "java-icu4j")))
+ ":")
+ " org.antlr.v4.Tool $*"))))
+ (chmod (string-append bin "/antlr4") #o755)
+ #t)))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "tool/resources/" "build/classes")
+ #t))
+ (add-before 'build 'generate-unicode
+ (lambda _
+ ;; First: build the generator
+ (invoke "javac" "-cp" (getenv "CLASSPATH")
+ "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
+ "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
+ ;; Then use it
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":tool/src:runtime/Java")
+ "org.antlr.v4.unicode.UnicodeRenderer"
+ "tool/resources/org/antlr/v4/tool/templates"
+ "unicodedata"
+ "tool/src/org/antlr/v4/unicode/UnicodeData.java")
+ ;; It seems there is a bug with our ST4
+ (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
+ (("\\\\>") ">"))
+ ;; Remove the additional file
+ (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
+ #t))
+ (add-before 'build 'generate-grammar
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "tool/src/org/antlr/v4/parse"
+ (for-each (lambda (file)
+ (display file)
+ (newline)
+ (invoke "antlr3" file))
+ '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
+ "GrammarTreeVisitor.g" "ATNBuilder.g"
+ "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
+ (with-directory-excursion "tool/src/org/antlr/v4/codegen"
+ (install-file "../parse/ANTLRParser.tokens" ".")
+ (display "SourceGenTriggers.g\n")
+ (invoke "antlr3" "SourceGenTriggers.g"))
+ #t)))))
+ (inputs
+ `(("antlr3" ,antlr3)
+ ("java-antlr4-runtime" ,java-antlr4-runtime)
+ ("java-icu4j" ,java-icu4j)
+ ("java-jsonp-api" ,java-jsonp-api)
+ ("java-stringtemplate" ,java-stringtemplate)
+ ("java-treelayout" ,java-treelayout)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (synopsis "Parser and lexer generator in Java")
+ (description "ANTLR (ANother Tool for Language Recognition) is a powerful
+parser generator for reading, processing, executing, or translating structured
+text or binary files. It's widely used to build languages, tools, and
+frameworks. From a grammar, ANTLR generates a parser that can build and walk
+parse trees.")))
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 04/15] gnu: ant/java8: Update to 1.10.8.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 02/15] gnu: Add java-antlr4-runtime Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 03/15] gnu: Add antlr4 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 05/15] gnu: ant: Update to 1.9.15 Julien Lepiller
` (10 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (ant/java8): Update to 1.10.8.
---
gnu/packages/java.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 674135071b..dd3ff73e2e 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2431,14 +2431,14 @@ new Date();"))
(define-public ant/java8
(package (inherit ant-bootstrap)
(name "ant")
- (version "1.10.1")
+ (version "1.10.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/ant/source/apache-ant-"
version "-src.tar.gz"))
(sha256
(base32
- "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
+ "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -2466,7 +2466,7 @@ new Date();"))
;; "check" phase, because the dependency on "test-jar" would always
;; result in the tests to be run.
(substitute* "build.xml"
- (("depends=\"jars,test-jar\"") "depends=\"jars\""))
+ (("depends=\"jars,test-jar") "depends=\"jars"))
(invoke "bash" "bootstrap.sh"
(string-append "-Ddist.dir="
(assoc-ref outputs "out")))))))))
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 05/15] gnu: ant: Update to 1.9.15.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (2 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 04/15] gnu: ant/java8: Update to 1.10.8 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 06/15] gnu: Add java-asm-8 Julien Lepiller
` (9 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (ant): Update to 1.9.15.
---
gnu/packages/java.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index dd3ff73e2e..253839e5f4 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2479,14 +2479,14 @@ new Date();"))
;; requires Java 8.
(define-public ant
(package (inherit ant/java8)
- (version "1.9.9")
+ (version "1.9.15")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/ant/source/apache-ant-"
version "-src.tar.gz"))
(sha256
(base32
- "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
+ "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
(native-inputs
`(("jdk" ,icedtea-7 "jdk")
("zip" ,zip)
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 06/15] gnu: Add java-asm-8.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (3 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 05/15] gnu: ant: Update to 1.9.15 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 07/15] gnu: Add java-asm-tree-8 Julien Lepiller
` (8 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-asm-8): New variable.
---
gnu/packages/java.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 253839e5f4..3b6f3bed69 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -5140,6 +5140,30 @@ including java-asm.")
((#:tests? _) #f)))
(native-inputs `())))
+(define-public java-asm-8
+ (package
+ (inherit java-asm)
+ (version "8.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.ow2.org/asm/asm")
+ (commit (string-append
+ "ASM_" (string-join (string-split version #\.)
+ "_")))))
+ (file-name (git-file-name "java-asm" version))
+ (sha256
+ (base32
+ "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
+ (arguments
+ `(#:jar-name "asm8.jar"
+ #:source-dir "asm/src/main/java"
+ #:test-dir "asm/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (propagated-inputs '())
+ (native-inputs '())))
+
(define-public java-cglib
(package
(name "java-cglib")
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 07/15] gnu: Add java-asm-tree-8.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (4 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 06/15] gnu: Add java-asm-8 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 08/15] gnu: Add java-asm-analysis-8 Julien Lepiller
` (7 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-asm-tree-8): New variable.
---
gnu/packages/java.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 3b6f3bed69..5afe22fcd4 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -5164,6 +5164,19 @@ including java-asm.")
(propagated-inputs '())
(native-inputs '())))
+(define-public java-asm-tree-8
+ (package
+ (inherit java-asm-8)
+ (name "java-asm-tree")
+ (arguments
+ `(#:jar-name "asm-tree.jar"
+ #:source-dir "asm-tree/src/main/java"
+ #:test-dir "asm-tree/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (inputs
+ `(("java-asm" ,java-asm-8)))))
+
(define-public java-cglib
(package
(name "java-cglib")
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 08/15] gnu: Add java-asm-analysis-8.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (5 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 07/15] gnu: Add java-asm-tree-8 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 09/15] gnu: Add java-asm-util-8 Julien Lepiller
` (6 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-asm-analysis-8): New variable.
---
gnu/packages/java.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 5afe22fcd4..f1540e5b43 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -5177,6 +5177,20 @@ including java-asm.")
(inputs
`(("java-asm" ,java-asm-8)))))
+(define-public java-asm-analysis-8
+ (package
+ (inherit java-asm-8)
+ (name "java-asm-analysis")
+ (arguments
+ `(#:jar-name "asm-analysis.jar"
+ #:source-dir "asm-analysis/src/main/java"
+ #:test-dir "asm-analysis/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (inputs
+ `(("java-asm" ,java-asm-8)
+ ("java-asm-tree" ,java-asm-tree-8)))))
+
(define-public java-cglib
(package
(name "java-cglib")
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 09/15] gnu: Add java-asm-util-8.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (6 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 08/15] gnu: Add java-asm-analysis-8 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 10/15] gnu: Add java-antlr4-runtime-4.1 Julien Lepiller
` (5 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-asm-util-8): New variable.
---
gnu/packages/java.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index f1540e5b43..0e02528a38 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -5191,6 +5191,21 @@ including java-asm.")
`(("java-asm" ,java-asm-8)
("java-asm-tree" ,java-asm-tree-8)))))
+(define-public java-asm-util-8
+ (package
+ (inherit java-asm-8)
+ (name "java-asm-util")
+ (arguments
+ `(#:jar-name "asm-util8.jar"
+ #:source-dir "asm-util/src/main/java"
+ #:test-dir "asm-util/src/test"
+ ;; tests depend on junit5
+ #:tests? #f))
+ (inputs
+ `(("java-asm" ,java-asm-8)
+ ("java-asm-analysis" ,java-asm-analysis-8)
+ ("java-asm-tree" ,java-asm-tree-8)))))
+
(define-public java-cglib
(package
(name "java-cglib")
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 10/15] gnu: Add java-antlr4-runtime-4.1.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (7 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 09/15] gnu: Add java-asm-util-8 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 11/15] gnu: Add antlr4-4.1 Julien Lepiller
` (4 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-antlr4-runtime-4.1): New variable.
---
gnu/packages/java.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0e02528a38..40a10be8b2 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8460,6 +8460,30 @@ text or binary files. It's widely used to build languages, tools, and
frameworks. From a grammar, ANTLR generates a parser that can build and walk
parse trees.")))
+(define-public java-antlr4-runtime-4.1
+ (package
+ (inherit java-antlr4-runtime)
+ (version "4.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/antlr/antlr4")
+ (commit version)))
+ (file-name (git-file-name "antlr4" version))
+ (sha256
+ (base32
+ "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'configure 'chmod
+ (lambda _
+ (chmod "build.xml" #o644)
+ #t))))))
+ (inputs
+ `(("java-treelayout" ,java-treelayout)))))
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 11/15] gnu: Add antlr4-4.1.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (8 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 10/15] gnu: Add java-antlr4-runtime-4.1 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 12/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime-annotations Julien Lepiller
` (3 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (antlr4-4.1): New variable.
---
gnu/packages/java.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 40a10be8b2..198a06c292 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8484,6 +8484,42 @@ parse trees.")))
(inputs
`(("java-treelayout" ,java-treelayout)))))
+(define-public antlr4-4.1
+ (package
+ (inherit antlr4)
+ (version (package-version java-antlr4-runtime-4.1))
+ (source (package-source java-antlr4-runtime-4.1))
+ (arguments
+ (substitute-keyword-arguments (package-arguments antlr4)
+ ((#:test-dir _)
+ "tool/test")
+ ((#:test-exclude excludes)
+ `(list "**/TestParseErrors.java"
+ "**/TestTopologicalSort.java"
+ ,@excludes))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'generate-unicode)
+ (replace 'check
+ (lambda _
+ (invoke "ant" "check")
+ #t))
+ (add-before 'configure 'chmod
+ (lambda _
+ (chmod "build.xml" #o644)
+ #t))
+ (delete 'remove-graphemes)
+ (delete 'remove-unrelated-languages)
+ (delete 'generate-test-parsers)))))
+ (inputs
+ (map
+ (match-lambda
+ ((name package)
+ (if (equal? name "java-antlr4-runtime")
+ (list name java-antlr4-runtime-4.1)
+ (list name package))))
+ (package-inputs antlr4)))))
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 12/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime-annotations.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (9 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 11/15] gnu: Add antlr4-4.1 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 13/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime Julien Lepiller
` (2 subsequent siblings)
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm
(java-tunnelvisionlabs-antlr4-runtime-annotations): New variable.
* gnu/packages/patches/java-tunnelvisionlabs-antlr-code-too-large.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/java.scm | 38 ++++++++
...unnelvisionlabs-antlr-code-too-large.patch | 87 +++++++++++++++++++
3 files changed, 126 insertions(+)
create mode 100644 gnu/packages/patches/java-tunnelvisionlabs-antlr-code-too-large.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 8e2f1976bf..01a825721d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1161,6 +1161,7 @@ dist_patch_DATA = \
%D%/packages/patches/jamvm-2.0.0-opcode-guard.patch \
%D%/packages/patches/java-antlr4-Add-standalone-generator.patch \
%D%/packages/patches/java-antlr4-fix-code-too-large.java \
+ %D%/packages/patches/java-tunnelvisionlabs-antlr-code-too-large.patch \
%D%/packages/patches/java-apache-ivy-port-to-latest-bouncycastle.patch \
%D%/packages/patches/java-commons-collections-fix-java8.patch \
%D%/packages/patches/java-jeromq-fix-tests.patch \
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 198a06c292..73a5fbd693 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8520,6 +8520,44 @@ parse trees.")))
(list name package))))
(package-inputs antlr4)))))
+(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
+ (package
+ (inherit java-antlr4-runtime)
+ (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
+ (version "4.7.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tunnelvisionlabs/antlr4")
+ (commit (string-append version "-opt"))))
+ (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
+ (sha256
+ (base32
+ "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
+ (patches
+ (search-patches "java-antlr4-Add-standalone-generator.patch"
+ "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
+ (arguments
+ `(#:jar-name "java-antlr4-runtime-annotations.jar"
+ #:source-dir "runtime/JavaAnnotations/src"
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'copy-resources
+ (lambda _
+ (copy-recursively "runtime/JavaAnnotations/resources"
+ "build/classes")
+ #t))
+ (add-after 'copy-resources 'rebuild-jar
+ (lambda _
+ (invoke "ant" "jar")
+ #t)))))
+ (inputs '())
+ (native-inputs '())
+ (synopsis "Annotations for ANTLR's runtime library")
+ (description "This package contains annotations used during the build of
+the runtime library of ANTLR.")))
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
diff --git a/gnu/packages/patches/java-tunnelvisionlabs-antlr-code-too-large.patch b/gnu/packages/patches/java-tunnelvisionlabs-antlr-code-too-large.patch
new file mode 100644
index 0000000000..7bdf05eb9c
--- /dev/null
+++ b/gnu/packages/patches/java-tunnelvisionlabs-antlr-code-too-large.patch
@@ -0,0 +1,87 @@
+From 56ae699a27eca52cc0bb14cbc9944b62136be52b Mon Sep 17 00:00:00 2001
+From: Julien Lepiller <julien@lepiller.eu>
+Date: Sun, 20 Sep 2020 21:07:29 +0200
+Subject: [PATCH] Separate addPropertyAliases in two methods
+
+The quantity of data used to generate addPropertyAliases creates a big
+method, that is too big for java and results in "error: code too large".
+This is most likely due to added data between the expected version of
+icu and the actual version of icu in Guix.
+---
+ .../org/antlr/v4/tool/templates/unicodedata.st | 15 ++++++++++++---
+ .../unicode/UnicodeDataTemplateController.java | 18 ++++++++++--------
+ 2 files changed, 22 insertions(+), 11 deletions(-)
+
+diff --git a/tool/resources/org/antlr/v4/tool/templates/unicodedata.st b/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
+index f5052b7..125d15b 100644
+--- a/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
++++ b/tool/resources/org/antlr/v4/tool/templates/unicodedata.st
+@@ -1,4 +1,4 @@
+-unicodedata(propertyCodePointRanges, propertyAliases) ::= <<
++unicodedata(propertyCodePointRanges, propertyAliasesA, propertyAliasesB) ::= <<
+ package org.antlr.v4.unicode;
+
+ import java.util.Arrays;
+@@ -17,7 +17,7 @@ public enum UnicodeData {
+ ;
+
+ private static final Map\<String, IntervalSet\> propertyCodePointRanges = new HashMap\<String, IntervalSet\>(<length(propertyCodePointRanges)>);
+- private static final Map\<String, String\> propertyAliases = new HashMap\<String, String\>(<length(propertyAliases)>);
++ private static final Map\<String, String\> propertyAliases = new HashMap\<String, String\>(<length(propertyAliasesA)> + <length(propertyAliasesB)>);
+
+ // Work around Java 64k bytecode method limit by splitting up static
+ // initialization into one method per Unicode property
+@@ -33,8 +33,17 @@ static private void addProperty<i>() {
+ \}}; separator="\n\n">
+
+ // Property aliases
++ static private void addPropertyAliasesA() {
++ <propertyAliasesA.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliasesA.(k)>".toLowerCase(Locale.US)); }; separator="\n">
++ }
++
++ static private void addPropertyAliasesB() {
++ <propertyAliasesB.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliasesB.(k)>".toLowerCase(Locale.US)); }; separator="\n">
++ }
++
+ static private void addPropertyAliases() {
+- <propertyAliases.keys:{ k | propertyAliases.put("<k>".toLowerCase(Locale.US), "<propertyAliases.(k)>".toLowerCase(Locale.US)); }; separator="\n">
++ addPropertyAliasesA();
++ addPropertyAliasesB();
+ }
+
+ // Put it all together
+diff --git a/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java b/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
+index 570190c..692cee0 100644
+--- a/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
++++ b/tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java
+@@ -74,17 +74,19 @@ public abstract class UnicodeDataTemplateController {
+ addTR35ExtendedPictographicPropertyCodesToCodePointRanges(propertyCodePointRanges);
+ addEmojiPresentationPropertyCodesToCodePointRanges(propertyCodePointRanges);
+
+- Map<String, String> propertyAliases = new LinkedHashMap<String, String>();
+- addUnicodeCategoryCodesToNames(propertyAliases);
+- addUnicodeBinaryPropertyCodesToNames(propertyAliases);
+- addUnicodeScriptCodesToNames(propertyAliases);
+- addUnicodeBlocksToNames(propertyAliases);
+- addUnicodeIntPropertyCodesToNames(propertyAliases);
+- propertyAliases.put("EP", "Extended_Pictographic");
++ Map<String, String> propertyAliasesA = new LinkedHashMap<String, String>();
++ Map<String, String> propertyAliasesB = new LinkedHashMap<String, String>();
++ addUnicodeCategoryCodesToNames(propertyAliasesA);
++ addUnicodeBinaryPropertyCodesToNames(propertyAliasesA);
++ addUnicodeScriptCodesToNames(propertyAliasesA);
++ addUnicodeBlocksToNames(propertyAliasesB);
++ addUnicodeIntPropertyCodesToNames(propertyAliasesB);
++ propertyAliasesB.put("EP", "Extended_Pictographic");
+
+ Map<String, Object> properties = new LinkedHashMap<String, Object>();
+ properties.put("propertyCodePointRanges", propertyCodePointRanges);
+- properties.put("propertyAliases", propertyAliases);
++ properties.put("propertyAliasesA", propertyAliasesA);
++ properties.put("propertyAliasesB", propertyAliasesB);
+ return properties;
+ }
+
+--
+2.28.0
+
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 13/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (10 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 12/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime-annotations Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 14/15] gnu: Add java-tunnelvisionlabs-antlr4 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 15/15] gnu: Add java-javaparser Julien Lepiller
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-tunnelvisionlabs-antlr4-runtime): New
variable.
---
gnu/packages/java.scm | 73 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 73a5fbd693..83d26c4ab4 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8558,6 +8558,79 @@ parse trees.")))
(description "This package contains annotations used during the build of
the runtime library of ANTLR.")))
+(define java-tunnelvisionlabs-antlr4-runtime-bootstrap
+ (package
+ (inherit java-antlr4-runtime)
+ (name "java-tunnelvisionlabs-antlr4-runtime")
+ (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (arguments
+ `(#:jar-name "java-antlr4-runtime.jar"
+ #:source-dir "runtime/Java/src"
+ #:tests? #f; tests require antlr4, but antlr4 depends on this package
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-xpath-lexer
+ (lambda _
+ (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
+ "-visitor" "-no-listener"
+ "-package" "org.antlr.v4.runtime.tree.xpath"
+ "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
+ ;; Generated code is for an incompatible version of the runtime
+ (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
+ (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
+ "LexerATNSimulator(this,_ATN)"))
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "runtime/Java/src/main/dot"
+ "build/classes")
+ #t)))))
+ (native-inputs
+ `(("antlr4" ,antlr4-4.1)
+ ("java-tunnelvisionlabs-antlr4-runtime-annotations"
+ ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
+
+(define java-tunnelvisionlabs-antlr4-bootstrap
+ (package
+ (inherit antlr4)
+ (name "java-tunnelvisionlabs-antlr4")
+ (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
+ (arguments
+ (substitute-keyword-arguments (package-arguments antlr4)
+ ((#:test-dir _)
+ "tool/test:runtime-testsuite/src")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'remove-unrelated-languages)
+ (delete 'remove-graphemes)
+ (delete 'generate-test-parsers)
+ (delete 'check)))))
+ (native-inputs '())
+ (inputs
+ `(("antlr3" ,antlr3)
+ ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
+ ("java-tunnelvisionlabs-antlr4-runtime-annotations"
+ ,java-tunnelvisionlabs-antlr4-runtime-annotations)
+ ("java-icu4j" ,java-icu4j)
+ ("java-jsonp-api" ,java-jsonp-api)
+ ("java-stringtemplate" ,java-stringtemplate)
+ ("java-treelayout" ,java-treelayout)))))
+
+(define-public java-tunnelvisionlabs-antlr4-runtime
+ (package
+ (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
+ (native-inputs
+ (map
+ (match-lambda
+ ((name package)
+ (if (equal? name "antlr4")
+ (list name java-tunnelvisionlabs-antlr4-bootstrap)
+ (list name package))))
+ (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
+
+
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
(package
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 14/15] gnu: Add java-tunnelvisionlabs-antlr4.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (11 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 13/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 15/15] gnu: Add java-javaparser Julien Lepiller
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-tunnelvisionlabs-antlr4): New variable.
---
gnu/packages/java.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 83d26c4ab4..8b6f3f945b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -8630,6 +8630,17 @@ the runtime library of ANTLR.")))
(list name package))))
(package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
+(define-public java-tunnelvisionlabs-antlr4
+ (package
+ (inherit java-tunnelvisionlabs-antlr4-bootstrap)
+ (inputs
+ (map
+ (match-lambda
+ ((name package)
+ (if (equal? name "java-antlr4-runtime")
+ (list name java-tunnelvisionlabs-antlr4-runtime)
+ (list name package))))
+ (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
(define-public java-commons-cli-1.2
;; This is a bootstrap dependency for Maven2.
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 15/15] gnu: Add java-javaparser.
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
` (12 preceding siblings ...)
2020-09-26 22:18 ` [bug#43639] [PATCH 14/15] gnu: Add java-tunnelvisionlabs-antlr4 Julien Lepiller
@ 2020-09-26 22:18 ` Julien Lepiller
13 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:18 UTC (permalink / raw)
To: 43639
* gnu/packages/java.scm (java-javaparser): New variable.
---
gnu/packages/java.scm | 95 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 8b6f3f945b..c96fee2bb5 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -13441,3 +13441,98 @@ in Java, usable from Groovy, Kotlin, Scala, etc.")
used in JVM-based languages. They serve as an additional documentation and
can be interpreted by IDEs and static analysis tools to improve code analysis.")
(license license:expat)))
+
+(define-public java-javaparser
+ (package
+ (name "java-javaparser")
+ (version "3.16.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/javaparser/javaparser")
+ (commit (string-append "javaparser-parent-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file
+ (find-files "." "\\.jar$"))
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f; tests require jbehave and junit5
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fill-template
+ (lambda _
+ (with-directory-excursion "javaparser-core/src/main"
+ (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
+ "java/com/github/javaparser/JavaParserBuild.java")
+ (substitute* "java/com/github/javaparser/JavaParserBuild.java"
+ (("\\$\\{project.version\\}") ,version)
+ (("\\$\\{project.name\\}") "javaparser")
+ (("\\$\\{project.build.finalName\\}") "javaparser")
+ (("\\$\\{maven.version\\}") "fake")
+ (("\\$\\{maven.build.version\\}") "fake")
+ (("\\$\\{build.timestamp\\}") "0")
+ (("\\$\\{java.vendor\\}") "Guix")
+ (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
+ (("\\$\\{java.version\\}") "1.8")
+ (("\\$\\{os.arch\\}") "any")
+ (("\\$\\{os.name\\}") "GuixSD")
+ (("\\$\\{os.version\\}") "not available")))
+ #t))
+ (add-before 'build 'generate-javacc
+ (lambda _
+ (with-directory-excursion "javaparser-core/src/main/java"
+ (invoke "java" "javacc" "../javacc/java.jj"))
+ #t))
+ (add-before 'build 'copy-javacc-support
+ (lambda _
+ (with-directory-excursion "javaparser-core/src/main"
+ (copy-recursively "javacc-support" "java"))
+ #t))
+ (replace 'build
+ (lambda _
+ (define (build name)
+ (format #t "Building ~a~%" name)
+ (delete-file-recursively "build/classes")
+ (mkdir-p "build/classes")
+ (apply invoke "javac"
+ "-cp" (string-append (getenv "CLASSPATH") ":"
+ (string-join (find-files "build/jar" ".")
+ ":"))
+ "-d" "build/classes"
+ (find-files (string-append name "/src/main/java")
+ ".*.java"))
+ (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
+ "-C" "build/classes" "."))
+ (mkdir-p "build/classes")
+ (mkdir-p "build/test-classes")
+ (mkdir-p "build/jar")
+ (build "javaparser-core")
+ (build "javaparser-core-serialization")
+ (build "javaparser-core-generators")
+ (build "javaparser-core-metamodel-generator")
+ (build "javaparser-symbol-solver-core")
+ #t))
+ (replace 'install
+ (install-jars "build/jar")))))
+ (inputs
+ `(("java-guava" ,java-guava)
+ ("java-jboss-javassist" ,java-jboss-javassist)
+ ("java-jsonp-api" ,java-jsonp-api)))
+ (native-inputs
+ `(("javacc" ,javacc)))
+ (home-page "http://javaparser.org/")
+ (synopsis "Parser for Java")
+ (description
+ "This project contains a set of libraries implementing a Java 1.0 - Java
+11 Parser with advanced analysis functionalities.")
+ (license (list
+ ;; either lgpl or asl
+ license:lgpl3+
+ license:asl2.0))))
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#43639] [PATCH 16/16] gnu: groovy: Update to 3.0.5.
2020-09-26 22:13 [bug#43639] [PATCH] [staging] gnu: groovy: Update to 3.0.5 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
@ 2020-09-26 22:23 ` Julien Lepiller
2020-10-14 1:44 ` bug#43639: [PATCH] [staging] " Julien Lepiller
2 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-09-26 22:23 UTC (permalink / raw)
To: 43639
* gnu/packages/groovy.scm (groovy): Update to 3.0.5.
---
gnu/packages/groovy.scm | 1430 ++++++++++++++++-----------------------
1 file changed, 577 insertions(+), 853 deletions(-)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index e21c4e3775..c44a17b59e 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -31,7 +31,7 @@
(define java-groovy-bootstrap
(package
(name "java-groovy-bootstrap")
- (version "2.4.15")
+ (version "3.0.5")
(source
(origin
(method git-fetch)
@@ -43,57 +43,69 @@
version)))))
(file-name (git-file-name name version))
(sha256
- (base32 "1q4cplimr18j93zz92kgq8b6wdv0p9svr7cdr47q8b2mbjpd0x3j"))
+ (base32 "00556qxjmcn3a3xhfy6n0zw3d69mnw72vzm2rb6n4ihzkk7579nm"))
(patches
(search-patches "groovy-add-exceptionutilsgenerator.patch"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "groovy.jar"
- #:source-dir "src/main:subprojects/groovy-test/src/main/java"
+ #:source-dir "src/main/java:src/main/antlr2:subprojects/parser-antlr4/src/main/java:src/antlr"
#:test-dir "src/test"
#:tests? #f
- #:jdk ,icedtea-8
+ #:jdk ,openjdk9
#:main-class "groovy.ui.GroovyMain"
#: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)"))
- #t))
(add-before 'build 'generate-parsers
(lambda _
- (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java"
+ (with-directory-excursion "src/main/antlr2/org/codehaus/groovy/antlr/java"
(invoke "antlr" "java.g"))
- (with-directory-excursion "src/main/org/codehaus/groovy/antlr"
+ (with-directory-excursion "src/main/antlr2/org/codehaus/groovy/antlr"
(mkdir "parser")
(with-directory-excursion "parser"
(invoke "antlr" "../groovy.g")))
+ (invoke "antlr4" "-lib" "src/antlr"
+ "-package" "org.apache.groovy.parser.antlr4"
+ "-visitor" "-no-listener" "src/antlr/GroovyLexer.g4")
+ (invoke "antlr4" "-lib" "src/antlr"
+ "-package" "org.apache.groovy.parser.antlr4"
+ "-visitor" "-no-listener" "src/antlr/GroovyParser.g4")
#t))
(add-before 'build 'generate-exception-utils
(lambda _
(invoke "javac" "-cp" (getenv "CLASSPATH")
+ "-source" "1.8" "-target" "1.8"
"config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java")
(invoke "java" "-cp" (string-append (getenv "CLASSPATH")
":config/ant/src")
"org.codehaus.groovy.ExceptionUtilsGenerator"
"build/classes/org/codehaus/groovy/runtime/ExceptionUtils.class")
+ #t))
+ (add-before 'build 'set-source-level
+ (lambda _
+ (substitute* "build.xml"
+ (("<javac") "<javac source=\"1.8\" target=\"1.8\""))
#t)))))
(native-inputs
- `(("java-junit" ,java-junit)
+ `(("antlr2" ,antlr2)
+ ("antlr4" ,java-tunnelvisionlabs-antlr4)
+ ("java-jsr305" ,java-jsr305)
+ ("java-junit" ,java-junit)
("java-hamcrest-core" ,java-hamcrest-core)
- ("antlr2" ,antlr2)
("java-jmock-1" ,java-jmock-1)
("java-xmlunit-legacy" ,java-xmlunit-legacy)))
(inputs
- `(("java-commons-cli" ,java-commons-cli)
- ("java-asm" ,java-asm)
+ `(("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime)
+ ("java-antlr4-runtime-annotations"
+ ,java-tunnelvisionlabs-antlr4-runtime-annotations)
+ ("java-asm" ,java-asm-8)
+ ("java-asm-util" ,java-asm-util-8)
("java-classpathx-servletapi" ,java-classpathx-servletapi)
- ("java-xstream" ,java-xstream)
+ ("java-commons-cli" ,java-commons-cli)
("java-jansi" ,java-jansi)
- ("java-jline-2" ,java-jline-2)))
+ ("java-jline-2" ,java-jline-2)
+ ("java-picocli" ,java-picocli)
+ ("java-xstream" ,java-xstream)))
(home-page "http://groovy-lang.org/")
(synopsis "Groovy's java bootstrap")
(description "This package contains the java bootstrap that is used to build
@@ -106,26 +118,25 @@ groovy submodules.")
(name "groovy-bootstrap")
(arguments
`(#:jar-name "groovy.jar"
- #:jdk ,icedtea-8
+ #:jdk ,openjdk9
;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)"))
- #t))
(add-before 'build 'generate-parser
(lambda _
- (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java"
+ (with-directory-excursion "src/main/antlr2/org/codehaus/groovy/antlr/java"
(invoke "antlr" "java.g"))
- (with-directory-excursion "src/main/org/codehaus/groovy/antlr"
+ (with-directory-excursion "src/main/antlr2/org/codehaus/groovy/antlr"
(mkdir "parser")
(with-directory-excursion "parser"
(invoke "antlr" "../groovy.g")))
+ (invoke "antlr4" "-lib" "src/antlr"
+ "-package" "org.apache.groovy.parser.antlr4"
+ "-visitor" "-no-listener" "src/antlr/GroovyLexer.g4")
+ (invoke "antlr4" "-lib" "src/antlr"
+ "-package" "org.apache.groovy.parser.antlr4"
+ "-visitor" "-no-listener" "src/antlr/GroovyParser.g4")
#t))
(add-before 'build 'generate-exception-utils
(lambda _
@@ -141,19 +152,19 @@ groovy submodules.")
(mkdir-p "target/classes/org/codehaus/groovy/runtime")
(mkdir-p "target/classes/META-INF")
(invoke "javac" "-cp" (getenv "CLASSPATH")
- "src/main/org/codehaus/groovy/tools/DgmConverter.java")
+ "src/main/java/org/codehaus/groovy/tools/DgmConverter.java")
(invoke "java" "-cp" (string-append (getenv "CLASSPATH")
- ":src/main")
+ ":src/main/java")
"org.codehaus.groovy.tools.DgmConverter")
#t))
(add-before 'build 'copy-resources
(lambda _
- (with-directory-excursion "src/main"
+ (with-directory-excursion "src/main/java"
(for-each (lambda (file)
- (mkdir-p (string-append "../../target/classes/"
+ (mkdir-p (string-append "../../../target/classes/"
(dirname file)))
(copy-file file
- (string-append "../../target/classes/"
+ (string-append "../../../target/classes/"
file)))
(find-files "." ".*.(txt|properties|xml|html)")))
#t))
@@ -162,6 +173,7 @@ groovy submodules.")
(mkdir-p "build/jar")
(apply invoke "java" "-cp" (getenv "CLASSPATH")
"org.codehaus.groovy.tools.FileSystemCompiler"
+ "-cp" (getenv "CLASSPATH")
"-d" "target/classes"
"-j"; joint compilation
(find-files "src/main"
@@ -186,7 +198,7 @@ is used to build the groovy submodules written in groovy.")))
(name "groovy-tests-bootstrap")
(arguments
`(#:jar-name "groovy-tests-bootstrap.jar"
- #:jdk ,icedtea-8
+ #:jdk ,openjdk9
#:tests? #f; no tests
#:phases
(modify-phases %standard-phases
@@ -196,17 +208,20 @@ is used to build the groovy submodules written in groovy.")))
(mkdir-p "build/jar")
(apply invoke "java" "-cp" (getenv "CLASSPATH")
"org.codehaus.groovy.tools.FileSystemCompiler"
+ "-cp" (getenv "CLASSPATH")
"-d" "build/classes"
"-j"; joint compilation
(append
(find-files "src/test" "TestSupport.java")
(find-files "src/test" "HeadlessTestSupport.java")
+ (find-files "src/test" "AstAssert.groovy")
(find-files "src/test" "XmlAssert.java")))
(invoke "jar" "-cf" "build/jar/groovy-tests-bootstrap.jar"
"-C" "build/classes" ".")
#t)))))
(inputs
`(("groovy-test" ,groovy-test)
+ ("groovy-parser-antlr4" ,groovy-parser-antlr4)
,@(package-inputs groovy-bootstrap)))
(native-inputs
`(("groovy-bootstrap" ,groovy-bootstrap)
@@ -215,855 +230,548 @@ is used to build the groovy submodules written in groovy.")))
(description "This package contains three classes required for testing
other groovy submodules.")))
+(define (groovy-subproject name)
+ (package
+ (inherit groovy-bootstrap)
+ (name name)
+ (arguments
+ `(#:jar-name ,(string-append name ".jar")
+ #:test-dir ,(string-append name "/src/test")
+ #:test-include (list "**/*Test.java" "**/*.groovy")
+ #:jdk ,openjdk9
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (mkdir-p "build/classes")
+ (mkdir-p "build/jar")
+ (apply invoke "java" "-cp" (getenv "CLASSPATH")
+ "org.codehaus.groovy.tools.FileSystemCompiler"
+ "-cp" (getenv "CLASSPATH")
+ "-d" "build/classes" "-j"
+ (append
+ (find-files ,(string-append "subprojects/" name "/src/main/java")
+ ".*\\.(groovy|java)$")
+ (find-files ,(string-append "subprojects/" name "/src/main/groovy")
+ ".*\\.(groovy|java)$")))
+ (invoke "jar" "-cf" ,(string-append "build/jar/" name ".jar")
+ "-C" "build/classes" ".")
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (let ((resource-dir ,(string-append "subprojects/" name
+ "/src/main/resources")))
+ (when (file-exists? resource-dir)
+ (copy-recursively resource-dir "build/classes")))
+ #t))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (mkdir-p "build/test-classes")
+ (substitute* "build.xml"
+ (("depends=\"compile-tests\"") "depends=\"\"")
+ (("}/java") "}/"))
+ (apply invoke "java" "-cp"
+ (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.groovy.tools.FileSystemCompiler" "-cp"
+ (string-append (getenv "CLASSPATH") ":build/classes")
+ "-d" "build/test-classes" "-j"
+ (append
+ (find-files ,(string-append "subprojects/" name "/src/test/java")
+ ".*\\.(groovy|java)$")
+ (find-files ,(string-append "subprojects/" name "/src/test/groovy")
+ ".*\\.(groovy|java)$")))
+ (invoke "ant" "check"))
+ #t)))))))
+
+(define groovy-parser-antlr4
+ (let ((base (groovy-subproject "parser-antlr4")))
+ (package
+ (inherit base)
+ (name "groovy-parser-antlr4")
+ (arguments
+ `(#:tests? #f
+ ,@(substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'build 'generate-parser
+ (lambda _
+ (invoke "antlr4" "-lib" "src/antlr"
+ "-package" "org.apache.groovy.parser.antlr4"
+ "-visitor" "-no-listener" "src/antlr/GroovyLexer.g4")
+ (invoke "antlr4" "-lib" "src/antlr"
+ "-package" "org.apache.groovy.parser.antlr4"
+ "-visitor" "-no-listener" "src/antlr/GroovyParser.g4")
+ (for-each
+ (lambda (file)
+ (install-file file
+ "subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4"))
+ (find-files "src/antlr" ".*.java$"))
+ #t)))))))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ,@(package-native-inputs java-groovy-bootstrap)))
+ (synopsis "Groovy antlr4 parser submodule")
+ (description "This package contains the new parser Parrot for Groovy, which
+is based on Antlr4. The new parser can parse Groovy source code and construct
+the related AST, which is almost identical to the one generated by the old
+parser. Currently all features of Groovy are available."))))
+
(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")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "subprojects/groovy-test/src/main"
- ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-test.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ,@(package-native-inputs java-groovy-bootstrap)))
- (synopsis "Groovy test submodule")
- (description "This package contains the test submodules used to test
-other groovy submodules.")))
+ (let ((base (groovy-subproject "groovy-test")))
+ (package
+ (inherit base)
+ (arguments
+ `(;#:tests? #f
+ ,@(package-arguments base)))
+ (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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-xml.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ("groovy-test" ,groovy-test)
- ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
- ,@(package-native-inputs java-groovy-bootstrap)))
- (synopsis "Groovy XML")
- (description "This package contains XML-related utilities for groovy.")))
+ (let ((base (groovy-subproject "groovy-xml")))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (inputs
+ `(("groovy-parser-antlr4" ,groovy-parser-antlr4)
+ ,@(package-inputs base)))
+ (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")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "subprojects/groovy-templates/src/main"
- ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-templates.jar"
- "-C" "build/classes" ".")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy template engine")
- (description "This package contains a template framework which is
+ (let ((base (groovy-subproject "groovy-templates")))
+ (package
+ (inherit base)
+ (arguments
+ `(#:tests? #f;Requires spock-framework which is a circular dependency
+ ,@(substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; These annotations are used for QA, but do not affect build output.
+ ;; They require findbugs, which we don't have yet.
+ (add-before 'build 'remove-annotation
+ (lambda _
+ (substitute* '("subprojects/groovy-templates/src/main/groovy/groovy/text/StreamingTemplateEngine.java"
+ "subprojects/groovy-templates/src/main/groovy/groovy/text/TemplateEngine.java")
+ (("import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;") "")
+ (("@SuppressFBWarnings.*") ""))
+ #t)))))))
+ (inputs
+ `(("groovy-xml" ,groovy-xml)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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.")))
+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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes"
- "-j"; joint compilation
- (find-files "subprojects/groovy-groovydoc/src/main"
- ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-groovydoc.jar"
- "-C" "build/classes" ".")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy documentation generation")
- (description "This package contains the groovy documentation generator,
-similar to javadoc.")))
+ (let ((base (groovy-subproject "groovy-groovydoc")))
+ (package
+ (inherit base)
+ (arguments
+ `(#:tests? #f; Requires groovy-ant which is a circular dependency
+ ,@(package-arguments base)))
+ (inputs
+ `(("groovy-templates" ,groovy-templates)
+ ("groovy-parser-antlr4" ,groovy-parser-antlr4)
+ ("java-javaparser" ,java-javaparser)
+ ,@(package-inputs groovy-bootstrap)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs java-groovy-bootstrap)))
+ (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")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (copy-recursively "src/main/resources" "build/classes")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-ant.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "java" "-cp"
- (string-append (getenv "CLASSPATH") ":build/classes")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/test-classes" "-j"
- (find-files "src/test" ".*\\.(groovy|java)$"))
- (invoke "ant" "check")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy ant tasks")
- (description "This package contains groovy-related ant tasks definitions.")))
+ (let ((base (groovy-subproject "groovy-ant")))
+ (package
+ (inherit base)
+ (arguments
+ `(;#:tests? #f;Requires spock-framework which is a circular dependency
+ #:ant ,ant/java8; ant is actually a dependency of this package, and we need 1.10
+ ,@(substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; These annotations are used for QA, but do not affect build output.
+ ;; They require findbugs, which we don't have yet.
+ (add-before 'build 'remove-annotation
+ (lambda _
+ (substitute* (find-files "subprojects/groovy-ant"
+ ".*.java$")
+ (("import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;") "")
+ (("@SuppressFBWarnings.*") ""))
+ #t)))))))
+ (inputs
+ `(("groovy-groovydoc" ,groovy-groovydoc)
+ ("java-asm-tree" ,java-asm-tree-8)
+ ("java-asm-analysis" ,java-asm-analysis-8)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("ant-junit" ,ant-junit)
+ ("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-xml" ,groovy-xml)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (synopsis "Groovy ant tasks")
+ (description "This package contains groovy-related ant tasks definitions."))))
+
+(define groovy-astbuilder
+ (let ((base (groovy-subproject "groovy-astbuilder")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'copy-resources)
+ (add-after 'build 'copy-resources
+ (lambda _
+ (copy-recursively
+ "subprojects/groovy-astbuilder/src/main/resources"
+ "build/classes")
+ (substitute* "build.xml"
+ (("depends=\"compile,") "depends=\""))
+ (invoke "ant" "jar")
+ #t))))))
+ (inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (synopsis "Transformation to capture ASTBuilder from code statements")
+ (description "This package contains an AST transformation for use with
+ASTBuilder when building \"from string\" Groovy statements."))))
(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
+ (let ((base (groovy-subproject "groovy-bsf")))
+ (package
+ (inherit base)
+ (arguments
+ `(#: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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-bsf.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\""))
- (apply invoke "java" "-cp"
- (string-append (getenv "CLASSPATH") ":build/classes")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/test-classes" "-j"
- (find-files "src/test" ".*\\.(groovy|java)$"))
- (invoke "ant" "check")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy BSF engine")
- (description "This package defines the BSF engine for using Groovy inside
-any @dfn{Bean Scripting Framework} (BSF) application.")))
+ ,@(package-arguments base)))
+ (inputs
+ `(("java-commons-bsf" ,java-commons-bsf)
+ ,@(package-inputs base)))
+ (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 base)))
+ (synopsis "Groovy BSF engine")
+ (description "This package defines the BSF engine for using Groovy inside
+any @dfn{Bean Scripting Framework} (BSF) application."))))
+
+(define groovy-cli-commons
+ (let ((base (groovy-subproject "groovy-cli-commons")))
+ (package
+ (inherit base)
+ (inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-test" ,groovy-test)
+ ,@(package-native-inputs base)))
+ (synopsis "Groovy CLI common classes")
+ (description "This package defines common classes for dealing with
+command-line arguments in Groovy."))))
+
+(define groovy-cli-picocli
+ (let ((base (groovy-subproject "groovy-cli-picocli")))
+ (package
+ (inherit base)
+ (inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("java-picocli" ,java-picocli)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-test" ,groovy-test)
+ ,@(package-native-inputs base)))
+ (synopsis "Groovy CLI classes that use picocli")
+ (description "This package defines classes for dealing with command-line
+arguments in Groovy using the picocli library."))))
(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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-swing.jar"
- "-C" "build/classes" ".")
- #t))
- (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"))
- (apply invoke "java" "-cp"
- (string-append (getenv "CLASSPATH") ":build/classes")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/test-classes" "-j"
- (find-files "src/test" ".*\\.(groovy|java)$"))
- (invoke "ant" "check")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy graphical library")
- (description "This package contains the groovy bindings to Java Swing, a
-library used to build graphical interfaces.")))
+ (let ((base (groovy-subproject "groovy-swing")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'check 'fix-test
+ (lambda _
+ (substitute*
+ "subprojects/groovy-swing/src/test/groovy/groovy/swing/GroovySwingTestCase.groovy"
+ (("HeadlessTestSupport.headless") "isHeadless()"))
+ #t))))))
+ (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 base)))
+ (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")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (copy-recursively "src/main/resources" "build/classes")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-console.jar"
- "-C" "build/classes" ".")
- #t))
- (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()"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy graphical interface")
- (description "This package contains a graphical interface to run groovy.")))
+ (let ((base (groovy-subproject "groovy-console")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'check 'build-swing
+ (lambda _
+ (substitute*
+ "subprojects/groovy-swing/src/test/groovy/groovy/swing/GroovySwingTestCase.groovy"
+ (("HeadlessTestSupport.headless") "isHeadless()"))
+ (mkdir-p "build/test-classes")
+ (apply invoke "java" "-cp"
+ (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.groovy.tools.FileSystemCompiler" "-cp"
+ (string-append (getenv "CLASSPATH") ":build/classes")
+ "-d" "build/test-classes" "-j"
+ (append
+ (find-files "subprojects/groovy-swing/src/test/java"
+ ".*\\.(groovy|java)$")
+ (find-files "subprojects/groovy-swing/src/test/groovy"
+ ".*\\.(groovy|java)$")))
+ #t))))))
+ (inputs
+ `(("groovy-swing" ,groovy-swing)
+ ("groovy-templates" ,groovy-templates)
+ ,@(package-inputs base)))
+ (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 base)))
+ (synopsis "Groovy graphical interface")
+ (description "This package contains a graphical interface to run groovy."))))
+
+(define groovy-datetime
+ (let ((base (groovy-subproject "groovy-datetime")))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("groovy-test" ,groovy-test)
+ ,@(package-native-inputs base)))
+ (synopsis "Date/Time API for Groovy")
+ (description "This package defines new Groovy methods which appear on
+normal JDK Date/Time API (@code{java.time}) classes inside the Groovy
+environment."))))
+
+(define groovy-dateutil
+ (let ((base (groovy-subproject "groovy-dateutil")))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("groovy-test" ,groovy-test)
+ ,@(package-native-inputs base)))
+ (synopsis "Date and Calendar API for Groovy")
+ (description "This package defines new groovy methods which appear on
+normal JDK Date and Calendar classes inside the Groovy environment."))))
(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")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (copy-recursively "src/main/resources" "build/classes")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-docgenerator.jar"
- "-C" "build/classes" ".")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy documentation generation")
- (description "This package contains a command line tool to generate
-documentation for groovy applications.")))
+ (let ((base (groovy-subproject "groovy-docgenerator")))
+ (package
+ (inherit base)
+ (arguments
+ `(#:tests? #f; No tests
+ ,@(package-arguments base)))
+ (inputs
+ `(("groovy-templates" ,groovy-templates)
+ ("groovy-swing" ,groovy-swing)
+ ("java-qdox-1.12" ,java-qdox-1.12)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (copy-recursively "src/main/resources" "build/classes")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-groovysh.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy REPL")
- (description "This package contains the Groovy REPL.")))
+ (let ((base (groovy-subproject "groovy-groovysh")))
+ (package
+ (inherit base)
+ (inputs
+ `(("groovy-xml" ,groovy-xml)
+ ("groovy-console" ,groovy-console)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-jmx.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ("groovy-test" ,groovy-test)
- ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
- ,@(package-native-inputs java-groovy-bootstrap)))
- (synopsis "Groovy JMX extension")
- (description "This package contains the JMX extension of Groovy, for
-management and monitoring of JVM-based solutions.")))
+ (let ((base (groovy-subproject "groovy-jmx")))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (synopsis "Groovy JMX extension")
+ (description "This package contains the JMX extension of Groovy, for
+management and monitoring of 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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-json.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ("groovy-test" ,groovy-test)
- ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
- ,@(package-native-inputs java-groovy-bootstrap)))
- (synopsis "Groovy JSON")
- (description "This package contains JSON-related utilities for groovy.")))
+ (let ((base (groovy-subproject "groovy-json")))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (copy-recursively "src/main/resources" "build/classes")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-jsr223.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ("groovy-test" ,groovy-test)
- ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
- ,@(package-native-inputs java-groovy-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.")))
+ (let ((base (groovy-subproject "groovy-jsr223")))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-nio.jar"
- "-C" "build/classes" ".")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ("groovy-test" ,groovy-test)
- ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
- ,@(package-native-inputs java-groovy-bootstrap)))
- (synopsis "Groovy input-output library")
- (description "This package implements an input/output library that extends
-the functionality of the common library of Java.")))
+ (let ((base (groovy-subproject "groovy-nio")))
+ (package
+ (inherit base)
+ (arguments
+ `(#:tests? #f; Require spock-framework
+ ,@(package-arguments base)))
+ (synopsis "Groovy input-output library")
+ (description "This package implements an input/output library that extends
+the functionality 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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes"
- "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-servlet.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (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 java-groovy-bootstrap)))
- (synopsis "Groovy's servlet implementation")
- (description "This package contains a library to create groovlets, Groovy's
-version of Java servlets.")))
+ (let ((base (groovy-subproject "groovy-servlet")))
+ (package
+ (inherit base)
+ (inputs
+ `(("groovy-templates" ,groovy-templates)
+ ("groovy-xml" ,groovy-xml)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-json" ,groovy-json)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main"
- ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-sql.jar"
- "-C" "build/classes" ".")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ("groovy-test" ,groovy-test)
- ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
- ,@(package-native-inputs java-groovy-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.")))
+ (let ((base (groovy-subproject "groovy-sql")))
+ (package
+ (inherit base)
+ (arguments
+ `(#:tests? #f;TODO: Requires hsqldb
+ ,@(package-arguments base)))
+ (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")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (copy-recursively "src/main/resources" "build/classes")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes"
- "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-testng.jar"
- "-C" "build/classes" ".")
- #t)))))
- (native-inputs
- `(("groovy-bootstrap" ,groovy-bootstrap)
- ("groovy-test" ,groovy-test)
- ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
- ,@(package-native-inputs java-groovy-bootstrap)))
- (synopsis "Groovy testing framework")
- (description "This package contains integration code for running TestNG
-tests in Groovy.")))
+ (let ((base (groovy-subproject "groovy-testng")))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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")
- #t))
- (replace 'build
- (lambda _
- (mkdir-p "build/classes")
- (mkdir-p "build/jar")
- (apply invoke "java" "-cp" (getenv "CLASSPATH")
- "org.codehaus.groovy.tools.FileSystemCompiler"
- "-d" "build/classes" "-j"; joint compilation
- (find-files "src/main" ".*\\.(groovy|java)$"))
- (invoke "jar" "-cf" "build/jar/groovy-macro.jar"
- "-C" "build/classes" ".")
- #t))
- (replace 'check
- (lambda _
- (mkdir-p "build/test-classes")
- (substitute* "build.xml"
- (("depends=\"compile-tests\"") "depends=\"\"")
- (("}/java") "}/groovy"))
- (apply invoke "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)$")))
- (invoke "ant" "check")
- #t)))))
- (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 java-groovy-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).")))
+ (let ((base (groovy-subproject "groovy-macro")))
+ (package
+ (inherit base)
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'copy-resources)
+ (add-after 'build 'copy-resources
+ (lambda _
+ (copy-recursively "subprojects/groovy-macro/src/main/resources"
+ "build/classes")
+ (substitute* "build.xml"
+ (("depends=\"compile,") "depends=\""))
+ (invoke "ant" "jar")
+ #t))))))
+ (inputs
+ `(("groovy-templates" ,groovy-templates)
+ ("groovy-xml" ,groovy-xml)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-bootstrap" ,groovy-bootstrap)
+ ("groovy-json" ,groovy-json)
+ ("groovy-test" ,groovy-test)
+ ("groovy-tests-bootstrap" ,groovy-tests-bootstrap)
+ ,@(package-native-inputs base)))
+ (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 groovy-yaml
+ (let ((base (groovy-subproject "groovy-yaml")))
+ (package
+ (inherit base)
+ (inputs
+ `(("groovy-json" ,groovy-json)
+ ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
+ ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
+ ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
+ ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
+ ,@(package-inputs base)))
+ (native-inputs
+ `(("groovy-test" ,groovy-test)
+ ,@(package-native-inputs base)))
+ (synopsis "Groovy YAML")
+ (description "This package contains YAML-related utilities for groovy."))))
(define-public groovy
(package
@@ -1071,7 +779,7 @@ and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
(name "groovy")
(arguments
`(#:tests? #f; No tests
- #:jdk ,icedtea-8
+ #:jdk ,openjdk9
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -1089,7 +797,7 @@ and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
(("@GROOVYJAR@") "groovy.jar")
(("MAX_FD=\"maximum\"")
(string-append
- "MAX_FD=\"maximum\"\nJAVAHOME="
+ "MAX_FD=\"maximum\"\nJAVA_HOME="
(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:
@@ -1105,14 +813,17 @@ and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
(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-bootstrap" "groovy-ant" "groovy-astbuilder"
+ "groovy-bsf" "groovy-cli-commons" "groovy-cli-picocli"
+ "groovy-console" "groovy-datetime" "groovy-dateutil"
+ "groovy-docgenerator" "groovy-groovydoc" "groovy-groovysh"
+ "groovy-jmx" "groovy-json" "groovy-jsr223" "groovy-nio"
+ "groovy-parser-antlr4" "groovy-servlet" "groovy-sql"
"groovy-swing" "groovy-templates" "groovy-testng"
- "groovy-xml" "java-commons-cli" "java-asm"
- "java-classpathx-servletapi" "java-xstream"
+ "groovy-xml" "groovy-yaml" "java-commons-cli"
+ "java-tunnelvisionlabs-antlr4-runtime" "java-asm"
+ "java-asm-analysis" "java-asm-tree" "java-asm-util"
+ "java-classpathx-servletapi" "java-xstream" "java-picocli"
"java-jansi" "java-jline-2"))
;; antlr.jar is present twice in antlr2. Symlink doesn't like
;; it, so we symlink it here.
@@ -1130,8 +841,13 @@ and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
(inputs
`(("groovy-bootstrap" ,groovy-bootstrap)
("groovy-ant" ,groovy-ant)
+ ("groovy-astbuilder" ,groovy-astbuilder)
("groovy-bsf" ,groovy-bsf)
+ ("groovy-cli-commons" ,groovy-cli-commons)
+ ("groovy-cli-picocli" ,groovy-cli-picocli)
("groovy-console" ,groovy-console)
+ ("groovy-datetime" ,groovy-datetime)
+ ("groovy-dateutil" ,groovy-dateutil)
("groovy-docgenerator" ,groovy-docgenerator)
("groovy-groovydoc" ,groovy-groovydoc)
("groovy-groovysh" ,groovy-groovysh)
@@ -1139,18 +855,26 @@ and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))
("groovy-json" ,groovy-json)
("groovy-jsr223" ,groovy-jsr223)
("groovy-nio" ,groovy-nio)
+ ("groovy-parser-antlr4" ,groovy-parser-antlr4)
("groovy-servlet" ,groovy-servlet)
("groovy-sql" ,groovy-sql)
("groovy-swing" ,groovy-swing)
("groovy-templates" ,groovy-templates)
("groovy-testng" ,groovy-testng)
("groovy-xml" ,groovy-xml)
+ ("groovy-yaml" ,groovy-yaml)
+ ("java-tunnelvisionlabs-antlr4-runtime"
+ ,java-tunnelvisionlabs-antlr4-runtime)
("java-commons-cli" ,java-commons-cli)
- ("java-asm" ,java-asm)
+ ("java-asm" ,java-asm-8)
+ ("java-asm-analysis" ,java-asm-analysis-8)
+ ("java-asm-tree" ,java-asm-tree-8)
+ ("java-asm-util" ,java-asm-util-8)
("java-classpathx-servletapi" ,java-classpathx-servletapi)
- ("java-xstream" ,java-xstream)
+ ("java-picocli" ,java-picocli)
("java-jansi" ,java-jansi)
("java-jline-2" ,java-jline-2)
+ ("java-xstream" ,java-xstream)
("antlr2" ,antlr2)))
(synopsis "Programming language for the JVM")
(description "Apache Groovy is a powerful, optionally typed and dynamic
--
2.28.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* bug#43639: [PATCH] [staging] gnu: groovy: Update to 3.0.5.
2020-09-26 22:13 [bug#43639] [PATCH] [staging] gnu: groovy: Update to 3.0.5 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
2020-09-26 22:23 ` [bug#43639] [PATCH 16/16] gnu: groovy: Update to 3.0.5 Julien Lepiller
@ 2020-10-14 1:44 ` Julien Lepiller
2 siblings, 0 replies; 18+ messages in thread
From: Julien Lepiller @ 2020-10-14 1:44 UTC (permalink / raw)
To: 43639-done
Since there was no review, pushed as 069ddd9900..417cf5445b on staging.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2020-10-14 1:47 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-26 22:13 [bug#43639] [PATCH] [staging] gnu: groovy: Update to 3.0.5 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 01/15] gnu: Add java-treelayout Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 02/15] gnu: Add java-antlr4-runtime Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 03/15] gnu: Add antlr4 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 04/15] gnu: ant/java8: Update to 1.10.8 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 05/15] gnu: ant: Update to 1.9.15 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 06/15] gnu: Add java-asm-8 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 07/15] gnu: Add java-asm-tree-8 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 08/15] gnu: Add java-asm-analysis-8 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 09/15] gnu: Add java-asm-util-8 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 10/15] gnu: Add java-antlr4-runtime-4.1 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 11/15] gnu: Add antlr4-4.1 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 12/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime-annotations Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 13/15] gnu: Add java-tunnelvisionlabs-antlr4-runtime Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 14/15] gnu: Add java-tunnelvisionlabs-antlr4 Julien Lepiller
2020-09-26 22:18 ` [bug#43639] [PATCH 15/15] gnu: Add java-javaparser Julien Lepiller
2020-09-26 22:23 ` [bug#43639] [PATCH 16/16] gnu: groovy: Update to 3.0.5 Julien Lepiller
2020-10-14 1:44 ` bug#43639: [PATCH] [staging] " Julien Lepiller
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).