dev-java/openjdk-bin: 25_beta36, better handling of "early access" SRC_URI

renames 25_p36_beta -> 25_beta36

Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Part-of: https://github.com/gentoo/gentoo/pull/43566
Closes: https://github.com/gentoo/gentoo/pull/43566
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Volkmar W. Pogatzki
2025-08-26 11:40:09 +02:00
committed by Sam James
parent c6c24f4d8a
commit c72e570783

View File

@@ -6,7 +6,7 @@ EAPI=8
inherit java-vm-2 toolchain-funcs
abi_uri() {
local baseuri="https://github.com/adoptium/temurin$(ver_cut 1)-binaries/releases/download/jdk-${MY_PV1}/"
local baseuri="https://github.com/adoptium/temurin$(ver_cut 1)-binaries/releases/download/jdk-${PVB}/"
local musl=
local os=linux
@@ -22,13 +22,23 @@ abi_uri() {
echo "${2-$1}? (
${musl:+ elibc_musl? ( }
${baseuri}/OpenJDK$(ver_cut 1)U-jdk_${1}_${os}_hotspot_${MY_PV2//+/_}.tar.gz
${baseuri}/OpenJDK$(ver_cut 1)U-jdk_${1}_${os}_hotspot_${PVH}.tar.gz
${musl:+ ) } )"
}
MY_PV=${PV/_p/+}
MY_PV1=${MY_PV/_beta/-ea-beta}
MY_PV2=${MY_PV1/-beta/}
# In "early access" versions, SRC_URI is different from released versions
# and contains strings like 'jdk-25+36-ea-beta' and '_25_36-ea.tar.gz'
# According to file naming rules, the ebuilds are named like
# 'openjdk-bin-25_beta36.ebuild'.
if [[ "${PV%_beta*}" != "${PV}" ]]; then # version string contains "_beta"
MY_PV="${PV/_beta/+}"
PVB="${PV/_beta/+}-ea-beta"
PVH="${PV/_beta/_}-ea"
else
MY_PV="${PV/_p/+}"
PVB="${MY_PV}"
PVH="${MY_PV//+/_}"
fi
DESCRIPTION="Prebuilt Java JDK binaries provided by Eclipse Temurin"
HOMEPAGE="https://adoptium.net"
@@ -40,7 +50,7 @@ SRC_URI="
$(abi_uri x64 amd64 musl)
$(abi_uri riscv64 riscv)
"
S="${WORKDIR}/jdk-${MY_PV%_beta}"
S="${WORKDIR}/jdk-${MY_PV}"
LICENSE="GPL-2-with-classpath-exception"
SLOT=$(ver_cut 1)
@@ -111,7 +121,8 @@ src_install() {
fi
if use headless-awt ; then
rm -v lib/lib*{[jx]awt,splashscreen}* || die
# do not die if not available, -f for bug #934974
rm -fv lib/lib*{[jx]awt,splashscreen}* || die
fi
fi