Diff openjdk-jre-bin-8.382_p05 with a openjdk-jre-bin-11.0.18_p10

/usr/portage/dev-java/openjdk-jre-bin/openjdk-jre-bin-11.0.18_p10.ebuild 2023-10-09 14:52:29.436368349 +0300
7 7

  
8 8
abi_uri() {
9 9
	echo "${2-$1}? (
10
			https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk${MY_PV}/OpenJDK8U-jre_${1}_linux_hotspot_${MY_PV/-/}.tar.gz
10
			https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jre_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz
11 11
		)"
12 12
}
13 13

  
14
MY_PV=$(ver_rs 1 'u' 2 '-' ${PV//p/b})
15
SLOT="$(ver_cut 1)"
14
MY_PV=${PV/_p/+}
15
SLOT=${MY_PV%%[.+]*}
16 16

  
17
DESCRIPTION="Prebuilt Java JRE binaries provided by Eclipse Temurin"
18
HOMEPAGE="https://adoptium.net"
19 17
SRC_URI="
20 18
	$(abi_uri x64 amd64)
21 19
"
22 20

  
21
DESCRIPTION="Prebuilt Java JRE binaries provided by Eclipse Temurin"
22
HOMEPAGE="https://adoptopenjdk.net"
23 23
LICENSE="GPL-2-with-classpath-exception"
24
KEYWORDS="~amd64"
25

  
24
KEYWORDS="amd64"
26 25
IUSE="alsa cups headless-awt selinux"
27 26

  
28 27
RDEPEND="
......
46 45
RESTRICT="preserve-libs splitdebug"
47 46
QA_PREBUILT="*"
48 47

  
49
S="${WORKDIR}/jdk${MY_PV}-jre"
48
S="${WORKDIR}/jdk-${MY_PV}-jre"
50 49

  
51 50
src_install() {
52
	local dest="/opt/${P}"
51
	local dest="/opt/${PN}-${SLOT}"
53 52
	local ddest="${ED}/${dest#/}"
54 53

  
55
	rm ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README || die
56

  
57
	# this does not exist on arm64 hence -f
58
	rm -fv lib/*/libfreetype.so* || die
54
	# Not sure why they bundle this as it's commonly available and they
55
	# only do so on x86_64. It's needed by libfontmanager.so. IcedTea
56
	# also has an explicit dependency while Oracle seemingly dlopens it.
57
	rm -vf lib/libfreetype.so || die
59 58

  
59
	# Oracle and IcedTea have libjsoundalsa.so depending on
60
	# libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird.
60 61
	if ! use alsa ; then
61
		rm -v lib/*/libjsoundalsa.so* || die
62
		rm -v lib/libjsound.* || die
62 63
	fi
63 64

  
64 65
	if use headless-awt ; then
65
		rm -fvr lib/*/lib*{[jx]awt,splashscreen}* \
66
			bin/policytool || die
66
		rm -v lib/lib*{[jx]awt,splashscreen}* || die
67 67
	fi
68 68

  
69 69
	rm -v lib/security/cacerts || die
......
72 72
	dodir "${dest}"
73 73
	cp -pPR * "${ddest}" || die
74 74

  
75
	# provide stable symlink
76
	dosym "${P}" "/opt/${PN}-${SLOT}"
77

  
78
	java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
75
	java-vm_install-env "${FILESDIR}"/${PN}.env.sh
79 76
	java-vm_set-pax-markings "${ddest}"
80 77
	java-vm_revdep-mask
81 78
	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
82 79
}
80

  
81
pkg_postinst() {
82
	java-vm-2_pkg_postinst
83
}
Thank you!