comments for groovy 3.0.0
more/packages/groovy.scm
33 | 33 | (package | |
34 | 34 | (name "groovy-java-bootstrap") | |
35 | 35 | (version "2.4.13") | |
36 | + | ;(version "3.0.0-alpha1") | |
36 | 37 | (source (origin | |
37 | 38 | (method url-fetch) | |
38 | 39 | (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_" | |
39 | 40 | "2_4_13.tar.gz")) | |
41 | + | ;(uri (string-append "https://github.com/apache/groovy/archive/GROOVY_" | |
42 | + | ; "3_0_0_ALPHA_1.tar.gz")) | |
40 | 43 | (file-name (string-append name "-" version ".tar.gz")) | |
41 | 44 | (sha256 | |
42 | 45 | (base32 | |
43 | 46 | "0qf1l029ilhnldmd194aybk3053apya3vfd33d3m80n2zh2wnbc1")) | |
47 | + | ; "0iqqp9mf5ar2y4c33i8i1rvnb1yi1k905yjr3gnx8i2hzbmkscr3")) | |
44 | 48 | (patches | |
45 | 49 | (search-patches | |
46 | 50 | "groovy-Add-exceptionutilsgenerator.patch")))) | |
… | |||
50 | 54 | #:source-dir "src/main:subprojects/groovy-test/src/main/java" | |
51 | 55 | #:test-dir "src/test" | |
52 | 56 | #:tests? #f | |
53 | - | ;; Reference to plus is ambiguous | |
54 | - | ;#:jdk ,icedtea-8 | |
57 | + | #:jdk ,icedtea-8 | |
55 | 58 | #:main-class "groovy.ui.GroovyMain" | |
56 | 59 | #:phases | |
57 | 60 | (modify-phases %standard-phases | |
58 | - | (add-before 'build 'generate-parser | |
61 | + | (add-before 'build 'fix-java8 | |
62 | + | ;; Fix "Reference to plus is ambiguous" | |
63 | + | (lambda _ | |
64 | + | (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java" | |
65 | + | (("toList\\(left\\)") | |
66 | + | "(List<T>)toList(left)")))) | |
67 | + | (add-before 'build 'generate-parsers | |
59 | 68 | (lambda _ | |
60 | 69 | (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java" | |
61 | 70 | (zero? (system* "antlr" "java.g"))) | |
… | |||
79 | 88 | ("java-xmlunit-legacy" ,java-xmlunit-legacy))) | |
80 | 89 | (inputs | |
81 | 90 | `(("java-commons-cli" ,java-commons-cli) | |
91 | + | ;("java-asm-6" ,java-asm-6) | |
82 | 92 | ("java-asm" ,java-asm) | |
83 | 93 | ("java-classpathx-servletapi" ,java-classpathx-servletapi) | |
84 | 94 | ("java-xstream" ,java-xstream) | |
… | |||
96 | 106 | (name "groovy-bootstrap") | |
97 | 107 | (arguments | |
98 | 108 | `(#:jar-name "groovy.jar" | |
109 | + | #:jdk ,icedtea-8 | |
99 | 110 | ;Requires groovy-xml and logback-classic which are circular dependencies | |
100 | 111 | #:tests? #f | |
101 | 112 | #:phases | |
102 | 113 | (modify-phases %standard-phases | |
114 | + | (add-before 'build 'fix-java8 | |
115 | + | ;; Fix "Reference to plus is ambiguous" | |
116 | + | (lambda _ | |
117 | + | (substitute* "src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java" | |
118 | + | (("toList\\(left\\)") | |
119 | + | "(List<T>)toList(left)")))) | |
103 | 120 | (add-before 'build 'generate-parser | |
104 | 121 | (lambda _ | |
105 | 122 | (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java" | |
… | |||
161 | 178 | (name "groovy-tests-bootstrap") | |
162 | 179 | (arguments | |
163 | 180 | `(#:jar-name "groovy-tests-bootstrap.jar" | |
181 | + | #:jdk ,icedtea-8 | |
164 | 182 | #:tests? #f; no tests | |
165 | 183 | #:phases | |
166 | 184 | (modify-phases %standard-phases | |
… | |||
186 | 204 | `(("groovy-bootstrap" ,groovy-bootstrap) | |
187 | 205 | ,@(package-native-inputs groovy-java-bootstrap))))) | |
188 | 206 | ||
207 | + | ; for groovy-3.0.0 | |
208 | + | ;(define-public groovy-parser-antlr4 | |
209 | + | ; (package | |
210 | + | ; (inherit groovy-java-bootstrap) | |
211 | + | ; (name "groovy-parser-antlr4") | |
212 | + | ; (arguments | |
213 | + | ; `(#:jar-name "groovy-parser-antlr4.jar" | |
214 | + | ; #:jdk ,icedtea-8 | |
215 | + | ; #:test-dir "subprojects/parser-antlr4/src/test" | |
216 | + | ; #:source-dir "subprojects/parser-antlr4/src/main/java" | |
217 | + | ; #:phases | |
218 | + | ; (modify-phases %standard-phases | |
219 | + | ; (add-before 'build 'generate-parser | |
220 | + | ; (lambda _ | |
221 | + | ; (with-directory-excursion "src/antlr" | |
222 | + | ; (zero? (system* "antlr4" "-visitor" "-no-listener" "-package" | |
223 | + | ; "org.apache.groovy.parser.antlr4" | |
224 | + | ; "-o" "../../subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4" | |
225 | + | ; "GroovyLexer.g4")) | |
226 | + | ; (zero? (system* "antlr4" "-visitor" "-no-listener" "-package" | |
227 | + | ; "org.apache.groovy.parser.antlr4" | |
228 | + | ; "-o" "../../subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4" | |
229 | + | ; "GroovyParser.g4")))))))) | |
230 | + | ; ;"-lib" "src/antlr" "-Xlog"))))))) | |
231 | + | ; (inputs | |
232 | + | ; `(("groovy-java-bootstrap" ,groovy-java-bootstrap) | |
233 | + | ; ("java-antlr4" ,java-antlr4) | |
234 | + | ; ("java-antlr4-runtime" ,java-antlr4-runtime) | |
235 | + | ; ,@(package-inputs groovy-java-bootstrap))))) | |
236 | + | ||
189 | 237 | (define-public groovy-test | |
190 | 238 | (package | |
191 | 239 | (inherit groovy-bootstrap) | |
192 | 240 | (name "groovy-test") | |
193 | 241 | (arguments | |
194 | 242 | `(#:jar-name "groovy-test.jar" | |
243 | + | #:jdk ,icedtea-8 | |
195 | 244 | #:test-dir "subprojects/groovy-test/src/test" | |
196 | 245 | #:phases | |
197 | 246 | (modify-phases %standard-phases | |
… | |||
233 | 282 | (name "groovy-xml") | |
234 | 283 | (arguments | |
235 | 284 | `(#:jar-name "groovy-xml.jar" | |
285 | + | #:jdk ,icedtea-8 | |
236 | 286 | #:test-dir "src/test" | |
237 | 287 | #:phases | |
238 | 288 | (modify-phases %standard-phases | |
… | |||
280 | 330 | (name "groovy-templates") | |
281 | 331 | (arguments | |
282 | 332 | `(#:jar-name "groovy-templates.jar" | |
333 | + | #:jdk ,icedtea-8 | |
283 | 334 | #:test-dir "subprojects/groovy-templates/src/test" | |
284 | 335 | #:tests? #f;Requires spock-framework which is a circular dependency | |
285 | 336 | #:phases | |
… | |||
312 | 363 | (name "groovy-groovydoc") | |
313 | 364 | (arguments | |
314 | 365 | `(#:jar-name "groovy-groovydoc.jar" | |
366 | + | #:jdk ,icedtea-8 | |
315 | 367 | #:test-dir "subprojects/groovy-groovydoc/src/test" | |
316 | 368 | #:tests? #f; Requires groovy-ant which is a circular dependency | |
317 | 369 | #:phases | |
… | |||
348 | 400 | (name "groovy-ant") | |
349 | 401 | (arguments | |
350 | 402 | `(#:jar-name "groovy-ant.jar" | |
403 | + | #:jdk ,icedtea-8 | |
351 | 404 | #:test-dir "src/test" | |
352 | 405 | ;; FIXME: Excluding all tests because they fail | |
353 | 406 | #:test-exclude (list | |
… | |||
405 | 458 | (name "groovy-bsf") | |
406 | 459 | (arguments | |
407 | 460 | `(#:jar-name "groovy-bsf.jar" | |
461 | + | #:jdk ,icedtea-8 | |
408 | 462 | #:test-dir "src/test" | |
409 | 463 | #:test-exclude (list | |
410 | 464 | ;; exception from Groovy: org.codehaus.groovy.runtime.InvokerInvocationException: | |
… | |||
461 | 515 | (name "groovy-swing") | |
462 | 516 | (arguments | |
463 | 517 | `(#:jar-name "groovy-swing.jar" | |
518 | + | #:jdk ,icedtea-8 | |
464 | 519 | ;; FIXME: tests are not run | |
465 | 520 | #:test-dir "src/test" | |
466 | 521 | #:phases | |
… | |||
511 | 566 | (name "groovy-console") | |
512 | 567 | (arguments | |
513 | 568 | `(#:jar-name "groovy-console.jar" | |
569 | + | #:jdk ,icedtea-8 | |
514 | 570 | ;; FIXME: tests are not run | |
515 | 571 | #:test-dir "src/test" | |
516 | 572 | #:phases | |
… | |||
572 | 628 | (name "groovy-docgenerator") | |
573 | 629 | (arguments | |
574 | 630 | `(#:jar-name "groovy-docgenerator.jar" | |
631 | + | #:jdk ,icedtea-8 | |
575 | 632 | #:tests? #f; No tests | |
576 | 633 | #:phases | |
577 | 634 | (modify-phases %standard-phases | |
… | |||
845 | 902 | (inherit groovy-bootstrap) | |
846 | 903 | (name "groovy-servlet") | |
847 | 904 | (arguments | |
848 | - | `(#:jar-name "groovy-jsr223.jar" | |
905 | + | `(#:jar-name "groovy-servlet.jar" | |
849 | 906 | #:test-dir "src/test" | |
850 | 907 | #:jdk ,icedtea-8 | |
851 | 908 | #:phases | |
… | |||
961 | 1018 | ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) | |
962 | 1019 | ,@(package-native-inputs groovy-java-bootstrap))))) | |
963 | 1020 | ||
1021 | + | (define-public groovy-macro | |
1022 | + | (package | |
1023 | + | (inherit groovy-bootstrap) | |
1024 | + | (name "groovy-macro") | |
1025 | + | (arguments | |
1026 | + | `(#:jar-name "groovy-macro.jar" | |
1027 | + | #:test-dir "src/test" | |
1028 | + | #:jdk ,icedtea-8 | |
1029 | + | #:phases | |
1030 | + | (modify-phases %standard-phases | |
1031 | + | (add-before 'configure 'chdir | |
1032 | + | (lambda _ | |
1033 | + | (chdir "subprojects/groovy-macro"))) | |
1034 | + | (replace 'build | |
1035 | + | (lambda _ | |
1036 | + | (mkdir-p "build/classes") | |
1037 | + | (mkdir-p "build/jar") | |
1038 | + | (and | |
1039 | + | (zero? (apply system* "java" "-cp" (getenv "CLASSPATH") | |
1040 | + | "org.codehaus.groovy.tools.FileSystemCompiler" | |
1041 | + | "-d" "build/classes" | |
1042 | + | "-j"; joint compilation | |
1043 | + | (find-files "src/main" | |
1044 | + | ".*\\.(groovy|java)$"))) | |
1045 | + | (zero? (system* "jar" "-cf" "build/jar/groovy-macro.jar" | |
1046 | + | "-C" "build/classes" "."))))) | |
1047 | + | (replace 'check | |
1048 | + | (lambda _ | |
1049 | + | (mkdir-p "build/test-classes") | |
1050 | + | (substitute* "build.xml" | |
1051 | + | (("depends=\"compile-tests\"") "depends=\"\"") | |
1052 | + | (("}/java") "}/groovy")) | |
1053 | + | (and | |
1054 | + | (zero? (apply system* "java" "-cp" | |
1055 | + | (string-append (getenv "CLASSPATH") ":build/classes") | |
1056 | + | "org.codehaus.groovy.tools.FileSystemCompiler" | |
1057 | + | "-d" "build/test-classes" | |
1058 | + | "-j" | |
1059 | + | (append | |
1060 | + | (find-files "src/test" | |
1061 | + | ".*\\.(groovy|java)$")))) | |
1062 | + | (zero? (system* "ant" "check")))))))) | |
1063 | + | (inputs | |
1064 | + | `(("groovy-templates" ,groovy-templates) | |
1065 | + | ("groovy-xml" ,groovy-xml) | |
1066 | + | ,@(package-inputs groovy-bootstrap))) | |
1067 | + | (native-inputs | |
1068 | + | `(("groovy-bootstrap" ,groovy-bootstrap) | |
1069 | + | ("groovy-json" ,groovy-json) | |
1070 | + | ("groovy-test" ,groovy-test) | |
1071 | + | ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) | |
1072 | + | ,@(package-native-inputs groovy-java-bootstrap))))) | |
1073 | + | ||
964 | 1074 | (define-public groovy | |
965 | 1075 | (package | |
966 | 1076 | (inherit groovy-bootstrap) | |
967 | 1077 | (name "groovy") | |
968 | 1078 | (arguments | |
969 | 1079 | `(#:tests? #f; No tests | |
1080 | + | #:jdk ,icedtea-8 | |
970 | 1081 | #:phases | |
971 | 1082 | (modify-phases %standard-phases | |
972 | 1083 | (delete 'configure) | |
… | |||
996 | 1107 | "java-commons-cli" "java-asm" | |
997 | 1108 | "java-classpathx-servletapi" "java-xstream" | |
998 | 1109 | "java-jansi" "java-jline-2" "antlr2"))) | |
999 | - | ":")))) | |
1110 | + | ":"))) | |
1111 | + | (("MAX_FD=\"maximum\"") | |
1112 | + | (string-append | |
1113 | + | "MAX_FD=\"maximum\"\nJAVACMD=" | |
1114 | + | (assoc-ref inputs "jdk") "/bin/java"))) | |
1000 | 1115 | (for-each | |
1001 | 1116 | (lambda (tool) | |
1002 | 1117 | (install-file tool out-bin) |