summaryrefslogtreecommitdiff
path: root/dev-java/openjdk
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-20 10:22:14 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-20 10:22:14 +0100
commit46eedbedafdb0040c37884982d4c775ce277fb7b (patch)
treedb33a91259730be84999e13a8d8168c799f50ac0 /dev-java/openjdk
parente23a08d0c97a0cc415aaa165da840b056f93c997 (diff)
gentoo resync : 20.10.2021
Diffstat (limited to 'dev-java/openjdk')
-rw-r--r--dev-java/openjdk/Manifest11
-rw-r--r--dev-java/openjdk/files/openjdk-17.env.sh16
-rw-r--r--dev-java/openjdk/openjdk-11.0.11_p9-r1.ebuild3
-rw-r--r--dev-java/openjdk/openjdk-11.0.12_p7.ebuild3
-rw-r--r--dev-java/openjdk/openjdk-17_p35.ebuild277
-rw-r--r--dev-java/openjdk/openjdk-8.292_p10.ebuild3
-rw-r--r--dev-java/openjdk/openjdk-8.302_p08.ebuild3
7 files changed, 312 insertions, 4 deletions
diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index 2044f1f0520d..7936573832be 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -1,8 +1,10 @@
AUX openjdk-11.env.sh 537 BLAKE2B 404aeaf3d4df54b66193b8e09521ad2e55a23dc0603beea9911e4c91ab96e30c0f4aa4a0e96b1982874e055af3b9923689657b58dc02b37f91163659343ed2f9 SHA512 f4a41891b0187048a21b1af43053375e62de249e3ba210c3cfd59178c9f4c667ff83f10ee85f9ae37db097e862ff7233f5136569d0cb1399dbf48cea075cfc6e
+AUX openjdk-17.env.sh 537 BLAKE2B 64ef0f37bc0fb1f20d5f30751727e8f70a0460ad5917a9aa0dd346732e0862ebe10ea48145d585aea45f3689c9d359ed3f983dbaafeaf9da4c5f306fac8db0fa SHA512 b6add3bd4cf296debcaa57c7e73c1469c2dab1450157259a70702098aaa40339b6927ac444116f62b9448806c88616049d4733b4d7d8b2ae6a1ec106c16a6a07
AUX openjdk-8-insantiate-arrayallocator.patch 647 BLAKE2B b2403d842ace7198520a25bf7c2027e6d74b5d418b52321722b21cac866df883d47e53e4f5e040aed55a9cc4bf03b5a62d008a0877add6c649a41f6230d78a38 SHA512 4bf002ec25844f4e55b588d0516e658c548700d3bcae79be74bf75d9cf30cf9cd448767db36935924dd3b07f34d0cf087321cb35abb4943690353d11485ab0de
AUX openjdk-8.env.sh 792 BLAKE2B efabd83be56cdbd06419267361b82278bd52bfce8df8f369b7b9cadac74196ad90b9ab83e3abe8ae73e5ac51c49236d24d7762450832236414f98c1f6d13d6b2 SHA512 acdf229fff329c79e2263bd433c953dd18fc0945a0ffb6428c7004baf0bedbe3a9503c22ba1e777e7598412dfa2d2d9255c9007ecd14b4590c558e6a52c48a9f
DIST openjdk-11.0.11_p9.tar.bz2 95298760 BLAKE2B 7572d297fecffa9d38998c79dda00ea9361c1cf2f6c8bf51bac782da17cd3b6b272d08ab57fff96d523a1299f5514cb3788d05eeb37ef467ee7ad8bbb156d98e SHA512 72deecf32b793fa331deb6a1c0294b1efc68b72af9aebc1ba0528189e0097ff6d226cd0c3947d3cdc35c3cf28b3450cc538d375be0b9d43dca379f244894d20e
DIST openjdk-11.0.12_p7.tar.bz2 95201432 BLAKE2B 6a031fec8e49025dd07d970bc12ef4da23c0e6be8a7b6f6609154bbe607de386669e58c529a935504a4a115269cf3e5a142ced50be5b21961b21d6ba53c6ecc2 SHA512 ca2af877839ee91b989981112be0af446d835ddf9eb68fc4976c2f97b21a4b0c9ec67625c202084e92834dd1a75f97a8aeff77a45570a79dc870cf6bd9d5d97f
+DIST openjdk-17_p35.tar.gz 104583143 BLAKE2B bc5cb90ea42d6a6fa414e807c04dbabadb097e9a3a3fe27010b03375997446a1d2ddfcd6ca8afc604730538ad0a375266e5a7fa4e111b02cef23b06b39160a89 SHA512 38a108752072133683bfdb5564f6406a4d0e95f4c15116f0b0dbae1d024450ff0be8a01f3a58ed5de9d93e1b0c70cb481a21237a9eb0d5034be85793785d19a4
DIST openjdk-8.292_p10.tar.bz2 457861 BLAKE2B 043c1d6f7d040dedaadd05091ce4fdf3f516c1cd241e3603c81f2c49fd81df9c4f1082822a5471255381d56f3ab838a24e499b4ec647f3354ee051078c496b2c SHA512 6e1ac380db32fa5f1decc80291dcdb5e1d3d9afb0dc4587966c5a1b840588a984bc07109c23cb0c69c60509c6db8152e7306509280063f7d2e853aed41e391cc
DIST openjdk-8.302_p08.tar.bz2 459824 BLAKE2B 19909605f3ae93f94875268e88b8fea0a49be0d8adbf2d2369c5fa1e66f6880094730294cb52bad009984c7ac7f63b8271fa43d0901fe4ce52b7b03696aaa6e3 SHA512 2be9c2965e307b09dcd07225e09665bbc818ba851d9e854645218194f0052eb4736f49915fddebb2a89043b0c14d7a6d5de145fb712034661568610e596fe0e5
DIST openjdk-aarch64-shenandoah-8.292_p10.tar.bz2 464164 BLAKE2B 3f50f20517ef7b4599f9062330b3bc86900c137751e65d3047d165ad153032447b5f9c88e0d390c0ed758ad10d818295ce2cde04150da5036dd6b05fa26c2745 SHA512 074e9ea2fe83f4edb4d0de72f0d1a9c9091c28707c17b08ffab11cad2620790e740bfe53cef41a07d04b31cc32c1388e52e09eb07ca0b9929300d611c514619e
@@ -35,8 +37,9 @@ DIST openjdk-langtools-8.292_p10.tar.bz2 2401270 BLAKE2B b4043862df04e9f0056d420
DIST openjdk-langtools-8.302_p08.tar.bz2 2401910 BLAKE2B 64e1d65121bfc75314b0f4205691140ec167f2ee72472650b1558f0a387bad1a657ad51a001c184ae65d8e8a1fd5bbe6f07a96e7e8c41cf13a195e0ba6aaf638 SHA512 517f75fa6e22fca92892d1811914bdcbcd7d85bd5357ac5253a0c3b3551a119d0ec68a82ca99bb336e34c6ff33b82195379c4ae9fb07f10e71f45e9a2ed65d75
DIST openjdk-nashorn-8.292_p10.tar.bz2 2849397 BLAKE2B d875dea02ec8a3a3cba49f173f42ad7d73d15492cb86a15b095063ad327655ab9c260571c8a8ed35daf4078d52eb24d58b04125d3cea148bbc9e3fe924375c45 SHA512 4b707059bc6b217bdae2d9ea685c18b9cc3759180d5dcb5e51ad4eb00e6e660ca6181a68427f1e53c81b9636a323c1229e19de35b51e14a5d599cb64412ae11f
DIST openjdk-nashorn-8.302_p08.tar.bz2 2848729 BLAKE2B 75cb7e04c0b398f7b5443738b08473a4a806ffbd416828dfa9d7696e11c4ed28337330a4ba19794394689d571a05e6dd95ffbb047482b744cf25ac9551e94100 SHA512 c0634948d4d35271c27009108c322779ee67cdc764c3e49aeaa0bf9e59729486bdaf7f54dcd5289e82fd0e83f03f68a04597d187d37ccb4aa5b2e93f30111a06
-EBUILD openjdk-11.0.11_p9-r1.ebuild 7792 BLAKE2B e56b763df2fd4006fb19f4ee4fcbc661bd7e2cb30bba2ccf203685bb7e194540d9cc39d53c6e1f7b8f19353a9dbf964a47d43b816d45cfbf22a339a373e3e28b SHA512 e11ee803045f9fd994ccf4ee617aceb31a527a64b568290a46f7f36a260c2a0587dc65c1104780a54d4d73110027d83dc077e2c1703ec2e932ca090b54390db4
-EBUILD openjdk-11.0.12_p7.ebuild 7793 BLAKE2B e6c81ae0203613ff9151c388c7f706e9cb314a113501a2d8707e14026ba7dde339e9522d611dd9cdfa0339f2c6a90b4a403a7e293181f3db4479ab75121255c8 SHA512 da62cee1d726339b8555d1db5826a5ef2263a54f29958b26405c261ffa365345a87cb8ec05b0acf78b87e2d9800ec5fe2133dad69b0125c6226966a0816cc394
-EBUILD openjdk-8.292_p10.ebuild 7313 BLAKE2B 1c5db4f660ab13a3bdd21e009900fd6f4f7b79005f89da8c802e611cb325929f42eb60f59c88220fc2d865fa5554d0b88c09846767e907c11d787a9433b6cee1 SHA512 eb35e875c863ba47d1a1b6de1f493ff2efdd5bc82a82be775f9977ffc46cb64854f9576498aba8cf424bdb78003c1301efae487c7223b4ef138f1efbe7e51b2b
-EBUILD openjdk-8.302_p08.ebuild 7315 BLAKE2B e3c1fa880c236700019e5ffe4d63767c3b4a20ecd5e4b31905d60b079e4b8326058cac97a4db5970a3fc30dfe42f682937e45a8731a6b3f4468598c955d8e12f SHA512 a494bcb6e77f7e00691df22eda50f1028aef090c83102e6d01b8fe351674e1373d3ef4799ad9db4e188deed7401f95c64883983a6a01a0dc10f6b3ea8e7c1e95
+EBUILD openjdk-11.0.11_p9-r1.ebuild 7880 BLAKE2B f445e99b98d7833b477af27ad5f3912a7db667ee4dc851898cc509197af42c40bf93a5b640627bdb4fd6e8dba624f99884a54b31cdda788290bdb971cbe28877 SHA512 3c072d057b6987315b0722fc76e9c00773fc347cb7412811b4aa6479baee8278e88aefb2a29ea9c5c14b70241815fec09c2f9d1268474386938b7cd55873215e
+EBUILD openjdk-11.0.12_p7.ebuild 7880 BLAKE2B 90be95ba0aa11179f0cb1f71277c28d53c9df33f630e5c3cf876009efeed9032426d85d304b20990972fb2b5eead1c67c3d25b1b546c88c83273fb0401d82c86 SHA512 631287cbf9a147fb7a6a0d33d5011b34229ac66b09234cdc750ac3019765cae990016b2c3821048a524bb6e54784c74342966f94d1e332fae1284b4ad0183eb6
+EBUILD openjdk-17_p35.ebuild 7801 BLAKE2B de1e5e767add36f98d18180bb57e2f65e73d2119e68f025cd315264bc486979ccd5e26b1c748c2c7b246b39ed67f9749bd0f484408549064c267c00356b06462 SHA512 3b0301ce9ec2ca457e687661b6f1444db69cffde4b5ba3c1984cf38f9c2d20fcf41b197a8dda4427c8fa8a4c1018eb233bce06c5205f9bbed03e026bf5ff6c1c
+EBUILD openjdk-8.292_p10.ebuild 7401 BLAKE2B fdaac61668973e591bc885b6a2033da7ac3ffa3263558a507f800df7a013d873eadec2259b324c1f56823e7c36629f7af7e470552c58e29a53096de212309a6a SHA512 0972113635d2c22aa7cad3b847368d0ce89f85ede1441488d8f13df19fbfbb051513188513960299b0ef1d57c8e5c4b2a898ee01c171cc6ebecc0d8ed954ca39
+EBUILD openjdk-8.302_p08.ebuild 7402 BLAKE2B 9c305a3a852441a557f9bd4213e9c4c29c6cc2cd8184c6c68d4181f65680efe4fb783f50f8d70e5257e4e0b1b1666ff475bf4cd33ed0dddf453e77c6a8859160 SHA512 aaae2b31dedd15ae27bd369d34bcd2077b8ab820d2ca54b99cbf83dfc3f58c68c618485cc6d58597de944b3c3efade774184359ed49444245cd71076d9576fc5
MISC metadata.xml 1433 BLAKE2B f1c32727711519e4f3ecbaf9f9be6c025b467d93e2423bb5e6d9f3644242ad8f356204e7a804b0fccb56a3df5b9283cce305e82b19659a1c39bffc6b65676316 SHA512 cee169279a8c13fd3bfbc89eb1e0ecdda9a34214d001cf941f08abf89516f224e1532e916bbdb6597c56bd6a1df18ede2c4bb18e54c5e4ad67be70250f836fb5
diff --git a/dev-java/openjdk/files/openjdk-17.env.sh b/dev-java/openjdk/files/openjdk-17.env.sh
new file mode 100644
index 000000000000..7db6461bf48f
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-17.env.sh
@@ -0,0 +1,16 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+VERSION="OpenJDK ${PV}"
+JAVA_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}"
+JDK_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}"
+JAVAC="\${JAVA_HOME}/bin/javac"
+PATH="\${JAVA_HOME}/bin"
+ROOTPATH="\${JAVA_HOME}/bin"
+LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/"
+MANPATH=""
+PROVIDES_TYPE="JDK JRE"
+PROVIDES_VERSION="${SLOT}"
+BOOTCLASSPATH=""
+GENERATION="2"
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
diff --git a/dev-java/openjdk/openjdk-11.0.11_p9-r1.ebuild b/dev-java/openjdk/openjdk-11.0.11_p9-r1.ebuild
index 789f3f0fde3b..d54714848896 100644
--- a/dev-java/openjdk/openjdk-11.0.11_p9-r1.ebuild
+++ b/dev-java/openjdk/openjdk-11.0.11_p9-r1.ebuild
@@ -141,6 +141,9 @@ src_configure() {
# Work around -fno-common ( GCC10 default ), bug #713180
append-flags -fcommon
+
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
# Enabling full docs appears to break doc building. If not
# explicitly disabled, the flag will get auto-enabled if pandoc and
diff --git a/dev-java/openjdk/openjdk-11.0.12_p7.ebuild b/dev-java/openjdk/openjdk-11.0.12_p7.ebuild
index 29fdbe9c1a1a..e0b6a2896eeb 100644
--- a/dev-java/openjdk/openjdk-11.0.12_p7.ebuild
+++ b/dev-java/openjdk/openjdk-11.0.12_p7.ebuild
@@ -142,6 +142,9 @@ src_configure() {
# Work around -fno-common ( GCC10 default ), bug #713180
append-flags -fcommon
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
+
# Enabling full docs appears to break doc building. If not
# explicitly disabled, the flag will get auto-enabled if pandoc and
# graphviz are detected. pandoc has loads of dependencies anyway.
diff --git a/dev-java/openjdk/openjdk-17_p35.ebuild b/dev-java/openjdk/openjdk-17_p35.ebuild
new file mode 100644
index 000000000000..b5e1cacf9515
--- /dev/null
+++ b/dev-java/openjdk/openjdk-17_p35.ebuild
@@ -0,0 +1,277 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit check-reqs eapi7-ver flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs
+
+MY_PV="${PV//_p/+}"
+SLOT="$(ver_cut 1)"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.java.net"
+SRC_URI="https://github.com/openjdk/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
+
+IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap +pch selinux source systemtap"
+
+COMMON_DEPEND="
+ media-libs/freetype:2=
+ media-libs/giflib:0/7
+ media-libs/harfbuzz:=
+ media-libs/libpng:0=
+ media-libs/lcms:2=
+ sys-libs/zlib
+ virtual/jpeg:0=
+ systemtap? ( dev-util/systemtap )
+"
+
+# Many libs are required to build, but not to run, make is possible to remove
+# by listing conditionally in RDEPEND unconditionally in DEPEND
+RDEPEND="
+ ${COMMON_DEPEND}
+ >=sys-apps/baselayout-java-0.1.0-r1
+ !headless-awt? (
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ )
+ alsa? ( media-libs/alsa-lib )
+ cups? ( net-print/cups )
+ selinux? ( sec-policy/selinux-java )
+"
+
+DEPEND="
+ ${COMMON_DEPEND}
+ app-arch/zip
+ media-libs/alsa-lib
+ net-print/cups
+ x11-base/xorg-proto
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXrandr
+ x11-libs/libXrender
+ x11-libs/libXt
+ x11-libs/libXtst
+ javafx? ( dev-java/openjfx:${SLOT}= )
+ || (
+ dev-java/openjdk-bin:${SLOT}
+ dev-java/openjdk:${SLOT}
+ )
+"
+
+REQUIRED_USE="javafx? ( alsa !headless-awt )"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV//+/-}"
+
+# The space required to build varies wildly depending on USE flags,
+# ranging from 2GB to 16GB. This function is certainly not exact but
+# should be close enough to be useful.
+openjdk_check_requirements() {
+ local M
+ M=2048
+ M=$(( $(usex jbootstrap 2 1) * $M ))
+ M=$(( $(usex debug 3 1) * $M ))
+ M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M ))
+
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ openjdk_check_requirements
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876"
+ fi
+}
+
+pkg_setup() {
+ openjdk_check_requirements
+ java-vm-2_pkg_setup
+
+ JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}"
+ JAVA_PKG_WANT_SOURCE="${SLOT}"
+ JAVA_PKG_WANT_TARGET="${SLOT}"
+
+ # The nastiness below is necessary while the gentoo-vm USE flag is
+ # masked. First we call java-pkg-2_pkg_setup if it looks like the
+ # flag was unmasked against one of the possible build VMs. If not,
+ # we try finding one of them in their expected locations. This would
+ # have been slightly less messy if openjdk-bin had been installed to
+ # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env
+ # file but disable it so that it would not normally be selectable.
+
+ local vm
+ for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
+ if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then
+ java-pkg-2_pkg_setup
+ return
+ fi
+ done
+
+ if has_version --host-root dev-java/openjdk:${SLOT}; then
+ export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT}
+ else
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT})
+ [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
+ JDK_HOME=${JDK_HOME#*/}
+ JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*}
+ export JDK_HOME
+ fi
+ fi
+}
+
+src_prepare() {
+ default
+ chmod +x configure || die
+}
+
+src_configure() {
+ # Work around stack alignment issue, bug #647954. in case we ever have x86
+ use x86 && append-flags -mincoming-stack-boundary=2
+
+ # Work around -fno-common ( GCC10 default ), bug #713180
+ append-flags -fcommon
+
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
+
+ # Enabling full docs appears to break doc building. If not
+ # explicitly disabled, the flag will get auto-enabled if pandoc and
+ # graphviz are detected. pandoc has loads of dependencies anyway.
+
+ local myconf=(
+ --disable-ccache
+ --disable-warnings-as-errors
+ --enable-full-docs=no
+ --with-boot-jdk="${JDK_HOME}"
+ --with-extra-cflags="${CFLAGS}"
+ --with-extra-cxxflags="${CXXFLAGS}"
+ --with-extra-ldflags="${LDFLAGS}"
+ --with-freetype=system
+ --with-giflib=system
+ --with-harfbuzz=system
+ --with-lcms=system
+ --with-libjpeg=system
+ --with-libpng=system
+ --with-native-debug-symbols=$(usex debug internal none)
+ --with-vendor-name="Gentoo"
+ --with-vendor-url="https://gentoo.org"
+ --with-vendor-bug-url="https://bugs.gentoo.org"
+ --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
+ --with-vendor-version-string="${PVR}"
+ --with-version-pre=""
+ --with-version-string="${PV%_p*}"
+ --with-version-build="${PV#*_p}"
+ --with-zlib=system
+ --enable-dtrace=$(usex systemtap yes no)
+ --enable-headless-only=$(usex headless-awt yes no)
+ $(tc-is-clang && echo "--with-toolchain-type=clang")
+ )
+
+ if use javafx; then
+ local zip="${EPREFIX%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
+ if [[ -r ${zip} ]]; then
+ myconf+=( --with-import-modules="${zip}" )
+ else
+ die "${zip} not found or not readable"
+ fi
+ fi
+
+ # PaX breaks pch, bug #601016
+ if use pch && ! host-is-pax; then
+ myconf+=( --enable-precompiled-headers )
+ else
+ myconf+=( --disable-precompiled-headers )
+ fi
+
+ (
+ unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS
+ CFLAGS= CXXFLAGS= LDFLAGS= \
+ CONFIG_SITE=/dev/null \
+ econf "${myconf[@]}"
+ )
+}
+
+src_compile() {
+ local myemakeargs=(
+ JOBS=$(makeopts_jobs)
+ LOG=debug
+ CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
+ $(usex doc docs '')
+ $(usex jbootstrap bootcycle-images product-images)
+ )
+ emake "${myemakeargs[@]}" -j1 #nowarn
+}
+
+src_install() {
+ local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+ local ddest="${ED}${dest#/}"
+
+ cd "${S}"/build/*-release/images/jdk || die
+
+ # Create files used as storage for system preferences.
+ mkdir .systemPrefs || die
+ touch .systemPrefs/.system.lock || die
+ touch .systemPrefs/.systemRootModFile || die
+
+ # Oracle and IcedTea have libjsoundalsa.so depending on
+ # libasound.so.2 but OpenJDK only has libjsound.so. Weird.
+ if ! use alsa ; then
+ rm -v lib/libjsound.* || die
+ fi
+
+ if ! use examples ; then
+ rm -vr demo/ || die
+ fi
+
+ if ! use source ; then
+ rm -v lib/src.zip || die
+ fi
+
+ rm -v lib/security/cacerts || die
+
+ dodir "${dest}"
+ cp -pPR * "${ddest}" || die
+
+ dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
+
+ # must be done before running itself
+ java-vm_set-pax-markings "${ddest}"
+
+ einfo "Creating the Class Data Sharing archives and disabling usage tracking"
+ "${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
+
+ use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
+ java-vm_revdep-mask
+ java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
+
+ if use doc ; then
+ docinto html
+ dodoc -r "${S}"/build/*-release/images/docs/*
+ dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
+ fi
+}
+
+pkg_postinst() {
+ java-vm-2_pkg_postinst
+
+ if use gentoo-vm ; then
+ ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK"
+ ewarn "recognised by the system. This will almost certainly break"
+ ewarn "many java ebuilds as they are not ready for openjdk-${SLOT}"
+ else
+ ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK"
+ ewarn "will not be recognised by the system. For example, simply calling"
+ ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
+ ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its"
+ ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}."
+ fi
+}
diff --git a/dev-java/openjdk/openjdk-8.292_p10.ebuild b/dev-java/openjdk/openjdk-8.292_p10.ebuild
index 898080f8d64f..efa35fc97284 100644
--- a/dev-java/openjdk/openjdk-8.292_p10.ebuild
+++ b/dev-java/openjdk/openjdk-8.292_p10.ebuild
@@ -154,6 +154,9 @@ src_configure() {
# Work around -fno-common ( GCC10 default ), bug #706638
append-flags -fcommon
+
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
tc-export_build_env CC CXX PKG_CONFIG STRIP
diff --git a/dev-java/openjdk/openjdk-8.302_p08.ebuild b/dev-java/openjdk/openjdk-8.302_p08.ebuild
index e358542ca062..fef83580c303 100644
--- a/dev-java/openjdk/openjdk-8.302_p08.ebuild
+++ b/dev-java/openjdk/openjdk-8.302_p08.ebuild
@@ -155,6 +155,9 @@ src_configure() {
# Work around -fno-common ( GCC10 default ), bug #706638
append-flags -fcommon
+ # Strip some flags users may set, but should not. #818502
+ filter-flags -fexceptions
+
tc-export_build_env CC CXX PKG_CONFIG STRIP
local myconf=(