From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] icedtea6: split outputs Date: Wed, 4 Mar 2015 11:17:50 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT6NQ-0005uR-Kx for guix-devel@gnu.org; Wed, 04 Mar 2015 05:18:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YT6NL-000377-I1 for guix-devel@gnu.org; Wed, 04 Mar 2015 05:18:04 -0500 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:35035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT6NL-00036m-59 for guix-devel@gnu.org; Wed, 04 Mar 2015 05:17:59 -0500 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id AA53F380B49 for ; Wed, 4 Mar 2015 11:17:56 +0100 (CET) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qXj06aFr1n4R for ; Wed, 4 Mar 2015 11:17:51 +0100 (CET) Received: from HTCATWO.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Wed, 4 Mar 2015 11:17:51 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Guix-devel --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-icedtea6-split-outputs.patch" >From 47b47b539d4d467b70861a42e0d9abba20f1362a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0002-gnu-ant-use-jdk-output-of-icedtea6.patch" >From 7e9189c0dd36704e9dddb71c31dac97fad23df73 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0003-gnu-r-use-jdk-output-of-icedtea6.patch" >From 258e905e17e17f54a930855e6d4856d98a27a52f Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus 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 --=-=-=--