commit:     c72e570783a5587a841ecc5905a06aed56f2a896
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue Aug 26 09:40:09 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 30 22:45:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c72e5707

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 <AT> 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 <AT> gentoo.org>

 ...36_beta.ebuild => openjdk-bin-25_beta36.ebuild} | 25 ++++++++++++++++------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/dev-java/openjdk-bin/openjdk-bin-25_p36_beta.ebuild 
b/dev-java/openjdk-bin/openjdk-bin-25_beta36.ebuild
similarity index 81%
rename from dev-java/openjdk-bin/openjdk-bin-25_p36_beta.ebuild
rename to dev-java/openjdk-bin/openjdk-bin-25_beta36.ebuild
index 84b8f0e2a314..78883e8fae2d 100644
--- a/dev-java/openjdk-bin/openjdk-bin-25_p36_beta.ebuild
+++ b/dev-java/openjdk-bin/openjdk-bin-25_beta36.ebuild
@@ -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
 

Reply via email to