gnu: ecj-javac-wrapper: Do not use sablevm.

* gnu/packages/java.scm (ecj-javac-wrapper)[native-inputs]: Remove sablevm and
sablevm-classpath; add jamvm-1-bootstrap and classpath-bootstrap.
[arguments]: Simplify builder now that only jamvm is used.
This commit is contained in:
Ricardo Wurmus 2018-03-25 20:54:15 +02:00
parent 6c775dc644
commit c4f06c1164
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 14 additions and 25 deletions

View File

@ -431,7 +431,7 @@ requirement for all GNU Classpath releases after version 0.93.")
(arguments (arguments
`(#:modules ((guix build utils)) `(#:modules ((guix build utils))
#:builder #:builder
(let ((backend 'sablevm)) (begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((bin (string-append (assoc-ref %outputs "out") "/bin")) (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
(target (string-append bin "/javac")) (target (string-append bin "/javac"))
@ -439,24 +439,12 @@ requirement for all GNU Classpath releases after version 0.93.")
"/bin/guile")) "/bin/guile"))
(ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap") (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
"/share/java/ecj-bootstrap.jar")) "/share/java/ecj-bootstrap.jar"))
(java (case backend (java (string-append (assoc-ref %build-inputs "jamvm")
((sablevm) "/bin/jamvm"))
(string-append (assoc-ref %build-inputs "sablevm") (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
"/lib/sablevm/bin/java")) "/share/classpath")))
((jamvm) (string-append jvmlib "/lib/glibj.zip:"
(string-append (assoc-ref %build-inputs "jamvm") jvmlib "/lib/tools.zip"))))
"/bin/jamvm"))))
(bootcp (case backend
((sablevm)
(let ((jvmlib (string-append
(assoc-ref %build-inputs "sablevm-classpath")
"/lib/sablevm")))
(string-append jvmlib "/jre/lib/rt.jar")))
((jamvm)
(let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
"/share/classpath")))
(string-append jvmlib "/lib/glibj.zip:"
jvmlib "/lib/tools.zip"))))))
(mkdir-p bin) (mkdir-p bin)
(with-output-to-file target (with-output-to-file target
(lambda _ (lambda _
@ -475,10 +463,11 @@ requirement for all GNU Classpath releases after version 0.93.")
(define (main args) (define (main args)
(let ((classpath (getenv "CLASSPATH"))) (let ((classpath (getenv "CLASSPATH")))
(setenv "CLASSPATH" (setenv "CLASSPATH"
(string-append ,ecj (string-join (list ,ecj
(if classpath ,(string-append (assoc-ref %build-inputs "jamvm")
(string-append ":" classpath) "/lib/rt.jar")
"")))) (or classpath ""))
":")))
(receive (vm-args other-args) (receive (vm-args other-args)
;; Separate VM arguments from arguments to ECJ. ;; Separate VM arguments from arguments to ECJ.
(partition (cut string-prefix? "-J" <>) (partition (cut string-prefix? "-J" <>)
@ -502,8 +491,8 @@ requirement for all GNU Classpath releases after version 0.93.")
(native-inputs (native-inputs
`(("guile" ,guile-2.2) `(("guile" ,guile-2.2)
("ecj-bootstrap" ,ecj-bootstrap) ("ecj-bootstrap" ,ecj-bootstrap)
("sablevm" ,sablevm) ("jamvm" ,jamvm-1-bootstrap)
("sablevm-classpath" ,sablevm-classpath))) ("classpath" ,classpath-bootstrap)))
(description "This package provides a wrapper around the @dfn{Eclipse (description "This package provides a wrapper around the @dfn{Eclipse
compiler for Java} (ecj) with a command line interface that is compatible with compiler for Java} (ecj) with a command line interface that is compatible with
the standard javac executable."))) the standard javac executable.")))