diff options
author | James Le Cuirot <chewi@gentoo.org> | 2017-07-20 20:58:42 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2017-07-20 21:02:01 +0100 |
commit | aa4f4d6b1f975a7a1b660e62a7ef68d42b9c1245 (patch) | |
tree | 5d088d29babbf85ff244c84524e32bbda8031aba /dev-java | |
parent | www-client/opera-beta: Old. (diff) | |
download | gentoo-aa4f4d6b1f975a7a1b660e62a7ef68d42b9c1245.tar.gz gentoo-aa4f4d6b1f975a7a1b660e62a7ef68d42b9c1245.tar.bz2 gentoo-aa4f4d6b1f975a7a1b660e62a7ef68d42b9c1245.zip |
dev-java/oracle-jdk-bin: Bump to 1.8.0.141 wrt security bug #625602
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/oracle-jdk-bin/Manifest | 14 | ||||
-rw-r--r-- | dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.141.ebuild | 355 |
2 files changed, 369 insertions, 0 deletions
diff --git a/dev-java/oracle-jdk-bin/Manifest b/dev-java/oracle-jdk-bin/Manifest index c64e0690c7be..da3691751c21 100644 --- a/dev-java/oracle-jdk-bin/Manifest +++ b/dev-java/oracle-jdk-bin/Manifest @@ -13,3 +13,17 @@ DIST jdk-8u131-solaris-sparcv9-demos.tar.gz 9785755 SHA256 9198b026b1fcfc2bb43b5 DIST jdk-8u131-solaris-sparcv9.tar.gz 103941880 SHA256 0ba4992ba599dd9aab801f574b8d9a27499900b60b11d4f0399dbaca93daeb1c SHA512 bc056223094e5a38f66c0d5eba69543757b6a27c4cb766496b3c826d22967a50b24fb31bd44da4421ba3092cf041ad75f12a9a8258b0c596e9042581ffffb151 WHIRLPOOL 7a507fd9eccadc8a64e6ee1ef164940b3b10b02553cc513a2c60e04906c0eb1c6920abf9933205c7ca17893cf507515ca2aefad579f3a2bb54711f096c741fdb DIST jdk-8u131-solaris-x64-demos.tar.gz 9740151 SHA256 51b92279dda2d1011420e4922abdedba77a6c6ca666a6c6fdd5d7a4b415da31b SHA512 862dfe11fb2a8ecf6c31c9e62be42c459e91c8fc3b3b9c284d460f0aceb3921dfe1423440ed0054d914ca72218155621caa816963193f462f1b7c1cdc76d44cd WHIRLPOOL 1810b4e63c3b64b7e753f46b021a04f1f017a2a6bcdd03f44477d9199815bafccb567fd822464b9f9fddf8187196c52c395d81ccca2af2942519a2a976fdc1e4 DIST jdk-8u131-solaris-x64.tar.gz 101664768 SHA256 258d44bf6c6554bbf059f1e702eb5372caac1d8becf52cd6d55f5976e4d83002 SHA512 7718cc3ff3fec17c289873354f478c15527dee09c2de8e04f5f79a95e9dd2f019d4deb4cf4bafa3b47bffce8b788d64dd94239b22f161b329f18bf176b039402 WHIRLPOOL 7291f2fd4b89c5ab1bc793ab2b9eb14b56b89695ec91a06d384fa674726a162702e71edb6bbc99a07456955f5b8ed2e0ee5a86df029430e1ac834020d8e3aed6 +DIST jdk-8u141-linux-arm32-vfp-hflt-demos.tar.gz 10425006 SHA256 8b37b473f888e53993f387eec150afd149d98bce5f0b7daffe9ddea9f7f58d86 SHA512 cdf711cdea5acc952d9509f283668a502bf9cf6a0e1ebc55b7d4add7db83dd1931aefe700d8ed850e94c56614ddc0c394dec2d3bbd634d743655062855e9c02b WHIRLPOOL b4196f6fb83cc40118117c448293141e0787a3ba8d8f17eb006ba23305fab2dc6c5b0ebed8358aafebcd5cbb8f00c3fe18235b1fd8a2bd6acdaf470439885c37 +DIST jdk-8u141-linux-arm32-vfp-hflt.tar.gz 81665416 SHA256 f73fa7631e5173b10a9ffd415b8fa9585a32eeac6fb7a3e1ccc4631270d79f31 SHA512 94811afc4934c51951019eb9aa6612879062a34b3dad0f63111ca4d1ea305eb1b93558931efcadb0513e461dbe9b0a8cca98ff811a342efe29be7a04a00973fc WHIRLPOOL a4bcc3ce0ce0a46aa61466a4868dcdf350ba63ec9715939ba18224d3ad203c472f415d2ad5a8cc5180bc5d08d82cc03c89c449185353599b5674780ba3550daa +DIST jdk-8u141-linux-arm64-vfp-hflt-demos.tar.gz 10424705 SHA256 86716e69e134c267b60ecfa5f6e1f64b82432a83f69c8e5ad316dfbd7e2c6be3 SHA512 95a5f2c673f24c8081635260d48ecc5a102be666a53617427177ac633382aa080e4c70739c44ea5f7bd4661c8fc9d56331a58fff34347573c90accc8cf0d880c WHIRLPOOL 89b1dc71fd8fb61c785db6644293783a5947cbde4db9fe5077416f29f32a30ad3b050438c65839a334ae14b7116e7211941d7184c508d9cbe5641c5beaf28ff3 +DIST jdk-8u141-linux-arm64-vfp-hflt.tar.gz 78462285 SHA256 1721b8f852f63c0889a978a262a58777e061ecdc64be1a6e437cf7464e925804 SHA512 47e952c32ef76202153e7fabc47ca27e02bb3111db2143b4b5477aa72972e8b3f7d96d1d40370d522519a2a9aefa34366c69dce97a88b900d22bfacac7e4fd00 WHIRLPOOL a7d7cc4ee169010da61ff8fad904bb6647400c2c421a032bc051ae435386434bd5473b9ceb882b7f3f94168f59b0461b5de831dcfdc11718846e9762f31a8836 +DIST jdk-8u141-linux-i586-demos.tar.gz 55065919 SHA256 653f264a98dd01ff8cc016b4df8e215fcc4b7de2a55b58f5f560d6947a84a153 SHA512 cedc05618c4e7e5d087529bc55932d5a2259c98400051e536c01b91de15850a8b86e5fa2b1d380cd9f2d9fc965562a0636ebbf8fb3ec4b24a65d078f98b68677 WHIRLPOOL 68b03ca6ebdeba7d697c61fd78d9ec20f6156a3a1a8ae5feae0c9ed31d0dc5a8801459eb63a462870b77d6e0414d7be1a96e544f2e23daf301042df7af789fce +DIST jdk-8u141-linux-i586.tar.gz 188115319 SHA256 6562f2bc8865e9c693b04c591d86d121871f49463ab0ca83fa0bcb070ffe084b SHA512 601396786b5537a84892e4143ac5b982628cb257cbc1c1ab3c1b76caac2dab89cec3ed67805456cbc2cdecc1846d17529c10ef26682f8056851eb7752b4a0a79 WHIRLPOOL 52b1d16989e135749b24a43409b1d6a6b3d9f469a86181da2d4186225dc8e3e358d80db2643458c0c69d64621bf326808fefb245d431a0de42bc33169e03bf5f +DIST jdk-8u141-linux-x64-demos.tar.gz 55094198 SHA256 75ad611e184f60e11786647fd453cb419e6045af416f0a31bf54d4e6cbb773e4 SHA512 afa4c3662a77301c87b1a66f22b6833f3219d90603862fb5d20c9712e36cc2765bb23a5519d0d4bf3e70d30b5723b263d761bee22385fae5d7472eec902525a9 WHIRLPOOL 211ecf81971127060989ddfa88b8a49ba9af6f7d665a609bc10310fbdce9c4537e7de73e493373c492db970edeb9c2883aa563f3967f3d484e56ee96ad04a2af +DIST jdk-8u141-linux-x64.tar.gz 185516505 SHA256 041d5218fbea6cd7e81c8c15e51d0d32911573af2ed69e066787a8dc8a39ba4f SHA512 1ffaf30d2d8af71e1fe694d13a7cc4b135ce9ed5d3d2f1a39045d1bd6dbfa22d2f8656371b52312bb4f65e48e01f223d463022ef860da5b4a6453a5c165ab074 WHIRLPOOL 0d8fcec215b5b096fb5ae03d2d86a46ef190c509df923e94df968afe034b97b3af38873e25a5760fd288ab329881a8b8377e7d35a277d6d31b02c47727b4a944 +DIST jdk-8u141-macosx-x64.dmg 237602730 SHA256 ed540bc452c1fd7772a27db6dc45b65d37ed0808edfa8853a234d3fc21e6992c SHA512 6a258d7899e245e24cc1b73d76b7d2cf74566d4ec0cf7ecf218eada5ba243fabf1b7f3fcae3f750ea684ab82cafd88c593d4118dbcd9926cba084bc4c990c097 WHIRLPOOL 1ae256ba7cc08fe28935808c0af180580cc020fade6956978cbf4b46a08ad4af8ae24e0a476d0b581bea04c03afa986c11be5746ae7b16f80aead2d37810165d +DIST jdk-8u141-macosx-x86_64-demos.zip 55667177 SHA256 71f91ad76ebd46e8fb8a93fa40b5de037b471315dc0cfe6b113ea8bfe7d74ae7 SHA512 6c9e93b10f97d07fb65b92e971a75b3cd441cbae014b4c5bacbd15ed19d6c5f6972758b311ade47af0c43d81e4c5679d056473c9c23d95243105cb5814736073 WHIRLPOOL 4ba0dc686915ac0f84a9455eda41a3ed27a8403969f69b60f8c38bc9045801988b95de5345f10ba8752fc0f62065208c4ccd36fcdc472e13c14ff94c47173941 +DIST jdk-8u141-solaris-amd64-demos.tar.gz 9754478 SHA256 77d64a65b232498ed0485e67806dbabcd16c5b2d687393a14b50e9cfeadf7d75 SHA512 5b9ca2b23c5df5bbe154039b9cb24c8331a7a99f8debddcad6700895eab9b9d1185fdd53eb7bdbedbade2e78185fcf23891aee397dbc6903b0ae157b9cf010eb WHIRLPOOL 87c5104ac006638f28b341a2caeb016eb188883dcca471d23829cf4bb232586ed4d72fbb88c57ec6a7fad38e3e5a4b4ccf0253a6dad0ea2eea1e53b546912825 +DIST jdk-8u141-solaris-sparcv9-demos.tar.gz 9776511 SHA256 d704eed84ae8c755b6f41ab210d2c5adfc27fede8e29522049043da84b91a53f SHA512 a360ed4145848dcfb7ff91209a66617b9129842c41d30bb24ab96276953ffe185d5c460c008811fa99c1078a7b6528c52ceb4010838c9c4ac5befcca3dfd09a8 WHIRLPOOL 7ff63be89112ad16e05574773df09786e38c313a6419f900658c585721ce98045894ce6d4dbab6e28076dd16526504995984cc492b739992d9b602d16c352bd1 +DIST jdk-8u141-solaris-sparcv9.tar.gz 103987001 SHA256 da73b6757be82cadb17060d2960aa3f7cc451e546eadf2e20fde85f1d60147f5 SHA512 ed094a3aa794eecc717462741ae4fd75e18049f4da81e4efbf853f8e55be53240c1ba1674ec28357bf6290c3e16506188a7ea32d2016c34a3afdf98621988767 WHIRLPOOL 3d31b593a2fe6acc4580086dc682d84f50c41045ca76f0cac3ce60f646fad1d7cd046f64287f67569d7e439f706644d51b05735dce8e5ff1b886a926f504bc82 +DIST jdk-8u141-solaris-x64.tar.gz 101721173 SHA256 a9944cff1b7500169f1c9b7e754f4f6dc081ccb6c68755f8971355e576a1e6fc SHA512 c0da2d01bfb491a2783783ccb7314e46621142d2d146202f4ae51c2ce640055b8cacf9ab7bf45382d18a2ab1da7f0cb8b12a768513de1da6b4bcc62c48ffb350 WHIRLPOOL 7408a697c22717ae7ec0cae28750fb781cd21799248ed687c057b1bb2c70cb3b255791c83f0a478f328d434ebd9d27531d379307c2ac6a90930f441856768222 diff --git a/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.141.ebuild b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.141.ebuild new file mode 100644 index 000000000000..95fd16904749 --- /dev/null +++ b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.141.ebuild @@ -0,0 +1,355 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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-amd64-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 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 + jce? ( app-arch/unzip ) + 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[@]}" + use jce && check_tarballs_available "${JCE_URI}" "${JCE_FILE}" +} + +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 + 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 + + 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 + + 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.* || 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 +} |