Skip to content

Commit

Permalink
dev-java/oracle-jdk-bin: version bump to 1.8.0.162
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.13, Repoman-2.3.3
Closes: gentoo#6886
  • Loading branch information
labre authored and chewi committed Jan 21, 2018
1 parent 12f83f7 commit fd33484
Show file tree
Hide file tree
Showing 2 changed files with 348 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dev-java/oracle-jdk-bin/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ DIST jdk-8u152-solaris-sparcv9-demos.tar.gz 9769313 BLAKE2B a811ceae2a7ee8d6081b
DIST jdk-8u152-solaris-sparcv9.tar.gz 104117809 BLAKE2B 1dc8e1297594bdd84186d4422dfc8fff94a78e0316f8873920c79342e7d0ab504794296622f0357acf137a3170f263acd0b2c1dd7179e50ff538b5648abf5a4b SHA512 9b87d11325e22bfb5f8e852ef4dcd182f091dcedfe71e5b19cc5a7d82f9f7ccb060b53512bc938d0e617648a8aa766bb722690751521b9a2cc3820507342548d
DIST jdk-8u152-solaris-x64-demos.tar.gz 9756596 BLAKE2B 4a5ca101e20d1693eaca23120bc3244412276d51dcf7700dd5142b9d23b90a7ff0d3599dce7862e38a183ea9e1ea67afbc075bdfe84908811bec700a928f46f6 SHA512 1aeaf732ad3956ede4baa005f34024750e03919ef81b608229a3df556b47db1255ce027e4278891644433db0c360225a3e81e9a547d298a4b958beb8691f8ff2
DIST jdk-8u152-solaris-x64.tar.gz 101758540 BLAKE2B 18b04a0eebc618148bdb215d4ca286fce141fb91dc9c0f05de2520eb073a819161af7a1533b3ecdab9961080ad52acd523b771c23a8a3da8797f0adaf974164e SHA512 4dd9606be347a61a03c0f670915c4e790d4f5eef80a67922342b539dcae7132b3157df04cd33e5f72fdc7e6fcb43e21b3b387e2da159cdfea0feb01183c68aa0
DIST jdk-8u162-linux-arm32-vfp-hflt-demos.tar.gz 10432598 BLAKE2B 49e8ac44c52b41851ccc96d41f77eddc92304e0ebb7b62da6bf393d73aadbd94e67d92b87bd13f7a2ccdedfbc0fc7c6ef7dd5cd2595860ee8d1776dad308e341 SHA512 00576347ec158f4f996db1aface6067b7df99a9e125bb2c22980b11ab84660cd2a3997d9519db3302fa31cbaaf98c01c5b3967b51daa5469926ca48037ef60e0
DIST jdk-8u162-linux-arm32-vfp-hflt.tar.gz 81719419 BLAKE2B be6bd2ec7114e313e6abbd040aa9b29fe415cc15ce93b5c6fa350b0964faa7a1a3c0882c303596156065f9ea79a08bf8542757c5a8a16170d31f9cee5d7dd426 SHA512 86b835c388010f2bafd05114813ab84b4cd13334244891e9a65ae140fb65c9ad4436380043255fab36d44a91df9210ffe0858d89e48fc4efe2e460ae62928134
DIST jdk-8u162-linux-arm64-vfp-hflt-demos.tar.gz 10434399 BLAKE2B 528476df75ec63acbe66dc58aad87e21633f34407e147352d048e76cc48c34afccf3d407229dd95ebd51bf2b5864d5b2626ddbd4a6b0d07142ce290fad58e786 SHA512 4ac7f4485c7290321221874fcac695cc47199e7ef76a0270a2d4b381bf42311a2d3dc0d325c1a50cbc0e79a82f9b876f5481a717425a7919d53e97b11d3f0a29
DIST jdk-8u162-linux-arm64-vfp-hflt.tar.gz 78519170 BLAKE2B f8c083aba14ed5a7d70ab5c7eaaba7854a55c467608f38eec389489cbfae0a3abca3a2c9297a100eef7328c5e1d78f751dbbb11947a191fde94a428ca9e7737b SHA512 f713b174193abcf5a7cdbef2ff75a77c953f3369cdd9dd80a3633e9024c1386bed10d3889bb1ea0617ae5764fee7e70cf487c6a1a4c8c46dc92c2e27704b0d9d
DIST jdk-8u162-linux-i586-demos.tar.gz 55100252 BLAKE2B 437dcb25306fedfda9fbda12533790d4df6b3be999ee5dafc2012e5277abc2736856f0ca028827420ff4b9aba920d8bc3f6933ead0e80e03c055e43fb7f1db71 SHA512 a867c08716874646e8073a1850f40d46f2d7b8bb1fa37ced7e95c11852ae169011fa8364055d07437cc1750974a984150eed8171b13d3bff03460cdea4b1567f
DIST jdk-8u162-linux-i586.tar.gz 192733880 BLAKE2B e4e00ff4ca48c9de65ba7493fbd9f9ba04304d03dfb67f0130db977d2a3f244b22b6092115345e701ed60fa56e3cfc3787a6292ba29d46a082ff8205809793ad SHA512 f6b84e3fbfe741851e109908b394dd65e68e1214a049f47754dc88f4c223d217e597f7c6a6f34c94fb8fa9d78be59861475612289269b34789223519badb0a2f
DIST jdk-8u162-linux-x64-demos.tar.gz 55164558 BLAKE2B a442bb0b9e75a61952ac8f588eef3d66f5bfe987cef982a621e12dc65e487cd49c95b9a92a5595d2d03337a07fb9d2cc4e0afbd0a041614a15a87751be525966 SHA512 a24668b4e2acb493e73ab4e0e1c8c2b60650675fe424c113514771e7ab6464bb40e839ff5b37c8e0019624160d7d3aacfc30c0049b851f34be816e13ea861db9
DIST jdk-8u162-linux-x64.tar.gz 189815615 BLAKE2B ae4f9cac86aab3dfd528f9e8930bfecdb42fbeea8a6394c9589303766d47127083cff13567927125756c4ea174d7ee338da115266d01a3613380333022a65101 SHA512 55349e0400f2fa77144af1977b7487f38631a404b23411a294f3ab55c2190fd3db1447fe788490834a03c2093421e06ed3e2db8434f8c4f417f58763881402f6
DIST jdk-8u162-macosx-x64.dmg 259123815 BLAKE2B 6c41876e7b9e54bbb7c14563f98825d6f41ea0cf30fbd914b4e75622f772c554a62d97b5e13f441de92428d945e985d3c32cbb285a85d5ae2ca15ff3883c97d9 SHA512 2c03129c5334ae7471a15722e70b872a3d8450d400b56333e42a663de71409b30161cd86764c8b9af7f0d49ef613ceac7d1507d821a84fb8544e53695ae6ea29
DIST jdk-8u162-macosx-x86_64-demos.zip 55705634 BLAKE2B 088884279396ff53b69721ba8f3870a67b6d846c94d7a21e713e270f31a6366d5b1b00f371d334da264824c33ad33a1b146890888074e09af31060e8e3cac011 SHA512 939da23bc935a7c089dce9f7fcf87f4df8be911282a4a7fca6cb8b9325cdbc85632721ee596dc2f4014c81ab5d9e18a56369b46bf7ed2547dfac553a6962c1fd
DIST jdk-8u162-solaris-sparcv9-demos.tar.gz 9799694 BLAKE2B e6812e0771cfde50ccb2623e645a114d668812656d4dc151a14f952a93f70dcbd7325c691637979eda95f2cc7892dd0e4ad75605eb72b2bdda4e1ea2bb2f9011 SHA512 b4d1a410b68b48eab66cab179274cf03f8dda1c49f155eb31bf6a91640f5ae4a9f750591d3d7327221c47d27e9fc6adc793414d1b63e404d5eb08cad2fac424b
DIST jdk-8u162-solaris-sparcv9.tar.gz 104118900 BLAKE2B 8aa9e54e1cc189517caab4b799d2a0cb2ad8f5a5796058cb18bcdca0dd03b1dbfe927a88cb7bc257c79412a0a2594762e083e1979ee4fd21662f152c79b6b445 SHA512 10249be011c526ee707dfc1f293351d60892b64f1b9160b70583d94b17989e6705a69d6502b477a960b7826cadbb214e52aae3ce36aa4bcb3b6ddf8d06fb90eb
DIST jdk-8u162-solaris-x64-demos.tar.gz 9752263 BLAKE2B 50e28f56df39b355587fc5894edb065eca115ef6f71c9afcef0c2640b9cd2dc8df9bb315a85219dbce96a59ab24304b429f0c756548b7a9fe26155f50916a11a SHA512 173c887650fa92f5c515fe5f7973c488301253344161ede7b1003a7fae0b5404c81fe450235c485846cb262ae82684500e249ac134f248889bea9ad05048cc1c
DIST jdk-8u162-solaris-x64.tar.gz 101741152 BLAKE2B 9e01659aa83b11b20e47842b7ef5c23b3e376540023d92a1e2350083037d45872cb15138fcd37ad62ea05ed5d47a716b0c8dc792f415ecd18ada6ed9b075aea4 SHA512 9755a4b9af4b5aa7e904748e5d627ebffb2ff290748d28aac9b494b372815a6ca3ee219c140ed43698a341f495ccffe5f9cae3bea0ad94e1e14fefa84d287783
DIST jdk-9.0.4_linux-x64_bin.tar.gz 354635831 BLAKE2B 6d102ca812c7fcf03b611d95880af51916dde52f09f3a5b972abd6575c73e8cca1855fb50ac00aac3f4643a1e422b5fdb97a746608b5a4235d8664926a061730 SHA512 787addfcf3d4736507ad8fa54b22894a33d39bde01d9d187d5c9f3433b43c9e8b14404a8366d0bc8510faa8936274bbfa304109d3927aa323b3f8a285efaffd6
DIST jdk-9.0.4_osx-x64_bin.dmg 400672048 BLAKE2B 0bcc3643ccbc72cd98aca71823e06fd60068a7e1d72c7ce59f8e4c26bb9461a207f57ef239b244ec05c8f843666f2854b07a5f05841819cfe79ed8fefafb3650 SHA512 34191b5802c2d369f890cb1b563f77ee040b9af6ee4fc8ae81974f46afea675401e2a02803fc4345e11bab1103397dd8b583d68bb81edcdd02902cb3e595cc52
DIST jdk-9.0.4_solaris-sparcv9_bin.tar.gz 217025485 BLAKE2B 6b3d4f4701ff3349f8acce727fcfcb06ce420e54dd32d2e6b91b71aa898a8d6a293375ec2cb0c66f14a5df77a6f5b7016160572b995ad84a593e9d5c6c928184 SHA512 9418a725a33dfbedf7f692abfb92550f23fca594fa8c1b85934d601284261339f177a32af7440e0b09233b2e99b2fd7cef835c54252cec6a645ea322a389de14
334 changes: 334 additions & 0 deletions dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.162.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit eutils java-vm-2 prefix versionator

