1 |
commit: 0ac1ad65963d2db7667de699c92ac9dd5694c280 |
2 |
Author: Florian Schmaus <flow <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 12 10:00:11 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 12 10:00:11 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/java.git/commit/?id=0ac1ad65 |
7 |
|
8 |
dev-java/openjdk-bin: new package, add 18.0.1_p10 |
9 |
|
10 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
11 |
|
12 |
dev-java/openjdk-bin/Manifest | 6 + |
13 |
dev-java/openjdk-bin/files/openjdk-bin-18.env.sh | 16 +++ |
14 |
dev-java/openjdk-bin/metadata.xml | 22 +++ |
15 |
dev-java/openjdk-bin/openjdk-bin-18.0.1_p10.ebuild | 147 +++++++++++++++++++++ |
16 |
4 files changed, 191 insertions(+) |
17 |
|
18 |
diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest |
19 |
new file mode 100644 |
20 |
index 00000000..1d8ea3b8 |
21 |
--- /dev/null |
22 |
+++ b/dev-java/openjdk-bin/Manifest |
23 |
@@ -0,0 +1,6 @@ |
24 |
+DIST OpenJDK18U-jdk_aarch64_linux_hotspot_18.0.1_10.tar.gz 191259769 BLAKE2B bf65463bd2d09c2546e272d3972f24ed1b92223125b474e40ab3166f7ee190b831d9a021a74b72279ce404517158b0cc144aec8eb3a20e164e8a86b73f20126e SHA512 c0127793551bb4f335c3970b53b515265f9e53cca02cd597ac854ceb88bc479bbb96b865ac31e194eda14c5a1b9f08a6d0f3922a3d763a54a1994478c2526afc |
25 |
+DIST OpenJDK18U-jdk_arm_linux_hotspot_18.0.1_10.tar.gz 189528067 BLAKE2B 05485aaf4ae8071afe0a988f893fdc1611b4841003b5c01ea6ae8ed83905191e9d7a4848e4a0b3b3f9d69e6246e1df354f57ebbd6460a53834b3562dfa971fea SHA512 93c45e7f3549018dc10a83e19052504352a7e242b2c5e40a5a9bfc30813e5c21b23f6f06c4ae5e94b9ab0a6b9be7397dceb7ebd871e2e45f49e6023c76bf6ca0 |
26 |
+DIST OpenJDK18U-jdk_ppc64le_linux_hotspot_18.0.1_10.tar.gz 191894570 BLAKE2B 4d9c34bfc24bd8edd25546a66c2ab7fe7fec0a4e813ad8ca4908736d37e64e65f19ab8b5f5058084189390acd9cfb7eb52c6c477ce7f055b2ed1792dfb722db7 SHA512 c9c2ba2734c66546cbaaeea64063b196be87ee93141244d6910159287cddbc1d3a05e4436b0edf3d22be38f7169a1d8da003525d8ebe650a2ccabe1928a5199d |
27 |
+DIST OpenJDK18U-jdk_x64_alpine-linux_hotspot_18.0.1_10.tar.gz 192338187 BLAKE2B 043cedf394fdc2abd28d0845de6603c13155fa0799dc08e38c246033e71bf718d96e33c8dfb0136f98bf494e935f176190a1bf8a42ea07e4aae6ace5fe02729d SHA512 7eb45639f8b8883b3f7fb0547a45df38fdeee12c6083b6f6237c557a388a511e655129c9d09997ea155c4e47333dfcffeb5a52fc1c7528b7eeae19a18c555f3e |
28 |
+DIST OpenJDK18U-jdk_x64_linux_hotspot_18.0.1_10.tar.gz 192550912 BLAKE2B 0bc56715f9747b35a48e82176bf42db637286e91492350ab6dbb77b8cbd1a9f806b1eef1654036d0e538fbd3199d3484d57edcc8f89b6f7c03c1ae5de132e6f1 SHA512 695b2c1776362d3f32462b63e64d3c4ba4ed1b7557b4a8f821f4df518af5ddf96450bc46165815827e2d2f240f04a09dd66c6ede59f6d111ad84414c57b0a759 |
29 |
+DIST OpenJDK18U-jdk_x64_mac_hotspot_18.0.1_10.tar.gz 188268875 BLAKE2B 94954e3ae9e0ba2ba93d4a71c605935d239a364ffd07720bf91eafaed320ce912ebfd93ca3eb283f6e44fb39de2553019a8b6484222e1a8446ff4fcbd824c514 SHA512 f63f35dbe5d757b194a01286a3feb3b0aa8a0740ffb2d75ee200db675bd1c653d930c51aa7c2e35deeadc301fc59583d83cc83ceefba8786793747101422beac |
30 |
|
31 |
diff --git a/dev-java/openjdk-bin/files/openjdk-bin-18.env.sh b/dev-java/openjdk-bin/files/openjdk-bin-18.env.sh |
32 |
new file mode 100644 |
33 |
index 00000000..f6d25d57 |
34 |
--- /dev/null |
35 |
+++ b/dev-java/openjdk-bin/files/openjdk-bin-18.env.sh |
36 |
@@ -0,0 +1,16 @@ |
37 |
+# Copyright 1999-2021 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+VERSION="Eclipse Temurin JDK ${PV}" |
41 |
+JAVA_HOME="${EPREFIX}/opt/${P}" |
42 |
+JDK_HOME="${EPREFIX}/opt/${P}" |
43 |
+JAVAC="\${JAVA_HOME}/bin/javac" |
44 |
+PATH="\${JAVA_HOME}/bin" |
45 |
+ROOTPATH="\${JAVA_HOME}/bin" |
46 |
+LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" |
47 |
+MANPATH="" |
48 |
+PROVIDES_TYPE="JDK JRE" |
49 |
+PROVIDES_VERSION="${SLOT}" |
50 |
+BOOTCLASSPATH="" |
51 |
+GENERATION="2" |
52 |
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" |
53 |
|
54 |
diff --git a/dev-java/openjdk-bin/metadata.xml b/dev-java/openjdk-bin/metadata.xml |
55 |
new file mode 100644 |
56 |
index 00000000..37e5947f |
57 |
--- /dev/null |
58 |
+++ b/dev-java/openjdk-bin/metadata.xml |
59 |
@@ -0,0 +1,22 @@ |
60 |
+<?xml version="1.0" encoding="UTF-8"?> |
61 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
62 |
+<pkgmetadata> |
63 |
+ <maintainer type="person"> |
64 |
+ <email>gyakovlev@g.o</email> |
65 |
+ <name>Georgy Yakovlev</name> |
66 |
+ </maintainer> |
67 |
+ <maintainer type="project"> |
68 |
+ <email>java@g.o</email> |
69 |
+ <name>Java</name> |
70 |
+ </maintainer> |
71 |
+ <longdescription> |
72 |
+ Java™ is the world's leading programming language and platform. |
73 |
+ The code for Java is open source and available at OpenJDK™. |
74 |
+ AdoptOpenJDK provides prebuilt OpenJDK binaries from a fully open source set of build scripts and infrastructure. |
75 |
+ </longdescription> |
76 |
+ <use> |
77 |
+ <flag name="headless-awt">Don't install the X backend for AWT, needed by some GUIs (used to be X flag)</flag> |
78 |
+ <flag name="gentoo-vm">Allow this JDK to be recognised by Gentoo (package manager, eselect, java-config, EXPERIMENTAL!)</flag> |
79 |
+ <flag name="source">Install JVM sources</flag> |
80 |
+ </use> |
81 |
+</pkgmetadata> |
82 |
|
83 |
diff --git a/dev-java/openjdk-bin/openjdk-bin-18.0.1_p10.ebuild b/dev-java/openjdk-bin/openjdk-bin-18.0.1_p10.ebuild |
84 |
new file mode 100644 |
85 |
index 00000000..bbd9df9f |
86 |
--- /dev/null |
87 |
+++ b/dev-java/openjdk-bin/openjdk-bin-18.0.1_p10.ebuild |
88 |
@@ -0,0 +1,147 @@ |
89 |
+# Copyright 1999-2022 Gentoo Authors |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+ |
92 |
+EAPI=8 |
93 |
+ |
94 |
+inherit java-vm-2 toolchain-funcs |
95 |
+ |
96 |
+abi_uri() { |
97 |
+ local baseuri="https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk-${MY_PV}/" |
98 |
+ local musl= |
99 |
+ local os=linux |
100 |
+ |
101 |
+ case ${2} in |
102 |
+ *-macos) os=mac ;; |
103 |
+ *-solaris) os=solaris ;; |
104 |
+ esac |
105 |
+ |
106 |
+ if [[ ${3} == musl ]]; then |
107 |
+ os=alpine-linux |
108 |
+ musl=true |
109 |
+ fi |
110 |
+ |
111 |
+ echo "${2-$1}? ( |
112 |
+ ${musl:+ elibc_musl? ( } |
113 |
+ ${baseuri}/OpenJDK${SLOT}U-jdk_${1}_${os}_hotspot_${MY_PV//+/_}.tar.gz |
114 |
+ ${musl:+ ) } )" |
115 |
+} |
116 |
+ |
117 |
+MY_PV=${PV/_p/+} |
118 |
+SLOT=${MY_PV%%[.+]*} |
119 |
+ |
120 |
+SRC_URI=" |
121 |
+ $(abi_uri aarch64 arm64) |
122 |
+ $(abi_uri arm) |
123 |
+ $(abi_uri x64 amd64) |
124 |
+ $(abi_uri x64 amd64 musl) |
125 |
+ $(abi_uri ppc64le ppc64) |
126 |
+ $(abi_uri x64 x64-macos) |
127 |
+" |
128 |
+ |
129 |
+DESCRIPTION="Prebuilt Java JDK binaries provided by Eclipse Temurin" |
130 |
+HOMEPAGE="https://adoptium.net" |
131 |
+LICENSE="GPL-2-with-classpath-exception" |
132 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x64-macos" |
133 |
+IUSE="alsa cups +gentoo-vm headless-awt selinux source" |
134 |
+ |
135 |
+RDEPEND=" |
136 |
+ >=sys-apps/baselayout-java-0.1.0-r1 |
137 |
+ kernel_linux? ( |
138 |
+ media-libs/fontconfig:1.0 |
139 |
+ media-libs/freetype:2 |
140 |
+ media-libs/harfbuzz |
141 |
+ elibc_glibc? ( >=sys-libs/glibc-2.2.5:* ) |
142 |
+ elibc_musl? ( sys-libs/musl ) |
143 |
+ sys-libs/zlib |
144 |
+ alsa? ( media-libs/alsa-lib ) |
145 |
+ cups? ( net-print/cups ) |
146 |
+ selinux? ( sec-policy/selinux-java ) |
147 |
+ !headless-awt? ( |
148 |
+ x11-libs/libX11 |
149 |
+ x11-libs/libXext |
150 |
+ x11-libs/libXi |
151 |
+ x11-libs/libXrender |
152 |
+ x11-libs/libXtst |
153 |
+ ) |
154 |
+ )" |
155 |
+ |
156 |
+RESTRICT="preserve-libs splitdebug" |
157 |
+QA_PREBUILT="*" |
158 |
+ |
159 |
+S="${WORKDIR}/jdk-${MY_PV}" |
160 |
+ |
161 |
+pkg_pretend() { |
162 |
+ if [[ "$(tc-is-softfloat)" != "no" ]]; then |
163 |
+ die "These binaries require a hardfloat system." |
164 |
+ fi |
165 |
+} |
166 |
+ |
167 |
+src_unpack() { |
168 |
+ default |
169 |
+ if [[ ${A} == *_mac_* ]] ; then |
170 |
+ mv -v "${S}/Contents/Home/"* "${S}" || die |
171 |
+ rm -Rf "${S}/Contents" # drop macOS executable |
172 |
+ fi |
173 |
+} |
174 |
+ |
175 |
+src_install() { |
176 |
+ local dest="/opt/${P}" |
177 |
+ local ddest="${ED}/${dest#/}" |
178 |
+ |
179 |
+ # on macOS if they would exist they would be called .dylib, but most |
180 |
+ # importantly, there are no different providers, so everything |
181 |
+ # that's shipped works. |
182 |
+ if [[ ${A} != *_mac_* ]] ; then |
183 |
+ # Not sure why they bundle this as it's commonly available and they |
184 |
+ # only do so on x86_64. It's needed by libfontmanager.so. IcedTea |
185 |
+ # also has an explicit dependency while Oracle seemingly dlopens it. |
186 |
+ rm -vf lib/libfreetype.so || die |
187 |
+ |
188 |
+ # prefer system copy # https://bugs.gentoo.org/776676 |
189 |
+ rm -vf lib/libharfbuzz.so || die |
190 |
+ |
191 |
+ # Oracle and IcedTea have libjsoundalsa.so depending on |
192 |
+ # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird. |
193 |
+ if ! use alsa ; then |
194 |
+ rm -v lib/libjsound.* || die |
195 |
+ fi |
196 |
+ |
197 |
+ if use headless-awt ; then |
198 |
+ rm -v lib/lib*{[jx]awt,splashscreen}* || die |
199 |
+ fi |
200 |
+ fi |
201 |
+ |
202 |
+ if ! use source ; then |
203 |
+ rm -v lib/src.zip || die |
204 |
+ fi |
205 |
+ |
206 |
+ rm -v lib/security/cacerts || die |
207 |
+ dosym -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts |
208 |
+ |
209 |
+ dodir "${dest}" |
210 |
+ cp -pPR * "${ddest}" || die |
211 |
+ |
212 |
+ # provide stable symlink |
213 |
+ dosym "${P}" "/opt/${PN}-${SLOT}" |
214 |
+ |
215 |
+ use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh |
216 |
+ java-vm_set-pax-markings "${ddest}" |
217 |
+ java-vm_revdep-mask |
218 |
+ java-vm_sandbox-predict /dev/random /proc/self/coredump_filter |
219 |
+} |
220 |
+ |
221 |
+pkg_postinst() { |
222 |
+ java-vm-2_pkg_postinst |
223 |
+ |
224 |
+ if use gentoo-vm ; then |
225 |
+ ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK" |
226 |
+ ewarn "recognised by the system. This will almost certainly break" |
227 |
+ ewarn "many java ebuilds as they are not ready for openjdk-${SLOT}" |
228 |
+ else |
229 |
+ ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" |
230 |
+ ewarn "will not be recognised by the system. For example, simply calling" |
231 |
+ ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" |
232 |
+ ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its" |
233 |
+ ewarn "absolute location under ${EPREFIX}/opt/${P}." |
234 |
+ fi |
235 |
+} |