[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/22: gnu: Add groovy-bootstrap.
From: |
julien lepiller |
Subject: |
02/22: gnu: Add groovy-bootstrap. |
Date: |
Wed, 9 May 2018 07:38:43 -0400 (EDT) |
roptat pushed a commit to branch master
in repository guix.
commit b0192c85fc3ef0c90514d469704ae599c444c7b5
Author: Julien Lepiller <address@hidden>
Date: Tue Mar 13 21:01:40 2018 +0100
gnu: Add groovy-bootstrap.
* gnu/packages/groovy.scm (groovy-bootstrap): New variable.
---
gnu/packages/groovy.scm | 82 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 81 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm
index d7409f4..c298865 100644
--- a/gnu/packages/groovy.scm
+++ b/gnu/packages/groovy.scm
@@ -28,7 +28,7 @@
(define java-groovy-bootstrap
(package
- (name "groovy-java-bootstrap")
+ (name "java-groovy-bootstrap")
(version "2.4.15")
(source (origin
(method url-fetch)
@@ -95,3 +95,83 @@
(description "This package contains the java bootstrap that is used to
build
groovy submodules.")
(license license:asl2.0)))
+
+(define groovy-bootstrap
+ (package
+ (inherit java-groovy-bootstrap)
+ (name "groovy-bootstrap")
+ (arguments
+ `(#:jar-name "groovy.jar"
+ #:jdk ,icedtea-8
+ ;Requires groovy-xml and logback-classic which are circular dependencies
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-java8
+ ;; Fix "Reference to plus is ambiguous"
+ (lambda _
+ (substitute*
"src/main/org/codehaus/groovy/runtime/DefaultGroovyMethods.java"
+ (("toList\\(left\\)")
+ "(List<T>)toList(left)"))
+ #t))
+ (add-before 'build 'generate-parser
+ (lambda _
+ (with-directory-excursion
"src/main/org/codehaus/groovy/antlr/java"
+ (invoke "antlr" "java.g"))
+ (with-directory-excursion "src/main/org/codehaus/groovy/antlr"
+ (mkdir "parser")
+ (with-directory-excursion "parser"
+ (invoke "antlr" "../groovy.g")))
+ #t))
+ (add-before 'build 'generate-exception-utils
+ (lambda _
+ (invoke "javac" "-cp" (getenv "CLASSPATH")
+
"config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java")
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":config/ant/src")
+ "org.codehaus.groovy.ExceptionUtilsGenerator"
+
"target/classes/org/codehaus/groovy/runtime/ExceptionUtils.class")
+ #t))
+ (add-before 'build 'generate-dgminfo
+ (lambda _
+ (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")
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
+ ":src/main")
+ "org.codehaus.groovy.tools.DgmConverter")
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (with-directory-excursion "src/main"
+ (for-each (lambda (file)
+ (mkdir-p (string-append "../../target/classes/"
+ (dirname file)))
+ (copy-file file
+ (string-append "../../target/classes/"
+ file)))
+ (find-files "." ".*.(txt|properties|xml|html)")))
+ #t))
+ (replace 'build
+ (lambda _
+ (mkdir-p "build/jar")
+ (apply invoke "java" "-cp" (getenv "CLASSPATH")
+ "org.codehaus.groovy.tools.FileSystemCompiler"
+ "-d" "target/classes"
+ "-j"; joint compilation
+ (find-files "src/main"
+ ".*\\.(groovy|java)$"))
+ (invoke "jar" "-cf" "build/jar/groovy.jar"
+ "-C" "target/classes" ".")
+ #t)))))
+ (inputs
+ `(("java-apache-ivy" ,java-apache-ivy)
+ ,@(package-inputs java-groovy-bootstrap)))
+ (native-inputs
+ `(("java-groovy-bootstrap" ,java-groovy-bootstrap)
+ ,@(package-native-inputs java-groovy-bootstrap)))
+ (synopsis "Groovy compiler")
+ (description "This package contains the first version of the Groovy
compiler.
+Although already usable, it doesn't contain the groovy library yet. This
package
+is used to build the groovy submodules written in groovy.")))
- 03/22: gnu: Add groovy-tests-bootstrap., (continued)
- 03/22: gnu: Add groovy-tests-bootstrap., julien lepiller, 2018/05/09
- 05/22: gnu: Add groovy-xml., julien lepiller, 2018/05/09
- 17/22: gnu: Add groovy-nio., julien lepiller, 2018/05/09
- 19/22: gnu: Add groovy-sql., julien lepiller, 2018/05/09
- 06/22: gnu: Add groovy-templates., julien lepiller, 2018/05/09
- 09/22: gnu: Add groovy-bsf., julien lepiller, 2018/05/09
- 16/22: gnu: Add groovy-jsr223., julien lepiller, 2018/05/09
- 15/22: gnu: Add groovy-json., julien lepiller, 2018/05/09
- 18/22: gnu: Add groovy-servlet., julien lepiller, 2018/05/09
- 22/22: gnu: Add groovy., julien lepiller, 2018/05/09
- 02/22: gnu: Add groovy-bootstrap.,
julien lepiller <=
- 07/22: gnu: Add groovy-groovydoc., julien lepiller, 2018/05/09
- 11/22: gnu: Add groovy-console., julien lepiller, 2018/05/09
- 20/22: gnu: Add groovy-testng., julien lepiller, 2018/05/09
- 04/22: gnu: Add groovy-test., julien lepiller, 2018/05/09
- 13/22: gnu: Add groovy-groovysh., julien lepiller, 2018/05/09
- 12/22: gnu: Add groovy-docgenerator., julien lepiller, 2018/05/09
- 14/22: gnu: Add groovy-jmx., julien lepiller, 2018/05/09
- 01/22: gnu: Add java-groovy-bootstrap., julien lepiller, 2018/05/09
- 08/22: gnu: Add groovy-ant., julien lepiller, 2018/05/09
- 21/22: gnu: Add groovy-macro., julien lepiller, 2018/05/09