# This URI needs to be updated when bumping!
JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"

# This is a list of archs supported by this update.
# Currently arm comes and goes.
AT_AVAILABLE=( amd64 arm arm64 x86 x64-solaris sparc64-solaris x64-macos )

# Sometimes some or all of the demos are missing, this is to not have to rewrite half
# the ebuild when it happens.
DEMOS_AVAILABLE=( amd64 arm arm64 x86 x64-solaris sparc64-solaris x64-macos )

if [[ "$(get_version_component_range 4)" == 0 ]] ; then
S_PV="$(get_version_component_range 1-3)"
else
MY_PV_EXT="u$(get_version_component_range 4)"
S_PV="$(get_version_component_range 1-4)"
fi

MY_PV="$(get_version_component_range 2)${MY_PV_EXT}"

AT_amd64="jdk-${MY_PV}-linux-x64.tar.gz"
AT_arm="jdk-${MY_PV}-linux-arm32-vfp-hflt.tar.gz"
AT_arm64="jdk-${MY_PV}-linux-arm64-vfp-hflt.tar.gz"
AT_x86="jdk-${MY_PV}-linux-i586.tar.gz"
AT_x64_solaris="jdk-${MY_PV}-solaris-x64.tar.gz"
AT_sparc64_solaris="${AT_sparc_solaris} jdk-${MY_PV}-solaris-sparcv9.tar.gz"
AT_x64_macos="jdk-${MY_PV}-macosx-x64.dmg"

