summaryrefslogtreecommitdiff
path: root/dev-java
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-20 10:17:50 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-20 10:17:50 +0100
commit399fa07bfac673a8846466b16c76549e329b55b8 (patch)
tree29af17ef91f1bd986b8e615a96b61db7fad5df14 /dev-java
parent388a0747e5972613060d5ca13955b5cd7132533d (diff)
gentoo auto-resync : 20:05:2023 - 10:17:50
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/Manifest.gzbin56829 -> 56834 bytes
-rw-r--r--dev-java/openjdk/Manifest2
-rw-r--r--dev-java/openjdk/files/openjdk-17.0.6-multihead-fix.patch24
-rw-r--r--dev-java/openjdk/openjdk-17.0.6_p10-r1.ebuild325
4 files changed, 351 insertions, 0 deletions
diff --git a/dev-java/Manifest.gz b/dev-java/Manifest.gz
index 12019fa538c1..5c1328707cf1 100644
--- a/dev-java/Manifest.gz
+++ b/dev-java/Manifest.gz
Binary files differ
diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
index 8994d2f123a3..ed5bcb8f5386 100644
--- a/dev-java/openjdk/Manifest
+++ b/dev-java/openjdk/Manifest
@@ -1,3 +1,4 @@
+AUX openjdk-17.0.6-multihead-fix.patch 1169 BLAKE2B c4d9271dd5d3f96cede0108a5db35de42237c09c3c3c6dc51dd7ca564fbd1b63434718cd67e240123b115dd4617b18f055620ae4f7422c5e1b18ea8f5d06834b SHA512 5c7452d3a8c8890a512ee2d5c9e7b5ec57bb069aaa8034e6fed9e6a3947080a3cdc6242028dd2c2301dfbc7e5580c2a52ddcce6ea08aa323a3a6f3fb029bfce1
AUX openjdk-8-insantiate-arrayallocator.patch 647 BLAKE2B b2403d842ace7198520a25bf7c2027e6d74b5d418b52321722b21cac866df883d47e53e4f5e040aed55a9cc4bf03b5a62d008a0877add6c649a41f6230d78a38 SHA512 4bf002ec25844f4e55b588d0516e658c548700d3bcae79be74bf75d9cf30cf9cd448767db36935924dd3b07f34d0cf087321cb35abb4943690353d11485ab0de
AUX openjdk-8.env.sh 687 BLAKE2B 4bb851545955fafa6a4b08f2589fa9a5441ef37484eb21ac5db06cde111d325903e70b5b7473659973a0bab972386c8f33ded1da57858fdca325cfa29b1122f5 SHA512 a43fc0fcf57108350235d47d6da65a12fb9f77f12f6163c649ceceacb3317c6a25516efa060efe129b74138a529945163343e5a7d1de2b7af36f6580054ed5e5
AUX openjdk.env.sh 432 BLAKE2B 8779a373af2f9e52473cb5e3bc2bbcb7fa83c6d09382d498466888dd322299adc1b736c6e3723fa68e92a80067599228b3511cc2826e1ebc3c5845a7a2f62fa3 SHA512 e6604a88fb857945a618e4b7735d49dbc23bdd4c6fb70fc5753470e9c1047825208a40fe25107bcde95f290656b44f92e1667ebc414454cbae2e71f16fec5fbd
@@ -14,6 +15,7 @@ DIST openjdk-bootstrap-17.0.1_p12-x86.tar.xz 111479904 BLAKE2B 17d33f8ee81c2846f
DIST openjdk-bootstrap-17.0.2_p8-arm64-musl.tar.xz 115353932 BLAKE2B 0cc4ab078085f094bbcc65448458d98a0f521e3b754c5118b1b4f957cfa00c24e896c811c2a477822c469ffcfe0de1ad6a8d0b7db23b0b09ae3b459eaf8c4fc8 SHA512 e30acd6c64a0095f4203129ecf2cff4c6b4293bc017457465d3abb746d280a2f5d89028eed22f7f3d236890d047149c7aa257e3b49593d7a6ab4dd6b777a7c26
DIST openjdk-bootstrap-17.0.3_p7-riscv.tar.xz 113344052 BLAKE2B 69ae326c600ecf1840a0874b1e26545779434b979e195a3bc7975615f873cd9ffce324f291e56a2800edc304447845baec774b2a08964afde274bd8e0dd3f704 SHA512 4a483faa32b26758f6fae605fdb3d3b77814c627a3a560e91ca88e2d36a88543a53f019a59b5a6456b87ca671e8b7129d5766210bd5cd52125cb3a040ec2a23f
EBUILD openjdk-11.0.18_p10.ebuild 8729 BLAKE2B 166109710e3241e30fb09ec5457ff3705b121fffcfe4d518bb2309f5ad87f341b3eba06b86783a35fdb00e02503808c99185255e29bc798abaab5a059fbe6bdf SHA512 8f8d02bd00801e02d919709f02bdadf9a7a6dd1e0b5137bad3ab8884469a7e3fc61c2f360ce115f9171d7a119195adaf508d0097760672875bfe6ec8db7edbf0
+EBUILD openjdk-17.0.6_p10-r1.ebuild 9577 BLAKE2B d53872c6f667f95567b2eeb7eb70e9cdecdef891b8fe2622e6e248bae48c75873d40643b40794dceffb7017d36e4a8a8e73abb28998d6fec00fd8e641fcc8cdc SHA512 3611fd4a79ca3ae9c666d88e030c3e5fb82b14488f5cedab30a39aff9c62bf6cd1b9024db6fd3c1656711f4a548f88fe09440d880430ee7fff9ed2fab211e32f
EBUILD openjdk-17.0.6_p10.ebuild 9511 BLAKE2B 3274358c03e26b9a9dd89dcb19439ceee2a02ee65d027bbc9528bbdba2f3b7f15fa46158c0e0a2137c83c31fadf8c1a78cfd23188fd7b474903d1271bb3730f6 SHA512 0f0016aa3564480ff81a4d7a128b4c3a52f5bc77b04357d339db6431675d6d7fb4d4c4ca8ff4c533ad91f8a6bb3094b88aeafd4e61a7897dd256164cbdfcf898
EBUILD openjdk-8.362_p09.ebuild 6395 BLAKE2B ce533353890336ba2edef69f6ca595c6c5fc69473e5ec8e5cd365ff53bdb37037cc6f56b88e0aa207e5d9596a54b84b844c2f5e07ec12c292981eaefd9a4fb04 SHA512 18b46306f1f7b214bc3e766f4fbc10f1d87b896fcf1e45b8d4b57567d8b02b8f4f4a2b96f6b5a1e080de7b0165ad5b65b1b14960caffef4941f53e09b1ee0be0
MISC metadata.xml 1669 BLAKE2B 3ec4792eb15f531ed5aa6358270b8d4173e6bab43e7bc894791ffeec8374e88106d574e8a0676d5bd6c8f55c484f2ec57f6439e7bd4897416fbf700b20486de7 SHA512 d11e6595c1929fdc7a1199a907b7b45d6f893c56b4fa2f4a9fa2691b1a3b9106121d46c7c3fc722fbea9605e4270c515793da825257e93a03ccee787c5a01966
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
+}