all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] icedtea6: split outputs
Date: Wed, 4 Mar 2015 11:17:50 +0100	[thread overview]
Message-ID: <idj385lrrqp.fsf@bimsb-sys02.mdc-berlin.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-icedtea6-split-outputs.patch --]
[-- Type: text/x-patch, Size: 1923 bytes --]

From 47b47b539d4d467b70861a42e0d9abba20f1362a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-ant-use-jdk-output-of-icedtea6.patch --]
[-- Type: text/x-patch, Size: 838 bytes --]

From 7e9189c0dd36704e9dddb71c31dac97fad23df73 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-r-use-jdk-output-of-icedtea6.patch --]
[-- Type: text/x-patch, Size: 831 bytes --]

From 258e905e17e17f54a930855e6d4856d98a27a52f Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
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	other threads:[~2015-03-04 10:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 10:17 Ricardo Wurmus [this message]
2015-03-04 12:18 ` [PATCH] icedtea6: split outputs Ludovic Courtès
2015-03-04 15:06   ` Ricardo Wurmus
2015-03-04 20:57     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=idj385lrrqp.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.