DEMOS_amd64="jdk-${MY_PV}-linux-x64-demos.tar.gz"
DEMOS_arm="jdk-${MY_PV}-linux-arm32-vfp-hflt-demos.tar.gz"
DEMOS_arm64="jdk-${MY_PV}-linux-arm64-vfp-hflt-demos.tar.gz"
DEMOS_x86="jdk-${MY_PV}-linux-i586-demos.tar.gz"
DEMOS_x64_solaris="jdk-${MY_PV}-solaris-x64-demos.tar.gz"
DEMOS_sparc64_solaris="jdk-${MY_PV}-solaris-sparcv9-demos.tar.gz"
DEMOS_x64_macos="jdk-${MY_PV}-macosx-x86_64-demos.zip"

DESCRIPTION="Oracle's Java SE Development Kit"
HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
for d in "${AT_AVAILABLE[@]}"; do
SRC_URI+=" ${d}? ( $(eval "echo \${$(echo AT_${d/-/_})}")"
if has ${d} "${DEMOS_AVAILABLE[@]}"; then
SRC_URI+=" examples? ( $(eval "echo \${$(echo DEMOS_${d/-/_})}") )"
fi
SRC_URI+=" )"
done
unset d

LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
SLOT="1.8"
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc64-solaris ~x64-solaris"
IUSE="alsa commercial cups derby doc examples +fontconfig headless-awt javafx jce nsplugin selinux source visualvm"
REQUIRED_USE="javafx? ( alsa fontconfig )"

