public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2018-11-08 23:11 James Le Cuirot
  0 siblings, 0 replies; 11+ messages in thread
From: James Le Cuirot @ 2018-11-08 23:11 UTC (permalink / raw
  To: gentoo-commits

commit:     369063cc1474a9a6bc49b2012e8fe08469a477cc
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  4 15:10:39 2018 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Nov  8 23:11:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=369063cc

dev-java/openjdk: New package to provide Java 11 from source

I'm not sure if this will build on hardened. There used to be an
upstream mechanism to handle PaX markings but this disappeared in an
earlier version. It might build with USE=-jbootstrap though. Please
let us know.

Thanks to Alex Dubov for the initial ebuild attempt.

Closes: https://github.com/gentoo/gentoo/pull/9835
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 dev-java/openjdk/Manifest                  |   1 +
 dev-java/openjdk/files/openjdk-11.env.sh   |  16 ++
 dev-java/openjdk/metadata.xml              |  16 ++
 dev-java/openjdk/openjdk-11.0.1_p13.ebuild | 234 +++++++++++++++++++++++++++++
 4 files changed, 267 insertions(+)

diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
new file mode 100644
index 00000000000..351991ab4ea
--- /dev/null
+++ b/dev-java/openjdk/Manifest
@@ -0,0 +1 @@
+DIST jdk-11.0.1+13.tar.bz2 90134818 BLAKE2B c79f32dc5b531a06317afb87ef15495267e914b9b292a1d434514a90298d8234e7e0ba92659416b15d9392c7513d976a0c81411953cb6706a27ee57c965e36fb SHA512 c534c2fa8dcd4fdebef6f00473d5ceaae4a33bd1e1a417846508e25f154b1ded649a73468c8c71ac0c1e27bab5f641a3b480a264b532a0c30be2869c3d11a15d

diff --git a/dev-java/openjdk/files/openjdk-11.env.sh b/dev-java/openjdk/files/openjdk-11.env.sh
new file mode 100644
index 00000000000..96c4be79c33
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-11.env.sh
@@ -0,0 +1,16 @@
+# Copyright 1999-2018 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/metadata.xml b/dev-java/openjdk/metadata.xml
new file mode 100644
index 00000000000..c76b9ca5d45
--- /dev/null
+++ b/dev-java/openjdk/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="project">
+    <email>java@gentoo.org</email>
+    <name>Java</name>
+  </maintainer>
+  <longdescription>Java™ is the world's leading programming language and platform. The code for Java is open source and available at OpenJDK™.</longdescription>
+  <use>
+    <flag name="headless-awt">Don't install the X backend for AWT, needed by some GUIs</flag>
+    <flag name="gentoo-vm">Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!)</flag>
+    <flag name="jbootstrap">Build OpenJDK twice, the second time using the result of the first</flag>
+    <flag name="source">Install JVM sources</flag>
+    <flag name="webstart">Provide javaws command through symlink to icedtea-web</flag>
+  </use>
+</pkgmetadata>

diff --git a/dev-java/openjdk/openjdk-11.0.1_p13.ebuild b/dev-java/openjdk/openjdk-11.0.1_p13.ebuild
new file mode 100644
index 00000000000..8bc5d1fa01e
--- /dev/null
+++ b/dev-java/openjdk/openjdk-11.0.1_p13.ebuild
@@ -0,0 +1,234 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs
+
+MY_PV=${PV/_p/+}
+SLOT=${MY_PV%%[.+]*}
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.java.net"
+SRC_URI="https://hg.${PN}.java.net/jdk-updates/jdk${SLOT}u/archive/jdk-${MY_PV}.tar.bz2"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+
+# Default variant must be first!
+# The rest do not matter.
+JVM_VARIANTS="
+	server
+	client
+	core
+	minimal
+	zero
+"
+
+IUSE=+$(printf "jvm_variant_%s " ${JVM_VARIANTS})
+IUSE+="alsa debug doc examples gentoo-vm headless-awt +jbootstrap nsplugin +pch selinux source +webstart"
+
+REQUIRED_USE="
+	^^ (
+		|| ( jvm_variant_server jvm_variant_client jvm_variant_minimal )
+		jvm_variant_core
+		jvm_variant_zero
+	)
+"
+
+CDEPEND="
+	media-libs/freetype:2=
+	net-print/cups
+	sys-libs/zlib
+	!headless-awt? (
+		x11-libs/libX11
+		x11-libs/libXext
+		x11-libs/libXi
+		x11-libs/libXrender
+		x11-libs/libXt
+		x11-libs/libXtst
+	)
+"
+
+RDEPEND="
+	${CDEPEND}
+	alsa? ( media-libs/alsa-lib )
+	selinux? ( sec-policy/selinux-java )
+"
+
+DEPEND="
+	${CDEPEND}
+	app-arch/zip
+	media-libs/alsa-lib
+	!headless-awt? (
+		x11-base/xorg-proto
+	)
+	|| (
+		dev-java/openjdk-bin:${SLOT}
+		dev-java/openjdk:${SLOT}
+	)
+"
+
+PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
+	nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
+
+# The space required to build varies wildly depending on USE flags,
+# ranging from 2GB to 24GB. This function is certainly not exact but
+# should be close enough to be useful.
+openjdk_check_requirements() {
+	local M variant count=0
+
+	for variant in ${JVM_VARIANTS}; do
+		use jvm_variant_${variant} &&
+			count=$(( $count + 1 ))
+	done
+
+	M=$(usex debug 2600 875)
+	M=$(( $(usex debug 2900 375) * $count + $M ))
+	M=$(( $(usex jbootstrap 2 1) * $M ))
+	M=$(( $(usex doc 300 0) + $(usex source 120 0) + 820 + $M ))
+
+	CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+	openjdk_check_requirements
+}
+
+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/$(get_libdir)/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
+		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
+}
+
+src_configure() {
+	# Work around stack alignment issue, bug #647954.
+	use x86 && append-flags -mincoming-stack-boundary=2
+
+	chmod +x configure || die
+
+	local variant build_variants
+	for variant in ${JVM_VARIANTS}; do
+		use jvm_variant_${variant} &&
+			build_variants+=${variant},
+	done
+
+	local myconf=()
+
+	# PaX breaks pch, bug #601016
+	if use pch && ! host-is-pax; then
+		myconf+=( --enable-precompiled-headers )
+	else
+		myconf+=( --disable-precompiled-headers )
+	fi
+
+	# 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.
+
+	(
+		unset JAVA JAVAC XARGS
+		CFLAGS= CXXFLAGS= LDFLAGS= \
+		CONFIG_SITE=/dev/null \
+		econf \
+			--with-boot-jdk="${JDK_HOME}" \
+			--with-extra-cflags="${CFLAGS}" \
+			--with-extra-cxxflags="${CXXFLAGS}" \
+			--with-extra-ldflags="${LDFLAGS}" \
+			--with-jvm-variants=${build_variants%,} \
+			--with-native-debug-symbols=$(usex debug internal none) \
+			--with-version-pre=gentoo \
+			--with-version-string=${MY_PV%+*} \
+			--with-version-build=${MY_PV#*+} \
+			--enable-headless-only=$(usex headless-awt yes no) \
+			--enable-full-docs=no \
+			--disable-ccache \
+			"${myconf[@]}"
+	)
+}
+
+src_compile() {
+	emake -j1 \
+		$(usex jbootstrap bootcycle-images product-images) $(usex doc docs '') \
+		JOBS=$(makeopts_jobs) LOG=debug CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
+}
+
+src_install() {
+	local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+	local ddest="${ED}${dest#/}"
+
+	cd "${S}"/build/*-release/images/jdk || 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
+
+	dodir "${dest}"
+	cp -pPR * "${ddest}" || die
+
+	use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
+	java-vm_set-pax-markings "${ddest}"
+	java-vm_revdep-mask
+	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
+
+	if use doc ; then
+		insinto /usr/share/doc/${PF}/html
+		doins -r "${S}"/build/*-release/images/docs/*
+		dosym ${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 things."
+	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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2019-02-01  9:09 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2019-02-01  9:09 UTC (permalink / raw
  To: gentoo-commits

commit:     74977ef710bda41d15f6c741f88c4b119c29df28
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  1 08:22:55 2019 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Feb  1 09:07:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74977ef7

dev-java/openjdk: add openjdk:8

Bug: https://bugs.gentoo.org/672058
Closes: https://github.com/gentoo/gentoo/pull/10858
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-java/openjdk/Manifest                  |   8 +
 dev-java/openjdk/files/generate-cacerts.pl | 358 +++++++++++++++++++++++++++++
 dev-java/openjdk/files/openjdk-8.env.sh    |  16 ++
 dev-java/openjdk/openjdk-8.202_p08.ebuild  | 240 +++++++++++++++++++
 4 files changed, 622 insertions(+)

diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index ad45e64d341..500148f6cfd 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -1,2 +1,10 @@
 DIST jdk-11.0.1+13.tar.bz2 90134818 BLAKE2B c79f32dc5b531a06317afb87ef15495267e914b9b292a1d434514a90298d8234e7e0ba92659416b15d9392c7513d976a0c81411953cb6706a27ee57c965e36fb SHA512 c534c2fa8dcd4fdebef6f00473d5ceaae4a33bd1e1a417846508e25f154b1ded649a73468c8c71ac0c1e27bab5f641a3b480a264b532a0c30be2869c3d11a15d
 DIST jdk-11.0.2+7.tar.bz2 90189455 BLAKE2B 37473a8db4c6ad6789ea67b44f4dda94b9f59143c681a206aa0931b3a2a376fbc480c0c5a6b617072cf9ce1faca34a6c5c5e56cfec9fbf5482b82520fb2463c4 SHA512 03214d9fc920c04f3057594efa78ff588a630e6c594e5bbcc24b4c327fa08273ce060063d98720cdc04bc6978a3d04e172f38ba7a3bcabf02dd5dad397fd9952
+DIST openjdk-8.202_p08.tar.bz2 449202 BLAKE2B 8f7442918c083e94cda0e029cf2348dd9242653027f84d66deebe162e0928b2c6a86d3f273ba235bad5e5656f2b109e6521aaccfa81332fea92873d008ac0c0d SHA512 586713b889dd60c7dc65fccd39ef3ddd985ebb95a7c6c1feaef3c8d76fd1d929bbf19a99f72274c1afb77bd7f80b581d44add4aa232358d8951f7cc5befb43d0
+DIST openjdk-corba-8.202_p08.tar.bz2 1033539 BLAKE2B 9cbe20fb771157142329db037866ec7d67ff7e70318bec8b74034ce59574cd730975f0e7a3d6b88fc946b1d340558a92ca867639765a205883481fd071d7059e SHA512 9b25132c76f559055698c52888f6cae287096e05b89541cb8e445b46a488126a38e58d4f28649e277862eac7aa20f75f64dbcdcf56c900dcb0530a9545c4f717
+DIST openjdk-hotspot-8.202_p08.tar.bz2 7918616 BLAKE2B a35cedf99a5067896dc498d4baa9b10f4ceb1ffcf946632b578c45d6354e4d025d82462797e56773507e504e5e25a25cdf63485460f9a8df234474a2e110f91a SHA512 ab53e77a4081a34c250750d7b975f790936cf370e81807d0081b006a12c0ceb452f54bd40cc8085a9f16047d270b9b610ee777f6fcd1431ff9d77461c32db464
+DIST openjdk-jaxp-8.202_p08.tar.bz2 2733553 BLAKE2B 53341136b427152115ea0d4f758228090a607270104c88ebb61bc442ddd51a43cfed03c34660a47ab55bb601e1a9d8bf4fcdab05874bf0a5ada33b1ecb60df45 SHA512 9671fb56b6127359376cc2f85d91eb027fb1df1f808e36abbe3a1265d88d50809c34d73b84f52fb6e058ef78017d8d7a24bd097a9d720ad70a6861aa9fcc80f2
+DIST openjdk-jaxws-8.202_p08.tar.bz2 2541554 BLAKE2B a92aae4290e1901b736a6a93aed3b8c4bca14046a1f3eb9939ea9bf8ae0cd09785cf37045a8274641f13e543b49114ff158b9bc0cdd58163b42791e952ac76d0 SHA512 ce385f247a57695f716894137d868fa492d610776d120966c86b741688d6df54ae9538da7cf7b9530212a288ac4ff0d156e09bd5d01305b8165b939fa518fede
+DIST openjdk-jdk-8.202_p08.tar.bz2 46618401 BLAKE2B e73b1341b837a0983ded4b4969ce83f9b77283e1d4d51e8d31a1b7401961a0b78943a41d2fe0aa724d85ac93dc3082511bcea341e87daecd070278ae59c8f240 SHA512 20e6747b506091383166298aeed6ff4ffd9deb92f20765ef839bf46d3ecae6b1aa218eb6857e6541df0522b8d571379341e94eb5bef765a1164cf9f59b20dfac
+DIST openjdk-langtools-8.202_p08.tar.bz2 2392880 BLAKE2B 45ebebe4864e3274e14cf27986cd96facfe2f8e5c1292344e05743d1448f95367caf0f68886c506ce10435fbf53948c6b9f7087ad5d2cd090cf0f1becb962843 SHA512 a1e1c3dc06b3a58082e1d67d58ffeaf0bc3c5534fd1ba368e835a54d3c6ba9232e277ae685ed3ff5ccdf3cd7fe0612ad78a08ed55d1d2d06de54914a19377907
+DIST openjdk-nashorn-8.202_p08.tar.bz2 2854026 BLAKE2B 05ba828160270e52f27023db83b1ffc4e6611b7a74b300a93a6d476f319a265834b48c7de57b0d3bea502d88279e72fd9cfbc5f3eb0e719650e34e82ba4a3d09 SHA512 bea0eaa4b2247cf1e5ee33613754c8f2f6ffe074a7be562f26e63c6327f56d67f60d4877dd363ed8a812689db1d837f5c257637460e247a1592c3258f3add11b

diff --git a/dev-java/openjdk/files/generate-cacerts.pl b/dev-java/openjdk/files/generate-cacerts.pl
new file mode 100644
index 00000000000..17d29b36676
--- /dev/null
+++ b/dev-java/openjdk/files/generate-cacerts.pl
@@ -0,0 +1,358 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# generate-cacerts.pl generates a JKS keystore named 'cacerts' from
+# OpenSSL's certificate bundle using OpenJDK's keytool.
+
+# First extract each of OpenSSL's bundled certificates into its own
+# aliased filename.
+
+# Downloaded from http://cvs.fedoraproject.org/viewvc/rpms/ca-certificates/F-12/generate-cacerts.pl?revision=1.2
+# Check and prevention of duplicate aliases added by Vlastimil Babka <caster@gentoo.org>
+
+$file = $ARGV[1];
+open(CERTS, $file);
+@certs = <CERTS>;
+close(CERTS);
+
+$pem_file_count = 0;
+$in_cert_block = 0;
+$write_current_cert = 1;
+foreach $cert (@certs)
+{
+    if ($cert =~ /Issuer: /)
+    {
+        $_ = $cert;
+        if ($cert =~ /personal-freemail/)
+        {
+            $cert_alias = "thawtepersonalfreemailca";
+        }
+        elsif ($cert =~ /personal-basic/)
+        {
+            $cert_alias = "thawtepersonalbasicca";
+        }
+        elsif ($cert =~ /personal-premium/)
+        {
+            $cert_alias = "thawtepersonalpremiumca";
+        }
+        elsif ($cert =~ /server-certs/)
+        {
+            $cert_alias = "thawteserverca";
+        }
+        elsif ($cert =~ /premium-server/)
+        {
+            $cert_alias = "thawtepremiumserverca";
+        }
+        elsif ($cert =~ /Class 1 Public Primary Certification Authority$/)
+        {
+            $cert_alias = "verisignclass1ca";
+        }
+        elsif ($cert =~ /Class 1 Public Primary Certification Authority - G2/)
+        {
+            $cert_alias = "verisignclass1g2ca";
+        }
+        elsif ($cert =~
+               /VeriSign Class 1 Public Primary Certification Authority - G3/)
+        {
+            $cert_alias = "verisignclass1g3ca";
+        }
+        elsif ($cert =~ /Class 2 Public Primary Certification Authority$/)
+        {
+            $cert_alias = "verisignclass2ca";
+        }
+        elsif ($cert =~ /Class 2 Public Primary Certification Authority - G2/)
+        {
+            $cert_alias = "verisignclass2g2ca";
+        }
+        elsif ($cert =~
+               /VeriSign Class 2 Public Primary Certification Authority - G3/)
+        {
+            $cert_alias = "verisignclass2g3ca";
+        }
+        elsif ($cert =~ /Class 3 Public Primary Certification Authority$/)
+        {
+            $cert_alias = "verisignclass3ca";
+        }
+        # Version 1 of Class 3 Public Primary Certification Authority
+        # - G2 is added.  Version 3 is excluded.  See below.
+        elsif ($cert =~
+               /VeriSign Class 3 Public Primary Certification Authority - G3/)
+        {
+            $cert_alias = "verisignclass3g3ca";
+        }
+        elsif ($cert =~
+               /RSA Data Security.*Secure Server Certification Authority/)
+        {
+            $cert_alias = "verisignserverca";
+        }
+        elsif ($cert =~ /GTE CyberTrust Global Root/)
+        {
+            $cert_alias = "gtecybertrustglobalca";
+        }
+        elsif ($cert =~ /Baltimore CyberTrust Root/)
+        {
+            $cert_alias = "baltimorecybertrustca";
+        }
+        elsif ($cert =~ /www.entrust.net\/Client_CA_Info\/CPS/)
+        {
+            $cert_alias = "entrustclientca";
+        }
+        elsif ($cert =~ /www.entrust.net\/GCCA_CPS/)
+        {
+            $cert_alias = "entrustglobalclientca";
+        }
+        elsif ($cert =~ /www.entrust.net\/CPS_2048/)
+        {
+            $cert_alias = "entrust2048ca";
+        }
+        elsif ($cert =~ /www.entrust.net\/CPS /)
+        {
+            $cert_alias = "entrustsslca";
+        }
+        elsif ($cert =~ /www.entrust.net\/SSL_CPS/)
+        {
+            $cert_alias = "entrustgsslca";
+        }
+        elsif ($cert =~ /The Go Daddy Group/)
+        {
+            $cert_alias = "godaddyclass2ca";
+        }
+        elsif ($cert =~ /Starfield Class 2 Certification Authority/)
+        {
+            $cert_alias = "starfieldclass2ca";
+        }
+        elsif ($cert =~ /ValiCert Class 2 Policy Validation Authority/)
+        {
+            $cert_alias = "valicertclass2ca";
+        }
+        elsif ($cert =~ /GeoTrust Global CA$/)
+        {
+            $cert_alias = "geotrustglobalca";
+        }
+        elsif ($cert =~ /Equifax Secure Certificate Authority/)
+        {
+            $cert_alias = "equifaxsecureca";
+        }
+        elsif ($cert =~ /Equifax Secure eBusiness CA-1/)
+        {
+            $cert_alias = "equifaxsecureebusinessca1";
+        }
+        elsif ($cert =~ /Equifax Secure eBusiness CA-2/)
+        {
+            $cert_alias = "equifaxsecureebusinessca2";
+        }
+        elsif ($cert =~ /Equifax Secure Global eBusiness CA-1/)
+        {
+            $cert_alias = "equifaxsecureglobalebusinessca1";
+        }
+        elsif ($cert =~ /Sonera Class1 CA/)
+        {
+            $cert_alias = "soneraclass1ca";
+        }
+        elsif ($cert =~ /Sonera Class2 CA/)
+        {
+            $cert_alias = "soneraclass2ca";
+        }
+        elsif ($cert =~ /AAA Certificate Services/)
+        {
+            $cert_alias = "comodoaaaca";
+        }
+        elsif ($cert =~ /AddTrust Class 1 CA Root/)
+        {
+            $cert_alias = "addtrustclass1ca";
+        }
+        elsif ($cert =~ /AddTrust External CA Root/)
+        {
+            $cert_alias = "addtrustexternalca";
+        }
+        elsif ($cert =~ /AddTrust Qualified CA Root/)
+        {
+            $cert_alias = "addtrustqualifiedca";
+        }
+        elsif ($cert =~ /UTN-USERFirst-Hardware/)
+        {
+            $cert_alias = "utnuserfirsthardwareca";
+        }
+        elsif ($cert =~ /UTN-USERFirst-Client Authentication and Email/)
+        {
+            $cert_alias = "utnuserfirstclientauthemailca";
+        }
+        elsif ($cert =~ /UTN - DATACorp SGC/)
+        {
+            $cert_alias = "utndatacorpsgcca";
+        }
+        elsif ($cert =~ /UTN-USERFirst-Object/)
+        {
+            $cert_alias = "utnuserfirstobjectca";
+        }
+        elsif ($cert =~ /America Online Root Certification Authority 1/)
+        {
+            $cert_alias = "aolrootca1";
+        }
+        elsif ($cert =~ /DigiCert Assured ID Root CA/)
+        {
+            $cert_alias = "digicertassuredidrootca";
+        }
+        elsif ($cert =~ /DigiCert Global Root CA/)
+        {
+            $cert_alias = "digicertglobalrootca";
+        }
+        elsif ($cert =~ /DigiCert High Assurance EV Root CA/)
+        {
+            $cert_alias = "digicerthighassuranceevrootca";
+        }
+        elsif ($cert =~ /GlobalSign Root CA$/)
+        {
+            $cert_alias = "globalsignca";
+        }
+        elsif ($cert =~ /GlobalSign Root CA - R2/)
+        {
+            $cert_alias = "globalsignr2ca";
+        }
+        elsif ($cert =~ /Elektronik.*Kas.*2005/)
+        {
+            $cert_alias = "extra-elektronikkas2005";
+        }
+        elsif ($cert =~ /Elektronik/)
+        {
+            $cert_alias = "extra-elektronik2005";
+        }
+        # Mozilla does not provide these certificates:
+        #   baltimorecodesigningca
+        #   gtecybertrust5ca
+        #   trustcenterclass2caii
+        #   trustcenterclass4caii
+        #   trustcenteruniversalcai
+        else
+        {
+            # Generate an alias using the OU and CN attributes of the
+            # Issuer field if both are present, otherwise use only the
+            # CN attribute.  The Issuer field must have either the OU
+            # or the CN attribute.
+            $_ = $cert;
+            if ($cert =~ /OU=/)
+            {
+                s/Issuer:.*?OU=//;
+                # Remove other occurrences of OU=.
+                s/OU=.*CN=//;
+                # Remove CN= if there were not other occurrences of OU=.
+                s/CN=//;
+                s/\/emailAddress.*//;
+                s/Certificate Authority/ca/g;
+                s/Certification Authority/ca/g;
+            }
+            elsif ($cert =~ /CN=/)
+            {
+                s/Issuer:.*CN=//;
+                s/\/emailAddress.*//;
+                s/Certificate Authority/ca/g;
+                s/Certification Authority/ca/g;
+            }
+            s/\W//g;
+            tr/A-Z/a-z/;
+            $cert_alias = "extra-$_";
+
+        }
+        while (-e "$cert_alias.pem")
+        {
+            $cert_alias = "$cert_alias" . "_";
+        }
+    }
+    # When it attempts to parse:
+    #
+    # Class 3 Public Primary Certification Authority - G2, Version 3
+    #
+    # keytool says:
+    #
+    # #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
+    # Unparseable AuthorityInfoAccess extension due to
+    # java.io.IOException: Invalid encoding of URI
+    #
+    # If we do not exclude this file
+    # openjdk/jdk/test/lib/security/cacerts/VerifyCACerts.java fails
+    # on this cert, printing:
+    #
+    # Couldn't verify: java.security.SignatureException: Signature
+    # does not match.
+    #
+    elsif ($cert =~
+           /A6:0F:34:C8:62:6C:81:F6:8B:F7:7D:A9:F6:67:58:8A:90:3F:7D:36/)
+    {
+        $write_current_cert = 0;
+        $pem_file_count--;
+    }
+    elsif ($cert eq "-----BEGIN CERTIFICATE-----\n")
+    {
+        if ($in_cert_block != 0)
+        {
+            die "$file is malformed.";
+        }
+        $in_cert_block = 1;
+        if ($write_current_cert == 1)
+        {
+            $pem_file_count++;
+            if (-e "$cert_alias.pem")
+            {
+                print "$cert_alias";
+                die "already exists"
+            }
+            open(PEM, ">$cert_alias.pem");
+            print PEM $cert;
+        }
+    }
+    elsif ($cert eq "-----END CERTIFICATE-----\n")
+    {
+        $in_cert_block = 0;
+        if ($write_current_cert == 1)
+        {
+            print PEM $cert;
+            close(PEM);
+        }
+        $write_current_cert = 1
+    }
+    else
+    {
+        if ($in_cert_block == 1 && $write_current_cert == 1)
+        {
+            print PEM $cert;
+        }
+    }
+}
+
+# Check that the correct number of .pem files were produced.
+@pem_files = <*.pem>;
+if (@pem_files != $pem_file_count)
+{
+    print "$pem_file_count";
+    die "Number of .pem files produced does not match".
+        " number of certs read from $file.";
+}
+
+# Now store each cert in the 'cacerts' file using keytool.
+$certs_written_count = 0;
+foreach $pem_file (@pem_files)
+{
+    system "$ARGV[0] -noprompt -import".
+        " -alias `basename $pem_file .pem`".
+        " -keystore cacerts -storepass 'changeit' -file $pem_file";
+    unlink($pem_file);
+    $certs_written_count++;
+}
+
+# Check that the correct number of certs were added to the keystore.
+if ($certs_written_count != $pem_file_count)
+{
+    die "Number of certs added to keystore does not match".
+        " number of certs read from $file.";
+}

