Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389643 - Please review changes for Prefix platforms for dev-java/sun-jdk-1.6.29
Summary: Please review changes for Prefix platforms for dev-java/sun-jdk-1.6.29
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-05 16:23 UTC by Fabian Groffen
Modified: 2011-12-15 21:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
oracle-jdk-bin-1.7_solaris_support.patch (oracle-jdk-bin-1.7_solaris_support.patch,1.59 KB, patch)
2011-12-13 18:06 UTC, Ralph Sennhauser (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2011-11-05 16:23:03 UTC
Thanks for making the sun-jdk ebuilds Prefix aware.  Please review the following changes to add support for the four flavours of Solaris:

--- sun-jdk-1.6.0.29.ebuild        2011-10-30 15:31:07.000000000 +0100
+++ sun-jdk-1.6.0.29.ebuild        2011-11-05 13:13:04.475217000 +0100
@@ -11,6 +11,10 @@
 
 X86_AT="jdk-${MY_PV}-linux-i586.bin"
 AMD64_AT="jdk-${MY_PV}-linux-x64.bin"
+SOL_X86_AT="jdk-${MY_PV}-solaris-i586.sh"
+SOL_AMD64_AT="jdk-${MY_PV}-solaris-x64.sh"
+SOL_SPARC_AT="jdk-${MY_PV}-solaris-sparc.sh"
+SOL_SPARCv9_AT="jdk-${MY_PV}-solaris-sparcv9.sh"
 
 # check the URIs when bumping, no idea about their stability yet
 JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk-${MY_PV}-download-513648.html"
@@ -18,10 +22,14 @@
 DESCRIPTION="Oracle's Java SE Development Kit"
 HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
 SRC_URI="x86? ( ${X86_AT} )
-       amd64? ( ${AMD64_AT} )"
+       amd64? ( ${AMD64_AT} )
+       x86-solaris? ( ${SOL_X86_AT} )
+       x64-solaris? ( ${SOL_X86_AT} ${SOL_AMD64_AT} )
+       sparc-solaris? ( ${SOL_SPARC_AT} )
+       sparc64-solaris? ( ${SOL_SPARC_AT} ${SOL_SPARCv9_AT} )"
 
 LICENSE="Oracle-BCLA-JavaSE"
-KEYWORDS="~amd64 x86"
+KEYWORDS="~amd64 x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 SLOT="1.6"
 IUSE="X alsa derby doc examples jce nsplugin"
 
@@ -34,6 +42,7 @@
 RDEPEND="${DEPEND}
        doc? ( dev-java/java-sdk-docs:1.6.0 )
        !prefix? ( sys-libs/glibc )
+       kernel_Solaris? ( app-arch/unzip )
        alsa? ( media-libs/alsa-lib )
        X? (
                x11-libs/libXext
@@ -51,6 +60,14 @@
                AT=${X86_AT}
        elif use amd64; then
                AT=${AMD64_AT}
+       elif use x86-solaris; then
+               AT=${SOL_X86_AT}
+       elif use x64-solaris; then
+               AT="${SOL_X86_AT} and ${SOL_AMD64_AT}"
+       elif use sparc-solaris; then
+               AT=${SOL_SPARC_AT}
+       elif use sparc64-solaris; then
+               AT="${SOL_SPARC_AT} and ${SOL_SPARCv9_AT}"
        fi
 
        einfo "Due to Oracle no longer providing the distro-friendly DLJ bundles, the package has become fetch restricted again."
@@ -62,7 +79,20 @@
 }
 
 src_unpack() {
-       sh "${DISTDIR}"/${A} -noregister || die "Failed to unpack"
+       if [[ ${CHOST} == *-solaris* ]] ; then
+               for i in ${A}; do
+                       rm -f "${S}"/jre/{LICENSE,README} "${S}"/LICENSE
+                       # don't die on unzip, it always "fails"
+                       unzip "${DISTDIR}"/${i}
+               done
+               for f in $(find "${S}" -name "*.pack") ; do
+                       "${S}"/bin/unpack200 ${f} ${f%.pack}.jar
+                       rm ${f}
+               done
+       else
+               sh "${DISTDIR}"/${A} --accept-license --unpack || die "Failed to unpack"
+               sh "${DISTDIR}"/${A} -noregister || die "Failed to unpack"
+       fi
 }
 
 src_compile() {
Comment 1 Fabian Groffen gentoo-dev 2011-12-03 16:09:46 UTC
obviously the
sh "${DISTDIR}"/${A} --accept-license --unpack || die "Failed
line should be removed (e.g. not added)
Comment 2 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-13 18:06:58 UTC
Created attachment 295707 [details, diff]
oracle-jdk-bin-1.7_solaris_support.patch

The Java 7 package of sun-jdk was added as oracle-jdk-bin in accordance with the change of owner. The Java 7 downloads are regular tarballs. Also I wonder what should happen with the respective jre packages?

Please try attached patch for oracle-jdk-bin:1.7

I'm not sure about adding Solaris support to others. Seems a lot of manual downloads for a questionable gain.
Comment 3 Fabian Groffen gentoo-dev 2011-12-13 18:12:38 UTC
(In reply to comment #2)
> I'm not sure about adding Solaris support to others. Seems a lot of manual
> downloads for a questionable gain.

What do you mean?  You realise that Prefix is mainly about non-Linux, do you?

Java 7 is certainly not an option for most people (it's considered buggy), so I need the latest Java 6 to be working :/
Comment 4 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-13 19:05:42 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I'm not sure about adding Solaris support to others. Seems a lot of manual
> > downloads for a questionable gain.
> 
> What do you mean?  You realise that Prefix is mainly about non-Linux, do you?
> 

Solaris is pretty much obviously not Linux :)

> Java 7 is certainly not an option for most people (it's considered buggy), so I
> need the latest Java 6 to be working :/

For Java 6 you wouldn't need the jre package if there is the jdk one. What I try to figure out where to draw the line. Adding Solaris support to Java 6 without doing the same for Java 7 seems wrong as well.
Comment 5 Fabian Groffen gentoo-dev 2011-12-14 15:46:41 UTC
(In reply to comment #4)
> For Java 6 you wouldn't need the jre package if there is the jdk one. What I
> try to figure out where to draw the line. Adding Solaris support to Java 6
> without doing the same for Java 7 seems wrong as well.

Ok, of course we should also do Java 7.  I will test your patch.
Comment 6 Fabian Groffen gentoo-dev 2011-12-14 18:17:01 UTC
Good news, your patch works on x86-solaris and x64-solaris, so likely to work on sparc-solaris and sparc64-solaris as well.  Thanks!

Can we have both JDK 1.6 and JDK 1.7 with these patches?
Comment 7 Fabian Groffen gentoo-dev 2011-12-14 18:22:57 UTC
(you only have to click the radio button on the website, then you can wget all of the files directly)
Comment 8 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-14 19:08:21 UTC
(In reply to comment #6)
> Good news, your patch works on x86-solaris and x64-solaris, so likely to work
> on sparc-solaris and sparc64-solaris as well.  Thanks!
> 
> Can we have both JDK 1.6 and JDK 1.7 with these patches?

If it works feel free to commit it.
Comment 9 Ralph Sennhauser (RETIRED) gentoo-dev 2011-12-14 19:10:13 UTC
(In reply to comment #7)
> (you only have to click the radio button on the website, then you can wget all
> of the files directly)

It's not an issue to maintain an option where there is a use for it. I just try to avoid options which are not maintenance free and no one has use for. ;)
Comment 10 Fabian Groffen gentoo-dev 2011-12-15 21:06:51 UTC
ok, committed now, thanks