[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/26: gnu: Add ecj-bootstrap.
From: |
Ricardo Wurmus |
Subject: |
08/26: gnu: Add ecj-bootstrap. |
Date: |
Mon, 22 May 2017 13:03:16 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 5461721fa06028cb32e1cb84498b60869c9d7b98
Author: Ricardo Wurmus <address@hidden>
Date: Sat May 13 07:31:30 2017 +0200
gnu: Add ecj-bootstrap.
* gnu/packages/java.scm (ecj-bootstrap): New variable.
---
gnu/packages/java.scm | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 41dd822..c71e770 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -248,6 +248,75 @@ and is best suited to building Java projects. Ant uses
XML to describe the
build process and its dependencies, whereas Make uses Makefile format.")
(license license:asl2.0)))
+;; Version 3.2.2 is the last version without a dependency on a full-fledged
+;; compiler for Java 1.5.
+(define ecj-bootstrap
+ (package
+ (name "ecj-bootstrap")
+ (version "3.2.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://archive.eclipse.org/eclipse/"
+ "downloads/drops/R-" version
+ "-200702121330/ecjsrc.zip"))
+ (sha256
+ (base32
+ "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
+ ;; It would be so much easier if we could use the ant-build-system, but we
+ ;; cannot as we don't have ant at this point. We use ecj for
+ ;; bootstrapping the JDK.
+ (build-system gnu-build-system)
+ (arguments
+ `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
+ #:tests? #f ; there are no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CLASSPATH"
+ (string-join
+ (find-files (string-append (assoc-ref inputs
"ant-bootstrap")
+ "/lib")
+ "\\.jar$")
+ ":"))
+ #t))
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; The unpack phase enters the "org" directory by mistake.
+ (chdir "..")
+
+ ;; Create a simple manifest to make ecj executable.
+ (with-output-to-file "manifest"
+ (lambda _
+ (display "Manifest-Version: 1.0
+Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
+
+ ;; Compile it all!
+ (and (zero? (apply system* "javac-sablevm"
+ (find-files "." "\\.java$")))
+ (zero? (system* "fastjar" "cvfm"
+ "ecj-bootstrap.jar" "manifest" ".")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((share (string-append (assoc-ref outputs "out")
+ "/share/java/")))
+ (mkdir-p share)
+ (install-file "ecj-bootstrap.jar" share)
+ #t))))))
+ (native-inputs
+ `(("ant-bootstrap" ,ant-bootstrap)
+ ("unzip" ,unzip)
+ ("sablevm" ,sablevm)
+ ("fastjar" ,fastjar)))
+ (home-page "https://eclipse.org")
+ (synopsis "Eclipse Java development tools core batch compiler")
+ (description "This package provides the Eclipse Java core batch compiler
+for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
+requirement for all GNU Classpath releases after version 0.93.")
+ (license license:epl1.0)))
+
(define-public java-swt
(package
(name "java-swt")
- 15/26: gnu: Add jamvm., (continued)
- 15/26: gnu: Add jamvm., Ricardo Wurmus, 2017/05/22
- 04/26: gnu: Add jikes., Ricardo Wurmus, 2017/05/22
- 11/26: gnu: Add jamvm-bootstrap., Ricardo Wurmus, 2017/05/22
- 16/26: gnu: Add ecj-javac-on-jamvm-wrapper-final., Ricardo Wurmus, 2017/05/22
- 24/26: gnu: Add ant/java8., Ricardo Wurmus, 2017/05/22
- 23/26: gnu: ant: Move after bootstrap packages., Ricardo Wurmus, 2017/05/22
- 22/26: gnu: ant: Delete bundled jars., Ricardo Wurmus, 2017/05/22
- 18/26: gnu: icedtea-7: Use icedtea-6 for bootstrapping., Ricardo Wurmus, 2017/05/22
- 17/26: gnu: Add icedtea-6., Ricardo Wurmus, 2017/05/22
- 26/26: gnu: Remove GCJ., Ricardo Wurmus, 2017/05/22
- 08/26: gnu: Add ecj-bootstrap.,
Ricardo Wurmus <=
- 13/26: gnu: Add ecj-javac-on-jamvm-wrapper., Ricardo Wurmus, 2017/05/22
- 19/26: gnu: java-swt: Move below the bootstrap packages., Ricardo Wurmus, 2017/05/22
- 20/26: gnu: clojure: Move below bootstrap packages., Ricardo Wurmus, 2017/05/22
- 25/26: gnu: ant: Implement in terms of ant/java8., Ricardo Wurmus, 2017/05/22
- 09/26: gnu: Add ecj-javac-wrapper., Ricardo Wurmus, 2017/05/22
- 10/26: gnu: Add classpath., Ricardo Wurmus, 2017/05/22
- 14/26: gnu: Add classpath-devel., Ricardo Wurmus, 2017/05/22
- 01/26: gnu: Add r-aroma-light., Ricardo Wurmus, 2017/05/22
- 21/26: gnu: ant: Inherit from ant-bootstrap., Ricardo Wurmus, 2017/05/22