diff --git a/dev-java/openjdk/files/openjdk-8.env.sh b/dev-java/openjdk/files/openjdk-8.env.sh
new file mode 100644
index 00000000000..e85a08ce4a8
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.env.sh
@@ -0,0 +1,16 @@
+# Copyright 1999-2019 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="\${JAVA_HOME}/man"
+PROVIDES_TYPE="JDK JRE"
+PROVIDES_VERSION="1.${SLOT}"
+BOOTCLASSPATH="\${JAVA_HOME}/jre/lib/resources.jar:\${JAVA_HOME}/jre/lib/rt.jar:\${JAVA_HOME}/jre/lib/jsse.jar:\${JAVA_HOME}/jre/lib/jce.jar:\${JAVA_HOME}/jre/lib/charsets.jar:\${JAVA_HOME}/jre/lib/jfr.jar"
+GENERATION="2"
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"

diff --git a/dev-java/openjdk/openjdk-8.202_p08.ebuild b/dev-java/openjdk/openjdk-8.202_p08.ebuild
new file mode 100644
index 00000000000..b1c57e60f8d
--- /dev/null
+++ b/dev-java/openjdk/openjdk-8.202_p08.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2019 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=$(ver_rs 1 'u' 2 '-' ${PV//p/b})
+
+BASE_URI="https://hg.${PN}.java.net/jdk8u/jdk8u"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.java.net"
+SRC_URI="
+	${BASE_URI}/archive/jdk${MY_PV}.tar.bz2 -> ${P}.tar.bz2
+	${BASE_URI}/corba/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-corba-${PV}.tar.bz2
+	${BASE_URI}/hotspot/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-hotspot-${PV}.tar.bz2
+	${BASE_URI}/jaxp/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxp-${PV}.tar.bz2
+	${BASE_URI}/jaxws/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxws-${PV}.tar.bz2
+	${BASE_URI}/jdk/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jdk-${PV}.tar.bz2
+	${BASE_URI}/langtools/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-langtools-${PV}.tar.bz2
+	${BASE_URI}/nashorn/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-nashorn-${PV}.tar.bz2
+"
+
+LICENSE="GPL-2"
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="alsa debug cups doc examples gentoo-vm headless-awt +jbootstrap nsplugin +pch selinux source +webstart"
+
+CDEPEND="
+	media-libs/freetype:2=
+	sys-libs/zlib
+	alsa? ( media-libs/alsa-lib )
+	!headless-awt? (
+		media-libs/giflib:0/7
+		x11-libs/libX11
+		x11-libs/libXext
+		x11-libs/libXi
+		x11-libs/libXrender
+		x11-libs/libXt
+		x11-libs/libXtst
+	)
+"
+
+RDEPEND="
+	${CDEPEND}
+	cups? ( net-print/cups )
+	selinux? ( sec-policy/selinux-java )
+"
+
+# cups headers requied to build, runtime dep is optional
+DEPEND="
+	${CDEPEND}
+	net-print/cups
+	app-arch/zip
+	app-misc/ca-certificates
+	dev-lang/perl
+	dev-libs/openssl:0
+	media-libs/alsa-lib
+	!headless-awt? (
+		x11-base/xorg-proto
+	)
+	|| (
+		dev-java/openjdk-bin:${SLOT}
+		dev-java/icedtea-bin:${SLOT}
+		dev-java/openjdk:${SLOT}
+		dev-java/icedtea:${SLOT}
+	)
+"
+
+PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
+	nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )"
+
+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 debug 3 1) * $M ))
+	M=$(( $(usex jbootstrap 2 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
+}
+
+pkg_setup() {
+	openjdk_check_requirements
+	java-vm-2_pkg_setup
+
+	JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-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
+		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
+}
+
+src_prepare() {
+	default
+	chmod +x configure || die
+	local repo
+	for repo in corba hotspot jdk jaxp jaxws langtools nashorn; do
+		ln -s ../"${repo}-jdk${MY_PV}" "${repo}" || die
+	done
+}
+
+src_configure() {
+	# general build info found here:
+	#https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
+
+	# Work around stack alignment issue, bug #647954.
+	use x86 && append-flags -mincoming-stack-boundary=2
+
+	append-flags -Wno-error
+
+	local myconf=(
+			--disable-ccache
+			--enable-unlimited-crypto
+			--with-boot-jdk="${JDK_HOME}"
+			--with-extra-cflags="${CFLAGS}"
+			--with-extra-cxxflags="${CXXFLAGS}"
+			--with-extra-ldflags="${LDFLAGS}"
+			--with-giflib=system
+			--with-jtreg=no
+			--with-jobs=1
+			--with-num-cores=1
+			--with-update-version="$(ver_cut 2)"
+			--with-build-number="$(ver_cut 4)"
+			--with-milestone="gentoo"
+			--with-zlib=system
+			--with-native-debug-symbols=$(usex debug internal none)
+			$(usex headless-awt --disable-headful '')
+		)
+
+	# PaX breaks pch, bug #601016
+	if use pch && ! host-is-pax; then
+		myconf+=( --enable-precompiled-headers )
+	else
+		myconf+=( --disable-precompiled-headers )
+	fi
+
+	(
+		unset JAVA JAVAC XARGS
+		CFLAGS= CXXFLAGS= LDFLAGS= \
+		CONFIG_SITE=/dev/null \
+		econf "${myconf[@]}"
+	)
+}
+
+src_compile() {
+	emake -j1 LOG=debug JOBS=$(makeopts_jobs)\
+		$(usex jbootstrap bootcycle-images images) $(usex doc docs '')
+}
+
+src_install() {
+	local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+	local ddest="${ED}${dest#/}"
+
+	cd "${S}"/build/*-release/images/j2sdk-image || die
+
+	if ! use alsa; then
+		rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die
+	fi
+
+	if ! use examples ; then
+		rm -vr demo/ || die
+	fi
+
+	if ! use source ; then
+		rm -v src.zip || die
+	fi
+
+	dodir "${dest}"
+	cp -pPR * "${ddest}" || die
+
+	einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/"
+	mkdir "${T}/certgen" && cd "${T}/certgen" || die
+	cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die
+	for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do
+		openssl x509 -text -in "${c}" >> all.crt || die
+	done
+	./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die
+	cp -vRP cacerts "${ddest}/jre/lib/security/" || die
+	chmod 644 "${ddest}/jre/lib/security/cacerts" || die
+
+	use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
+	java-vm_set-pax-markings "${ddest}"
+	java-vm_revdep-mask
+	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
+
+	if use doc ; then
+		insinto /usr/share/doc/${PF}/html
+		doins -r "${S}"/build/*-release/docs/*
+	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 things."
+	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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2020-01-28  9:22 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2020-01-28  9:22 UTC (permalink / raw
  To: gentoo-commits

commit:     b1ef64c6d48de6bb0e3bd1155ace461ed17d0893
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 09:21:36 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 09:21:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1ef64c6

dev-java/openjdk: add patch to fix build with make-4.3

Bug: https://bugs.gentoo.org/706012
Thanks-to: Alex Parker <alex.iris.parker <AT> gmail.com>
Package-Manager: Portage-2.3.86, Repoman-2.3.20
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-java/openjdk/files/openjdk-11-make43.patch | 12 ++++++++++++
 dev-java/openjdk/openjdk-11.0.6.ebuild         |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/dev-java/openjdk/files/openjdk-11-make43.patch b/dev-java/openjdk/files/openjdk-11-make43.patch
new file mode 100644
index 00000000000..9466e2be56f
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-11-make43.patch
@@ -0,0 +1,12 @@
+diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk
+index 170c3ed..b3b49f1 100644
+--- a/make/common/MakeBase.gmk
++++ b/make/common/MakeBase.gmk
+@@ -974,6 +974,7 @@ DependOnVariableFileName = \
+ # Param 2 - (optional) name of file to store value in
+ DependOnVariableHelper = \
+     $(strip \
++        $(eval $(call DependOnVariableFileName, $1, $2):$(NEWLINE)	true) \
+         $(eval -include $(call DependOnVariableFileName, $1, $2)) \
+         $(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
+           $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \

diff --git a/dev-java/openjdk/openjdk-11.0.6.ebuild b/dev-java/openjdk/openjdk-11.0.6.ebuild
index c5cf008ef3e..f98807e652b 100644
--- a/dev-java/openjdk/openjdk-11.0.6.ebuild
+++ b/dev-java/openjdk/openjdk-11.0.6.ebuild
@@ -73,6 +73,8 @@ PDEPEND="
 
 REQUIRED_USE="javafx? ( alsa !headless-awt )"
 
+PATCHES=( "${FILESDIR}/openjdk-11-make43.patch" )
+
 S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
 
 # The space required to build varies wildly depending on USE flags,


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2020-04-23 20:42 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2020-04-23 20:42 UTC (permalink / raw
  To: gentoo-commits

commit:     15f4b287d4e51821577b32f7f7d435d0e9030461
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 23 20:41:15 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Apr 23 20:41:47 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15f4b287

dev-java/openjdk: add patch to 11.0.7 to fix SIGSEGV in bootstrap

Happens if bootstrap jvm was compiled with 11.0.7 (like -bin version)

Bug: https://bugs.gentoo.org/719118
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 .../openjdk/files/openjdk-11.0.7_p10-sigsegv.patch | 55 ++++++++++++++++++++++
 dev-java/openjdk/openjdk-11.0.7_p10.ebuild         |  4 ++
 2 files changed, 59 insertions(+)

diff --git a/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch b/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch
new file mode 100644
index 00000000000..04c61c06589
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch
@@ -0,0 +1,55 @@
+
+# HG changeset patch
+# User ccheung
+# Date 1564075552 25200
+# Node ID f1332f6025515e4fc9e42fbf79f983d782abaaf0
+# Parent  966fc6d784a737ec25cd0b1be48109a4a3fa02ad
+8228407: JVM crashes with shared archive file mismatch
+Summary: Stop processing other header fields if initial header check has failed.
+Reviewed-by: dholmes, jiangli
+
+diff -r 966fc6d784a7 -r f1332f602551 src/hotspot/share/memory/filemap.cpp
+--- a/src/hotspot/share/memory/filemap.cpp	Mon Mar 02 12:30:59 2020 +0100
++++ b/src/hotspot/share/memory/filemap.cpp	Thu Jul 25 10:25:52 2019 -0700
+@@ -1287,7 +1287,9 @@
+   }
+ 
+   init_from_file(_fd);
+-  if (!validate_header()) {
++  // UseSharedSpaces could be disabled if the checking of some of the header fields in
++  // init_from_file has failed.
++  if (!UseSharedSpaces || !validate_header()) {
+     return false;
+   }
+   return true;
+diff -r 966fc6d784a7 -r f1332f602551 test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java
+--- a/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java	Mon Mar 02 12:30:59 2020 +0100
++++ b/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java	Thu Jul 25 10:25:52 2019 -0700
+@@ -385,8 +385,16 @@
+         output.shouldNotContain("Checksum verification failed");
+ 
+         copyFile(orgJsaFile, jsa);
++        // modify _jvm_ident and run with -Xshare:auto
++        System.out.println("\n2b. Corrupt _jvm_ident run with -Xshare:auto\n");
++        modifyJvmIdent();
++        output = TestCommon.execAuto(execArgs);
++        output.shouldContain("The shared archive file was created by a different version or build of HotSpot");
++        output.shouldContain("Hello World");
++
++        copyFile(orgJsaFile, jsa);
+         // modify _magic and _paths_misc_info_size, test should fail
+-        System.out.println("\n2b. Corrupt _magic and _paths_misc_info_size, should fail\n");
++        System.out.println("\n2c. Corrupt _magic and _paths_misc_info_size, should fail\n");
+         modifyHeaderIntField(offset_magic, 0x00000000);
+         modifyHeaderIntField(offset_paths_misc_info_size, Integer.MAX_VALUE);
+         output = TestCommon.execCommon(execArgs);
+@@ -395,7 +403,7 @@
+ 
+         copyFile(orgJsaFile, jsa);
+         // modify _version and _paths_misc_info_size, test should fail
+-        System.out.println("\n2c. Corrupt _version and _paths_misc_info_size, should fail\n");
++        System.out.println("\n2d. Corrupt _version and _paths_misc_info_size, should fail\n");
+         modifyHeaderIntField(offset_version, 0x00000000);
+         modifyHeaderIntField(offset_paths_misc_info_size, Integer.MAX_VALUE);
+         output = TestCommon.execCommon(execArgs);
+

diff --git a/dev-java/openjdk/openjdk-11.0.7_p10.ebuild b/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
index 9df2e6c723a..76d41a4eb08 100644
--- a/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
+++ b/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
@@ -77,6 +77,10 @@ REQUIRED_USE="javafx? ( alsa !headless-awt )"
 
 S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
 
+PATCHES=(
+	"${FILESDIR}/${P}-sigsegv.patch"
+)
+
 # 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.


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2020-05-24  3:52 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2020-05-24  3:52 UTC (permalink / raw
  To: gentoo-commits

commit:     9465512df55b6c865841953f2d8b5c64550fb7ba
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun May 24 03:51:32 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun May 24 03:51:47 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9465512d

dev-java/openjdk: add gcc10 patch to openjdk-8

Bug: https://bugs.gentoo.org/721970
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 .../openjdk/files/openjdk-8-detect-gcc10.patch     | 49 ++++++++++++++++++++++
 dev-java/openjdk/openjdk-8.252_p09.ebuild          |  5 +++
 2 files changed, 54 insertions(+)

diff --git a/dev-java/openjdk/files/openjdk-8-detect-gcc10.patch b/dev-java/openjdk/files/openjdk-8-detect-gcc10.patch
new file mode 100644
index 00000000000..b47e012d4a3
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8-detect-gcc10.patch
@@ -0,0 +1,49 @@
+From 6d96aaac5662f734b0a933397ebb8cd4ff66606d Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Sat, 23 May 2020 20:48:10 -0700
+Subject: [PATCH] backport gcc10 fix
+
+https://hg.openjdk.java.net/jdk8u/jdk8u/rev/39a7914e14a0
+---
+ common/autoconf/generated-configure.sh | 4 ++--
+ common/autoconf/toolchain.m4           | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
+index 5e71c50..90c017d 100644
+--- a/common/autoconf/generated-configure.sh
++++ b/common/autoconf/generated-configure.sh
+@@ -27955,7 +27955,7 @@ $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSIO
+     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
+         $SED -e 's/ *Copyright .*//'`
+     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
+-        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
++        $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
+   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
+     # clang --version output typically looks like
+     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
+@@ -29696,7 +29696,7 @@ $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSIO
+     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
+         $SED -e 's/ *Copyright .*//'`
+     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
+-        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
++        $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
+   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
+     # clang --version output typically looks like
+     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
+diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
+index e3a82c8..c0a4af5 100644
+--- a/common/autoconf/toolchain.m4
++++ b/common/autoconf/toolchain.m4
+@@ -433,7 +433,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
+     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
+         $SED -e 's/ *Copyright .*//'`
+     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
+-        $SED -e 's/^.* \(@<:@1-9@:>@\.@<:@0-9.@:>@*\) .*$/\1/'`
++        $SED -e 's/^.* \(@<:@1-9@:>@@<:@0-9@:>@*\.@<:@0-9.@:>@*\) .*$/\1/'`
+   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
+     # clang --version output typically looks like
+     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
+-- 
+2.26.2
+

diff --git a/dev-java/openjdk/openjdk-8.252_p09.ebuild b/dev-java/openjdk/openjdk-8.252_p09.ebuild
index 1b3576eacaf..45c3e3cc90c 100644
--- a/dev-java/openjdk/openjdk-8.252_p09.ebuild
+++ b/dev-java/openjdk/openjdk-8.252_p09.ebuild
@@ -80,6 +80,11 @@ PDEPEND="
 
 S="${WORKDIR}/jdk${SLOT}u-jdk${MY_PV}"
 
+# bug 721970, JDK-8244760
+PATCHES=(
+	"${FILESDIR}/openjdk-8-detect-gcc10.patch"
+)
+
 # 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.


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2020-08-04 21:58 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2020-08-04 21:58 UTC (permalink / raw
  To: gentoo-commits

commit:     b2e262024d4c564b29a7da88732e2c422234549e
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  4 21:44:55 2020 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 21:58:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2e26202

dev-java/openjdk: drop old

Bug: https://bugs.gentoo.org/732624
Closes: https://bugs.gentoo.org/734320
Closes: https://bugs.gentoo.org/706012
Closes: https://bugs.gentoo.org/713180
Closes: https://bugs.gentoo.org/706638
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-java/openjdk/Manifest                          |  17 --
 .../openjdk/files/openjdk-11.0.7_p10-sigsegv.patch |  55 ----
 .../openjdk/files/openjdk-8-detect-gcc10.patch     |  49 ----
 dev-java/openjdk/openjdk-11.0.7_p10.ebuild         | 280 ---------------------
 dev-java/openjdk/openjdk-8.252_p09.ebuild          | 231 -----------------
 dev-java/openjdk/openjdk-8.262_p10.ebuild          | 226 -----------------
 6 files changed, 858 deletions(-)

diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index c3e413b9dd0..e5d12e87686 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -1,26 +1,9 @@
-DIST openjdk-11.0.7_p10.tar.bz2 91317054 BLAKE2B 113f6d0b1ea97aa6c3a619a3f4183b72f5e0448422d17b6ffc4d778ce50eee68e4495d610845d1f3aace2e5660703dad96583203c6d12b5528e0f33f78df7cec SHA512 c6776bd05e2cbb42134ccf5cd522e4b73d1662e3cf136a8718c5d302b9c44e76b74a554b81aa14c5deda20bee76abc80a144f5c2e1941b70c9503579c325aa12
 DIST openjdk-11.0.8_p10.tar.bz2 91141175 BLAKE2B eeef0f6b6a8f804e043cde01de256c86ed35d5a391588100caea49c8c2b617c3f06aa37df894feaa89734e68c32fe28d8bc5337755050c457d657cf88fcff7f3 SHA512 f8fd26a11cb044197d3b04a1347e27e177e79cb58436e67116f63025a2a5c39c0083ac17362e7d2234caf89df530422ead088e3fc4546f8d9f68482fc75eb7a0
-DIST openjdk-8.252_p09.tar.bz2 454656 BLAKE2B 7132af72a09da9ded1759ccf92da6237a24e3fd15209b8d5aecb7011b890cd3484b4724f6b6a144e4bc5cb41931076985f75a9089c178938be62ac1a1d2a7f07 SHA512 0f03f1549dea1577cb01895d4e34721d16443977c5e7b3f0744af9cf2c0b09e60cb6d91b35a5e474c593d518d5610fb4c14fc4b9a907a7e13bb2351cea51bd06
-DIST openjdk-8.262_p10.tar.bz2 455868 BLAKE2B 22637a8ecd2af97b8cdc335fff5d4a14c56f53a26f0fe1ccb61f7f6542961126f4a2dadfc596ae561ea27cfdbc5f23fb10350d1533f43f1740540367565cb160 SHA512 196e201cbbd53132a78f276df7407346ba611798d813272c68cd3d654f34b84874009cda1df62e51fd5e33c5bc4aa4bdda6bd0ef7cac9857c609fcdb3fa3fd53
 DIST openjdk-8.265_p01.tar.bz2 456095 BLAKE2B 8de4d0293f3062583654da99a29d5be02197c323772f663d37ab21bdfdf32a723412d301094e6f70cbba99883241f52406a799a91c3d7c2a69ab7b35932c0a38 SHA512 686b869f9278462c6cb52036c4c9261e1689b917ce0afd4e6b47bb3d3207b2e79b2d03c2d3808a5853ab2fa070ac2206877849f5837282cb6deb80f610ba67f5
-DIST openjdk-corba-8.252_p09.tar.bz2 1034367 BLAKE2B d281a0b2e092c637adae4a206ac4b3f7beeb65f0fce5862f996ac71a814c5c3ee3261dd1145660cb50fde0398e42ca1e8c86d6aad07e43b44aa1f903c204b21c SHA512 08f348849eeadefee3dce9658b519091a14b9f972a1ee1dc51c37a3cd766e5265faed1931b967410ebff2132dd18cedf8840277d804b402ee43a862e37575ab1
-DIST openjdk-corba-8.262_p10.tar.bz2 1033428 BLAKE2B 979f86546dc4c558c8615e4cc1887bcc4a0b82845cf6474ef3802321cb205037c2c753c55f0c219cba3e0771bc2e1a7096b6ad93ce8582e45ef6b5815c0c593b SHA512 4b91cbcc55b983719aa1e0fb683bf2d169b908eb4d4e24857dfd918f4f086e6ce1317f980ba89ff911673131c71c27149091ee114deb75e6f98f31b0922bc04f
 DIST openjdk-corba-8.265_p01.tar.bz2 1034140 BLAKE2B 4b176bf2d9ff461b5682ad7f4b994091acf017df2caabf292dcda9baa34abd7d8016f56f2aff0866508eac565f4079e6f8ba8cbd8167abf1e38cd1fac727e141 SHA512 d92b69ab33176c29c5b7c0a5a21947d5d28dafa32a5933414bea5d16d4e68e1a381b2a73114952d507e7ee76c132e70dc8234175edfd3a086c4775417eaa7d9a
-DIST openjdk-hotspot-8.252_p09.tar.bz2 7954548 BLAKE2B a791d3c3385be3c8543bea1fc8d5bee9b3de873122ec850c3ad0082430083ec9dff2aa7c0cae33e628047a18a76fca8146b68aa52f32845cf7a61a45fdc8d9eb SHA512 53079cc255f75f246a67937bdf2b7715882f9baf8bcbc46ab2963c259359b1008642aeeae7ba7705c39f7a04e69ba286421a83b90294e81071f8e630db48ba7c
-DIST openjdk-hotspot-8.262_p10.tar.bz2 8204485 BLAKE2B dd4411fdceb36c378d15fce45dc75ea6b2e19c219a6b46e10de3864407d9eff0a4fcb7fcf2f5f0bc613b68cd54766404f25c76346c7500e7a2018c0001ad4981 SHA512 11880562cebbdc4abd59cd2ac234ca697316c1ec78ad291fa41d69fe8f5f01f30db0c3e224226521afcaf798619a5afc9055ea12fcd41f5da179a353351dff2a
 DIST openjdk-hotspot-8.265_p01.tar.bz2 8204133 BLAKE2B 3c574da38c9c787e2b40dafa6d7885f9632804a158de26fb4e6f9b5266c955adad8adb1917043eecba97fbb1e53c063da08231e806f5ba8f6c0ef762e88c45b6 SHA512 a3fbc527456aeb8566db24f910e6a64f976e3434fe3717058ee91e66e88d03d77641d342801002f7fa35fb8bb94ce397c95ac2abb86c0616ff25f167878b478b
-DIST openjdk-jaxp-8.252_p09.tar.bz2 2736174 BLAKE2B c198f144be7d0e7439e2184768db8649973f9e6869e67d3a950abd4872584160f4aaec1f4bec727f0d38830d34a4be7bd2f3e897b8ca10c758212262fa1672c3 SHA512 8027676e2928087a7d396c4f1edd3366336aaf8e3f201e2006cb7ddf91e518c9258d7ab6cc1c4fcc27e3e87bcecd96c55b2550d49f28b98beabf7553ea54ba3f
-DIST openjdk-jaxp-8.262_p10.tar.bz2 2735942 BLAKE2B 0445bffe29772968775d4ef5c516e16e53564a27828487ac69224591f008659548bf561eb5e8ac90d1c6129c52e5b91da142b66eb3c4117504752d8a151202ba SHA512 6ff35eaf23a21376643252a0cdcf7d82588c49f9e231e069b14c930d0379f1ef5973996918ae964729d2038d677f2afeec094af904df7e294c3c81a09f12c0b1
 DIST openjdk-jaxp-8.265_p01.tar.bz2 2735823 BLAKE2B 84a1248b4eb56f4afff62c5dc0f3517c98a6dc5c7e434012c667d59f05a1719372f68594d9d6b13c04e98887913a01b05eefcdadb3a028275555b2a9720502ba SHA512 d0f9da699d4141fa5535abbdf244b4da0fd466b8b5eca3fcaa7cc739326d79a5aa5ffac90988f8bedb39f80d7d4f1feaac3cf5fb1b019203cc96eae9746d9bbc
-DIST openjdk-jaxws-8.252_p09.tar.bz2 2542417 BLAKE2B cf898e0c56269ea1f468c6b9e6cfbdf552caea562f833ade234d207f05be6f39f86d9d6794cc8b365ed3fde4bac5df41949e76cbaef61553f5557ec86dd593e6 SHA512 cadeec8825073db1fea13f1d83903ba2799324cfa8e25012c5dc98ec31976bd91b22526f98fc871d0ee01156943f4fc4ec115f7a81feb10e9f7d96f3f39a9313
-DIST openjdk-jaxws-8.262_p10.tar.bz2 2543114 BLAKE2B 1329a7157335374e6a61572843c067fbb8125ccdc425ce54a5fc723750d2efdde255390393dfbdb3993fe21943bc9c18bb0aa22a177d7095bbe1343cd4fed1b4 SHA512 d229dea6d1feb0f404f438e8e2fe7760866965db3d0dfe2c3be52122723a915b502114716b99a243029f4377ea701918568dfe7a8426922e7186addb2ea9a36a
 DIST openjdk-jaxws-8.265_p01.tar.bz2 2543597 BLAKE2B c83256ab68837cc44d65414343d4bfa7d908926b1a092416cb16551593ed58eb4e28333a6e0417fdad7426ea2b648cffe9e8ef9531f76b7ff9a29851cb27918b SHA512 3a23ae92cbc1f5f47a1f2dffaaef1999acc34125176f67139040f17c3b6fe4cf78ee8c506a73c8fd38ddbb59bfb22c61f2e45ebf8739be7eb7df83cc65303433
-DIST openjdk-jdk-8.252_p09.tar.bz2 47507382 BLAKE2B 4638256df52aa48a1ccace15fe65b284cb2a1e3a3c45f32ae69a807ae4bd9b9ce3cf9f464a9b8a87d07c49f2d7c48c8516b43d9d4372f578ad1cd4dfa17abb80 SHA512 96188acc8078c312c7118abfbc39874429f71e63c2e282fef2da9df29731ee13396bda28a8a1041b17b50da4bb00b1fe88404d682b0a850e5db10e59e39994f2
-DIST openjdk-jdk-8.262_p10.tar.bz2 48030557 BLAKE2B 5aba38969729686718527acbf469086afc241c65667a69ddd2a71af4250dd2d931ea267a0c956a1ab342eea032a981ff66a31875f3d7ccca9dcdff82e02df10e SHA512 120b0f613ed9b13c07e68cfc074a1d812567edbc209cbc14d15b477fb7e67a779139f620bc7c65423e420c7b240211727760ca69b532d2f009452f7bfbecacd4
 DIST openjdk-jdk-8.265_p01.tar.bz2 48017864 BLAKE2B b30a573a79a06abfe98e5963521f762e3517bda2bf6849af758285b7ea61cc57d89290ec47538b1082eea99646d3dd6295b98ad65edd62d1b1fd2480c0928a74 SHA512 44ad75bf3b3c6fd6b782ee5383edfa60fb49ac2e40493b18487bcb8a4dac926ffcf5b663adbb8d3267021bd47d5b60652771a88257fbaff77aa2e1f627252418
-DIST openjdk-langtools-8.252_p09.tar.bz2 2399354 BLAKE2B aa3f0cb647986490612b9574fb0c78955f5ffb8969dbd06dfae5406436d6fecdbbb09896bdb0acc18d56f51bcd4ad1eadb19cc544185762ad623a47fde2e4a85 SHA512 d84ff97294ac612cd4e49deb2d7470026a564208c0e1fa23d5692db45efaaf564483966921ce642506a97aa90a2a8593617f944ebc6d18c9db5a808fd3946864
-DIST openjdk-langtools-8.262_p10.tar.bz2 2398186 BLAKE2B 874461ecd6655edab66541ca681e60eb1f0dd3331d26ad806f59c486658fb7cdf26a65869316ae7e1ba04aa1a4b45f1bc2848b695e89a87b878f399b08b12bb4 SHA512 a109d8dd94c83b0caddd1527c2467c12f05c344c1916a5af7bac0127a5694107d6a902679bf609a48aad434b3c623d42cce6ece83b205051435d3e3aab1824f7
 DIST openjdk-langtools-8.265_p01.tar.bz2 2399426 BLAKE2B 550a3dcee38b41feaf8c5b6b88f700c52f870ed0c3f25fa23f34bb3f40c333965e911ac126f4b038057472acea2b684917692a6881e46e4aa68b05cd7e4346da SHA512 24d0978a8e6254a96a5399420831d320ea2b2f5b7055ceba030802b85fcb9630031499504ca72305361fa3a386c2ca0a8c38082ee2b15b8569fdf7e815730be6
-DIST openjdk-nashorn-8.252_p09.tar.bz2 2852104 BLAKE2B 570fbe605ed27c4b3a5db5f6e9dbb4269ad2c895654a989d366a4a6f238ea06fec398140563ca2700303856dfa795ae40dbf9485dd9e9a46ef438f5418fd8b8b SHA512 996e7068d8c6f8ca192e6037eaf7f98ff94188c02670caadf1042e4e0909a3d51835a8cd2250d1f0a8bbdedb107f3713b614466ba4d2915b955e19fdcc2cbb91
-DIST openjdk-nashorn-8.262_p10.tar.bz2 2852351 BLAKE2B f7c4650981e6193f5e7495971b1a1777e086d734befe79ef53bc20382cc738f14ea95e6bd1baa51e128a071c96ca3885eac93494fe1db92de4eb2820f1392ebd SHA512 55119e12a7dc2f1acc31c655f5b3fb9f417b06310c99d4e93c355bd638950f839e62137509f784dafd7f402940dddefc4c0952a5e182d4801f46d78830086e97
 DIST openjdk-nashorn-8.265_p01.tar.bz2 2852124 BLAKE2B 380202d487e62e08784b7fd5cb720c22a2b93d802898b90bf2686bac803fe2bc41d8d4b3d56b45bfb45686a2976d208359818b17b96ccce73fd55b389f4d04af SHA512 12522a06f16f1c63d6b6df525011d01ff91ba05f06ee7ade239faa31527ca9aaa9fa609c1ad261f0ae8d75cc195fe1af66e026815bdc0669fb6a286a49f86a5e

diff --git a/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch b/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch
deleted file mode 100644
index 04c61c06589..00000000000
--- a/dev-java/openjdk/files/openjdk-11.0.7_p10-sigsegv.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-
-# HG changeset patch
-# User ccheung
-# Date 1564075552 25200
-# Node ID f1332f6025515e4fc9e42fbf79f983d782abaaf0
-# Parent  966fc6d784a737ec25cd0b1be48109a4a3fa02ad
-8228407: JVM crashes with shared archive file mismatch
-Summary: Stop processing other header fields if initial header check has failed.
-Reviewed-by: dholmes, jiangli
-
-diff -r 966fc6d784a7 -r f1332f602551 src/hotspot/share/memory/filemap.cpp
---- a/src/hotspot/share/memory/filemap.cpp	Mon Mar 02 12:30:59 2020 +0100
-+++ b/src/hotspot/share/memory/filemap.cpp	Thu Jul 25 10:25:52 2019 -0700
-@@ -1287,7 +1287,9 @@
-   }
- 
-   init_from_file(_fd);
--  if (!validate_header()) {
-+  // UseSharedSpaces could be disabled if the checking of some of the header fields in
-+  // init_from_file has failed.
-+  if (!UseSharedSpaces || !validate_header()) {
-     return false;
-   }
-   return true;
-diff -r 966fc6d784a7 -r f1332f602551 test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java
---- a/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java	Mon Mar 02 12:30:59 2020 +0100
-+++ b/test/hotspot/jtreg/runtime/appcds/SharedArchiveConsistency.java	Thu Jul 25 10:25:52 2019 -0700
-@@ -385,8 +385,16 @@
-         output.shouldNotContain("Checksum verification failed");
- 
-         copyFile(orgJsaFile, jsa);
-+        // modify _jvm_ident and run with -Xshare:auto
-+        System.out.println("\n2b. Corrupt _jvm_ident run with -Xshare:auto\n");
-+        modifyJvmIdent();
-+        output = TestCommon.execAuto(execArgs);
-+        output.shouldContain("The shared archive file was created by a different version or build of HotSpot");
-+        output.shouldContain("Hello World");
-+
-+        copyFile(orgJsaFile, jsa);
-         // modify _magic and _paths_misc_info_size, test should fail
--        System.out.println("\n2b. Corrupt _magic and _paths_misc_info_size, should fail\n");
-+        System.out.println("\n2c. Corrupt _magic and _paths_misc_info_size, should fail\n");
-         modifyHeaderIntField(offset_magic, 0x00000000);
-         modifyHeaderIntField(offset_paths_misc_info_size, Integer.MAX_VALUE);
-         output = TestCommon.execCommon(execArgs);
-@@ -395,7 +403,7 @@
- 
-         copyFile(orgJsaFile, jsa);
-         // modify _version and _paths_misc_info_size, test should fail
--        System.out.println("\n2c. Corrupt _version and _paths_misc_info_size, should fail\n");
-+        System.out.println("\n2d. Corrupt _version and _paths_misc_info_size, should fail\n");
-         modifyHeaderIntField(offset_version, 0x00000000);
-         modifyHeaderIntField(offset_paths_misc_info_size, Integer.MAX_VALUE);
-         output = TestCommon.execCommon(execArgs);
-

diff --git a/dev-java/openjdk/files/openjdk-8-detect-gcc10.patch b/dev-java/openjdk/files/openjdk-8-detect-gcc10.patch
deleted file mode 100644
index b47e012d4a3..00000000000
--- a/dev-java/openjdk/files/openjdk-8-detect-gcc10.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 6d96aaac5662f734b0a933397ebb8cd4ff66606d Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Sat, 23 May 2020 20:48:10 -0700
-Subject: [PATCH] backport gcc10 fix
-
-https://hg.openjdk.java.net/jdk8u/jdk8u/rev/39a7914e14a0
----
- common/autoconf/generated-configure.sh | 4 ++--
- common/autoconf/toolchain.m4           | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
-index 5e71c50..90c017d 100644
---- a/common/autoconf/generated-configure.sh
-+++ b/common/autoconf/generated-configure.sh
-@@ -27955,7 +27955,7 @@ $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSIO
-     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
-         $SED -e 's/ *Copyright .*//'`
-     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
--        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
-+        $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
-   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
-     # clang --version output typically looks like
-     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
-@@ -29696,7 +29696,7 @@ $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSIO
-     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
-         $SED -e 's/ *Copyright .*//'`
-     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
--        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
-+        $SED -e 's/^.* \([1-9][0-9]*\.[0-9.]*\) .*$/\1/'`
-   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
-     # clang --version output typically looks like
-     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
-diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4
-index e3a82c8..c0a4af5 100644
---- a/common/autoconf/toolchain.m4
-+++ b/common/autoconf/toolchain.m4
-@@ -433,7 +433,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
-     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
-         $SED -e 's/ *Copyright .*//'`
-     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
--        $SED -e 's/^.* \(@<:@1-9@:>@\.@<:@0-9.@:>@*\) .*$/\1/'`
-+        $SED -e 's/^.* \(@<:@1-9@:>@@<:@0-9@:>@*\.@<:@0-9.@:>@*\) .*$/\1/'`
-   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
-     # clang --version output typically looks like
-     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
--- 
-2.26.2
-

diff --git a/dev-java/openjdk/openjdk-11.0.7_p10.ebuild b/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
deleted file mode 100644
index b5d448dd9e8..00000000000
--- a/dev-java/openjdk/openjdk-11.0.7_p10.ebuild
+++ /dev/null
@@ -1,280 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs
-
-# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to
-# set build version properly
-MY_PV="${PV%_p*}-ga"
-SLOT="${MY_PV%%[.+]*}"
-
-DESCRIPTION="Open source implementation of the Java programming language"
-HOMEPAGE="https://openjdk.java.net"
-SRC_URI="https://hg.${PN}.java.net/jdk-updates/jdk${SLOT}u/archive/jdk-${MY_PV}.tar.bz2 -> ${P}.tar.bz2"
-
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
-
-IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap nsplugin +pch selinux source systemtap webstart"
-
-COMMON_DEPEND="
-	media-libs/freetype:2=
-	media-libs/giflib:0/7
-	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}
-	)
-"
-
-PDEPEND="
-	webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
-	nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )
-"
-
-REQUIRED_USE="javafx? ( alsa !headless-awt )"
-
-S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
-
-PATCHES=(
-	"${FILESDIR}/${P}-sigsegv.patch"
-)
-
-# 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}"
-	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
-
-	# 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
-		--enable-full-docs=no
-		--with-boot-jdk="${JDK_HOME}"
-		--with-extra-cflags="${CFLAGS}"
-		--with-extra-cxxflags="${CXXFLAGS}"
-		--with-extra-ldflags="${LDFLAGS}"
-		--with-giflib=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)
-	)
-
-	if use javafx; then
-		local zip="${EROOT%/}/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-11"
-	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.252_p09.ebuild b/dev-java/openjdk/openjdk-8.252_p09.ebuild
deleted file mode 100644
index 45c3e3cc90c..00000000000
--- a/dev-java/openjdk/openjdk-8.252_p09.ebuild
+++ /dev/null
@@ -1,231 +0,0 @@
-# Copyright 1999-2020 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
-
-# we need latest -ga tag from hg, but want to keep build number as well
-# as _p component of the gentoo version string.
-
-MY_PV=$(ver_rs 1 'u' 2 '-' ${PV%_p*}-ga)
-
-BASE_URI="https://hg.${PN}.java.net/jdk8u/jdk8u"
-
-DESCRIPTION="Open source implementation of the Java programming language"
-HOMEPAGE="https://openjdk.java.net"
-SRC_URI="
-	${BASE_URI}/archive/jdk${MY_PV}.tar.bz2 -> ${P}.tar.bz2
-	${BASE_URI}/corba/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-corba-${PV}.tar.bz2
-	${BASE_URI}/hotspot/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-hotspot-${PV}.tar.bz2
-	${BASE_URI}/jaxp/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxp-${PV}.tar.bz2
-	${BASE_URI}/jaxws/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxws-${PV}.tar.bz2
-	${BASE_URI}/jdk/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jdk-${PV}.tar.bz2
-	${BASE_URI}/langtools/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-langtools-${PV}.tar.bz2
-	${BASE_URI}/nashorn/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-nashorn-${PV}.tar.bz2
-"
-
-LICENSE="GPL-2"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 ppc64 ~x86"
-IUSE="alsa debug cups doc examples headless-awt +jbootstrap nsplugin +pch selinux source webstart"
-
-COMMON_DEPEND="
-	media-libs/freetype:2=
-	media-libs/giflib:0/7
-	sys-libs/zlib
-"
-# 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/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/libXrender
-	x11-libs/libXt
-	x11-libs/libXtst
-	|| (
-		dev-java/openjdk-bin:${SLOT}
-		dev-java/icedtea-bin:${SLOT}
-		dev-java/openjdk:${SLOT}
-		dev-java/icedtea:${SLOT}
-	)
-"
-
-PDEPEND="
-	webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
-	nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )
-"
-
-S="${WORKDIR}/jdk${SLOT}u-jdk${MY_PV}"
-
-# bug 721970, JDK-8244760
-PATCHES=(
-	"${FILESDIR}/openjdk-8-detect-gcc10.patch"
-)
-
-# 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 debug 3 1) * $M ))
-	M=$(( $(usex jbootstrap 2 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}"
-	fi
-}
-
-pkg_setup() {
-	openjdk_check_requirements
-
-	JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}"
-	JAVA_PKG_WANT_SOURCE="${SLOT}"
-	JAVA_PKG_WANT_TARGET="${SLOT}"
-
-	java-vm-2_pkg_setup
-	java-pkg-2_pkg_setup
-}
-
-src_prepare() {
-	default
-	chmod +x configure || die
-	local repo
-	for repo in corba hotspot jdk jaxp jaxws langtools nashorn; do
-		ln -s ../"${repo}-jdk${MY_PV}" "${repo}" || die
-	done
-	# new warnings in new gcc https://bugs.gentoo.org/685426
-	sed -i '/^WARNINGS_ARE_ERRORS/ s/-Werror/-Wno-error/' \
-		hotspot/make/linux/makefiles/gcc.make || die
-}
-
-src_configure() {
-	# general build info found here:
-	#https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
-
-	# Work around stack alignment issue, bug #647954.
-	use x86 && append-flags -mincoming-stack-boundary=2
-
-	# Work around -fno-common ( GCC10 default ), bug #706638
-	append-flags -fcommon
-
-	local myconf=(
-			--disable-ccache
-			--enable-unlimited-crypto
-			--with-boot-jdk="${JDK_HOME}"
-			--with-extra-cflags="${CFLAGS}"
-			--with-extra-cxxflags="${CXXFLAGS}"
-			--with-extra-ldflags="${LDFLAGS}"
-			--with-giflib=system
-			--with-jtreg=no
-			--with-jobs=1
-			--with-num-cores=1
-			--with-update-version="$(ver_cut 2)"
-			--with-build-number="b$(ver_cut 4)"
-			--with-milestone="fcs" # magic variable that means "release version"
-			--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-zlib=system
-			--with-native-debug-symbols=$(usex debug internal none)
-			$(usex headless-awt --disable-headful '')
-		)
-
-	# 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
-		$(usex doc docs '')
-		$(usex jbootstrap bootcycle-images images)
-	)
-	emake "${myemakeargs[@]}" -j1 #nowarn
-}
-
-src_install() {
-	local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
-	local ddest="${ED%/}/${dest#/}"
-
-	cd "${S}"/build/*-release/images/j2sdk-image || die
-
-	if ! use alsa; then
-		rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die
-	fi
-
-	# stupid build system does not remove that
-	if use headless-awt ; then
-		rm -fvr jre/lib/$(get_system_arch)/lib*{[jx]awt,splashscreen}* \
-		{,jre/}bin/policytool bin/appletviewer || die
-	fi
-
-	if ! use examples ; then
-		rm -vr demo/ || die
-	fi
-
-	if ! use source ; then
-		rm -v src.zip || die
-	fi
-
-	dodir "${dest}"
-	cp -pPR * "${ddest}" || die
-
-	dosym ../../../../../../etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts
-
-	java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
-	java-vm_set-pax-markings "${ddest}"
-	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/docs/*
-	fi
-}
-
-pkg_postinst() {
-	java-vm-2_pkg_postinst
-}

diff --git a/dev-java/openjdk/openjdk-8.262_p10.ebuild b/dev-java/openjdk/openjdk-8.262_p10.ebuild
deleted file mode 100644
index ceee66cafae..00000000000
--- a/dev-java/openjdk/openjdk-8.262_p10.ebuild
+++ /dev/null
@@ -1,226 +0,0 @@
-# Copyright 1999-2020 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
-
-# we need latest -ga tag from hg, but want to keep build number as well
-# as _p component of the gentoo version string.
-
-MY_PV=$(ver_rs 1 'u' 2 '-' ${PV%_p*}-ga)
-
-BASE_URI="https://hg.${PN}.java.net/jdk8u/jdk8u"
-
-DESCRIPTION="Open source implementation of the Java programming language"
-HOMEPAGE="https://openjdk.java.net"
-SRC_URI="
-	${BASE_URI}/archive/jdk${MY_PV}.tar.bz2 -> ${P}.tar.bz2
-	${BASE_URI}/corba/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-corba-${PV}.tar.bz2
-	${BASE_URI}/hotspot/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-hotspot-${PV}.tar.bz2
-	${BASE_URI}/jaxp/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxp-${PV}.tar.bz2
-	${BASE_URI}/jaxws/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxws-${PV}.tar.bz2
-	${BASE_URI}/jdk/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jdk-${PV}.tar.bz2
-	${BASE_URI}/langtools/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-langtools-${PV}.tar.bz2
-	${BASE_URI}/nashorn/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-nashorn-${PV}.tar.bz2
-"
-
-LICENSE="GPL-2"
-SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 ~ppc64 ~x86"
-IUSE="alsa debug cups doc examples headless-awt +jbootstrap nsplugin +pch selinux source webstart"
-
-COMMON_DEPEND="
-	media-libs/freetype:2=
-	media-libs/giflib:0/7
-	sys-libs/zlib
-"
-# 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/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/libXrender
-	x11-libs/libXt
-	x11-libs/libXtst
-	|| (
-		dev-java/openjdk-bin:${SLOT}
-		dev-java/icedtea-bin:${SLOT}
-		dev-java/openjdk:${SLOT}
-		dev-java/icedtea:${SLOT}
-	)
-"
-
-PDEPEND="
-	webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
-	nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )
-"
-
-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 debug 3 1) * $M ))
-	M=$(( $(usex jbootstrap 2 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}"
-	fi
-}
-
-pkg_setup() {
-	openjdk_check_requirements
-
-	JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}"
-	JAVA_PKG_WANT_SOURCE="${SLOT}"
-	JAVA_PKG_WANT_TARGET="${SLOT}"
-
-	java-vm-2_pkg_setup
-	java-pkg-2_pkg_setup
-}
-
-src_prepare() {
-	default
-	chmod +x configure || die
-	local repo
-	for repo in corba hotspot jdk jaxp jaxws langtools nashorn; do
-		ln -s ../"${repo}-jdk${MY_PV}" "${repo}" || die
-	done
-	# new warnings in new gcc https://bugs.gentoo.org/685426
-	sed -i '/^WARNINGS_ARE_ERRORS/ s/-Werror/-Wno-error/' \
-		hotspot/make/linux/makefiles/gcc.make || die
-}
-
-src_configure() {
-	# general build info found here:
-	#https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
-
-	# Work around stack alignment issue, bug #647954.
-	use x86 && append-flags -mincoming-stack-boundary=2
-
-	# Work around -fno-common ( GCC10 default ), bug #706638
-	append-flags -fcommon
-
-	local myconf=(
-			--disable-ccache
-			--enable-unlimited-crypto
-			--with-boot-jdk="${JDK_HOME}"
-			--with-extra-cflags="${CFLAGS}"
-			--with-extra-cxxflags="${CXXFLAGS}"
-			--with-extra-ldflags="${LDFLAGS}"
-			--with-giflib=system
-			--with-jtreg=no
-			--with-jobs=1
-			--with-num-cores=1
-			--with-update-version="$(ver_cut 2)"
-			--with-build-number="b$(ver_cut 4)"
-			--with-milestone="fcs" # magic variable that means "release version"
-			--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-zlib=system
-			--with-native-debug-symbols=$(usex debug internal none)
-			$(usex headless-awt --disable-headful '')
-		)
-
-	# 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
-		$(usex doc docs '')
-		$(usex jbootstrap bootcycle-images images)
-	)
-	emake "${myemakeargs[@]}" -j1 #nowarn
-}
-
-src_install() {
-	local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
-	local ddest="${ED%/}/${dest#/}"
-
-	cd "${S}"/build/*-release/images/j2sdk-image || die
-
-	if ! use alsa; then
-		rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die
-	fi
-
-	# stupid build system does not remove that
-	if use headless-awt ; then
-		rm -fvr jre/lib/$(get_system_arch)/lib*{[jx]awt,splashscreen}* \
-		{,jre/}bin/policytool bin/appletviewer || die
-	fi
-
-	if ! use examples ; then
-		rm -vr demo/ || die
-	fi
-
-	if ! use source ; then
-		rm -v src.zip || die
-	fi
-
-	dodir "${dest}"
-	cp -pPR * "${ddest}" || die
-
-	dosym ../../../../../../etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts
-
-	java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
-	java-vm_set-pax-markings "${ddest}"
-	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/docs/*
-	fi
-}
-
-pkg_postinst() {
-	java-vm-2_pkg_postinst
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2021-03-25  2:08 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-03-25  2:08 UTC (permalink / raw
  To: gentoo-commits

commit:     c79be6d69533e45fb077c952085eb2dd38b3a745
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 25 01:44:54 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Thu Mar 25 01:46:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c79be6d6

dev-java/openjdk: revbump 8, fix build with gcc10

_ZN14ArrayAllocatorImL10MemoryType7EE4freeEv: symbol not found
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 .../files/openjdk-8-insantiate-arrayallocator.patch      | 16 ++++++++++++++++
 ...njdk-8.282_p08.ebuild => openjdk-8.282_p08-r1.ebuild} |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/dev-java/openjdk/files/openjdk-8-insantiate-arrayallocator.patch b/dev-java/openjdk/files/openjdk-8-insantiate-arrayallocator.patch
new file mode 100644
index 00000000000..ba5283f1577
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8-insantiate-arrayallocator.patch
@@ -0,0 +1,16 @@
+Workarounds build error:
+Error: dl failure on line 895
+Error relocating .../libjvm.so: _ZN14ArrayAllocatorImL10MemoryType7EE4freeEv: symbol not found
+
+Possibly due to g++ 10.x error on not properly instantiating the template.
+
+--- openjdk/hotspot/src/share/vm/utilities/bitMap.cpp.orig	2020-11-10 14:07:08.372045326 +0200
++++ openjdk/hotspot/src/share/vm/utilities/bitMap.cpp	2020-11-10 14:08:07.911412813 +0200
+@@ -42,6 +42,7 @@
+ # include "os_bsd.inline.hpp"
+ #endif
+ 
++template class ArrayAllocator<BitMap::bm_word_t, mtInternal>;
+ 
+ BitMap::BitMap(bm_word_t* map, idx_t size_in_bits) :
+   _map(map), _size(size_in_bits), _map_allocator(false)

diff --git a/dev-java/openjdk/openjdk-8.282_p08.ebuild b/dev-java/openjdk/openjdk-8.282_p08-r1.ebuild
similarity index 99%
rename from dev-java/openjdk/openjdk-8.282_p08.ebuild
rename to dev-java/openjdk/openjdk-8.282_p08-r1.ebuild
index 093a181abbf..88eb48ba9b1 100644
--- a/dev-java/openjdk/openjdk-8.282_p08.ebuild
+++ b/dev-java/openjdk/openjdk-8.282_p08-r1.ebuild
@@ -91,6 +91,8 @@ DEPEND="
 
 PDEPEND="javafx? ( dev-java/openjfx:${SLOT} )"
 
+PATCHES=( "${FILESDIR}/openjdk-8-insantiate-arrayallocator.patch" )
+
 # 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.


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2021-07-27  1:26 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-07-27  1:26 UTC (permalink / raw
  To: gentoo-commits

commit:     be4e238f48ff45815c2a5a37b09edec7c0030118
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 27 01:05:14 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Jul 27 01:23:52 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be4e238f

dev-java/openjdk: add 8.302_p08

Bug: https://bugs.gentoo.org/803605
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-java/openjdk/Manifest                 |  16 ++
 dev-java/openjdk/files/openjdk-8.env.sh   |   2 +-
 dev-java/openjdk/openjdk-8.302_p08.ebuild | 253 ++++++++++++++++++++++++++++++
 3 files changed, 270 insertions(+), 1 deletion(-)

diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index 35d7bee2b77..ceba6878ea9 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -1,17 +1,33 @@
 DIST openjdk-11.0.11_p9.tar.bz2 95298760 BLAKE2B 7572d297fecffa9d38998c79dda00ea9361c1cf2f6c8bf51bac782da17cd3b6b272d08ab57fff96d523a1299f5514cb3788d05eeb37ef467ee7ad8bbb156d98e SHA512 72deecf32b793fa331deb6a1c0294b1efc68b72af9aebc1ba0528189e0097ff6d226cd0c3947d3cdc35c3cf28b3450cc538d375be0b9d43dca379f244894d20e
 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
+DIST openjdk-aarch64-shenandoah-8.302_p08.tar.bz2 466591 BLAKE2B 3ef3939a2ed30c628d92319b2ef68472e53b47752faa331728966432c8469138b61e634e021aa5f69eef608e951cee5f0b77c1de6f3768cf568900f2eb78c5be SHA512 deb126036fecdc9a65b8a203ba32f99a2114cbcba2680950963d3e87565277e14ac53d802278e1f27c2a73be02d0ef77549de4ecd9ee355b1c8e45a86c83b095
 DIST openjdk-aarch64-shenandoah-corba-8.292_p10.tar.bz2 1052188 BLAKE2B b4acda6a4d97cdfb4cfe16e1442dac6989af5fec82143dabb914ee31632b5421bc091708b06e37f95d552b21dbf24ed681b026635e96d32f05ac7d964eb53ac0 SHA512 9f4cfdf8a2580414f90ce0b128fd2ebbeb46977994605d3182ee5033be92898f3b292bafe6c0ca3a0fc767c03de598c93e25cbbc06726383b35961d40c601cee
+DIST openjdk-aarch64-shenandoah-corba-8.302_p08.tar.bz2 1053085 BLAKE2B 02296f31b6ad8f72e89baf669c47d59a71ff02dcb87efac020b3dd443b033e8e9e4faa831a08922db5fc5f07872233e3314bd416eb97d7946110d89fa2cc9f87 SHA512 11f3413ec44b3cd7d543464b1757fa041798861e3b323641b26abe5edd3ba8edaacb6a5fd26d5b9f27d60cbb38983c6fd55ba80c13ff7ec09839d2c340f305bb
 DIST openjdk-aarch64-shenandoah-hotspot-8.292_p10.tar.bz2 8787501 BLAKE2B 628c84ad165e82b782a66c159ea2bfc2e739eafa41981d353272911bce3338b8eedeb204bf5c8238270ef22259c215301dbf30bcbcc366bbb1c1ed05c6bcf0fc SHA512 50a97c8bbf225c7b2dae50d398eb17831ad761fafb210a481942101bac54164604c76353ca4f0ec7c3a601039eb80164afdfc62f509c0b87e9c948970c0e6140
+DIST openjdk-aarch64-shenandoah-hotspot-8.302_p08.tar.bz2 8790278 BLAKE2B 4dfc70455f680f683c51620acc4624f2301b4304ff5e56783665a00b0366a67612b0219f45fd97021f7e6c396ffcd60355bc642e2cb4fd87c9f93443f72df9de SHA512 68473f17aeb4bdac87385ae33f8c241003b8dde51200633a1cc7f7f92e2ed92151c49ad023427970d855d52f35615709f0076b1cf073a00961f320b825ecbf78
 DIST openjdk-aarch64-shenandoah-jaxp-8.292_p10.tar.bz2 2726660 BLAKE2B dc720b115212084ab59a4af6b257b485592a84e630650445ed3bdc0c471d529bdc8a1f2b73c5e38fbdd65ff1c221309e814adbba851c59279c8b3740b4560d90 SHA512 43c0e6327c3f7ff2d6320e7d1504f1575c0993c53a207dcabc75a0e1785fcca2aac7f78856db374198e3e95bce4bb05520a9a4e94f2ec03446b28f4d65cd69b6
+DIST openjdk-aarch64-shenandoah-jaxp-8.302_p08.tar.bz2 2726090 BLAKE2B b15a940dc1832f9c5536da5b0f024a091e62500eed7300075e7e8b21491cbe67a4e56f0cbb0e247e288b766619212f34e5cbb4265bb7688f44dc85f6d666c622 SHA512 e77d10caa9e2844470e01512a78cfce10c4d93c1d0597e405fa7233d5b402bb5c015045770fc2f338d24d98c978d23bfa7c6c0edc65f8bb48233c3a5a846e3e9
 DIST openjdk-aarch64-shenandoah-jaxws-8.292_p10.tar.bz2 2560138 BLAKE2B 6e40ca6fd363c6ef9500b6b40c7f6c836b496899d289d0626f0e52412924498eb6b000291b58af8d42b9bc7dcc2beb1374ef6b8ea18d483841568d3848230842 SHA512 0ffbe33f375f18679797a7e724b621015650a6a9374ff231814f8e8ad0eafe42f281f76a83e87e234604c266ccbc15bd6e84692c3d7e272e702be316ce0048b2
+DIST openjdk-aarch64-shenandoah-jaxws-8.302_p08.tar.bz2 2560243 BLAKE2B 9a548756d609df495f77b2fe79884698d73e6c18254507c31b3364693eabf91d3a31153e182efeef4f5c2d505d509e01bebbe19afdce9d5294678c38a4791111 SHA512 b9bbe9ca06336daf8e10c60de1bdd209d8d561baed4d0ec77e419280d50b34f5297291a442568b0bba366fd39c6e8ac5a10fb9a19644fd584632456be618be6e
 DIST openjdk-aarch64-shenandoah-jdk-8.292_p10.tar.bz2 48705934 BLAKE2B ab8995ef30267d635f670791417124ce63435f4cde095c057e4b506cbc23b879bf308986ea0960392836acd46aa6fd7be9a09fea011a85c981388ad58a876f0a SHA512 7f76a8e81cf759989657101a4b71ae0e896273571e5d61790100e412dc1c211118251b6f068da3764ff1059635f98079d88c6cdddf04f676c5db3a665d3d9d8b
+DIST openjdk-aarch64-shenandoah-jdk-8.302_p08.tar.bz2 48780613 BLAKE2B fdf5c10e57ae153728c560de643e1a73070ba72a97e72ea94f66e8e69bd7602b7b821bc8240fa09b0fa16a563a4c7083e386989f947f2027b966e6b859dc6491 SHA512 ed7e884daa9899224c75577d6a86e0f431314d561e2afb244b7cd208f9e5614a4cc80578e7e14d803b4096b1bfca5d3929abec63e201c13f28de2fe6cef59398
 DIST openjdk-aarch64-shenandoah-langtools-8.292_p10.tar.bz2 2402059 BLAKE2B 707654793fa26f2a992c2ded6130d5710efac6a91661914bde150a91720fcf08a54931fcd1a56fbc31dc1a61a5216b61e3871d963a2b03803ae8cbcfa8b095ab SHA512 6dc82a18edeb5390d078a3113d2f7c7510737b9a9761b1a714d855d36afe4530b41a6e980af0bb090b31e8f95f67e097190d656d265c8518f3971526ee5e4001
+DIST openjdk-aarch64-shenandoah-langtools-8.302_p08.tar.bz2 2403538 BLAKE2B a26e79353637e0f3c431dbd5edc9ce959f9f60057af76d3b24c09ac623f2f3272de5fd5d2ffc3153247f1f76d339ab4ad62a87864d70ca64881dc5d177e6c96e SHA512 97c5a039620df40185327bd04865d3a11ea8a419c310f27ae1c4b45cb4f8dbe940c8a08bb9903525faaa79d917b009175d4b3827e6cfa0b64e4807b6da3328b2
 DIST openjdk-aarch64-shenandoah-nashorn-jdk8.292_p10.tar.bz2 2841484 BLAKE2B 4d95d38c6af366fa4be8e9ad2d3cf09d6ad1ac05d25ca94d15200a051cdfcc67af666420a5487f0b2782040dc3483475bf2515b0b5d40e520f162e78f768d5c5 SHA512 523e1292169a6a791c2b90672295cd3210a09b8c973cc038e9ebda7e89afc0339568a993909eb108985998060ccdd13601a9bd9a8e4890ac606febf07578a887
+DIST openjdk-aarch64-shenandoah-nashorn-jdk8.302_p08.tar.bz2 2842578 BLAKE2B 0ce96a05392250116099a23d6ec54117dfdeff3e75a8fecfab6c1350edb0a45b9652befef6d0387579835c3450e61a4409e51d1a471aefcbe5016c3f346df9b4 SHA512 87140f7e451234b916df6948c0f5a59e5c4321939474aba8318076ff76c247414807d51cdc006f6db6d45f71c1b2e7cc1e7e7ada44b7bc446adebbe622af6062
 DIST openjdk-corba-8.292_p10.tar.bz2 1033217 BLAKE2B f6ac60ad0aab0c1ca149fdf2b26648d38ab083ee6fa36b2f82aca19e79037ac7166c43f91c193493923ea4dabd57de3bcccd75a73aeb6439c1d464729afa957b SHA512 7bbc2b61421a81ca2f0e1080bf5c3bd065f737c0dbc822f123875f2675515b947b4f8efbf0ddb3b8d887b90ab5c646fbb12ae35607ff295d9ca489737ff4fac9
+DIST openjdk-corba-8.302_p08.tar.bz2 1033971 BLAKE2B 0e714a7f8344cd5a1a4800b7a3cdc06d1993f97a34bb15af6f259ab4aa36fad883f82aaa16136c5c62fed0716c8d63ec5d6990d2f4b9385906c99ca4c62c286f SHA512 d539e7222df64cee23b071087d2f5fd5467ebf5fbb0c49bda631c735517073e0f7e2b933f8595bb33b2fe5bf3e3064efaaaada41f7538537914678efdae543a7
 DIST openjdk-hotspot-8.292_p10.tar.bz2 8558678 BLAKE2B 02aaa0cef73dc7aa7e9db426fb021d00f25321426438365f672e0fcbec476826d62c92d897b520f0162ab63f2bf72ecdbf6d8e8a7241d455900d427aafa22bb8 SHA512 ae1e174fad6c41f30593abb4c0be17752d6f7de0fa0a1b83c383cb7cd0848e462ca88feb391c9a8427e167c06e6c3d01230fb769f711dcfddd007f8e43d4c481
+DIST openjdk-hotspot-8.302_p08.tar.bz2 8559747 BLAKE2B 0050b7f4fd8a8beafa6e95215c820bb98a3576b6c8620ea5cc8d631a5e1be7f0f2237734b962ed648ddd038cb0abbb571b24ae71ba488816cdf93ba59915e905 SHA512 86bfcf6c2e4e63dc646062da004520e8ad5c146bb7a6aa3ea1a80813f0b05cc972bce9c3e75a2bb73822ddcef1fbaa525f8b43b36da7f62740a70e1c572d1683
 DIST openjdk-jaxp-8.292_p10.tar.bz2 2684063 BLAKE2B 7130d33afb81d83f0ec3afb5e6e161c318e7c6b36189dd7f88410a7edc07a17ebe2d5c15c5991b31d180d4d1c70c683953a9cfcac1c3eded64a4ab679d4a0366 SHA512 92a15a693440cda28aebe9033675aadcbc099a913f9148b26eae90004d54b246152b326e0005b3da6178286ee21f71f12ecd2f395c09b6707679239506154849
+DIST openjdk-jaxp-8.302_p08.tar.bz2 2684910 BLAKE2B 0f6b7066efb2064a8af59c53da182bdf21313389ea933352a7cd8d1ddbabc7286b8558dd0770ac121b74b55ea47107f037603202d2b12582d6ae00a37b6ba567 SHA512 13aafaa978a28a31beb3c25a6d85626dfd91972a1bb43273dcb1b55c6d48cd4fe0f0d1d78aa309792a00885534d767c05a38b7da24b4ba9c7f81eb0702a9025e
 DIST openjdk-jaxws-8.292_p10.tar.bz2 2543680 BLAKE2B f39b7e939de9ba19f9ff53d2748e2fee7acc82bd4d85a4d8e1f49e3b0919daa03c4996e63a46e908da966dbebbf7051955104b291178f9b059d60e8208dce51c SHA512 5106a28819da3708f8a71e4595cb0191099a7d2e06b7190981beea6af504681927be6c07ebcbe77340735bb22c365e1cf001709311c0a57940247d9584a0ee48
+DIST openjdk-jaxws-8.302_p08.tar.bz2 2544355 BLAKE2B 94665442869022a94db1e6ac945b6baa262c055d17c458b936cdfbec1b0cac8cb975f4949c64b7ad39a7c76096e8457a9e6bc752fcb91b2342a18593b7b98521 SHA512 b0a933ee76f0b787d9ca7835e4191812669259d471b4214906e247fcf30ccfeca76ee213bd07ed8263af2a1ecca11df5c2870fe64bfb8c68f838992f64962da0
 DIST openjdk-jdk-8.292_p10.tar.bz2 48746031 BLAKE2B a54a832a305b87cbd4ceda4eb5bcea07e2a3d4b9f5648f21f52b4e29cf6053b830f876591a0c2c1a6447473354bfcf79d70c260c7bb24505743bd3ba67ba2568 SHA512 c10a64086e0fd63f2ecab884b7baa88c3dcdaad83f2240d7fe3d590913af252a57c9d735268acb1e75bda2883c4c41d47f405db0c15f82d833d33d08c824b9d6
+DIST openjdk-jdk-8.302_p08.tar.bz2 48761793 BLAKE2B d27904377719193603f20af54ffaff918f490b09c79eea371edf920c1a254cf8e5520b286be33b7adc035668ffb483bec158c0c7e12b4af6ab8b9436a3aea534 SHA512 bd07b21bbfbb8340f4e08e6ad7a39d68f4e1ec091a39a773ae87a9212b11218b82419f35523ae85300369e704595fbde6da6446625e349801bc07c5d13b46b2f
 DIST openjdk-langtools-8.292_p10.tar.bz2 2401270 BLAKE2B b4043862df04e9f0056d420116e47f4f1515d1e935bfb6830a67a9de3894c94a6289a7952153bef971369cdbdf2374154cd4895950fe49f8a21af5e3316dfa8a SHA512 ba66be7f37ca8268d1dd0b8d4e68c90ae19f815ac3b64aa1f1abf02a722a09ec46c7605d5124ac960bd44335b053da12b36d4b0562b3675ac503fd838d4924d7
+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

diff --git a/dev-java/openjdk/files/openjdk-8.env.sh b/dev-java/openjdk/files/openjdk-8.env.sh
index e85a08ce4a8..8f863e4c869 100644
--- a/dev-java/openjdk/files/openjdk-8.env.sh
+++ b/dev-java/openjdk/files/openjdk-8.env.sh
@@ -7,7 +7,7 @@ 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/"
+LDPATH="\${JAVA_HOME}/jre/lib/$(get_system_arch)/:\${JAVA_HOME}/jre/lib/$(get_system_arch)/server/"
 MANPATH="\${JAVA_HOME}/man"
 PROVIDES_TYPE="JDK JRE"
 PROVIDES_VERSION="1.${SLOT}"

diff --git a/dev-java/openjdk/openjdk-8.302_p08.ebuild b/dev-java/openjdk/openjdk-8.302_p08.ebuild
new file mode 100644
index 00000000000..e0adcf48d13
--- /dev/null
+++ b/dev-java/openjdk/openjdk-8.302_p08.ebuild
@@ -0,0 +1,253 @@
+# 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
+
+# we need latest -ga tag from hg, but want to keep build number as well
+# as _p component of the gentoo version string.
+
+MY_PV=$(ver_rs 1 'u' 2 '-' ${PV%_p*}-ga)
+MY_PN_AARCH64="${PN}-aarch64-shenandoah"
+MY_PV_AARCH64="$(ver_rs 1 'u' 2 '-' ${PV/_p/-b})"
+MY_P_AARCH64="${MY_PN_AARCH64/#${PN}-}-jdk${MY_PV_AARCH64}"
+
+BASE_URI="https://hg.${PN}.java.net/jdk8u/jdk8u"
+AARCH64_URI="https://hg.${PN}.java.net/aarch64-port/jdk8u-shenandoah"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.java.net"
+SRC_URI="
+	!arm64? (
+		${BASE_URI}/archive/jdk${MY_PV}.tar.bz2 -> ${P}.tar.bz2
+		${BASE_URI}/corba/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-corba-${PV}.tar.bz2
+		${BASE_URI}/hotspot/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-hotspot-${PV}.tar.bz2
+		${BASE_URI}/jaxp/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxp-${PV}.tar.bz2
+		${BASE_URI}/jaxws/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxws-${PV}.tar.bz2
+		${BASE_URI}/jdk/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jdk-${PV}.tar.bz2
+		${BASE_URI}/langtools/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-langtools-${PV}.tar.bz2
+		${BASE_URI}/nashorn/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-nashorn-${PV}.tar.bz2
+	)
+	arm64? (
+		${AARCH64_URI}/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-${PV}.tar.bz2
+		${AARCH64_URI}/corba/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-corba-${PV}.tar.bz2
+		${AARCH64_URI}/hotspot/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-hotspot-${PV}.tar.bz2
+		${AARCH64_URI}/jaxp/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-jaxp-${PV}.tar.bz2
+		${AARCH64_URI}/jaxws/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-jaxws-${PV}.tar.bz2
+		${AARCH64_URI}/jdk/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-jdk-${PV}.tar.bz2
+		${AARCH64_URI}/langtools/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-langtools-${PV}.tar.bz2
+		${AARCH64_URI}/nashorn/archive/${MY_P_AARCH64}.tar.bz2 -> ${MY_PN_AARCH64}-nashorn-jdk${PV}.tar.bz2
+	)
+"
+
+LICENSE="GPL-2"
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="alsa debug cups doc examples headless-awt javafx +jbootstrap +pch selinux source"
+
+COMMON_DEPEND="
+	media-libs/freetype:2=
+	media-libs/giflib:0/7
+	sys-libs/zlib
+"
+# 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/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
+	virtual/pkgconfig
+	x11-base/xorg-proto
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXi
+	x11-libs/libXrender
+	x11-libs/libXt
+	x11-libs/libXtst
+	|| (
+		dev-java/openjdk-bin:${SLOT}
+		dev-java/icedtea-bin:${SLOT}
+		dev-java/openjdk:${SLOT}
+		dev-java/icedtea:${SLOT}
+	)
+"
+
+PDEPEND="javafx? ( dev-java/openjfx:${SLOT} )"
+
+PATCHES=( "${FILESDIR}/openjdk-8-insantiate-arrayallocator.patch" )
+
+# 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 debug 3 1) * $M ))
+	M=$(( $(usex jbootstrap 2 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_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}"
+	JAVA_PKG_WANT_SOURCE="${SLOT}"
+	JAVA_PKG_WANT_TARGET="${SLOT}"
+
+	java-vm-2_pkg_setup
+	java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+	default
+	mv -v "jdk${SLOT}u"* "${P}" || die
+
+	local repo
+	for repo in corba hotspot jdk jaxp jaxws langtools nashorn; do
+		mv -v "${repo}-"* "${P}/${repo}" || die
+	done
+}
+
+src_prepare() {
+	default
+
+	# new warnings in new gcc https://bugs.gentoo.org/685426
+	sed -i '/^WARNINGS_ARE_ERRORS/ s/-Werror/-Wno-error/' \
+		hotspot/make/linux/makefiles/gcc.make || die
+
+	chmod +x configure || die
+}
+
+src_configure() {
+	# general build info found here:
+	#https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
+
+	# Work around stack alignment issue, bug #647954.
+	use x86 && append-flags -mincoming-stack-boundary=2
+
+	# Work around -fno-common ( GCC10 default ), bug #706638
+	append-flags -fcommon
+
+	tc-export_build_env CC CXX PKG_CONFIG STRIP
+
+	local myconf=(
+			--disable-ccache
+			--enable-unlimited-crypto
+			--with-boot-jdk="${JDK_HOME}"
+			--with-extra-cflags="${CFLAGS}"
+			--with-extra-cxxflags="${CXXFLAGS}"
+			--with-extra-ldflags="${LDFLAGS}"
+			--with-giflib=system
+			--with-jtreg=no
+			--with-jobs=1
+			--with-num-cores=1
+			--with-update-version="$(ver_cut 2)"
+			--with-build-number="b$(ver_cut 4)"
+			--with-milestone="fcs" # magic variable that means "release version"
+			--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-zlib=system
+			--with-native-debug-symbols=$(usex debug internal none)
+			$(usex headless-awt --disable-headful '')
+			$(tc-is-clang && echo "--with-toolchain-type=clang")
+		)
+
+	# 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 MAKE XARGS
+		CFLAGS= CXXFLAGS= LDFLAGS= \
+		CONFIG_SITE=/dev/null \
+		CONFIG_SHELL="${EPREFIX}/bin/bash"
+		econf "${myconf[@]}"
+	)
+}
+
+src_compile() {
+	local myemakeargs=(
+		JOBS=$(makeopts_jobs)
+		LOG=debug
+		$(usex doc docs '')
+		$(usex jbootstrap bootcycle-images images)
+	)
+	emake "${myemakeargs[@]}" -j1 #nowarn
+}
+
+src_install() {
+	local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+	local ddest="${ED%/}/${dest#/}"
+
+	cd "${S}"/build/*-release/images/j2sdk-image || die
+
+	if ! use alsa; then
+		rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die
+	fi
+
+	# build system does not remove that
+	if use headless-awt ; then
+		rm -fvr jre/lib/$(get_system_arch)/lib*{[jx]awt,splashscreen}* \
+		{,jre/}bin/policytool bin/appletviewer || die
+	fi
+
+	if ! use examples ; then
+		rm -vr demo/ || die
+	fi
+
+	if ! use source ; then
+		rm -v src.zip || die
+	fi
+
+	dodir "${dest}"
+	cp -pPR * "${ddest}" || die
+
+	dosym ../../../../../../etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts
+
+	java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
+	java-vm_set-pax-markings "${ddest}"
+	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/docs/*
+	fi
+}
+
+pkg_postinst() {
+	java-vm-2_pkg_postinst
+	einfo "JavaWebStart functionality provided by icedtea-web package"
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2022-07-04 10:44 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2022-07-04 10:44 UTC (permalink / raw
  To: gentoo-commits

commit:     47a6b18cec31fafb037c2aa6189cc1c026055e42
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 28 18:28:56 2022 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Jul  4 10:44:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47a6b18c

dev-java/openjdk: consolidate env files

Also drop the pointless copyright notice.

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 dev-java/openjdk/files/openjdk-17.env.sh                 | 16 ----------------
 dev-java/openjdk/files/openjdk-8.env.sh                  |  3 ---
 .../openjdk/files/{openjdk-11.env.sh => openjdk.env.sh}  |  3 ---
 dev-java/openjdk/openjdk-11.0.15_p10-r1.ebuild           |  2 +-
 dev-java/openjdk/openjdk-17.0.3_p7-r1.ebuild             |  2 +-
 5 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/dev-java/openjdk/files/openjdk-17.env.sh b/dev-java/openjdk/files/openjdk-17.env.sh
deleted file mode 100644
index 7db6461bf48f..000000000000
--- a/dev-java/openjdk/files/openjdk-17.env.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-# 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/files/openjdk-8.env.sh b/dev-java/openjdk/files/openjdk-8.env.sh
index 8f863e4c869a..cc0bc80b474b 100644
--- a/dev-java/openjdk/files/openjdk-8.env.sh
+++ b/dev-java/openjdk/files/openjdk-8.env.sh
@@ -1,6 +1,3 @@
-# Copyright 1999-2019 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}"

diff --git a/dev-java/openjdk/files/openjdk-11.env.sh b/dev-java/openjdk/files/openjdk.env.sh
similarity index 80%
rename from dev-java/openjdk/files/openjdk-11.env.sh
rename to dev-java/openjdk/files/openjdk.env.sh
index 96c4be79c33f..287c0578b7c2 100644
--- a/dev-java/openjdk/files/openjdk-11.env.sh
+++ b/dev-java/openjdk/files/openjdk.env.sh
@@ -1,6 +1,3 @@
-# Copyright 1999-2018 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}"

diff --git a/dev-java/openjdk/openjdk-11.0.15_p10-r1.ebuild b/dev-java/openjdk/openjdk-11.0.15_p10-r1.ebuild
index 8431ae423614..4b7612e1259b 100644
--- a/dev-java/openjdk/openjdk-11.0.15_p10-r1.ebuild
+++ b/dev-java/openjdk/openjdk-11.0.15_p10-r1.ebuild
@@ -278,7 +278,7 @@ src_install() {
 	einfo "Creating the Class Data Sharing archives and disabling usage tracking"
 	"${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
 
-	java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
+	java-vm_install-env "${FILESDIR}"/${PN}.env.sh
 	java-vm_revdep-mask
 	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
 

diff --git a/dev-java/openjdk/openjdk-17.0.3_p7-r1.ebuild b/dev-java/openjdk/openjdk-17.0.3_p7-r1.ebuild
index 18915c340d94..226b675fbd2f 100644
--- a/dev-java/openjdk/openjdk-17.0.3_p7-r1.ebuild
+++ b/dev-java/openjdk/openjdk-17.0.3_p7-r1.ebuild
@@ -291,7 +291,7 @@ src_install() {
 	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
+	use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}.env.sh
 	java-vm_revdep-mask
 	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2023-05-20  6:28 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-05-20  6:28 UTC (permalink / raw
  To: gentoo-commits

commit:     141ab9e4fa81526f4f05e319329e2943a2e7d5a5
Author:     Hank Leininger <hlein <AT> korelogic <DOT> com>
AuthorDate: Thu May 18 23:18:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 20 06:27:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=141ab9e4

dev-java/openjdk: fix multi-screen bug

See $BUG, https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264356, https://bugs.openjdk.org/browse/JDK-8299417
Cherry-picked the fix that has landed in the next openjdk release.

Signed-off-by: Hank Leininger <hlein <AT> korelogic.com>
Closes: https://bugs.gentoo.org/906708
Closes: https://github.com/gentoo/gentoo/pull/31091
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/openjdk-17.0.6-multihead-fix.patch       |  24 ++
 dev-java/openjdk/openjdk-17.0.6_p10-r1.ebuild      | 325 +++++++++++++++++++++
 2 files changed, 349 insertions(+)

diff --git a/dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch b/dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch
new file mode 100644
index 000000000000..46f503dd8e0b
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch
@@ -0,0 +1,24 @@
+From cfc9a881afd300bd7c1ce784287d1669308e89fc Mon Sep 17 00:00:00 2001
+From: Sergey Bylokhov <serb@openjdk.org>
+Date: Sat, 2 Jul 2022 00:25:20 +0000
+Subject: [PATCH] 8288854: getLocalGraphicsEnvironment() on for multi-screen
+ setups throws exception NPE
+
+Reviewed-by: azvegint, aivanov
+---
+ .../unix/classes/sun/awt/X11GraphicsEnvironment.java            | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java b/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java
+index 5c9d2a1b695..93f5eaf6656 100644
+--- a/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java
++++ b/src/java.desktop/unix/classes/sun/awt/X11GraphicsEnvironment.java
+@@ -236,7 +236,7 @@ private synchronized void initDevices() {
+             throw new AWTError("no screen devices");
+         }
+         int index = getDefaultScreenNum();
+-        mainScreen = 0 < index && index < screens.length ? index : 0;
++        mainScreen = 0 < index && index < numScreens ? index : 0;
+ 
+         for (int id = 0; id < numScreens; ++id) {
+             devices.put(id, old.containsKey(id) ? old.remove(id) :

diff --git a/dev-java/openjdk/openjdk-17.0.6_p10-r1.ebuild b/dev-java/openjdk/openjdk-17.0.6_p10-r1.ebuild
new file mode 100644
index 000000000000..1a2fcdf2672e
--- /dev/null
+++ b/dev-java/openjdk/openjdk-17.0.6_p10-r1.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
+
+# variable name format: <UPPERCASE_KEYWORD>_XPAK
+ARM64_XPAK="17.0.2_p8" # musl bootstrap install
+PPC64_XPAK="17.0.1_p12" # big-endian bootstrap tarball
+RISCV_XPAK="17.0.3_p7"
+X86_XPAK="17.0.1_p12"
+
+# Usage: bootstrap_uri <keyword> <version> [extracond]
+# Example: $(bootstrap_uri ppc64 17.0.1_p12 big-endian)
+# Output: ppc64? ( big-endian? ( https://...17.0.1_p12-ppc64.tar.xz ) )
+bootstrap_uri() {
+	local baseuri="https://dev.gentoo.org/~arthurzam/distfiles/dev-java/${PN}/${PN}-bootstrap"
+	local suff="tar.xz"
+	local kw="${1:?${FUNCNAME[0]}: keyword not specified}"
+	local ver="${2:?${FUNCNAME[0]}: version not specified}"
+	local cond="${3-}"
+	[[ ${cond} == elibc_musl* ]] && local musl=yes
+
+	# here be dragons
+	echo "${kw}? ( ${cond:+${cond}? (} ${baseuri}-${ver}-${kw}${musl:+-musl}.${suff} ${cond:+) })"
+}
+
+# don't change versioning scheme
+# to find correct _p number, look at
+# https://github.com/openjdk/jdk${SLOT}u/tags
+# you will see, for example, jdk-17.0.4.1-ga and jdk-17.0.4.1+1, both point
+# to exact same commit sha. we should always use the full version.
+# -ga tag is just for humans to easily identify General Availability release tag.
+MY_PV="${PV%_p*}-ga"
+SLOT="${MY_PV%%[.+]*}"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.org"
+SRC_URI="
+	https://github.com/${PN}/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz
+		-> ${P}.tar.gz
+	!system-bootstrap? (
+		$(bootstrap_uri arm64 ${ARM64_XPAK} elibc_musl)
+		$(bootstrap_uri ppc64 ${PPC64_XPAK} big-endian)
+		$(bootstrap_uri x86 ${X86_XPAK})
+		$(bootstrap_uri riscv ${RISCV_XPAK})
+	)
+	riscv? ( https://dev.gentoo.org/~gyakovlev/distfiles/dev-java/openjdk/java17-riscv64.patch )
+"
+# riscv patch origin:
+# https://raw.githubusercontent.com/felixonmars/archriscv-packages/master/java17-openjdk/java17-riscv64.patch
+
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+
+IUSE="alsa big-endian cups debug doc examples headless-awt javafx +jbootstrap lto selinux source system-bootstrap systemtap"
+
+REQUIRED_USE="
+	javafx? ( alsa !headless-awt )
+	!system-bootstrap? ( jbootstrap )
+"
+
+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
+	media-libs/libjpeg-turbo: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}= )
+	system-bootstrap? (
+		|| (
+			dev-java/openjdk-bin:${SLOT}
+			dev-java/openjdk:${SLOT}
+		)
+	)
+"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV//+/-}"
+
+PATCHES=( "${FILESDIR}/openjdk-17.0.6-multihead-fix.patch" )
+
+# 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
+
+	[[ ${MERGE_TYPE} == "binary" ]] && return
+
+	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 ${BROOT}/usr/lib/jvm/${vm} ]]; then
+			java-pkg-2_pkg_setup
+			return
+		fi
+	done
+}
+
+src_prepare() {
+	use riscv && eapply "${DISTDIR}"/java17-riscv64.patch
+	default
+	chmod +x configure || die
+}
+
+src_configure() {
+	if has_version dev-java/openjdk:${SLOT}; then
+		export JDK_HOME=${BROOT}/usr/$(get_libdir)/openjdk-${SLOT}
+	elif use !system-bootstrap ; then
+		local xpakvar="${ARCH^^}_XPAK"
+		export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}"
+	else
+		JDK_HOME=$(best_version -b dev-java/openjdk-bin:${SLOT})
+		[[ -n ${JDK_HOME} ]] || die "Build VM not found!"
+		JDK_HOME=${JDK_HOME#*/}
+		JDK_HOME=${BROOT}/opt/${JDK_HOME%-r*}
+		export JDK_HOME
+	fi
+
+	# 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
+
+	# Strip lto related flags, we rely on USE=lto and --with-jvm-features=link-time-opt
+	# https://bugs.gentoo.org/833097
+	# https://bugs.gentoo.org/833098
+	filter-flags '-flto*'
+	filter-flags -fdevirtualize-at-ltrans
+
+	# 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-precompiled-headers
+		--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="${XPAK_BOOTSTRAP:-system}"
+		--with-giflib="${XPAK_BOOTSTRAP:-system}"
+		--with-harfbuzz="${XPAK_BOOTSTRAP:-system}"
+		--with-lcms="${XPAK_BOOTSTRAP:-system}"
+		--with-libjpeg="${XPAK_BOOTSTRAP:-system}"
+		--with-libpng="${XPAK_BOOTSTRAP:-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="${XPAK_BOOTSTRAP:-system}"
+		--enable-dtrace=$(usex systemtap yes no)
+		--enable-headless-only=$(usex headless-awt yes no)
+		$(tc-is-clang && echo "--with-toolchain-type=clang")
+	)
+
+	use riscv && myconf+=( --with-boot-jdk-jvmargs="-Djdk.lang.Process.launchMechanism=vfork" )
+
+	use lto && myconf+=( --with-jvm-features=link-time-opt )
+
+	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
+
+	if use !system-bootstrap ; then
+		addpredict /dev/random
+		addpredict /proc/self/coredump_filter
+	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
+		NICE= # Use PORTAGE_NICENESS, don't adjust further down
+		$(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
+
+	dosym8 -r /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
+
+	java-vm_install-env "${FILESDIR}"/${PN}.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
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/
@ 2024-03-06 12:44 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2024-03-06 12:44 UTC (permalink / raw
  To: gentoo-commits

commit:     250d2f45f958ccb2a4e3c437d396b88f5d3bd59e
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Mar  6 12:36:46 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar  6 12:42:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=250d2f45

dev-java/openjdk: add 8.402_p06

* Fix various modern C issues - all by backporting parts of later JDK 11/17/21 patches.
* cgroup2 issues: Assuming bug #926247 affects the source build too, but not
  verified, so tagging that.
* Drop stale -fcommon workaround (bug #850505).
* Build with -std=gnu++14 because of -Wregister for Clang 17+ compat (bug #918655).
  (Part of the build uses -std=gnu++98 but not all of it.)

Bug: https://bugs.gentoo.org/926247
Closes: https://bugs.gentoo.org/850505
Closes: https://bugs.gentoo.org/874621
Closes: https://bugs.gentoo.org/918655
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-java/openjdk/Manifest                          |   1 +
 ...penjdk-8.402_p06-0001-Fix-Wint-conversion.patch |  41 ++++
 ..._p06-0002-Fix-Wincompatible-pointer-types.patch |  48 ++++
 ...02_p06-0003-Fix-negative-value-left-shift.patch |  38 ++++
 ...openjdk-8.402_p06-0004-Fix-misc.-warnings.patch |  61 ++++++
 dev-java/openjdk/openjdk-8.402_p06.ebuild          | 244 +++++++++++++++++++++
 6 files changed, 433 insertions(+)

diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index 4bda6b86f359..d2297f205a54 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -4,6 +4,7 @@ DIST openjdk-11.0.20.1_p1.tar.gz 116165519 BLAKE2B 3f3627d6535770c6654226ca2c188
 DIST openjdk-17.0.8.1_p1.tar.gz 105878760 BLAKE2B e4d752dc87717855bfe4bd84c97056f0d93b554c67bdbb3e750e20479e2156628c85aea7b404577ea6ff40d49669d5f53aab06d0c4cf9aa926b060a0cd93cd03 SHA512 0d8e9e54173be855c15d121d4d6cd36996700e1e2fb194ad93ba8ad794a342c87b7d2f81a32d0bb215e45f1dc1f4efdfe1be5e8de99395730902d443ac773813
 DIST openjdk-21.0.1_p12.tar.gz 112241360 BLAKE2B 68a542a1dd65cf74b826e255d08350ec662c37337e45aec18d91e0dbdcce5c6e50172ad482cc21f1aacbf356722e009d4b6431aecf5a1d6b67b74a5007ca702a SHA512 def4b6688f063758235bc454bbbdb4caefa45d2724a9f2296af11d684801f05f1375f0be771b52d9235676e7f89dec816a34b3a1a1cc972662ee50de89600455
 DIST openjdk-8.382_p05.tar.gz 93105951 BLAKE2B 07e2961dbbd8de153650a1f92fd88960e6b1b39e7d212cc158bd943d35da5fdab0595583226ac12134eb176b1c550576e7aef5dfaf4a76ac0060daa42f4b4495 SHA512 5879cfbd5795f0260897c52fe2503754767faf1e229832e0c4c6dd9957055fd7105d14403d82ccf92eed0adfecc5bc858a89643e68d3c81d437fd543fbfce49a
+DIST openjdk-8.402_p06.tar.gz 93136112 BLAKE2B 023422ca2b4dfc08fd3642e3cb3ec0503d57d09dbcb54841e4a04f67a6cd118712cba90b7760eaf9135f9f001f7c15221c4bcb19986547fb2b6b3fb852bb8af4 SHA512 476d195ef500d8dd2013b17de0669a77ef8076b55c2753eb88b1a13f7a48526b1be7a1befabd284eb9ee8411df19ab1f39c81287ab659984d2d67e8aa7192d79
 DIST openjdk-bootstrap-11.0.13_p8-ppc64.tar.xz 108215404 BLAKE2B 5e6c0b905b34b437137922b73a9724da96b8832186fea945f8c73d941db822ca1cc5718f3ecb4607ed98d1f8241c9f365b54caaf978863e8b84680a94f067b5d SHA512 732e2220219d42be10589fcaf2420da87ebc8564b4afc6bd02f61f31cdca9c31b339366e34d374fb814499b92f8aa796435a18f28e10c8cb00d9a0f5953bb60e
 DIST openjdk-bootstrap-11.0.13_p8-x86.tar.xz 105420236 BLAKE2B d3137ad497937a9a04dedf38776f3ac45bf3b115d275991fd8582b72ade48390b6aa8ad89e0b4d34fa6a787a3c413dab20b32ef347dc8733544e810150c55d29 SHA512 f71a7ef8fbf19b0595dd7d4ebe52bbe1c95b8c17f34d092472c5f5ce8caf52a053f22db8587f1649f9a96ad01c0c632be343342812f5a8cc4ff843b33b8d9b0f
 DIST openjdk-bootstrap-11.0.14_p9-riscv.tar.xz 104601676 BLAKE2B 5f976e8a626a829fae70ad6c007f10bfeff79e29c85d6c75fb2f5ff8984fd2a2bd44ee6e07958dbbdaaed761c6839d375e1b5ba6cffc63b02ad9e2c9178310db SHA512 580dec81626553fe3e7afd0f6385a733ba80a0502cf0f9e8bdc973048887290c9ab6171267d61d8838c4ece4de58c9ca8b78540bd52b1757495a27175057ec64

diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch
new file mode 100644
index 000000000000..317f1aa226b3
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch
@@ -0,0 +1,41 @@
+From cc568d4d246ffc9bf08a96db0889d3b89c852718 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 11:22:11 +0000
+Subject: [PATCH 1/4] Fix -Wint-conversion
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport of upstream commit https://github.com/openjdk/jdk21u-dev/commit/7b1455163ed893639059b3d62b71b2ff347c2e3f.
+
+Fixes the following warning/error:
+```
+jdk8u-jdk8u402-ga/jdk/src/share/bin/splashscreen_stubs.c:64:5: error: returning ‘void *’ from a function with return type ‘int’ makes integer from pointer without a cast [-Wint-conversion]
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/bin/splashscreen_stubs.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/jdk/src/share/bin/splashscreen_stubs.c b/jdk/src/share/bin/splashscreen_stubs.c
+index 9c1f514..666634f 100644
+--- a/jdk/src/share/bin/splashscreen_stubs.c
++++ b/jdk/src/share/bin/splashscreen_stubs.c
+@@ -61,11 +61,11 @@ typedef char* (*SplashGetScaledImageName_t)(const char* fileName,
+ #define INVOKEV(name) _INVOKE(name, ,;)
+ 
+ int     DoSplashLoadMemory(void* pdata, int size) {
+-    INVOKE(SplashLoadMemory, NULL)(pdata, size);
++    INVOKE(SplashLoadMemory, 0)(pdata, size);
+ }
+ 
+ int     DoSplashLoadFile(const char* filename) {
+-    INVOKE(SplashLoadFile, NULL)(filename);
++    INVOKE(SplashLoadFile, 0)(filename);
+ }
+ 
+ void    DoSplashInit(void) {
+-- 
+2.44.0
+

diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch
new file mode 100644
index 000000000000..3e8a5d17113c
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch
@@ -0,0 +1,48 @@
+From 57b8fef20b090ffdf99bcf2c3f5fc8d0d4472788 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 11:54:24 +0000
+Subject: [PATCH 2/4] Fix -Wincompatible-pointer-types
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport https://github.com/openjdk/jdk17u/commit/6632e6c6ca74101b45b052fb7962376fbe97605e.
+
+```
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c: In function ‘Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeImage’:
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2853:19: error: passing argument 1 of ‘freeArray’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 2853 |         freeArray(scale, numBands);
+      |                   ^~~~~
+      |                   |
+      |                   UINT8 ** {aka unsigned char **}
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2689:30: note: expected ‘void **’ but argument is of type ‘UINT8 **’ {aka ‘unsigned char **’}
+ 2689 | static void freeArray(void** arr, jint size) {
+      |                       ~~~~~~~^~~
+jdk8u-jdk8u402-ga/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c:2860:19: error: passing argument 1 of ‘freeArray’ from incompatible pointer type [-Wincompatible-pointer-types]
+ 2860 |         freeArray(scale, numBands);
+      |                   ^~~~~
+      |                   |
+      |                   UINT8 ** {aka unsigned char **}
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+index 7e1d8c9..163003c 100644
+--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
++++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+@@ -2686,7 +2686,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_writeTables
+     RELEASE_ARRAYS(env, data, NULL);
+ }
+ 
+-static void freeArray(void** arr, jint size) {
++static void freeArray(UINT8** arr, jint size) {
+     int i;
+     if (arr != NULL) {
+         for (i = 0; i < size; i++) {
+-- 
+2.44.0
+

diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch
new file mode 100644
index 000000000000..3e4296d21aac
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch
@@ -0,0 +1,38 @@
+From 685bf942bdf5b265a3b343c2b682b01b11b6e58a Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 12:20:03 +0000
+Subject: [PATCH 3/4] Fix negative value left shift
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport of https://github.com/openjdk/jdk17u/commit/51be7db96f3fc32a7ddb24f8af19fb4fc0577aaf.
+
+```
+jdk/src/share/native/com/sun/java/util/jar/pack/constants.h:226:37: error: left operand of shift expression ‘(-1 << 13)’ is negative [-fpermissive]
+jdk/src/share/native/com/sun/java/util/jar/pack/constants.h:226:39: error: enumerator value for ‘AO_UNUSED_MBZ’ is not an integer constant
+  226 |     AO_UNUSED_MBZ             = (-1)<<13, // options bits reserved for future use.
+      |                                       ^~
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/native/com/sun/java/util/jar/pack/constants.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h
+index f1a1f73..536003b 100644
+--- a/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h
++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/constants.h
+@@ -223,7 +223,7 @@ enum {
+     AO_HAVE_FIELD_FLAGS_HI    = 1<<10,
+     AO_HAVE_METHOD_FLAGS_HI   = 1<<11,
+     AO_HAVE_CODE_FLAGS_HI     = 1<<12,
+-    AO_UNUSED_MBZ             = (-1)<<13, // options bits reserved for future use.
++    AO_UNUSED_MBZ             = (int)((~0U)<<13), // options bits reserved for future use.
+ 
+ #define ARCHIVE_BIT_DO(F) \
+          F(AO_HAVE_SPECIAL_FORMATS) \
+-- 
+2.44.0
+

diff --git a/dev-java/openjdk/files/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch b/dev-java/openjdk/files/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch
new file mode 100644
index 000000000000..44c5268646d8
--- /dev/null
+++ b/dev-java/openjdk/files/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch
@@ -0,0 +1,61 @@
+From 24f51a75b79aec29bd1631d320e051a646b9fae4 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 6 Mar 2024 12:23:41 +0000
+Subject: [PATCH 4/4] Fix misc. warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Backport of https://github.com/openjdk/jdk11u/commit/49dec121161c162f4aa94caf8c09413253d89377.
+
+```
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp: In function ‘_jobject* Java_com_sun_java_util_jar_Unpack_getUnusedInput(JNIEnv*, jobject)’:
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp:295:12: error: cannot convert ‘bool’ to ‘jobject’ {aka ‘_jobject*’} in return
+  295 |     return false;
+      |            ^~~~~
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp: In function ‘jlong Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv*, jobject)’:
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp:315:3: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
+  315 |   CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL);
+      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+jdk8u-jdk8u402-ga/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp:315:3: warning: converting to non-pointer type ‘long int’ from NULL [-Wconversion-null]
+[...]
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
+index 5fbc726..4c002e7 100644
+--- a/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
++++ b/jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp
+@@ -292,7 +292,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_getUnusedInput(JNIEnv *env, jobject
+ 
+   if (uPtr->aborting()) {
+     THROW_IOE(uPtr->get_abort_message());
+-    return false;
++    return null;
+   }
+ 
+   // We have fetched all the files.
+@@ -312,7 +312,7 @@ Java_com_sun_java_util_jar_pack_NativeUnpack_finish(JNIEnv *env, jobject pObj) {
+   // There's no need to create a new unpacker here if we don't already have one
+   // just to immediatly free it afterwards.
+   unpacker* uPtr = get_unpacker(env, pObj, /* noCreate= */ true);
+-  CHECK_EXCEPTION_RETURN_VALUE(uPtr, NULL);
++  CHECK_EXCEPTION_RETURN_VALUE(uPtr, 0);
+   size_t consumed = uPtr->input_consumed();
+   // free_unpacker() will set the unpacker field on 'pObj' to null
+   free_unpacker(env, pObj, uPtr);
+@@ -323,6 +323,7 @@ JNIEXPORT jboolean JNICALL
+ Java_com_sun_java_util_jar_pack_NativeUnpack_setOption(JNIEnv *env, jobject pObj,
+                                        jstring pProp, jstring pValue) {
+   unpacker*   uPtr  = get_unpacker(env, pObj);
++  CHECK_EXCEPTION_RETURN_VALUE(uPtr, false);
+   const char* prop  = env->GetStringUTFChars(pProp, JNI_FALSE);
+   CHECK_EXCEPTION_RETURN_VALUE(prop, false);
+   const char* value = env->GetStringUTFChars(pValue, JNI_FALSE);
+-- 
+2.44.0
+

diff --git a/dev-java/openjdk/openjdk-8.402_p06.ebuild b/dev-java/openjdk/openjdk-8.402_p06.ebuild
new file mode 100644
index 000000000000..4c9831f1f783
--- /dev/null
+++ b/dev-java/openjdk/openjdk-8.402_p06.ebuild
@@ -0,0 +1,244 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs eapi8-dosym flag-o-matic java-pkg-2 java-vm-2 multiprocessing toolchain-funcs
+
+# don't change versioning scheme
+# to find correct _p number, look at
+# https://github.com/openjdk/jdk${SLOT}u/tags
+# you will see, for example, jdk-17.0.4.1-ga and jdk-17.0.4.1+1, both point
+# to exact same commit sha. we should always use the full version.
+# -ga tag is just for humans to easily identify General Availability release tag.
+# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to
+# set build version properly
+MY_PV="$(ver_rs 1 'u' 2 '-' ${PV%_p*}-ga)"
+SLOT="${PV%%[.+]*}"
+
+DESCRIPTION="Open source implementation of the Java programming language"
+HOMEPAGE="https://openjdk.org"
+SRC_URI="https://github.com/openjdk/jdk${SLOT}u/archive/refs/tags/jdk${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2-with-classpath-exception"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+IUSE="alsa debug cups doc examples headless-awt javafx +jbootstrap selinux source"
+
+COMMON_DEPEND="
+	media-libs/freetype:2=
+	media-libs/giflib:0/7
+	sys-libs/zlib
+"
+# 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/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
+	virtual/pkgconfig
+	x11-base/xorg-proto
+	x11-libs/libX11
+	x11-libs/libXext
+	x11-libs/libXi
+	x11-libs/libXrender
+	x11-libs/libXt
+	x11-libs/libXtst
+	|| (
+		dev-java/openjdk-bin:${SLOT}
+		dev-java/icedtea-bin:${SLOT}
+		dev-java/openjdk:${SLOT}
+	)
+"
+
+BDEPEND="
+	virtual/pkgconfig
+"
+
+PDEPEND="javafx? ( dev-java/openjfx:${SLOT} )"
+
+S="${WORKDIR}/jdk${SLOT}u-jdk${MY_PV}"
+
+PATCHES=(
+	"${FILESDIR}/openjdk-8-insantiate-arrayallocator.patch"
+	"${FILESDIR}/openjdk-8.402_p06-0001-Fix-Wint-conversion.patch"
+	"${FILESDIR}/openjdk-8.402_p06-0002-Fix-Wincompatible-pointer-types.patch"
+	"${FILESDIR}/openjdk-8.402_p06-0003-Fix-negative-value-left-shift.patch"
+	"${FILESDIR}/openjdk-8.402_p06-0004-Fix-misc.-warnings.patch"
+)
+
+# 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 debug 3 1) * $M ))
+	M=$(( $(usex jbootstrap 2 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_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}"
+	JAVA_PKG_WANT_SOURCE="${SLOT}"
+	JAVA_PKG_WANT_TARGET="${SLOT}"
+
+	java-vm-2_pkg_setup
+	java-pkg-2_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# new warnings in new gcc https://bugs.gentoo.org/685426
+	sed -i '/^WARNINGS_ARE_ERRORS/ s/-Werror/-Wno-error/' \
+		hotspot/make/linux/makefiles/gcc.make || die
+
+	chmod +x configure || die
+}
+
+src_configure() {
+	# general build info found here:
+	# https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
+
+	# -Wregister use (bug #918655)
+	append-cxxflags -std=gnu++14
+
+	# Work around stack alignment issue, bug #647954.
+	use x86 && append-flags -mincoming-stack-boundary=2
+
+	# Strip some flags users may set, but should not. #818502
+	filter-flags -fexceptions
+
+	# Strip lto related flags, no support in this version.
+	# https://bugs.gentoo.org/833097
+	# https://bugs.gentoo.org/833098
+	filter-lto
+	filter-flags -fdevirtualize-at-ltrans
+
+	tc-export_build_env CC CXX PKG_CONFIG STRIP
+
+	local myconf=(
+			--disable-ccache
+			--disable-freetype-bundling
+			--disable-precompiled-headers
+			--enable-unlimited-crypto
+			--with-boot-jdk="${JDK_HOME}"
+			--with-extra-cflags="${CFLAGS}"
+			--with-extra-cxxflags="${CXXFLAGS}"
+			--with-extra-ldflags="${LDFLAGS}"
+			--with-freetype-lib="$( $(tc-getPKG_CONFIG) --variable=libdir freetype2 )"
+			--with-freetype-include="$( $(tc-getPKG_CONFIG) --variable=includedir freetype2)/freetype2"
+			--with-giflib=system
+			--with-jtreg=no
+			--with-jobs=1
+			--with-num-cores=1
+			--with-update-version="$(ver_cut 2)"
+			--with-build-number="b$(ver_cut 4)"
+			--with-milestone="fcs" # magic variable that means "release version"
+			--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-zlib=system
+			--with-native-debug-symbols=$(usex debug internal none)
+			$(usex headless-awt --disable-headful '')
+			$(tc-is-clang && echo "--with-toolchain-type=clang")
+		)
+
+	(
+		unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC MAKE XARGS
+		CFLAGS= CXXFLAGS= LDFLAGS= \
+		CONFIG_SITE=/dev/null \
+		CONFIG_SHELL="${BROOT}/bin/bash"
+		econf "${myconf[@]}"
+	)
+}
+
+src_compile() {
+	# Too brittle - gets confused by e.g. -Oline
+	export MAKEOPTS="-j$(makeopts_jobs) -l$(makeopts_loadavg)"
+	unset GNUMAKEFLAGS MAKEFLAGS
+
+	local myemakeargs=(
+		JOBS=$(makeopts_jobs)
+		LOG=debug
+		CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
+		NICE= # Use PORTAGE_NICENESS, don't adjust further down
+		$(usex doc docs '')
+		$(usex jbootstrap bootcycle-images images)
+	)
+	emake "${myemakeargs[@]}" -j1
+}
+
+src_install() {
+	local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
+	local ddest="${ED}/${dest#/}"
+
+	cd "${S}"/build/*-release/images/j2sdk-image || die
+
+	if ! use alsa; then
+		rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die
+	fi
+
+	# build system does not remove that
+	if use headless-awt ; then
+		rm -fvr jre/lib/$(get_system_arch)/lib*{[jx]awt,splashscreen}* \
+		{,jre/}bin/policytool bin/appletviewer || die
+	fi
+
+	if ! use examples ; then
+		rm -vr demo/ || die
+	fi
+
+	if ! use source ; then
+		rm -v src.zip || die
+	fi
+
+	dodir "${dest}"
+	cp -pPR * "${ddest}" || die
+
+	dosym8 -r /etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts
+
+	java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
+	java-vm_set-pax-markings "${ddest}"
+	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/docs/*
+	fi
+}
+
+pkg_postinst() {
+	java-vm-2_pkg_postinst
+	einfo "JavaWebStart functionality provided by icedtea-web package"
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-03-06 12:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-23 20:42 [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk/files/, dev-java/openjdk/ Georgy Yakovlev
  -- strict thread matches above, loose matches on Subject: below --
2024-03-06 12:44 Sam James
2023-05-20  6:28 Sam James
2022-07-04 10:44 Georgy Yakovlev
2021-07-27  1:26 Georgy Yakovlev
2021-03-25  2:08 Georgy Yakovlev
2020-08-04 21:58 Georgy Yakovlev
2020-05-24  3:52 Georgy Yakovlev
2020-01-28  9:22 Georgy Yakovlev
2019-02-01  9:09 Georgy Yakovlev
2018-11-08 23:11 James Le Cuirot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox