1 |
commit: f4a0c4d5810e06a9013b546e3821b0532a2b4d8c |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 13 14:17:25 2022 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 20 07:23:18 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4a0c4d5 |
7 |
|
8 |
dev-java/openjdk: enable usage of bootstrapping using snapshots |
9 |
|
10 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
11 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
12 |
|
13 |
dev-java/openjdk/Manifest | 2 ++ |
14 |
dev-java/openjdk/metadata.xml | 1 + |
15 |
dev-java/openjdk/openjdk-11.0.14_p9.ebuild | 57 +++++++++++++++++++++++------- |
16 |
dev-java/openjdk/openjdk-17.0.2_p8.ebuild | 57 +++++++++++++++++++++++------- |
17 |
4 files changed, 93 insertions(+), 24 deletions(-) |
18 |
|
19 |
diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest |
20 |
index 38a39ca62be1..e0c613ca2c60 100644 |
21 |
--- a/dev-java/openjdk/Manifest |
22 |
+++ b/dev-java/openjdk/Manifest |
23 |
@@ -11,6 +11,8 @@ DIST openjdk-aarch64-shenandoah-jaxws-8.312_p07.tar.bz2 2559773 BLAKE2B b3c06549 |
24 |
DIST openjdk-aarch64-shenandoah-jdk-8.312_p07.tar.bz2 48837594 BLAKE2B 368caa0a628e3bd0d0343baf7ac6c8854f6998ea5b5f96594e99ac565293bfdbfe733acfdfd398964634ffaf4e0eef298dbed078b0a61626c97711764a45a0bb SHA512 8436daa785fba98ed2c23444673842dc28b18f114ebafd203bc01bd2295a9501c2391c2e51d0f589cd4112243eee2e18a8a71180b2aca3988c58a02f33d13d57 |
25 |
DIST openjdk-aarch64-shenandoah-langtools-8.312_p07.tar.bz2 2403116 BLAKE2B 10c1ca4e78dfad90bf9b8d6745cda41605d5985eddfd8e4c3bfbfcb6458c5b5115813e9aa7b4aec148c4d82f268ab02ca6cef9e68bb902f1944858b6bb6b36d4 SHA512 2c9fc95cb19b1c3a4e7b9c2e305d9a285f1dedb7954cce365738e683c3a52eb7f4e3f3485b947860aee2fd6059b7d2b18e196cc1c585427c6b4b8299f6fc3105 |
26 |
DIST openjdk-aarch64-shenandoah-nashorn-jdk8.312_p07.tar.bz2 2845057 BLAKE2B ff32686b27b767683ae0a670b2509291b6708d371b398cac854210132f555218b9189d3012cf9b45e0584f44425e09aefb8acbef95f1786787067f4d5275fdbe SHA512 71fad14ad6b7a75ee499bc0b3370e5beb22d5a7e32a02d54fc5dff1cf25ede51c3a8a04de6424947ddaa3b5d4a0d7f5a447ba073b62c5c86a49c0543cec3f374 |
27 |
+DIST openjdk-bootstrap-11.0.13_p8-ppc64.tar.xz 108215404 BLAKE2B 5e6c0b905b34b437137922b73a9724da96b8832186fea945f8c73d941db822ca1cc5718f3ecb4607ed98d1f8241c9f365b54caaf978863e8b84680a94f067b5d SHA512 732e2220219d42be10589fcaf2420da87ebc8564b4afc6bd02f61f31cdca9c31b339366e34d374fb814499b92f8aa796435a18f28e10c8cb00d9a0f5953bb60e |
28 |
+DIST openjdk-bootstrap-17.0.1_p12-ppc64.tar.xz 116557680 BLAKE2B d20e45a5a76e30ee60446993bf5dcf0fa10b8b668ebec637ea02b458a472c642f22740e18f28cbf9923ea4cceb17702115c038b13137442e5f0572477d37f12f SHA512 92e0343f493d094300911625a561f42c47402ca4cdbd2ac18414089e8ed8a50ca58f02ec1ef9a3dce017ab7af99a22ab465ddf732ab9e55728e2b146de56fba7 |
29 |
DIST openjdk-corba-8.312_p07.tar.bz2 1035097 BLAKE2B 38ae2cf2e61c44a42320b26f7bdea424066ee4568f2f3bbe6e7aa2d8b7aa927429d0b8c2cc757f580867df6c6e5dbe1270da5f91d9c52aa131e66c146a311caa SHA512 9035449c07e5fc9776b40e32de3e4f1c6efac482c14298671e5e719a1f9830fe9a20851dac3f9c6d6c0c8c387a7b44e40019570c1f054fd1d1f24e2f5cef5bfc |
30 |
DIST openjdk-hotspot-8.312_p07.tar.bz2 8559682 BLAKE2B 776acb83bc065885da90b26c88f0083c3bb7bb1f6dfd0585e37e58f185b5612f6501f2b26e1eeb7533d30f82faea7ccedeeee21dcf454a4e8fe951aca0406a1d SHA512 0c501d284bb22867391de0f8da8b098ca9309173ab6f7415d591d056a2d8859757aaa3da4a9c294dcc434a41771928a9f1edd8a69dad38ef7a9bcad793deeaa8 |
31 |
DIST openjdk-jaxp-8.312_p07.tar.bz2 2686710 BLAKE2B acbfd2a7ebfdcfbfa1c4467dbc6778afbb2b8fab5c70381000b926645197c3bb5537a81574ed98960cae2fd0d70e50ca5976aabd0c49cf833c07f1f3b7935773 SHA512 da3fbd82ff05e48809cf6180d876f09764f5f97e4fc37c4352c7875ccd5bebe66cb51ff4565e6fcd67699ec5b5ae3eebc9c0a1510998697519cfc94d3d04df5f |
32 |
|
33 |
diff --git a/dev-java/openjdk/metadata.xml b/dev-java/openjdk/metadata.xml |
34 |
index a97614c63101..e4fe12d5b61f 100644 |
35 |
--- a/dev-java/openjdk/metadata.xml |
36 |
+++ b/dev-java/openjdk/metadata.xml |
37 |
@@ -24,6 +24,7 @@ |
38 |
<flag name="javafx" restrict=">=dev-java/openjdk-11">Import OpenJFX modules at build time, via <pkg>dev-java/openjfx</pkg></flag> |
39 |
<flag name="jbootstrap">Build OpenJDK twice, the second time using the result of the first</flag> |
40 |
<flag name="source">Install JVM sources</flag> |
41 |
+ <flag name="system-bootstrap">Bootstrap using installed openjdk</flag> |
42 |
<flag name="systemtap" restrict=">=dev-java/openjdk-11">Enable SystemTAP/DTrace tracing</flag> |
43 |
</use> |
44 |
</pkgmetadata> |
45 |
|
46 |
diff --git a/dev-java/openjdk/openjdk-11.0.14_p9.ebuild b/dev-java/openjdk/openjdk-11.0.14_p9.ebuild |
47 |
index 3e2a2d0ff12f..76112e4cf51d 100644 |
48 |
--- a/dev-java/openjdk/openjdk-11.0.14_p9.ebuild |
49 |
+++ b/dev-java/openjdk/openjdk-11.0.14_p9.ebuild |
50 |
@@ -10,14 +10,37 @@ inherit check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils t |
51 |
MY_PV="${PV%_p*}-ga" |
52 |
SLOT="${MY_PV%%[.+]*}" |
53 |
|
54 |
+# variable name format: <UPPERCASE_KEYWORD>_XPAK |
55 |
+PPC64_XPAK="11.0.13_p8" # big-endian bootstrap tarball |
56 |
+ |
57 |
+# Usage: bootstrap_uri <keyword> <version> [extracond] |
58 |
+# Example: $(bootstrap_uri ppc64 17.0.1_p12 big-endian) |
59 |
+# Output: ppc64? ( big-endian? ( https://...17.0.1_p12-ppc64.tar.xz ) ) |
60 |
+bootstrap_uri() { |
61 |
+ local baseuri="https://dev.gentoo.org/~arthurzam/distfiles/dev-java/${PN}/${PN}-bootstrap" |
62 |
+ local suff="tar.xz" |
63 |
+ local kw="${1:?${FUNCNAME[0]}: keyword not specified}" |
64 |
+ local ver="${2:?${FUNCNAME[0]}: version not specified}" |
65 |
+ local cond="${3-}" |
66 |
+ |
67 |
+ # here be dragons |
68 |
+ echo "${kw}? ( ${cond:+${cond}? (} ${baseuri}-${ver}-${kw}.${suff} ${cond:+) })" |
69 |
+} |
70 |
+ |
71 |
DESCRIPTION="Open source implementation of the Java programming language" |
72 |
HOMEPAGE="https://openjdk.java.net" |
73 |
-SRC_URI="https://github.com/${PN}/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz -> ${P}.tar.gz" |
74 |
+SRC_URI=" |
75 |
+ https://github.com/${PN}/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz |
76 |
+ -> ${P}.tar.gz |
77 |
+ !system-bootstrap? ( |
78 |
+ $(bootstrap_uri ppc64 ${PPC64_XPAK} big-endian) |
79 |
+ ) |
80 |
+" |
81 |
|
82 |
LICENSE="GPL-2" |
83 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64" |
84 |
|
85 |
-IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap pch selinux source systemtap" |
86 |
+IUSE="alsa big-endian cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap pch selinux source system-bootstrap systemtap" |
87 |
|
88 |
COMMON_DEPEND=" |
89 |
media-libs/freetype:2= |
90 |
@@ -63,9 +86,11 @@ DEPEND=" |
91 |
x11-libs/libXt |
92 |
x11-libs/libXtst |
93 |
javafx? ( dev-java/openjfx:${SLOT}= ) |
94 |
- || ( |
95 |
- dev-java/openjdk-bin:${SLOT} |
96 |
- dev-java/openjdk:${SLOT} |
97 |
+ system-bootstrap? ( |
98 |
+ || ( |
99 |
+ dev-java/openjdk-bin:${SLOT} |
100 |
+ dev-java/openjdk:${SLOT} |
101 |
+ ) |
102 |
) |
103 |
" |
104 |
|
105 |
@@ -119,6 +144,9 @@ pkg_setup() { |
106 |
|
107 |
if has_version --host-root dev-java/openjdk:${SLOT}; then |
108 |
export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT} |
109 |
+ elif use !system-bootstrap ; then |
110 |
+ local xpakvar="${ARCH^^}_XPAK" |
111 |
+ export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}" |
112 |
else |
113 |
if [[ ${MERGE_TYPE} != "binary" ]]; then |
114 |
JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT}) |
115 |
@@ -156,12 +184,12 @@ src_configure() { |
116 |
--with-extra-cflags="${CFLAGS}" |
117 |
--with-extra-cxxflags="${CXXFLAGS}" |
118 |
--with-extra-ldflags="${LDFLAGS}" |
119 |
- --with-freetype=system |
120 |
- --with-giflib=system |
121 |
- --with-harfbuzz=system |
122 |
- --with-lcms=system |
123 |
- --with-libjpeg=system |
124 |
- --with-libpng=system |
125 |
+ --with-freetype="${XPAK_BOOTSTRAP:-system}" |
126 |
+ --with-giflib="${XPAK_BOOTSTRAP:-system}" |
127 |
+ --with-harfbuzz="${XPAK_BOOTSTRAP:-system}" |
128 |
+ --with-lcms="${XPAK_BOOTSTRAP:-system}" |
129 |
+ --with-libjpeg="${XPAK_BOOTSTRAP:-system}" |
130 |
+ --with-libpng="${XPAK_BOOTSTRAP:-system}" |
131 |
--with-native-debug-symbols=$(usex debug internal none) |
132 |
--with-vendor-name="Gentoo" |
133 |
--with-vendor-url="https://gentoo.org" |
134 |
@@ -171,7 +199,7 @@ src_configure() { |
135 |
--with-version-pre="" |
136 |
--with-version-string="${PV%_p*}" |
137 |
--with-version-build="${PV#*_p}" |
138 |
- --with-zlib=system |
139 |
+ --with-zlib="${XPAK_BOOTSTRAP:-system}" |
140 |
--enable-dtrace=$(usex systemtap yes no) |
141 |
--enable-headless-only=$(usex headless-awt yes no) |
142 |
$(tc-is-clang && echo "--with-toolchain-type=clang") |
143 |
@@ -198,6 +226,11 @@ src_configure() { |
144 |
myconf+=( --disable-precompiled-headers ) |
145 |
fi |
146 |
|
147 |
+ if use !system-bootstrap ; then |
148 |
+ addpredict /dev/random |
149 |
+ addpredict /proc/self/coredump_filter |
150 |
+ fi |
151 |
+ |
152 |
( |
153 |
unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS |
154 |
CFLAGS= CXXFLAGS= LDFLAGS= \ |
155 |
|
156 |
diff --git a/dev-java/openjdk/openjdk-17.0.2_p8.ebuild b/dev-java/openjdk/openjdk-17.0.2_p8.ebuild |
157 |
index a446bf53746b..fa5f143fce01 100644 |
158 |
--- a/dev-java/openjdk/openjdk-17.0.2_p8.ebuild |
159 |
+++ b/dev-java/openjdk/openjdk-17.0.2_p8.ebuild |
160 |
@@ -5,17 +5,40 @@ EAPI=6 |
161 |
|
162 |
inherit check-reqs eapi7-ver flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs |
163 |
|
164 |
+# variable name format: <UPPERCASE_KEYWORD>_XPAK |
165 |
+PPC64_XPAK="17.0.1_p12" # big-endian bootstrap tarball |
166 |
+ |
167 |
+# Usage: bootstrap_uri <keyword> <version> [extracond] |
168 |
+# Example: $(bootstrap_uri ppc64 17.0.1_p12 big-endian) |
169 |
+# Output: ppc64? ( big-endian? ( https://...17.0.1_p12-ppc64.tar.xz ) ) |
170 |
+bootstrap_uri() { |
171 |
+ local baseuri="https://dev.gentoo.org/~arthurzam/distfiles/dev-java/${PN}/${PN}-bootstrap" |
172 |
+ local suff="tar.xz" |
173 |
+ local kw="${1:?${FUNCNAME[0]}: keyword not specified}" |
174 |
+ local ver="${2:?${FUNCNAME[0]}: version not specified}" |
175 |
+ local cond="${3-}" |
176 |
+ |
177 |
+ # here be dragons |
178 |
+ echo "${kw}? ( ${cond:+${cond}? (} ${baseuri}-${ver}-${kw}.${suff} ${cond:+) })" |
179 |
+} |
180 |
+ |
181 |
MY_PV="${PV//_p/+}" |
182 |
SLOT="$(ver_cut 1)" |
183 |
|
184 |
DESCRIPTION="Open source implementation of the Java programming language" |
185 |
HOMEPAGE="https://openjdk.java.net" |
186 |
-SRC_URI="https://github.com/openjdk/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz -> ${P}.tar.gz" |
187 |
+SRC_URI=" |
188 |
+ https://github.com/openjdk/jdk${SLOT}u/archive/refs/tags/jdk-${MY_PV}.tar.gz |
189 |
+ -> ${P}.tar.gz |
190 |
+ !system-bootstrap? ( |
191 |
+ $(bootstrap_uri ppc64 ${PPC64_XPAK} big-endian) |
192 |
+ ) |
193 |
+" |
194 |
|
195 |
LICENSE="GPL-2" |
196 |
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64" |
197 |
|
198 |
-IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap pch selinux source systemtap" |
199 |
+IUSE="alsa big-endian cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap pch selinux source system-bootstrap systemtap" |
200 |
|
201 |
COMMON_DEPEND=" |
202 |
media-libs/freetype:2= |
203 |
@@ -61,9 +84,11 @@ DEPEND=" |
204 |
x11-libs/libXt |
205 |
x11-libs/libXtst |
206 |
javafx? ( dev-java/openjfx:${SLOT}= ) |
207 |
- || ( |
208 |
- dev-java/openjdk-bin:${SLOT} |
209 |
- dev-java/openjdk:${SLOT} |
210 |
+ system-bootstrap? ( |
211 |
+ || ( |
212 |
+ dev-java/openjdk-bin:${SLOT} |
213 |
+ dev-java/openjdk:${SLOT} |
214 |
+ ) |
215 |
) |
216 |
" |
217 |
|
218 |
@@ -117,6 +142,9 @@ pkg_setup() { |
219 |
|
220 |
if has_version --host-root dev-java/openjdk:${SLOT}; then |
221 |
export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT} |
222 |
+ elif use !system-bootstrap ; then |
223 |
+ local xpakvar="${ARCH^^}_XPAK" |
224 |
+ export JDK_HOME="${WORKDIR}/openjdk-bootstrap-${!xpakvar}" |
225 |
else |
226 |
if [[ ${MERGE_TYPE} != "binary" ]]; then |
227 |
JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT}) |
228 |
@@ -155,12 +183,12 @@ src_configure() { |
229 |
--with-extra-cflags="${CFLAGS}" |
230 |
--with-extra-cxxflags="${CXXFLAGS}" |
231 |
--with-extra-ldflags="${LDFLAGS}" |
232 |
- --with-freetype=system |
233 |
- --with-giflib=system |
234 |
- --with-harfbuzz=system |
235 |
- --with-lcms=system |
236 |
- --with-libjpeg=system |
237 |
- --with-libpng=system |
238 |
+ --with-freetype="${XPAK_BOOTSTRAP:-system}" |
239 |
+ --with-giflib="${XPAK_BOOTSTRAP:-system}" |
240 |
+ --with-harfbuzz="${XPAK_BOOTSTRAP:-system}" |
241 |
+ --with-lcms="${XPAK_BOOTSTRAP:-system}" |
242 |
+ --with-libjpeg="${XPAK_BOOTSTRAP:-system}" |
243 |
+ --with-libpng="${XPAK_BOOTSTRAP:-system}" |
244 |
--with-native-debug-symbols=$(usex debug internal none) |
245 |
--with-vendor-name="Gentoo" |
246 |
--with-vendor-url="https://gentoo.org" |
247 |
@@ -170,7 +198,7 @@ src_configure() { |
248 |
--with-version-pre="" |
249 |
--with-version-string="${PV%_p*}" |
250 |
--with-version-build="${PV#*_p}" |
251 |
- --with-zlib=system |
252 |
+ --with-zlib="${XPAK_BOOTSTRAP:-system}" |
253 |
--enable-dtrace=$(usex systemtap yes no) |
254 |
--enable-headless-only=$(usex headless-awt yes no) |
255 |
$(tc-is-clang && echo "--with-toolchain-type=clang") |
256 |
@@ -192,6 +220,11 @@ src_configure() { |
257 |
myconf+=( --disable-precompiled-headers ) |
258 |
fi |
259 |
|
260 |
+ if use !system-bootstrap ; then |
261 |
+ addpredict /dev/random |
262 |
+ addpredict /proc/self/coredump_filter |
263 |
+ fi |
264 |
+ |
265 |
( |
266 |
unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS |
267 |
CFLAGS= CXXFLAGS= LDFLAGS= \ |