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

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

  
4 4
EAPI=8
5 5

  
6
inherit java-vm-2
6
inherit java-vm-2 toolchain-funcs
7 7

  
8 8
abi_uri() {
9
	local baseuri="https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk${MY_PV}"
9
	local baseuri="https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk-${MY_PV}/"
10 10
	local musl=
11 11
	local os=linux
12 12

  
......
22 22

  
23 23
	echo "${2-$1}? (
24 24
		${musl:+ elibc_musl? ( }
25
			${baseuri}/OpenJDK${SLOT}U-jdk_${1}_${os}_hotspot_${MY_PV//-/}.tar.gz
25
			${baseuri}/OpenJDK${SLOT}U-jdk_${1}_${os}_hotspot_${MY_PV//+/_}.tar.gz
26 26
		${musl:+ ) } )"
27 27
}
28 28

  
29
MY_PV=$(ver_rs 1 'u' 2 '-' ${PV//p/b})
29
MY_PV=${PV/_p/+}
30 30
SLOT=$(ver_cut 1)
31 31

  
32
DESCRIPTION="Prebuilt Java JDK binaries provided by Eclipse Temurin"
33
HOMEPAGE="https://adoptium.net"
34 32
SRC_URI="
35 33
	$(abi_uri aarch64 arm64)
36 34
	$(abi_uri arm)
37 35
	$(abi_uri ppc64le ppc64)
38 36
	$(abi_uri x64 amd64)
39
	$(abi_uri x64 amd64 musl)
40 37
	$(abi_uri x64 x64-macos)
38
	$(abi_uri x64 amd64 musl)
41 39
"
42 40

  
41
DESCRIPTION="Prebuilt Java JDK binaries provided by Eclipse Temurin"
42
HOMEPAGE="https://adoptium.net"
43 43
LICENSE="GPL-2-with-classpath-exception"
44
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x64-macos"
45

  
46
IUSE="alsa cups examples headless-awt selinux source"
44
KEYWORDS="amd64 ~arm arm64 ppc64 ~x64-macos"
45
IUSE="alsa cups headless-awt selinux source"
47 46

  
48 47
RDEPEND="
49 48
	>=sys-apps/baselayout-java-0.1.0-r1
50 49
	kernel_linux? (
51 50
		media-libs/fontconfig:1.0
52 51
		media-libs/freetype:2
52
		media-libs/harfbuzz
53 53
		elibc_glibc? ( >=sys-libs/glibc-2.2.5:* )
54 54
		elibc_musl? ( sys-libs/musl )
55 55
		sys-libs/zlib
56 56
		alsa? ( media-libs/alsa-lib )
57
		arm? ( dev-libs/libffi-compat:6 )
58 57
		cups? ( net-print/cups )
59 58
		selinux? ( sec-policy/selinux-java )
60 59
		!headless-awt? (
......
64 63
			x11-libs/libXrender
65 64
			x11-libs/libXtst
66 65
		)
67
	)
68
"
66
	)"
69 67

  
70
RESTRICT="preserve-libs strip"
68
RESTRICT="preserve-libs splitdebug"
71 69
QA_PREBUILT="*"
72 70

  
73
S="${WORKDIR}/jdk${MY_PV}"
71
S="${WORKDIR}/jdk-${MY_PV}"
72

  
73
pkg_pretend() {
74
	if [[ "$(tc-is-softfloat)" != "no" ]]; then
75
		die "These binaries require a hardfloat system."
76
	fi
77
}
74 78

  
75 79
src_unpack() {
76 80
	default
77
	# 753575
78
	if use arm; then
79
		mv -v "${S}"* "${S}" || die
80
	elif [[ ${A} == *_mac_* ]] ; then
81
	if [[ ${A} == *_mac_* ]] ; then
81 82
		mv -v "${S}/Contents/Home/"* "${S}" || die
82 83
		rm -Rf "${S}/Contents"  # drop macOS executable
83 84
	fi
......
87 88
	local dest="/opt/${P}"
88 89
	local ddest="${ED}/${dest#/}"
89 90

  
90
	rm ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README || die
91

  
92 91
	# on macOS if they would exist they would be called .dylib, but most
93 92
	# importantly, there are no different providers, so everything
94 93
	# that's shipped works.
95 94
	if [[ ${A} != *_mac_* ]] ; then
96
		# this does not exist on arm64 hence -f
97
		rm -fv jre/lib/*/libfreetype.so* || die
95
		# Not sure why they bundle this as it's commonly available and they
96
		# only do so on x86_64. It's needed by libfontmanager.so. IcedTea
97
		# also has an explicit dependency while Oracle seemingly dlopens it.
98
		rm -vf lib/libfreetype.so || die
98 99

  
99
		if ! use alsa ; then
100
			rm -v jre/lib/*/libjsoundalsa.so* || die
101
		fi
100
		# prefer system copy # https://bugs.gentoo.org/776676
101
		rm -vf lib/libharfbuzz.so || die
102 102

  
103
		if ! use examples ; then
104
			rm -vr sample || die
103
		# Oracle and IcedTea have libjsoundalsa.so depending on
104
		# libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird.
105
		if ! use alsa ; then
106
			rm -v lib/libjsound.* || die
105 107
		fi
106 108

  
107 109
		if use headless-awt ; then
108
			rm -fvr {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
109
				{,jre/}bin/policytool bin/appletviewer || die
110
			rm -v lib/lib*{[jx]awt,splashscreen}* || die
110 111
		fi
111 112
	fi
112 113

  
113 114
	if ! use source ; then
114
		rm -v src.zip || die
115
		rm -v lib/src.zip || die
115 116
	fi
116 117

  
117
	rm -v jre/lib/security/cacerts || die
118
	dosym ../../../../../etc/ssl/certs/java/cacerts \
119
		"${dest}"/jre/lib/security/cacerts
118
	rm -v lib/security/cacerts || die
119
	dosym -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
120 120

  
121 121
	dodir "${dest}"
122 122
	cp -pPR * "${ddest}" || die
......
124 124
	# provide stable symlink
125 125
	dosym "${P}" "/opt/${PN}-${SLOT}"
126 126

  
127
	java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
127
	java-vm_install-env "${FILESDIR}"/${PN}.env.sh
128 128
	java-vm_set-pax-markings "${ddest}"
129 129
	java-vm_revdep-mask
130 130
	java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
131 131
}
132

  
133
pkg_postinst() {
134
	java-vm-2_pkg_postinst
135
}
Thank you!