RESTRICT="fetch preserve-libs strip"
QA_PREBUILT="*"

# NOTES:
#
# * cups is dlopened.
#
# * libpng is also dlopened but only by libsplashscreen, which isn't
# important, so we can exclude that.
#
# * We still need to work out the exact AWT and JavaFX dependencies
# under MacOS. It doesn't appear to use many, if any, of the
# dependencies below.
#
RDEPEND="!x64-macos? (
!headless-awt? (
x11-libs/libX11
x11-libs/libXext
x11-libs/libXi
x11-libs/libXrender
x11-libs/libXtst
)
javafx? (
dev-libs/glib:2
dev-libs/libxml2:2
dev-libs/libxslt
media-libs/freetype:2
x11-libs/cairo
x11-libs/gtk+:2
x11-libs/libX11
x11-libs/libXtst
x11-libs/libXxf86vm
x11-libs/pango
virtual/opengl
)
)
alsa? ( media-libs/alsa-lib )
cups? ( net-print/cups )
doc? ( dev-java/java-sdk-docs:${SLOT} )
fontconfig? ( media-libs/fontconfig:1.0 )
!prefix? ( sys-libs/glibc:* )
selinux? ( sec-policy/selinux-java )"

DEPEND="app-arch/zip
examples? ( x64-macos? ( app-arch/unzip ) )"

S="${WORKDIR}/jdk"

check_tarballs_available() {
local uri=$1; shift
local dl= unavailable=
for dl in "${@}" ; do
[[ ! -f "${DISTDIR}/${dl}" ]] && unavailable+=" ${dl}"
done

if [[ -n "${unavailable}" ]] ; then
if [[ -z ${_check_tarballs_available_once} ]] ; then
einfo
einfo "Oracle requires you to download the needed files manually after"
einfo "accepting their license through a javascript capable web browser."
einfo
_check_tarballs_available_once=1
fi
einfo "Download the following files:"
for dl in ${unavailable}; do
einfo " ${dl}"
done
einfo "at '${uri}'"
einfo "and move them to '${DISTDIR}'"
einfo
einfo "If the above mentioned urls do not point to the correct version anymore,"
einfo "please download the files from Oracle's java download archive:"
einfo
einfo " http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jdk-${MY_PV}-oth-JPR"
einfo
fi
}

pkg_nofetch() {
local distfiles=( $(eval "echo \${$(echo AT_${ARCH/-/_})}") )
if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}"; then
distfiles+=( $(eval "echo \${$(echo DEMOS_${ARCH/-/_})}") )
fi
check_tarballs_available "${JDK_URI}" "${distfiles[@]}"
}

src_unpack() {
if use x64-macos ; then
pushd "${T}" > /dev/null || die
mkdir dmgmount || die
hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \
-mountpoint "${T}"/dmgmount || die
printf -v update "%02d" $(get_version_component_range 4) || die
xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ ${update}.pkg || die
hdiutil detach "${T}"/dmgmount || die
zcat jdk1${MY_PV%u*}0${update}.pkg/Payload | cpio -idv || die
mv Contents/Home "${WORKDIR}"/jdk${MY_PV} || die
popd > /dev/null || die
else
default
fi

# Upstream is changing their versioning scheme every release around 1.8.0.*;
# to stop having to change it over and over again, just wildcard match and
# live a happy life instead of trying to get this new jdk1.8.0_05 to work.
mv "${WORKDIR}"/jdk* "${S}" || die
}

src_prepare() {
default

if [[ -n ${JAVA_PKG_STRICT} ]] ; then
# Mark this binary early to run it now.
pax-mark m ./bin/javap

eqawarn "Ensure that this only calls trackJavaUsage(). If not, see bug #559936."
eqawarn
eqawarn "$(./bin/javap -J-Duser.home=${T} -c sun.misc.PostVMInitHook || die)"
fi

# Remove the hook that calls Oracle's evil usage tracker. Not just
# because it's evil but because it breaks the sandbox during builds
# and we can't find any other feasible way to disable it or make it
# write somewhere else. See bug #559936 for details.
zip -d jre/lib/rt.jar sun/misc/PostVMInitHook.class || die
}

