Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/openjdk-bin/
Date: Sun, 30 Jan 2022 21:55:19
Message-Id: 1643579680.633ed902d05fdb7f5e154ffd361e2b159921f2f1.gyakovlev@gentoo
1 commit: 633ed902d05fdb7f5e154ffd361e2b159921f2f1
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 30 21:54:25 2022 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 30 21:54:40 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=633ed902
7
8 dev-java/openjdk-bin: add 17.0.2_p8
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 dev-java/openjdk-bin/Manifest | 4 +
13 dev-java/openjdk-bin/openjdk-bin-17.0.2_p8.ebuild | 145 ++++++++++++++++++++++
14 2 files changed, 149 insertions(+)
15
16 diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest
17 index a8b32f34adf8..6ce7ef04c7ce 100644
18 --- a/dev-java/openjdk-bin/Manifest
19 +++ b/dev-java/openjdk-bin/Manifest
20 @@ -9,11 +9,15 @@ DIST OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz 193109331 BLAKE2B d1f3031
21 DIST OpenJDK11U-jdk_x64_mac_hotspot_11.0.13_8.tar.gz 190666788 BLAKE2B 9248072292727e6ac6d3f1783996c13ad7c78418da444d96e8df3c11ac1f2a7c047dcc16951dbabcfa0e46d7121c91e916940ef0749e982f20b6fc36be516d64 SHA512 603ddb6f01a556040e56a8f1d0769636295e2c1579f07d1f58828ab1db9634cc07cada66496a6144cc6de29469eedd02e6fa788961a9e4e6b5c7c6a5fd94839e
22 DIST OpenJDK11U-jdk_x64_mac_hotspot_11.0.14_9.tar.gz 191414234 BLAKE2B abc031558434dc4f800ab2f3251f66cddd49f2296933ae34c58406a1780982693106fe6f37747e48365bd4b6c9f9dd20e0492ddcca62d7e2555df776297d6f96 SHA512 a306fbd6775f4186483e0403f593f599af95e295acc46cba44dd0758dfae8b6a7b1b6ef4581c2ecac1f18b5e98a84e3e3900fae6ca948b74aba2c62a63c00dee
23 DIST OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.1_12.tar.gz 188878354 BLAKE2B 4e2b4272ae91f12b8a4c7a3c1cf2eab250102ff1590c84f2f3612bc206337477284d63914dddcecd8dc259da1ddd08a1fc6e3c52a37b0cbb5ed0187456c2b24e SHA512 8289fb50b06f08c6288bcbab9e609a24744f123568a901b5ea4f2c1928bfdc236a9a9cfa572708c56f1f7f844b17562f9ddcb502b15df8ac8bc7d1ef758a741b
24 +DIST OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.2_8.tar.gz 188965124 BLAKE2B 659bf8518b3104e1fedd116cb9af8b0455d323ce883485f5e42cc9d1fb4d9bae5556757b309a7473559bd67c17a9aa0e0c51934e549141b25dcaeb9032a55b80 SHA512 5eadc730b39f6300be7b64a0a4e9d87873cdfa7b0a031923ddfab473affd5b22788a33e2f01412c99c2e42ffb2774cc655c732e7721a6fc02c2b34a42dc9088d
25 DIST OpenJDK17U-jdk_arm_linux_hotspot_17.0.1_12.tar.gz 188832535 BLAKE2B 4ea2e209f7bebde4cfae439773b42cb9d4143eb5b61a5e69fba181946cd3a3dc977966ed14e24ce6b23066450e64bbf204b72b04562f7af381c765bb4ea31d53 SHA512 615806f02c108c08be70d975f3dc402fc2e30f9a961630fe6528eedb7a5ee76ac07851ada5264fe263453eaefc40aa1ded1cefa37d3455af78b04fdf9caf9a93
26 DIST OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.1_12.tar.gz 187718236 BLAKE2B a55eeb2651d6fbd83b579527761e246bc3babb3858b7c14823e0d512e308a65be1e35899206c1e2458db74ee2aaf4d69578b4045a13a35a0b3d6577d4821d137 SHA512 5179991d451f8736776de933aa44fa726217282da66236f373a0e47d815d03754f28588acf0aca55258ca1085d0e06f53627092bd0cff2c2b60eb6ff9c1df248
27 DIST OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.1_12.tar.gz 191355612 BLAKE2B 21c1459c58a10ed6a87a422e70fc4fa27a37a1ea4cbd121e237d82f9ec0991e7245193c5a44cd2826d502301166a48e2d3e7ac0015dcb9a1c3732f03210ff366 SHA512 30ce2ff05d46ea125fc17256420c8bf9dcc3afe802338cd62d0961e6588cf54663aee07c6d4d21fd0f363b58628ee34cf4f9cf622b6da970924aa94d47e6406a
28 +DIST OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.2_8.tar.gz 191420670 BLAKE2B 901cd6f9e816e1eaa949c97a86d9cfa6d3265b33da483ac5a4ba87621b5a196c7c51305be19745f8aa504ee4471a583180bc36de5a6013ca59e4f0890ea8fa34 SHA512 e80c8f02a35587c9305a92ed20926e79b0bab6b2d0fa3fd62ef7825383f68567c38cb52d2cc82b5def219df1fe2dbb531d0973b3713d1ec18c06c6967a228f73
29 DIST OpenJDK17U-jdk_x64_linux_hotspot_17.0.1_12.tar.gz 191978211 BLAKE2B f0428e67c6f75bc204c8e7c74b25c73a270cff1889c0e3fdcc830f868bcddb58e6c9a480ba0313638a7edf56dd2e61e52b7c4f1dd9ad3643f3e70c9770141c93 SHA512 057fc5c4869bc9113c1a299b125c8bed47e4a841238b42fbd4b39adfd7bbbca0fa9efed7315a98303ff8f4000afd02baaa5b3169be6287d06edbfbbb44728538
30 +DIST OpenJDK17U-jdk_x64_linux_hotspot_17.0.2_8.tar.gz 192041953 BLAKE2B 76b66b6571d50fd00c80bfdfd63023d070b7fb0f4ecacce86fcc10b651fa193a88ac8357e097d83ee4cfb982cd34b15cf4a9b59441066677d19a29073bee3666 SHA512 25ffa17e6d7c402e976823ac90d6fd6c4f07093c3766c6d48a7d1ecfe5908d6d73efe6f732af8fcb3f4f91b6daa0dd8f4a141ce7aae5fc12f0ed23a1c1e2ebb5
31 DIST OpenJDK17U-jdk_x64_mac_hotspot_17.0.1_12.tar.gz 192449459 BLAKE2B 506d31e97c7be57a870e80e1beb0bfa72528cb0e5d006b0dc76667f6ef29624165375a91127e3cc934f3135298d748c43a5adcecb9a07c5d758998bbf6551837 SHA512 8d7afed31b37759ba426d412f70c36e380f0f472d850c9ba9e895e0ebd4a2cf9a7f6118526f0a30f6a1d9d880affca4e1ed9848125509ae97e32f506ad78f541
32 +DIST OpenJDK17U-jdk_x64_mac_hotspot_17.0.2_8.tar.gz 192611208 BLAKE2B ef5e801d3d8b5ace125d62a96ec2b76faf5acf12acd94d3cf6c3f80c84abe9ae91b9e53a85d5f57ff69bd2596cfb5715808d73070c971a5ed8dddec2694a9d64 SHA512 c43075b14450de6763a66c0f73d7836ec880045cc84c1b8f1e72f9e3f1e3ba6057afff27cb3bdcadd89a52c75671ed7cf844299943ba8d3bf86e6c45386fa039
33 DIST OpenJDK8U-jdk_aarch64_linux_hotspot_8u312b07.tar.gz 102144826 BLAKE2B b351fe3a82d8ef1e77314890a00c2920dbe5621bb524c4d4ed80b2f3a3b10853f91b0488ab42a5b1691ba66aa9de8eb0630b9325c3dc7fe6b071e2a95dad6bed SHA512 1b58c5453c473d798e5c4871212c484518b44038f81b32623668174fc47c4118120f770ebe3a21534b7f9e01c383a75cb558538e1e635f7c290686825b4ea78a
34 DIST OpenJDK8U-jdk_aarch64_linux_hotspot_8u322b06.tar.gz 102170434 BLAKE2B 84755d791d6aea0b58de68f7ced3e023d7d5f705c99ece9cb91f77663643681ea22672bb1dae143475959374193b1bea1068c0a0f73df4e748430495993d1c5c SHA512 cda25392c8d51b720fac9022de0d7cfc1f496b9e5295b90ee6082e6787d483eaf32198092072b6fe9cadfec157a93f66290691b3d1476572ba2097ab5e70b33c
35 DIST OpenJDK8U-jdk_arm_linux_hotspot_8u312b07.tar.gz 98364180 BLAKE2B 2b7cfffa33e9486637f9274f5a3138d6c1a53afa63d24ecb82aff4c0baa8b765003642c582c0191d0d229754dd9de64ab7cda4d81e9168df3d960baa44a5de9a SHA512 8b7273688a1ee28d0a2f918f2fe02586b8ff9e7962bbf8cd2973001594e627b1eef7a9f1893bf3bd3789fabe0058a916ac2d4d53c72cbd8d586e4e7c3217438e
36
37 diff --git a/dev-java/openjdk-bin/openjdk-bin-17.0.2_p8.ebuild b/dev-java/openjdk-bin/openjdk-bin-17.0.2_p8.ebuild
38 new file mode 100644
39 index 000000000000..dd7106ec3367
40 --- /dev/null
41 +++ b/dev-java/openjdk-bin/openjdk-bin-17.0.2_p8.ebuild
42 @@ -0,0 +1,145 @@
43 +# Copyright 1999-2022 Gentoo Authors
44 +# Distributed under the terms of the GNU General Public License v2
45 +
46 +EAPI=8
47 +
48 +inherit java-vm-2 toolchain-funcs
49 +
50 +abi_uri() {
51 + local baseuri="https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk-${MY_PV}/"
52 + local musl=
53 + local os=linux
54 +
55 + case ${2} in
56 + *-macos) os=mac ;;
57 + *-solaris) os=solaris ;;
58 + esac
59 +
60 + if [[ ${3} == musl ]]; then
61 + os=alpine-linux
62 + musl=true
63 + fi
64 +
65 + echo "${2-$1}? (
66 + ${musl:+ elibc_musl? ( }
67 + ${baseuri}/OpenJDK${SLOT}U-jdk_${1}_${os}_hotspot_${MY_PV//+/_}.tar.gz
68 + ${musl:+ ) } )"
69 +}
70 +
71 +MY_PV=${PV/_p/+}
72 +SLOT=${MY_PV%%[.+]*}
73 +
74 +SRC_URI="
75 + $(abi_uri aarch64 arm64)
76 + $(abi_uri x64 amd64)
77 + $(abi_uri x64 amd64 musl)
78 + $(abi_uri x64 x64-macos)
79 +"
80 +
81 +DESCRIPTION="Prebuilt Java JDK binaries provided by Eclipse Temurin"
82 +HOMEPAGE="https://adoptium.net"
83 +LICENSE="GPL-2-with-classpath-exception"
84 +KEYWORDS="~amd64 ~arm64 ~x64-macos"
85 +IUSE="alsa cups +gentoo-vm headless-awt selinux source"
86 +
87 +RDEPEND="
88 + >=sys-apps/baselayout-java-0.1.0-r1
89 + kernel_linux? (
90 + media-libs/fontconfig:1.0
91 + media-libs/freetype:2
92 + media-libs/harfbuzz
93 + elibc_glibc? ( >=sys-libs/glibc-2.2.5:* )
94 + elibc_musl? ( sys-libs/musl )
95 + sys-libs/zlib
96 + alsa? ( media-libs/alsa-lib )
97 + cups? ( net-print/cups )
98 + selinux? ( sec-policy/selinux-java )
99 + !headless-awt? (
100 + x11-libs/libX11
101 + x11-libs/libXext
102 + x11-libs/libXi
103 + x11-libs/libXrender
104 + x11-libs/libXtst
105 + )
106 + )"
107 +
108 +RESTRICT="preserve-libs splitdebug"
109 +QA_PREBUILT="*"
110 +
111 +S="${WORKDIR}/jdk-${MY_PV}"
112 +
113 +pkg_pretend() {
114 + if [[ "$(tc-is-softfloat)" != "no" ]]; then
115 + die "These binaries require a hardfloat system."
116 + fi
117 +}
118 +
119 +src_unpack() {
120 + default
121 + if [[ ${A} == *_mac_* ]] ; then
122 + mv -v "${S}/Contents/Home/"* "${S}" || die
123 + rm -Rf "${S}/Contents" # drop macOS executable
124 + fi
125 +}
126 +
127 +src_install() {
128 + local dest="/opt/${P}"
129 + local ddest="${ED}/${dest#/}"
130 +
131 + # on macOS if they would exist they would be called .dylib, but most
132 + # importantly, there are no different providers, so everything
133 + # that's shipped works.
134 + if [[ ${A} != *_mac_* ]] ; then
135 + # Not sure why they bundle this as it's commonly available and they
136 + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea
137 + # also has an explicit dependency while Oracle seemingly dlopens it.
138 + rm -vf lib/libfreetype.so || die
139 +
140 + # prefer system copy # https://bugs.gentoo.org/776676
141 + rm -vf lib/libharfbuzz.so || die
142 +
143 + # Oracle and IcedTea have libjsoundalsa.so depending on
144 + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird.
145 + if ! use alsa ; then
146 + rm -v lib/libjsound.* || die
147 + fi
148 +
149 + if use headless-awt ; then
150 + rm -v lib/lib*{[jx]awt,splashscreen}* || die
151 + fi
152 + fi
153 +
154 + if ! use source ; then
155 + rm -v lib/src.zip || die
156 + fi
157 +
158 + rm -v lib/security/cacerts || die
159 + dosym -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
160 +
161 + dodir "${dest}"
162 + cp -pPR * "${ddest}" || die
163 +
164 + # provide stable symlink
165 + dosym "${P}" "/opt/${PN}-${SLOT}"
166 +
167 + use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
168 + java-vm_set-pax-markings "${ddest}"
169 + java-vm_revdep-mask
170 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
171 +}
172 +
173 +pkg_postinst() {
174 + java-vm-2_pkg_postinst
175 +
176 + if use gentoo-vm ; then
177 + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK"
178 + ewarn "recognised by the system. This will almost certainly break"
179 + ewarn "many java ebuilds as they are not ready for openjdk-${SLOT}"
180 + else
181 + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK"
182 + ewarn "will not be recognised by the system. For example, simply calling"
183 + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
184 + ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its"
185 + ewarn "absolute location under ${EPREFIX}/opt/${P}."
186 + fi
187 +}