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() {
obviously the sh "${DISTDIR}"/${A} --accept-license --unpack || die "Failed line should be removed (e.g. not added)
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.
(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 :/
(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.
(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.
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?
(you only have to click the radio button on the website, then you can wget all of the files directly)
(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.
(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. ;)
ok, committed now, thanks