diff options
author | James Le Cuirot <chewi@gentoo.org> | 2017-01-21 23:04:23 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2017-01-23 22:52:05 +0000 |
commit | 090d01d2c01092de8f73720ece3d379ffec7a6c5 (patch) | |
tree | d69618217b3a57d84da5b683cefcd3665f8cbb52 /dev-java/oracle-jdk-bin | |
parent | java-vm-2.eclass: PT PaX markings are no longer supported, bug #592856 (diff) | |
download | gentoo-090d01d2c01092de8f73720ece3d379ffec7a6c5.tar.gz gentoo-090d01d2c01092de8f73720ece3d379ffec7a6c5.tar.bz2 gentoo-090d01d2c01092de8f73720ece3d379ffec7a6c5.zip |
dev-java/oracle-jdk-bin: Bump to 1.8.0.121 wrt security bug #606118
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'dev-java/oracle-jdk-bin')
-rw-r--r-- | dev-java/oracle-jdk-bin/Manifest | 14 | ||||
-rw-r--r-- | dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.121.ebuild | 366 |
2 files changed, 380 insertions, 0 deletions
diff --git a/dev-java/oracle-jdk-bin/Manifest b/dev-java/oracle-jdk-bin/Manifest index 5368238044cc..0f9974e35696 100644 --- a/dev-java/oracle-jdk-bin/Manifest +++ b/dev-java/oracle-jdk-bin/Manifest @@ -13,3 +13,17 @@ DIST jdk-8u112-solaris-sparcv9-demos.tar.gz 9804200 SHA256 acd7237d7e3efc69d3769 DIST jdk-8u112-solaris-sparcv9.tar.gz 103876511 SHA256 f01739d94564eced651ea93ce5d98d1ccbb63fa99a4b7a7c3db99d03e30cf475 SHA512 ef4463b8a7e49d4ddf5aa5bca6f279ed4d3fbeca867aecb1f0c30661b8a08bbf1d0a5a8ecddc4f951e8655bb8d936b63090034d09fa7cca3a4012602a7f775c8 WHIRLPOOL f2bd24163c905fc1e800267b4e1d1f4856ceaca409a24b1ba406fa779d5b78917de5bd4acaf54177220d6abd824b33b6e2e351604681e27be13e7b15c2072254 DIST jdk-8u112-solaris-x64-demos.tar.gz 9755514 SHA256 bbd8e55531ae6b1f6ad759334ffd62c1746912822326915def857351df3a7d95 SHA512 182ed642f76de2e15eba7bb96c09f75d14dfe9bb3b85c881521cda3746b90419eefef3941545f37d3fd81ec98509ae9003f9b419c3277ad58c0ed412b8b07b48 WHIRLPOOL 1007923893b91c0a636b5a710d98d137f34069e875382dc45b79977c6eff4166fcc10f134a9630966247597012668ff6b9dbc532273902175c9ac356b7b3686a DIST jdk-8u112-solaris-x64.tar.gz 101560691 SHA256 8adb58456c1860be9e73e28a4d249b478918d331f2dbcbbbac7c558708b8b754 SHA512 f7aeb0c4c8904014e247cf57ff30a53c804f06454f3b7eadfc2b831d59961a35ec29b0a3d1beb7809bf05fed452b898637fd54e2b59d3caccae76cd2fbf4e776 WHIRLPOOL 60967fb1930ce00298a11f4488b9e52a48f2f01fd2df60bffab095c968a5c1f2a383cc454331e6d43d5fab8ed703861783268faa8328fbff55742e542b4bd934 +DIST jdk-8u121-linux-arm32-vfp-hflt-demos.tar.gz 10403176 SHA256 65e4007e4e52a9755e967fe8dd943a0bf5efa6d5658d7575c352d3c9c22aefab SHA512 6db56012e857a0606124a6d519531cfa3151dda3067a873204e2175f19eee9f229733e4656bedd48b9eee11213e97334b03b4069747059cee32cdef31ac03691 WHIRLPOOL 1175bee77955d83133b6e3c76c4171106703aa8e488d55551d53133903d8b2341c6e369b492f7c04bf1669afb30f892709402cae6b21285c52b1790e3c129aa7 +DIST jdk-8u121-linux-arm32-vfp-hflt.tar.gz 81645826 SHA256 134c73db663b1fb0f3d771a383dbea1a7cfeaa00e4d2872e0a6df94d242cf2f6 SHA512 d7074a427bc270dc73ab8a86ea7503aa04554599239b80493ed92b7a216d483190c78b188373947b658e4cc64a0edfa64158607a313a9d19b49efda82c71646b WHIRLPOOL 576e540f4f4f487b4be6d2572a32f8e54b095722785b217c52df6100efe9af69219f831fa21122c2479ad540f1f0757efbc9a8743be3ce4249c9fe7b0926e15f +DIST jdk-8u121-linux-arm64-vfp-hflt-demos.tar.gz 10425709 SHA256 3a57e4d6bb0e088c3b799f9d95a59b655c9356b6efa2312eec2bbcdc820fa7af SHA512 0aac9333a53147073286aa7d576c21a50ae223f8a7d338a470f0bda664d914500e559338bb8b86c5dae6ce1868569602c01f0a8fc2243a46c6bf01d7c71d52c0 WHIRLPOOL daad0b7a197d1d8f74de2c2af37c0933543626e28361de28354efb138954a8cadd3a79f1fdd02283e510121f1bcedf11c318c6377a0de55be82829a316a07acf +DIST jdk-8u121-linux-arm64-vfp-hflt.tar.gz 78462931 SHA256 acd84c59aa0c3fa8cfb2e3c51bbd9ebf979b4ed9b5f15b343821c31af2ce3573 SHA512 a1b0469ed6ad51f2d07f2dfad1ed0c2966661b987b819d4321b4c9b6de5f1aa35e02dd2653abb9ef0fcfa33db4820a67d679a3ff8668ca116b26012e19756ed8 WHIRLPOOL cc3f84f377178024d1ef469a8a089a8d00395760ac79899cc7f60593ec4177d9fa22781de0cdf695f3f20a65762ef9c57ee6024cb66b803ad9833fea2a1857a4 +DIST jdk-8u121-linux-i586-demos.tar.gz 55065250 SHA256 42c7c34a3e1db77d49e01c19bfa530924fb70e565add63391fa5bae1ba6ebd60 SHA512 be4d73d6854a7d4568bc1a8d31a01201130fd1751278670a528e8348a678eff0fe5143741018db1f070f55ad3b837c71b7167719899514322720db19b8932ad7 WHIRLPOOL 736f9450bc79526805a586ee52dd98c61c10c28c4f9b19733c0bae2afe5840f461bc126ceca0520ec28998a301cd3fdfc33759dbf3edbe92f25d301f3f7f7fd5 +DIST jdk-8u121-linux-i586.tar.gz 185735871 SHA256 f7d6cf1468c5e71ff097bec0189caccdd8e709a2a88a2c9849ad6200c0f33d4c SHA512 d900343912034a6d454ce8ca2dc5767551c6d14ed96b1297bcab817a73b43775f449b29f2c97cc7e7821543388eefc0d5d5fa130187e0a73813812e87c8e30e5 WHIRLPOOL 6af71bf8d5e7df8c82a6afd8a400d9ba76bdc19c73f3f71abf30cf85e8ec2ab3707f961de64d9b7a0b77940aab6093e39df34331529937cf47030980d8cb8a2e +DIST jdk-8u121-linux-x64-demos.tar.gz 55097929 SHA256 48f4d19df6fcee93e6ddcd9562c622bf558178eef14440273c266ace3ea97efb SHA512 9bb9e4e18e15055adfd7943da07fb29dfe2a35b39ade1895ab35ccb15611e1675c23ae3ef99312716d2bd8dc31937c12d5f292349538b15fc3c39511d47e966e WHIRLPOOL 0259d5e81e2bf93efb811f6299218e068ea1ef608eb7e23d482541bcfc7f8a1bfab405635196a60488fa94e70b8ab33dda9304497a60d30b995b889921f4f09a +DIST jdk-8u121-linux-x64.tar.gz 183246769 SHA256 97e30203f1aef324a07c94d9d078f5d19bb6c50e638e4492722debca588210bc SHA512 df5d90a87fff6f71246aab1e63412a0b8d50207784da939fdb09ab547a469d121c6c74a7849628fb4d4f3596658eef31fad4026598862f1a5637a15b37b44648 WHIRLPOOL bce31c3b12fe5ec820d8d7e3af6786365bd3830e92d51669bac314f8be866d2f9827fb2b9753fc62feaf574149d23b97a81ead8f8dae2f0dfea6fd98fb9bbbef +DIST jdk-8u121-macosx-x64.dmg 234054861 SHA256 82ff2493cd4b9ebdaeb9135abaffc9a37b71d341b007a83f73aa6ff3df1b6a3a SHA512 2f433c8dd2e6575df52343fc438c11bd5ccf2f81d3ef0dcd6047340eeb980ff0d609fbcce08acd237a9751d9b87386c176c1f33a01e502aaf03be7c47ab01082 WHIRLPOOL a6ffc15e99bb7286591fe8e2798080ff59676d7619d519308a9ad649435c8bf56a3cb7f0a612a1cf737314d806d34e0d43f4ac1329ea613b7f3ce2931d18b391 +DIST jdk-8u121-macosx-x86_64-demos.zip 55667576 SHA256 ed3f06213be725545f7238edf39280d2d15d8e493a7fcafb6919287c1f32def0 SHA512 45cefa19fcf9c1c01b2907b3f4943b750f67dc5393968a35421daa7ec10c63020ff94bd50f0f9b20ce4724edfb60e7904eccb55fc9220036e236ae53972b977c WHIRLPOOL 49ebb2d2f891ee37fcf981614d630d8822648eb1afa99ddb32c5bf50cde95a37cf69f09249eafe3746822c37f9a5636c12a6bd349b50f27b41e62cb303d1502b +DIST jdk-8u121-solaris-sparcv9-demos.tar.gz 9779387 SHA256 8b60ace2690b27c1316b71061884a257e00af1e2e0d6ac337f7806f64dccb9bf SHA512 f9e5a519a1cac824fe9927f3f36ced6e6b7542e04f991982d9404e24fda480aaee8298f7e286598399b4c74eabd112a441d11eafede41cbcb46e86fa4129652c WHIRLPOOL 3cef9d2d02bdba3aeed43d25b99bcd5ac9713492c712480cd909c8d9c88233fb577fc93bdc2dfd9e35fa5016eb58441a7ced2e1b1861dce8b28b2cf0b9675a01 +DIST jdk-8u121-solaris-sparcv9.tar.gz 103886687 SHA256 6c9ff068e2c6e0c0d41cc18b7ac5ec88a4e45285aa2eed3158287df017aecf81 SHA512 da9e4ef64c7721e1e666f54639d6efc0437239cae9ff80ddce59d01030e0421910e143c29d8e81e3e96c6248afd2e0d714f359ccf7862432ad3794287f3aad9e WHIRLPOOL dec5ef0806a518b756a975ec5b008eae571797d50141f5076c4d0ac8b88cd29368adccf51a5d55fdcde6b734732f890de15ec97a94b97fda420113ce1409182e +DIST jdk-8u121-solaris-x64-demos.tar.gz 9757042 SHA256 e4ebca2fb3166c1b2eeaa55803ce9c68a35e89e5f3bc056aa3f5e8e02c94b4c0 SHA512 4ed348c6b14445fd099b3df153a6df85a2d07bb194fde81ad25253b745c9d86e966b60c6faeff4808bb5e3ab7f4fe1a82f2f7119ecd7b7252fe5c27a31896b03 WHIRLPOOL 5cefbb8cf34f84726ce7bf48bf1875ecd326c29e6e2e693e921189757d512461df79842081700053ad773e7472ca4ffb0f9ca80bcc6738189cb9626f3d23f370 +DIST jdk-8u121-solaris-x64.tar.gz 101604840 SHA256 eb5d6f7d7804b3e8bc6dc46676a017368e402724f9a5747b6145e1e305c9ffa6 SHA512 14983383f94b62396948269a10d662b8adca851706558076c000be3d8352c7c66d3172f9e656e2de230c511d77117944a0cf3114fa467e072ce2f25ad1b7e9fa WHIRLPOOL 70e1a907fa4811db58fed40d42a37121b8700a408e2dc750911aa769fe61647758c1c231b913c131af152581588b0c38098fc10fcbc13c006ea5a7da3dab1f85 diff --git a/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.121.ebuild b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.121.ebuild new file mode 100644 index 000000000000..ad9f0f75d215 --- /dev/null +++ b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.121.ebuild @@ -0,0 +1,366 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils java-vm-2 prefix versionator + +# This URIs need to be updated when bumping! +JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" +JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.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" + +JCE_DIR="UnlimitedJCEPolicyJDK8" +JCE_FILE="jce_policy-8.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 +SRC_URI+=" jce? ( ${JCE_FILE} )" + +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 cups derby doc examples +fontconfig headless-awt javafx jce nsplugin pax_kernel selinux source" +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 )" + +# A PaX header isn't created by scanelf so depend on paxctl to avoid +# fallback marking. See bug #427642. +DEPEND="app-arch/zip + jce? ( app-arch/unzip ) + examples? ( x64-macos? ( app-arch/unzip ) ) + pax_kernel? ( sys-apps/paxctl )" + +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[@]}" + + use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}" +} + +src_unpack() { + if use x64-macos ; then + pushd "${T}" > /dev/null + mkdir dmgmount + hdiutil attach "${DISTDIR}"/jdk-${MY_PV}-macosx-x64.dmg \ + -mountpoint "${T}"/dmgmount + local update=$(get_version_component_range 4) + [[ ${#update} == 1 ]] && update="0${update}" + xar -xf dmgmount/JDK\ $(get_version_component_range 2)\ Update\ ${update}.pkg + hdiutil detach "${T}"/dmgmount + zcat jdk1${MY_PV%u*}0${update}.pkg/Payload | cpio -idv + mv Contents/Home "${WORKDIR}"/jdk${MY_PV} + popd > /dev/null + use jce && unpack "${JCE_FILE}" + 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() { + if use jce ; then + mv "${WORKDIR}"/${JCE_DIR} jre/lib/security/ || die + fi + + if [[ -n ${JAVA_PKG_STRICT} ]] ; then + # Mark this binary early to run it now. + pax-mark Cm ./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 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 + + 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 + + if use jce ; then + dodir "${dest}"/jre/lib/security/strong-jce + mv "${ddest}"/jre/lib/security/US_export_policy.jar \ + "${ddest}"/jre/lib/security/strong-jce || die + mv "${ddest}"/jre/lib/security/local_policy.jar \ + "${ddest}"/jre/lib/security/strong-jce || die + dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \ + "${dest}"/jre/lib/security/US_export_policy.jar + dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \ + "${dest}"/jre/lib/security/local_policy.jar + fi + + 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.* + 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. + pushd "${ddest}"/jre/lib > /dev/null || die + local lib needed nlib npath + 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}" \ + "${lib}" + done + popd > /dev/null + + # This is still jdk1{5,6}, even on Java 8, so don't change it + # until you know different. + for nlib in jdk1{5,6} ; do + install_name_tool -change \ + /usr/lib/libgcc_s_ppc64.1.dylib \ + /usr/lib/libSystem.B.dylib \ + "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib + install_name_tool -id \ + "${EPREFIX}${dest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib \ + "${ddest}"/lib/visualvm/profiler/lib/deployed/${nlib}/mac/libprofilerinterface.jnilib + done + fi + + set_java_env + 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 +} |