guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] icedtea6: split outputs


From: Ricardo Wurmus
Subject: [PATCH] icedtea6: split outputs
Date: Wed, 4 Mar 2015 11:17:50 +0100

Hi Guix,

when I originally packaged up OpenJDK with IcedTea it did not occur to
me that the build output in openjdk.build contained multiple
distributions of the JDK and JRE in addition to various binaries and
libraries.

What really matters are these distribution directories named
"j2re-image", "j2sdk-image", and "j2sdk-server-image".  They contain the
JRE, the JDK with examples, and the JDK without examples, respectively.
The binaries and libraries contained in these directories are duplicates
of those in the various directories of "openjdk.build".  The
"j2sdk-server-image" is virtually identical to the "j2sdk-image", but it
lacks examples, so I chose to use the latter as the JDK.

The first attached patch splits the outputs of the icedtea6 package into
"doc", "jdk", and "out", containing the documentation, the contents of
the "j2sdk-image" directory, and the contents of the "j2re-image"
directory, respectively.

The other two patches update the packages for Ant and R, such that they
depend on the "jdk" output.

~~ Ricardo

>From 47b47b539d4d467b70861a42e0d9abba20f1362a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Wed, 4 Mar 2015 10:25:54 +0100
Subject: [PATCH 1/3] gnu: icedtea6: split outputs.

* gnu/packages/java.scm (icedtea6)[outputs]: Use separate outputs for
  documentation ("doc"), JDK ("jdk"), and JRE ("out").
---
 gnu/packages/java.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index c486742..962d710 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -122,6 +122,9 @@ build process and its dependencies, whereas Make uses 
Makefile format.")
                   (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
                    "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
     (build-system gnu-build-system)
+    (outputs '("out"   ; Java Runtime Environment
+               "jdk"   ; Java Development Kit
+               "doc")) ; all documentation
     (arguments
      `(;; There are many failing tests and many are known to fail upstream.
        ;;
@@ -412,8 +415,13 @@ build process and its dependencies, whereas Make uses 
Makefile format.")
                           (run-test "check-jdk")))))
              (alist-replace
               'install
-              (lambda _
-                (copy-recursively "openjdk.build" %output))
+              (lambda* (#:key outputs #:allow-other-keys)
+                (let ((doc (string-append (assoc-ref outputs "doc") 
"/share/doc/" ,name))
+                      (jre (assoc-ref outputs "out"))
+                      (jdk (assoc-ref outputs "jdk")))
+                  (copy-recursively "openjdk.build/docs" doc)
+                  (copy-recursively "openjdk.build/j2re-image" jre)
+                  (copy-recursively "openjdk.build/j2sdk-image" jdk)))
               %standard-phases))))))))
     (native-inputs
      `(("ant-bootstrap"
-- 
2.1.0

>From 7e9189c0dd36704e9dddb71c31dac97fad23df73 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Wed, 4 Mar 2015 11:08:16 +0100
Subject: [PATCH 2/3] gnu: ant: use "jdk" output of icedtea6.

* gnu/packages/java.scm (ant)[native-inputs]: Reference "jdk" output of
  icedtea6 package.
---
 gnu/packages/java.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 962d710..0d33293 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -90,7 +90,7 @@
           'configure
           (alist-delete 'install %standard-phases))))))
     (native-inputs
-     `(("icedtea6" ,icedtea6)))
+     `(("icedtea6" ,icedtea6 "jdk")))
     (home-page "http://ant.apache.org";)
     (synopsis "Build tool for Java")
     (description
-- 
2.1.0

>From 258e905e17e17f54a930855e6d4856d98a27a52f Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Wed, 4 Mar 2015 11:10:11 +0100
Subject: [PATCH 3/3] gnu: r: use "jdk" output of icedtea6.

* gnu/packages/statistics.scm (r)[inputs]: Reference "jdk" output of icedtea6
  package.
---
 gnu/packages/statistics.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index acf7b78..ad7bc58 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -87,7 +87,7 @@
        ("cairo" ,cairo)
        ("gfortran" ,gfortran-4.8)
        ("icu4c" ,icu4c)
-       ("icedtea6" ,icedtea6)
+       ("icedtea6" ,icedtea6 "jdk")
        ("lapack" ,lapack)
        ("libjpeg" ,libjpeg)
        ("libpng" ,libpng)
-- 
2.1.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]