From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 806431396D9 for ; Sat, 21 Oct 2017 23:20:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9C68E0C48; Sat, 21 Oct 2017 23:20:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5061AE0C48 for ; Sat, 21 Oct 2017 23:20:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5944F33BF44 for ; Sat, 21 Oct 2017 23:20:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7F712829 for ; Sat, 21 Oct 2017 23:20:01 +0000 (UTC) From: "James Le Cuirot" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "James Le Cuirot" Message-ID: <1508626986.2e01c262a9b38fedda5b37f1c5b33e12806f4242.chewi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/oracle-jdk-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-java/oracle-jdk-bin/Manifest dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.152.ebuild X-VCS-Directories: dev-java/oracle-jdk-bin/ X-VCS-Committer: chewi X-VCS-Committer-Name: James Le Cuirot X-VCS-Revision: 2e01c262a9b38fedda5b37f1c5b33e12806f4242 X-VCS-Branch: master Date: Sat, 21 Oct 2017 23:20:01 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3d7991c1-1ab8-4903-a92f-f75ff35d73e1 X-Archives-Hash: e6dd95b8d0f3dcf30d203d2c707a92f2 commit: 2e01c262a9b38fedda5b37f1c5b33e12806f4242 Author: Manuel Ullmann posteo de> AuthorDate: Sat Oct 21 01:23:14 2017 +0000 Commit: James Le Cuirot gentoo org> CommitDate: Sat Oct 21 23:03:06 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e01c262 dev-java/oracle-jdk-bin: Version bump to 1.8.0.152 Package-Manager: Portage-2.3.8, Repoman-2.3.3 Closes: https://github.com/gentoo/gentoo/pull/6004 dev-java/oracle-jdk-bin/Manifest | 14 + .../oracle-jdk-bin/oracle-jdk-bin-1.8.0.152.ebuild | 355 +++++++++++++++++++++ 2 files changed, 369 insertions(+) diff --git a/dev-java/oracle-jdk-bin/Manifest b/dev-java/oracle-jdk-bin/Manifest index 708fbed9de7..45b51a23883 100644 --- a/dev-java/oracle-jdk-bin/Manifest +++ b/dev-java/oracle-jdk-bin/Manifest @@ -13,3 +13,17 @@ DIST jdk-8u144-solaris-amd64-demos.tar.gz 9765361 SHA256 33f76fb0bec3f554aeb15c0 DIST jdk-8u144-solaris-sparcv9-demos.tar.gz 9793649 SHA256 ceea29533ceb76ed1ee7f65b5935ef0fc53b0afee7c5f4ddb08d4face3b0838e SHA512 ba14fe455acc52f2f6da0c3d419d491f3a3123c7a0f80ce4d130e68a0492e7509e34709ca5921c6f266c468ba085f78d203d8018f1d9df26982e3d2dea72c1c5 WHIRLPOOL 5fe028f3959d2337416f8cb3b9b101dbba4ec42db18abec7641cac3133da44d0938f0429d43be3e2c159957fe5c351a6db81d6b08fddb55cb5abf7ef36e1885c DIST jdk-8u144-solaris-sparcv9.tar.gz 103999213 SHA256 fe8e6d12cac940569c5b2270d2d40ed57d6a0861d15d512e4d1cbc55277a2d2d SHA512 0a9ed86237ec253c009f68a3d6832610595623437d25d68c157ef2b5d59e0556acbe229be7b9a1713565b76604bd15474d2ce50ab7c593bf568226e9c1f6f6c7 WHIRLPOOL 24cee16e12c622cc675226842c28211b9d1a7e6079e0e0c0721e7f2cc2fe822e033ffbd405f7d509b5068531d7b9ce525a6628ee4cc3642400f33f7d8f86a8c3 DIST jdk-8u144-solaris-x64.tar.gz 101700929 SHA256 9eea0096784e6c876aae6918bf4692096bd738200e717da09b4471bd1e706cf1 SHA512 fcd65f556d8565a29d4b7d3d5dec5c52c669c64db536c8ab01749f1f320232e8d42ba3d7012802033d9d7344b9abddd52140e345e4f95a025f00069901726f6b WHIRLPOOL f3ddd659003c5f2d39112132050bc441630c73208900babed8c1ec814c3d73271f8774e9411c8fc3e2eeae31f5312d6731520963c82f1c148d461eab0a355972 +DIST jdk-8u152-linux-arm32-vfp-hflt-demos.tar.gz 10405226 SHA256 5dba4af988562661f4543f210e0e16be9f4e11885e8addd9b7f8f6e2aa18741b SHA512 774b1957142ca489e362ef6ab48ce152196b64c00d779d051f76421fdf4a52cd7a741cfe3336b02c05f432fd2cb95728cdfd992f4ea3fee56047b40e7ce95053 WHIRLPOOL 1196d099f307f21b22e08c3b4badba33ee0475ebd70091ed98510730f7c492032e02a8dd475bd72b380eb9ceb8980e5a012c0be906d76afd2073e048d94f5909 +DIST jdk-8u152-linux-arm32-vfp-hflt.tar.gz 81729798 SHA256 35ab532355c72310c4c7add2b7c7f9d1eb0e045cf59d3fd69ee08fa6a9e610f0 SHA512 c548c18e2e2c9e2c87ad24841348b676628a33023a70aa0a5dab56d031c1d9c7a4813240a046db96631025d034ed333fec81c8099f02a7c9efd39fecd4592e32 WHIRLPOOL 32119379086fc008957bb6a00012d17e2f7d2a22ebd26f8b6e04a3d6476ab5d98a25bcc51cd5ce3c0eba6422581a050b809ffed2539819295aadef37d6e79383 +DIST jdk-8u152-linux-arm64-vfp-hflt-demos.tar.gz 10434504 SHA256 59c1787ad8b5f604293b09576fc8e872ad3fe32c0df3f3a62c9149dddfe25b24 SHA512 c41cb3f8394f98516e7dce52d8aaaea87d0e1675560292009eba0b4b3e993d1aaef7a7895dd83af2570486af6ca8913f280940d5f7e0051c3cc198a6387d9cd7 WHIRLPOOL ae3189cb9393ae9039ddb7a0c87db4ed30defc9cea5cc7d86de8bc32003f5d33c4200c20a3a10658c21f3099c2d455c3660fd1b4d0b222398cf084d776e36ae6 +DIST jdk-8u152-linux-arm64-vfp-hflt.tar.gz 78513081 SHA256 732609dd090a7d20e09b48b90f8f447497879bb6da1b786a9dd1ea6e91ea178f SHA512 fe35360a9ffa73e9745360560db6a5dee9665d31801ea58bd8be676588c93955f47077dbcb5a415c0074f9759a9cace77916e3b322c572b4d3b23a1d99f16578 WHIRLPOOL 9b1abcfa123d783b4caeaab8f469084647fa8deea3056aba910710e525dc7a89a096909111c24e869557d26db2a363be7008b1bddfaff7f9123b168767b78bf7 +DIST jdk-8u152-linux-i586-demos.tar.gz 55096721 SHA256 0a12f9f08e863a75685b11a66f31e990140777b1a8762cb30d9d617a3a0144a5 SHA512 44776eafd70306a392fae5cf269036d7500c7cbaee13a9fcda14b9f7191376dbfcbb03262693e3114a08f5d4ff27ede1ef570fa6008c9ef71ab3b24d44f9ad2c WHIRLPOOL a4b63c7d05a7b69d0525a1ee743e571ecc289c9abbf283c42ffa99dfa17ac98e822a523ca8d021d4fe3d89b51cfa6072ebed4ed272b772aadbab26cc2e479d8d +DIST jdk-8u152-linux-i586.tar.gz 192699649 SHA256 fc60b121d4b194fa70084fd0ca0d69e8b78e5db01a071efe200e90eed83c4c3e SHA512 6b7576ec40b0ddd0a54fbcd61c22b95f472192be5855d143387f1b56220dd68e851a8b87894802c181b1039c14f5a278d950f100c4bd10b862fe4049d9294ce2 WHIRLPOOL a4bd3b3eed55c42ae51599783c6a2743edb9aaa090e84dd49708930ea712b9d262c565fcaf1e59d5b48f362ec84cca22da920699b9ef8abfd6e9ec93025bbce5 +DIST jdk-8u152-linux-x64-demos.tar.gz 55162003 SHA256 7f0858d204c952fddc402379c187952fcf75dbe5a02b31e51b8a961320f24afa SHA512 51303580a702c1fd1227d8f57c546b6e11de6a87d3ba32123a3e001688c5ff308efa1feaa6da8d2bcff8143fa61726ba9e4aec959a70e82817d628480b0a576f WHIRLPOOL a42cd6a7f0e3619f6408e7f9a923a48cf05c749b945b2e29999344375f146dd408abc774ca153f2d6ec659ebc14229255bee9b850fe182ad5b6f4394313e3a2f +DIST jdk-8u152-linux-x64.tar.gz 189784266 SHA256 218b3b340c3f6d05d940b817d0270dfe0cfd657a636bad074dcabe0c111961bf SHA512 b0851d46bf0385b7595f8d60da0f06ccdcd59aac75efa9b48635ba77a3e4eb557cbda5585fa5886787a0e549d9e5cfa4a992741349cfc224b36f180907838321 WHIRLPOOL c1d7030f94585725ae4bbf65893456a376ebd5d8ad9cbd63ef7dc86c0b7b6103c98140bbe955234cf8605b422c00d213f9089b56d36f1c920fdb25835ff45e62 +DIST jdk-8u152-macosx-x64.dmg 259130998 SHA256 9f9008e2b05e431838c8ee5f0d54f7715da386bc70b14d4910766c71e9f7923f SHA512 9b3b8ea5119a2f5d3e221244ec07e6da6405041a65fec6299643133a89434d44719e4ccea35498749c00bc400c125dae7a1f4f41fc44d0d6748235bf92601eb8 WHIRLPOOL 0abda8fa87e1b2d525ba401b6b842fc30728c936d05372bb0e2680b602dcd3cc15fc293a1932c716e9904c4d97b9e57a8f7ac66c8ac4080ea342800f4c57542e +DIST jdk-8u152-macosx-x86_64-demos.zip 55705509 SHA256 3d05061a5c58da669797cd9f8583412eca34e8b0f8779aa6a45b93daac2d2b43 SHA512 5b17f84aeda22a145d8171c8789a8fa1127d1e9b3b6acabdc9e2ad42e4ac5b8c95f2afc0e1736096bec246ca87a22908a5ede492fde34a081984a02382c19ac3 WHIRLPOOL 261e6b89dbb73aa94f4d3d4dacf2353d11a4bae66d446315c0d588de995dee76d7cda9f89fa325656bc8e39657f4d4faafac6f9a06843a12b3045416f93e9969 +DIST jdk-8u152-solaris-sparcv9-demos.tar.gz 9769313 SHA256 2675ad1157ba9a2db3e5d72e8aa658e0f3388731a435b01f890091aaf509f326 SHA512 32e35cb2b3f9e3cb5b5d77a84612fe37f90879e7eb38578af6a922157f12878d1b5f893a3119df055facf7457a5516f502a7da5cb93fa3d5614fdf1f855ecfb8 WHIRLPOOL d38bf520351be78a9eeae4de8696a5fccabb8fd09a9196f14cdd91db457441c341de6854d922e1bcc4d89e1635ac0912e3bd68c166c457b0b86265a617211c0a +DIST jdk-8u152-solaris-sparcv9.tar.gz 104117809 SHA256 bb23f8813c99b99130e2a7bc076b22712801f19aa600832cd7ce590995ed0ba2 SHA512 9b87d11325e22bfb5f8e852ef4dcd182f091dcedfe71e5b19cc5a7d82f9f7ccb060b53512bc938d0e617648a8aa766bb722690751521b9a2cc3820507342548d WHIRLPOOL 33a11de9b2969eea74251c1dbe217d311ae0db9ff7190c1c9713898212b9c5b537ff5382d15ce27f45bc362901809f2ad7b8a50a3f01904454c9f6be262743d4 +DIST jdk-8u152-solaris-x64-demos.tar.gz 9756596 SHA256 ea6468eca72d715db7e3e4494fb316b25872b91276b156a598a5ea0bd9baf919 SHA512 1aeaf732ad3956ede4baa005f34024750e03919ef81b608229a3df556b47db1255ce027e4278891644433db0c360225a3e81e9a547d298a4b958beb8691f8ff2 WHIRLPOOL f56dec7bc4e156a5058aec0ed7e6274a043dd8069a0b5f95592155a062e133c04dbbe98e1d91ff7e30f71abd863a90022f3fa4363b4fbffd6bb41f5e0701c7e5 +DIST jdk-8u152-solaris-x64.tar.gz 101758540 SHA256 2bf02d98d0eca1ed55fcf274e6254c3e6e71d8e07700fd1ff9e82c44006abace SHA512 4dd9606be347a61a03c0f670915c4e790d4f5eef80a67922342b539dcae7132b3157df04cd33e5f72fdc7e6fcb43e21b3b387e2da159cdfea0feb01183c68aa0 WHIRLPOOL 476c5af0b835643b4d8605deb8f67ef7448bfb0887088cb632a7464d28863b92a9fae2315ef9e454cbd6e1f693910f329dae84acca0d9cb42b4a986e834a1e1e diff --git a/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.152.ebuild b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.152.ebuild new file mode 100644 index 00000000000..cd57314695a --- /dev/null +++ b/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.8.0.152.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-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 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 +}