src_install() {
local dest="/opt/${P}"
local ddest="${ED}${dest#/}"

# Create files used as storage for system preferences.
mkdir jre/.systemPrefs || die
touch jre/.systemPrefs/.system.lock || die
touch jre/.systemPrefs/.systemRootModFile || die

if ! use alsa ; then
rm -vf jre/lib/*/libjsoundalsa.* || die
fi

if ! use commercial; then
rm -vfr lib/missioncontrol jre/lib/jfr* || die
fi

if use headless-awt ; then
rm -vf {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
{,jre/}bin/{javaws,policytool} \
bin/appletviewer || die
fi

if ! use javafx ; then
rm -vf jre/lib/*/lib*{decora,fx,glass,prism}* \
jre/lib/*/libgstreamer-lite.* {,jre/}lib/{,ext/}*fx* \
bin/*javafx* bin/javapackager || die
fi

if ! use nsplugin ; then
rm -vf jre/lib/*/libnpjp2.* || die
else
local nsplugin=$(echo jre/lib/*/libnpjp2.*)
fi

# Even though plugins linked against multiple ffmpeg versions are
# provided, they generally lag behind what Gentoo has available.
rm -vf jre/lib/*/libavplugin* || die

# Packaged as dev-util/visualvm but some users prefer this version.
use visualvm || find -name "*visualvm*" -exec rm -vfr {} + || die

dodoc COPYRIGHT
dodir "${dest}"
cp -pPR bin include jre lib man "${ddest}" || die

if use derby ; then
cp -pPR db "${ddest}" || die
fi

if use examples && has ${ARCH} "${DEMOS_AVAILABLE[@]}" ; then
cp -pPR demo sample "${ddest}" || die
fi

ln -s policy/$(usex jce unlimited limited)/{US_export,local}_policy.jar \
"${ddest}"/jre/lib/security/ || die

if use nsplugin ; then
local nsplugin_link=${nsplugin##*/}
nsplugin_link=${nsplugin_link/./-${PN}-${SLOT}.}
dosym "${dest}/${nsplugin}" "/usr/$(get_libdir)/nsbrowser/plugins/${nsplugin_link}"
fi

if use source ; then
cp -v src.zip "${ddest}" || die

if use javafx ; then
cp -v javafx-src.zip "${ddest}" || die
fi
fi

if [[ -d jre/lib/desktop ]] ; then
# Install desktop file for the Java Control Panel.
# Using ${PN}-${SLOT} to prevent file collision with jre and or
# other slots. make_desktop_entry can't be used as ${P} would
# end up in filename.
newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
sun-jcontrol-${PN}-${SLOT}.png || die
sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
-e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
-e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}#" \
-e "s#Application;##" \
-e "/Encoding/d" \
jre/lib/desktop/applications/sun_java.desktop \
> "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
fi

# Prune all fontconfig files so libfontconfig will be used and only install
# a Gentoo specific one if fontconfig is disabled.
# http://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
rm "${ddest}"/jre/lib/fontconfig.* || die
if ! use fontconfig ; then
cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
eprefixify "${T}"/fontconfig.properties
insinto "${dest}"/jre/lib/
doins "${T}"/fontconfig.properties
fi

# This needs to be done before CDS - #215225
java-vm_set-pax-markings "${ddest}"

# see bug #207282
einfo "Creating the Class Data Sharing archives"
case ${ARCH} in
arm|ia64)
${ddest}/bin/java -client -Xshare:dump || die
;;
x86)
${ddest}/bin/java -client -Xshare:dump || die
# limit heap size for large memory on x86 #467518
# this is a workaround and shouldn't be needed.
${ddest}/bin/java -server -Xms64m -Xmx64m -Xshare:dump || die
;;
*)
${ddest}/bin/java -server -Xshare:dump || die
;;
esac

# Remove empty dirs we might have copied.
find "${D}" -type d -empty -exec rmdir -v {} + || die

if use x64-macos ; then
# Fix miscellaneous install_name issues.
local lib
for lib in decora_sse glass prism_{common,es2,sw} ; do
lib=lib${lib}.dylib
einfo "Fixing self-reference of ${lib}"
install_name_tool \
-id "${EPREFIX}${dest}/jre/lib/${lib}" \
"${ddest}"/jre/lib/${lib} || die
done
fi

java-vm_install-env "${FILESDIR}"/${PN}.env.sh
java-vm_revdep-mask
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
}

pkg_postinst() {
java-vm-2_pkg_postinst

if ! use headless-awt && ! use javafx; then
ewarn "You have disabled the javafx flag. Some modern desktop Java applications"
ewarn "require this and they may fail with a confusing error message."
fi
}

0 comments on commit fd33484

Please sign in to comment.