1 |
commit: 74977ef710bda41d15f6c741f88c4b119c29df28 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 1 08:22:55 2019 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 1 09:07:05 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74977ef7 |
7 |
|
8 |
dev-java/openjdk: add openjdk:8 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/672058 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/10858 |
12 |
Package-Manager: Portage-2.3.59, Repoman-2.3.12 |
13 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
14 |
|
15 |
dev-java/openjdk/Manifest | 8 + |
16 |
dev-java/openjdk/files/generate-cacerts.pl | 358 +++++++++++++++++++++++++++++ |
17 |
dev-java/openjdk/files/openjdk-8.env.sh | 16 ++ |
18 |
dev-java/openjdk/openjdk-8.202_p08.ebuild | 240 +++++++++++++++++++ |
19 |
4 files changed, 622 insertions(+) |
20 |
|
21 |
diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest |
22 |
index ad45e64d341..500148f6cfd 100644 |
23 |
--- a/dev-java/openjdk/Manifest |
24 |
+++ b/dev-java/openjdk/Manifest |
25 |
@@ -1,2 +1,10 @@ |
26 |
DIST jdk-11.0.1+13.tar.bz2 90134818 BLAKE2B c79f32dc5b531a06317afb87ef15495267e914b9b292a1d434514a90298d8234e7e0ba92659416b15d9392c7513d976a0c81411953cb6706a27ee57c965e36fb SHA512 c534c2fa8dcd4fdebef6f00473d5ceaae4a33bd1e1a417846508e25f154b1ded649a73468c8c71ac0c1e27bab5f641a3b480a264b532a0c30be2869c3d11a15d |
27 |
DIST jdk-11.0.2+7.tar.bz2 90189455 BLAKE2B 37473a8db4c6ad6789ea67b44f4dda94b9f59143c681a206aa0931b3a2a376fbc480c0c5a6b617072cf9ce1faca34a6c5c5e56cfec9fbf5482b82520fb2463c4 SHA512 03214d9fc920c04f3057594efa78ff588a630e6c594e5bbcc24b4c327fa08273ce060063d98720cdc04bc6978a3d04e172f38ba7a3bcabf02dd5dad397fd9952 |
28 |
+DIST openjdk-8.202_p08.tar.bz2 449202 BLAKE2B 8f7442918c083e94cda0e029cf2348dd9242653027f84d66deebe162e0928b2c6a86d3f273ba235bad5e5656f2b109e6521aaccfa81332fea92873d008ac0c0d SHA512 586713b889dd60c7dc65fccd39ef3ddd985ebb95a7c6c1feaef3c8d76fd1d929bbf19a99f72274c1afb77bd7f80b581d44add4aa232358d8951f7cc5befb43d0 |
29 |
+DIST openjdk-corba-8.202_p08.tar.bz2 1033539 BLAKE2B 9cbe20fb771157142329db037866ec7d67ff7e70318bec8b74034ce59574cd730975f0e7a3d6b88fc946b1d340558a92ca867639765a205883481fd071d7059e SHA512 9b25132c76f559055698c52888f6cae287096e05b89541cb8e445b46a488126a38e58d4f28649e277862eac7aa20f75f64dbcdcf56c900dcb0530a9545c4f717 |
30 |
+DIST openjdk-hotspot-8.202_p08.tar.bz2 7918616 BLAKE2B a35cedf99a5067896dc498d4baa9b10f4ceb1ffcf946632b578c45d6354e4d025d82462797e56773507e504e5e25a25cdf63485460f9a8df234474a2e110f91a SHA512 ab53e77a4081a34c250750d7b975f790936cf370e81807d0081b006a12c0ceb452f54bd40cc8085a9f16047d270b9b610ee777f6fcd1431ff9d77461c32db464 |
31 |
+DIST openjdk-jaxp-8.202_p08.tar.bz2 2733553 BLAKE2B 53341136b427152115ea0d4f758228090a607270104c88ebb61bc442ddd51a43cfed03c34660a47ab55bb601e1a9d8bf4fcdab05874bf0a5ada33b1ecb60df45 SHA512 9671fb56b6127359376cc2f85d91eb027fb1df1f808e36abbe3a1265d88d50809c34d73b84f52fb6e058ef78017d8d7a24bd097a9d720ad70a6861aa9fcc80f2 |
32 |
+DIST openjdk-jaxws-8.202_p08.tar.bz2 2541554 BLAKE2B a92aae4290e1901b736a6a93aed3b8c4bca14046a1f3eb9939ea9bf8ae0cd09785cf37045a8274641f13e543b49114ff158b9bc0cdd58163b42791e952ac76d0 SHA512 ce385f247a57695f716894137d868fa492d610776d120966c86b741688d6df54ae9538da7cf7b9530212a288ac4ff0d156e09bd5d01305b8165b939fa518fede |
33 |
+DIST openjdk-jdk-8.202_p08.tar.bz2 46618401 BLAKE2B e73b1341b837a0983ded4b4969ce83f9b77283e1d4d51e8d31a1b7401961a0b78943a41d2fe0aa724d85ac93dc3082511bcea341e87daecd070278ae59c8f240 SHA512 20e6747b506091383166298aeed6ff4ffd9deb92f20765ef839bf46d3ecae6b1aa218eb6857e6541df0522b8d571379341e94eb5bef765a1164cf9f59b20dfac |
34 |
+DIST openjdk-langtools-8.202_p08.tar.bz2 2392880 BLAKE2B 45ebebe4864e3274e14cf27986cd96facfe2f8e5c1292344e05743d1448f95367caf0f68886c506ce10435fbf53948c6b9f7087ad5d2cd090cf0f1becb962843 SHA512 a1e1c3dc06b3a58082e1d67d58ffeaf0bc3c5534fd1ba368e835a54d3c6ba9232e277ae685ed3ff5ccdf3cd7fe0612ad78a08ed55d1d2d06de54914a19377907 |
35 |
+DIST openjdk-nashorn-8.202_p08.tar.bz2 2854026 BLAKE2B 05ba828160270e52f27023db83b1ffc4e6611b7a74b300a93a6d476f319a265834b48c7de57b0d3bea502d88279e72fd9cfbc5f3eb0e719650e34e82ba4a3d09 SHA512 bea0eaa4b2247cf1e5ee33613754c8f2f6ffe074a7be562f26e63c6327f56d67f60d4877dd363ed8a812689db1d837f5c257637460e247a1592c3258f3add11b |
36 |
|
37 |
diff --git a/dev-java/openjdk/files/generate-cacerts.pl b/dev-java/openjdk/files/generate-cacerts.pl |
38 |
new file mode 100644 |
39 |
index 00000000000..17d29b36676 |
40 |
--- /dev/null |
41 |
+++ b/dev-java/openjdk/files/generate-cacerts.pl |
42 |
@@ -0,0 +1,358 @@ |
43 |
+#!/usr/bin/perl |
44 |
+ |
45 |
+# Copyright (C) 2007, 2008 Red Hat, Inc. |
46 |
+# |
47 |
+# This program is free software; you can redistribute it and/or modify |
48 |
+# it under the terms of the GNU General Public License as published by |
49 |
+# the Free Software Foundation; either version 2 of the License, or |
50 |
+# (at your option) any later version. |
51 |
+# |
52 |
+# This program is distributed in the hope that it will be useful, |
53 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
54 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
55 |
+# GNU General Public License for more details. |
56 |
+ |
57 |
+# generate-cacerts.pl generates a JKS keystore named 'cacerts' from |
58 |
+# OpenSSL's certificate bundle using OpenJDK's keytool. |
59 |
+ |
60 |
+# First extract each of OpenSSL's bundled certificates into its own |
61 |
+# aliased filename. |
62 |
+ |
63 |
+# Downloaded from http://cvs.fedoraproject.org/viewvc/rpms/ca-certificates/F-12/generate-cacerts.pl?revision=1.2 |
64 |
+# Check and prevention of duplicate aliases added by Vlastimil Babka <caster@g.o> |
65 |
+ |
66 |
+$file = $ARGV[1]; |
67 |
+open(CERTS, $file); |
68 |
+@certs = <CERTS>; |
69 |
+close(CERTS); |
70 |
+ |
71 |
+$pem_file_count = 0; |
72 |
+$in_cert_block = 0; |
73 |
+$write_current_cert = 1; |
74 |
+foreach $cert (@certs) |
75 |
+{ |
76 |
+ if ($cert =~ /Issuer: /) |
77 |
+ { |
78 |
+ $_ = $cert; |
79 |
+ if ($cert =~ /personal-freemail/) |
80 |
+ { |
81 |
+ $cert_alias = "thawtepersonalfreemailca"; |
82 |
+ } |
83 |
+ elsif ($cert =~ /personal-basic/) |
84 |
+ { |
85 |
+ $cert_alias = "thawtepersonalbasicca"; |
86 |
+ } |
87 |
+ elsif ($cert =~ /personal-premium/) |
88 |
+ { |
89 |
+ $cert_alias = "thawtepersonalpremiumca"; |
90 |
+ } |
91 |
+ elsif ($cert =~ /server-certs/) |
92 |
+ { |
93 |
+ $cert_alias = "thawteserverca"; |
94 |
+ } |
95 |
+ elsif ($cert =~ /premium-server/) |
96 |
+ { |
97 |
+ $cert_alias = "thawtepremiumserverca"; |
98 |
+ } |
99 |
+ elsif ($cert =~ /Class 1 Public Primary Certification Authority$/) |
100 |
+ { |
101 |
+ $cert_alias = "verisignclass1ca"; |
102 |
+ } |
103 |
+ elsif ($cert =~ /Class 1 Public Primary Certification Authority - G2/) |
104 |
+ { |
105 |
+ $cert_alias = "verisignclass1g2ca"; |
106 |
+ } |
107 |
+ elsif ($cert =~ |
108 |
+ /VeriSign Class 1 Public Primary Certification Authority - G3/) |
109 |
+ { |
110 |
+ $cert_alias = "verisignclass1g3ca"; |
111 |
+ } |
112 |
+ elsif ($cert =~ /Class 2 Public Primary Certification Authority$/) |
113 |
+ { |
114 |
+ $cert_alias = "verisignclass2ca"; |
115 |
+ } |
116 |
+ elsif ($cert =~ /Class 2 Public Primary Certification Authority - G2/) |
117 |
+ { |
118 |
+ $cert_alias = "verisignclass2g2ca"; |
119 |
+ } |
120 |
+ elsif ($cert =~ |
121 |
+ /VeriSign Class 2 Public Primary Certification Authority - G3/) |
122 |
+ { |
123 |
+ $cert_alias = "verisignclass2g3ca"; |
124 |
+ } |
125 |
+ elsif ($cert =~ /Class 3 Public Primary Certification Authority$/) |
126 |
+ { |
127 |
+ $cert_alias = "verisignclass3ca"; |
128 |
+ } |
129 |
+ # Version 1 of Class 3 Public Primary Certification Authority |
130 |
+ # - G2 is added. Version 3 is excluded. See below. |
131 |
+ elsif ($cert =~ |
132 |
+ /VeriSign Class 3 Public Primary Certification Authority - G3/) |
133 |
+ { |
134 |
+ $cert_alias = "verisignclass3g3ca"; |
135 |
+ } |
136 |
+ elsif ($cert =~ |
137 |
+ /RSA Data Security.*Secure Server Certification Authority/) |
138 |
+ { |
139 |
+ $cert_alias = "verisignserverca"; |
140 |
+ } |
141 |
+ elsif ($cert =~ /GTE CyberTrust Global Root/) |
142 |
+ { |
143 |
+ $cert_alias = "gtecybertrustglobalca"; |
144 |
+ } |
145 |
+ elsif ($cert =~ /Baltimore CyberTrust Root/) |
146 |
+ { |
147 |
+ $cert_alias = "baltimorecybertrustca"; |
148 |
+ } |
149 |
+ elsif ($cert =~ /www.entrust.net\/Client_CA_Info\/CPS/) |
150 |
+ { |
151 |
+ $cert_alias = "entrustclientca"; |
152 |
+ } |
153 |
+ elsif ($cert =~ /www.entrust.net\/GCCA_CPS/) |
154 |
+ { |
155 |
+ $cert_alias = "entrustglobalclientca"; |
156 |
+ } |
157 |
+ elsif ($cert =~ /www.entrust.net\/CPS_2048/) |
158 |
+ { |
159 |
+ $cert_alias = "entrust2048ca"; |
160 |
+ } |
161 |
+ elsif ($cert =~ /www.entrust.net\/CPS /) |
162 |
+ { |
163 |
+ $cert_alias = "entrustsslca"; |
164 |
+ } |
165 |
+ elsif ($cert =~ /www.entrust.net\/SSL_CPS/) |
166 |
+ { |
167 |
+ $cert_alias = "entrustgsslca"; |
168 |
+ } |
169 |
+ elsif ($cert =~ /The Go Daddy Group/) |
170 |
+ { |
171 |
+ $cert_alias = "godaddyclass2ca"; |
172 |
+ } |
173 |
+ elsif ($cert =~ /Starfield Class 2 Certification Authority/) |
174 |
+ { |
175 |
+ $cert_alias = "starfieldclass2ca"; |
176 |
+ } |
177 |
+ elsif ($cert =~ /ValiCert Class 2 Policy Validation Authority/) |
178 |
+ { |
179 |
+ $cert_alias = "valicertclass2ca"; |
180 |
+ } |
181 |
+ elsif ($cert =~ /GeoTrust Global CA$/) |
182 |
+ { |
183 |
+ $cert_alias = "geotrustglobalca"; |
184 |
+ } |
185 |
+ elsif ($cert =~ /Equifax Secure Certificate Authority/) |
186 |
+ { |
187 |
+ $cert_alias = "equifaxsecureca"; |
188 |
+ } |
189 |
+ elsif ($cert =~ /Equifax Secure eBusiness CA-1/) |
190 |
+ { |
191 |
+ $cert_alias = "equifaxsecureebusinessca1"; |
192 |
+ } |
193 |
+ elsif ($cert =~ /Equifax Secure eBusiness CA-2/) |
194 |
+ { |
195 |
+ $cert_alias = "equifaxsecureebusinessca2"; |
196 |
+ } |
197 |
+ elsif ($cert =~ /Equifax Secure Global eBusiness CA-1/) |
198 |
+ { |
199 |
+ $cert_alias = "equifaxsecureglobalebusinessca1"; |
200 |
+ } |
201 |
+ elsif ($cert =~ /Sonera Class1 CA/) |
202 |
+ { |
203 |
+ $cert_alias = "soneraclass1ca"; |
204 |
+ } |
205 |
+ elsif ($cert =~ /Sonera Class2 CA/) |
206 |
+ { |
207 |
+ $cert_alias = "soneraclass2ca"; |
208 |
+ } |
209 |
+ elsif ($cert =~ /AAA Certificate Services/) |
210 |
+ { |
211 |
+ $cert_alias = "comodoaaaca"; |
212 |
+ } |
213 |
+ elsif ($cert =~ /AddTrust Class 1 CA Root/) |
214 |
+ { |
215 |
+ $cert_alias = "addtrustclass1ca"; |
216 |
+ } |
217 |
+ elsif ($cert =~ /AddTrust External CA Root/) |
218 |
+ { |
219 |
+ $cert_alias = "addtrustexternalca"; |
220 |
+ } |
221 |
+ elsif ($cert =~ /AddTrust Qualified CA Root/) |
222 |
+ { |
223 |
+ $cert_alias = "addtrustqualifiedca"; |
224 |
+ } |
225 |
+ elsif ($cert =~ /UTN-USERFirst-Hardware/) |
226 |
+ { |
227 |
+ $cert_alias = "utnuserfirsthardwareca"; |
228 |
+ } |
229 |
+ elsif ($cert =~ /UTN-USERFirst-Client Authentication and Email/) |
230 |
+ { |
231 |
+ $cert_alias = "utnuserfirstclientauthemailca"; |
232 |
+ } |
233 |
+ elsif ($cert =~ /UTN - DATACorp SGC/) |
234 |
+ { |
235 |
+ $cert_alias = "utndatacorpsgcca"; |
236 |
+ } |
237 |
+ elsif ($cert =~ /UTN-USERFirst-Object/) |
238 |
+ { |
239 |
+ $cert_alias = "utnuserfirstobjectca"; |
240 |
+ } |
241 |
+ elsif ($cert =~ /America Online Root Certification Authority 1/) |
242 |
+ { |
243 |
+ $cert_alias = "aolrootca1"; |
244 |
+ } |
245 |
+ elsif ($cert =~ /DigiCert Assured ID Root CA/) |
246 |
+ { |
247 |
+ $cert_alias = "digicertassuredidrootca"; |
248 |
+ } |
249 |
+ elsif ($cert =~ /DigiCert Global Root CA/) |
250 |
+ { |
251 |
+ $cert_alias = "digicertglobalrootca"; |
252 |
+ } |
253 |
+ elsif ($cert =~ /DigiCert High Assurance EV Root CA/) |
254 |
+ { |
255 |
+ $cert_alias = "digicerthighassuranceevrootca"; |
256 |
+ } |
257 |
+ elsif ($cert =~ /GlobalSign Root CA$/) |
258 |
+ { |
259 |
+ $cert_alias = "globalsignca"; |
260 |
+ } |
261 |
+ elsif ($cert =~ /GlobalSign Root CA - R2/) |
262 |
+ { |
263 |
+ $cert_alias = "globalsignr2ca"; |
264 |
+ } |
265 |
+ elsif ($cert =~ /Elektronik.*Kas.*2005/) |
266 |
+ { |
267 |
+ $cert_alias = "extra-elektronikkas2005"; |
268 |
+ } |
269 |
+ elsif ($cert =~ /Elektronik/) |
270 |
+ { |
271 |
+ $cert_alias = "extra-elektronik2005"; |
272 |
+ } |
273 |
+ # Mozilla does not provide these certificates: |
274 |
+ # baltimorecodesigningca |
275 |
+ # gtecybertrust5ca |
276 |
+ # trustcenterclass2caii |
277 |
+ # trustcenterclass4caii |
278 |
+ # trustcenteruniversalcai |
279 |
+ else |
280 |
+ { |
281 |
+ # Generate an alias using the OU and CN attributes of the |
282 |
+ # Issuer field if both are present, otherwise use only the |
283 |
+ # CN attribute. The Issuer field must have either the OU |
284 |
+ # or the CN attribute. |
285 |
+ $_ = $cert; |
286 |
+ if ($cert =~ /OU=/) |
287 |
+ { |
288 |
+ s/Issuer:.*?OU=//; |
289 |
+ # Remove other occurrences of OU=. |
290 |
+ s/OU=.*CN=//; |
291 |
+ # Remove CN= if there were not other occurrences of OU=. |
292 |
+ s/CN=//; |
293 |
+ s/\/emailAddress.*//; |
294 |
+ s/Certificate Authority/ca/g; |
295 |
+ s/Certification Authority/ca/g; |
296 |
+ } |
297 |
+ elsif ($cert =~ /CN=/) |
298 |
+ { |
299 |
+ s/Issuer:.*CN=//; |
300 |
+ s/\/emailAddress.*//; |
301 |
+ s/Certificate Authority/ca/g; |
302 |
+ s/Certification Authority/ca/g; |
303 |
+ } |
304 |
+ s/\W//g; |
305 |
+ tr/A-Z/a-z/; |
306 |
+ $cert_alias = "extra-$_"; |
307 |
+ |
308 |
+ } |
309 |
+ while (-e "$cert_alias.pem") |
310 |
+ { |
311 |
+ $cert_alias = "$cert_alias" . "_"; |
312 |
+ } |
313 |
+ } |
314 |
+ # When it attempts to parse: |
315 |
+ # |
316 |
+ # Class 3 Public Primary Certification Authority - G2, Version 3 |
317 |
+ # |
318 |
+ # keytool says: |
319 |
+ # |
320 |
+ # #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false |
321 |
+ # Unparseable AuthorityInfoAccess extension due to |
322 |
+ # java.io.IOException: Invalid encoding of URI |
323 |
+ # |
324 |
+ # If we do not exclude this file |
325 |
+ # openjdk/jdk/test/lib/security/cacerts/VerifyCACerts.java fails |
326 |
+ # on this cert, printing: |
327 |
+ # |
328 |
+ # Couldn't verify: java.security.SignatureException: Signature |
329 |
+ # does not match. |
330 |
+ # |
331 |
+ elsif ($cert =~ |
332 |
+ /A6:0F:34:C8:62:6C:81:F6:8B:F7:7D:A9:F6:67:58:8A:90:3F:7D:36/) |
333 |
+ { |
334 |
+ $write_current_cert = 0; |
335 |
+ $pem_file_count--; |
336 |
+ } |
337 |
+ elsif ($cert eq "-----BEGIN CERTIFICATE-----\n") |
338 |
+ { |
339 |
+ if ($in_cert_block != 0) |
340 |
+ { |
341 |
+ die "$file is malformed."; |
342 |
+ } |
343 |
+ $in_cert_block = 1; |
344 |
+ if ($write_current_cert == 1) |
345 |
+ { |
346 |
+ $pem_file_count++; |
347 |
+ if (-e "$cert_alias.pem") |
348 |
+ { |
349 |
+ print "$cert_alias"; |
350 |
+ die "already exists" |
351 |
+ } |
352 |
+ open(PEM, ">$cert_alias.pem"); |
353 |
+ print PEM $cert; |
354 |
+ } |
355 |
+ } |
356 |
+ elsif ($cert eq "-----END CERTIFICATE-----\n") |
357 |
+ { |
358 |
+ $in_cert_block = 0; |
359 |
+ if ($write_current_cert == 1) |
360 |
+ { |
361 |
+ print PEM $cert; |
362 |
+ close(PEM); |
363 |
+ } |
364 |
+ $write_current_cert = 1 |
365 |
+ } |
366 |
+ else |
367 |
+ { |
368 |
+ if ($in_cert_block == 1 && $write_current_cert == 1) |
369 |
+ { |
370 |
+ print PEM $cert; |
371 |
+ } |
372 |
+ } |
373 |
+} |
374 |
+ |
375 |
+# Check that the correct number of .pem files were produced. |
376 |
+@pem_files = <*.pem>; |
377 |
+if (@pem_files != $pem_file_count) |
378 |
+{ |
379 |
+ print "$pem_file_count"; |
380 |
+ die "Number of .pem files produced does not match". |
381 |
+ " number of certs read from $file."; |
382 |
+} |
383 |
+ |
384 |
+# Now store each cert in the 'cacerts' file using keytool. |
385 |
+$certs_written_count = 0; |
386 |
+foreach $pem_file (@pem_files) |
387 |
+{ |
388 |
+ system "$ARGV[0] -noprompt -import". |
389 |
+ " -alias `basename $pem_file .pem`". |
390 |
+ " -keystore cacerts -storepass 'changeit' -file $pem_file"; |
391 |
+ unlink($pem_file); |
392 |
+ $certs_written_count++; |
393 |
+} |
394 |
+ |
395 |
+# Check that the correct number of certs were added to the keystore. |
396 |
+if ($certs_written_count != $pem_file_count) |
397 |
+{ |
398 |
+ die "Number of certs added to keystore does not match". |
399 |
+ " number of certs read from $file."; |
400 |
+} |
401 |
|
402 |
diff --git a/dev-java/openjdk/files/openjdk-8.env.sh b/dev-java/openjdk/files/openjdk-8.env.sh |
403 |
new file mode 100644 |
404 |
index 00000000000..e85a08ce4a8 |
405 |
--- /dev/null |
406 |
+++ b/dev-java/openjdk/files/openjdk-8.env.sh |
407 |
@@ -0,0 +1,16 @@ |
408 |
+# Copyright 1999-2019 Gentoo Authors |
409 |
+# Distributed under the terms of the GNU General Public License v2 |
410 |
+ |
411 |
+VERSION="OpenJDK ${PV}" |
412 |
+JAVA_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" |
413 |
+JDK_HOME="${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}" |
414 |
+JAVAC="\${JAVA_HOME}/bin/javac" |
415 |
+PATH="\${JAVA_HOME}/bin" |
416 |
+ROOTPATH="\${JAVA_HOME}/bin" |
417 |
+LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/" |
418 |
+MANPATH="\${JAVA_HOME}/man" |
419 |
+PROVIDES_TYPE="JDK JRE" |
420 |
+PROVIDES_VERSION="1.${SLOT}" |
421 |
+BOOTCLASSPATH="\${JAVA_HOME}/jre/lib/resources.jar:\${JAVA_HOME}/jre/lib/rt.jar:\${JAVA_HOME}/jre/lib/jsse.jar:\${JAVA_HOME}/jre/lib/jce.jar:\${JAVA_HOME}/jre/lib/charsets.jar:\${JAVA_HOME}/jre/lib/jfr.jar" |
422 |
+GENERATION="2" |
423 |
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH" |
424 |
|
425 |
diff --git a/dev-java/openjdk/openjdk-8.202_p08.ebuild b/dev-java/openjdk/openjdk-8.202_p08.ebuild |
426 |
new file mode 100644 |
427 |
index 00000000000..b1c57e60f8d |
428 |
--- /dev/null |
429 |
+++ b/dev-java/openjdk/openjdk-8.202_p08.ebuild |
430 |
@@ -0,0 +1,240 @@ |
431 |
+# Copyright 1999-2019 Gentoo Authors |
432 |
+# Distributed under the terms of the GNU General Public License v2 |
433 |
+ |
434 |
+EAPI=6 |
435 |
+ |
436 |
+inherit check-reqs eapi7-ver flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs |
437 |
+ |
438 |
+MY_PV=$(ver_rs 1 'u' 2 '-' ${PV//p/b}) |
439 |
+ |
440 |
+BASE_URI="https://hg.${PN}.java.net/jdk8u/jdk8u" |
441 |
+ |
442 |
+DESCRIPTION="Open source implementation of the Java programming language" |
443 |
+HOMEPAGE="https://openjdk.java.net" |
444 |
+SRC_URI=" |
445 |
+ ${BASE_URI}/archive/jdk${MY_PV}.tar.bz2 -> ${P}.tar.bz2 |
446 |
+ ${BASE_URI}/corba/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-corba-${PV}.tar.bz2 |
447 |
+ ${BASE_URI}/hotspot/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-hotspot-${PV}.tar.bz2 |
448 |
+ ${BASE_URI}/jaxp/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxp-${PV}.tar.bz2 |
449 |
+ ${BASE_URI}/jaxws/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jaxws-${PV}.tar.bz2 |
450 |
+ ${BASE_URI}/jdk/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-jdk-${PV}.tar.bz2 |
451 |
+ ${BASE_URI}/langtools/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-langtools-${PV}.tar.bz2 |
452 |
+ ${BASE_URI}/nashorn/archive/jdk${MY_PV}.tar.bz2 -> ${PN}-nashorn-${PV}.tar.bz2 |
453 |
+" |
454 |
+ |
455 |
+LICENSE="GPL-2" |
456 |
+SLOT="$(ver_cut 1)" |
457 |
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" |
458 |
+IUSE="alsa debug cups doc examples gentoo-vm headless-awt +jbootstrap nsplugin +pch selinux source +webstart" |
459 |
+ |
460 |
+CDEPEND=" |
461 |
+ media-libs/freetype:2= |
462 |
+ sys-libs/zlib |
463 |
+ alsa? ( media-libs/alsa-lib ) |
464 |
+ !headless-awt? ( |
465 |
+ media-libs/giflib:0/7 |
466 |
+ x11-libs/libX11 |
467 |
+ x11-libs/libXext |
468 |
+ x11-libs/libXi |
469 |
+ x11-libs/libXrender |
470 |
+ x11-libs/libXt |
471 |
+ x11-libs/libXtst |
472 |
+ ) |
473 |
+" |
474 |
+ |
475 |
+RDEPEND=" |
476 |
+ ${CDEPEND} |
477 |
+ cups? ( net-print/cups ) |
478 |
+ selinux? ( sec-policy/selinux-java ) |
479 |
+" |
480 |
+ |
481 |
+# cups headers requied to build, runtime dep is optional |
482 |
+DEPEND=" |
483 |
+ ${CDEPEND} |
484 |
+ net-print/cups |
485 |
+ app-arch/zip |
486 |
+ app-misc/ca-certificates |
487 |
+ dev-lang/perl |
488 |
+ dev-libs/openssl:0 |
489 |
+ media-libs/alsa-lib |
490 |
+ !headless-awt? ( |
491 |
+ x11-base/xorg-proto |
492 |
+ ) |
493 |
+ || ( |
494 |
+ dev-java/openjdk-bin:${SLOT} |
495 |
+ dev-java/icedtea-bin:${SLOT} |
496 |
+ dev-java/openjdk:${SLOT} |
497 |
+ dev-java/icedtea:${SLOT} |
498 |
+ ) |
499 |
+" |
500 |
+ |
501 |
+PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 ) |
502 |
+ nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )" |
503 |
+ |
504 |
+S="${WORKDIR}/jdk${SLOT}u-jdk${MY_PV}" |
505 |
+ |
506 |
+# The space required to build varies wildly depending on USE flags, |
507 |
+# ranging from 2GB to 16GB. This function is certainly not exact but |
508 |
+# should be close enough to be useful. |
509 |
+openjdk_check_requirements() { |
510 |
+ local M |
511 |
+ M=2048 |
512 |
+ M=$(( $(usex debug 3 1) * $M )) |
513 |
+ M=$(( $(usex jbootstrap 2 1) * $M )) |
514 |
+ M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M )) |
515 |
+ |
516 |
+ CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} |
517 |
+} |
518 |
+ |
519 |
+pkg_pretend() { |
520 |
+ openjdk_check_requirements |
521 |
+} |
522 |
+ |
523 |
+pkg_setup() { |
524 |
+ openjdk_check_requirements |
525 |
+ java-vm-2_pkg_setup |
526 |
+ |
527 |
+ JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT} icedtea-${SLOT} icedtea-bin-${SLOT}" |
528 |
+ JAVA_PKG_WANT_SOURCE="${SLOT}" |
529 |
+ JAVA_PKG_WANT_TARGET="${SLOT}" |
530 |
+ |
531 |
+ # The nastiness below is necessary while the gentoo-vm USE flag is |
532 |
+ # masked. First we call java-pkg-2_pkg_setup if it looks like the |
533 |
+ # flag was unmasked against one of the possible build VMs. If not, |
534 |
+ # we try finding one of them in their expected locations. This would |
535 |
+ # have been slightly less messy if openjdk-bin had been installed to |
536 |
+ # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env |
537 |
+ # file but disable it so that it would not normally be selectable. |
538 |
+ |
539 |
+ local vm |
540 |
+ for vm in ${JAVA_PKG_WANT_BUILD_VM}; do |
541 |
+ if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then |
542 |
+ java-pkg-2_pkg_setup |
543 |
+ return |
544 |
+ fi |
545 |
+ done |
546 |
+ |
547 |
+ if has_version --host-root dev-java/openjdk:${SLOT}; then |
548 |
+ export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT} |
549 |
+ else |
550 |
+ JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT}) |
551 |
+ [[ -n ${JDK_HOME} ]] || die "Build VM not found!" |
552 |
+ JDK_HOME=${JDK_HOME#*/} |
553 |
+ JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*} |
554 |
+ export JDK_HOME |
555 |
+ fi |
556 |
+} |
557 |
+ |
558 |
+src_prepare() { |
559 |
+ default |
560 |
+ chmod +x configure || die |
561 |
+ local repo |
562 |
+ for repo in corba hotspot jdk jaxp jaxws langtools nashorn; do |
563 |
+ ln -s ../"${repo}-jdk${MY_PV}" "${repo}" || die |
564 |
+ done |
565 |
+} |
566 |
+ |
567 |
+src_configure() { |
568 |
+ # general build info found here: |
569 |
+ #https://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html |
570 |
+ |
571 |
+ # Work around stack alignment issue, bug #647954. |
572 |
+ use x86 && append-flags -mincoming-stack-boundary=2 |
573 |
+ |
574 |
+ append-flags -Wno-error |
575 |
+ |
576 |
+ local myconf=( |
577 |
+ --disable-ccache |
578 |
+ --enable-unlimited-crypto |
579 |
+ --with-boot-jdk="${JDK_HOME}" |
580 |
+ --with-extra-cflags="${CFLAGS}" |
581 |
+ --with-extra-cxxflags="${CXXFLAGS}" |
582 |
+ --with-extra-ldflags="${LDFLAGS}" |
583 |
+ --with-giflib=system |
584 |
+ --with-jtreg=no |
585 |
+ --with-jobs=1 |
586 |
+ --with-num-cores=1 |
587 |
+ --with-update-version="$(ver_cut 2)" |
588 |
+ --with-build-number="$(ver_cut 4)" |
589 |
+ --with-milestone="gentoo" |
590 |
+ --with-zlib=system |
591 |
+ --with-native-debug-symbols=$(usex debug internal none) |
592 |
+ $(usex headless-awt --disable-headful '') |
593 |
+ ) |
594 |
+ |
595 |
+ # PaX breaks pch, bug #601016 |
596 |
+ if use pch && ! host-is-pax; then |
597 |
+ myconf+=( --enable-precompiled-headers ) |
598 |
+ else |
599 |
+ myconf+=( --disable-precompiled-headers ) |
600 |
+ fi |
601 |
+ |
602 |
+ ( |
603 |
+ unset JAVA JAVAC XARGS |
604 |
+ CFLAGS= CXXFLAGS= LDFLAGS= \ |
605 |
+ CONFIG_SITE=/dev/null \ |
606 |
+ econf "${myconf[@]}" |
607 |
+ ) |
608 |
+} |
609 |
+ |
610 |
+src_compile() { |
611 |
+ emake -j1 LOG=debug JOBS=$(makeopts_jobs)\ |
612 |
+ $(usex jbootstrap bootcycle-images images) $(usex doc docs '') |
613 |
+} |
614 |
+ |
615 |
+src_install() { |
616 |
+ local dest="/usr/$(get_libdir)/${PN}-${SLOT}" |
617 |
+ local ddest="${ED}${dest#/}" |
618 |
+ |
619 |
+ cd "${S}"/build/*-release/images/j2sdk-image || die |
620 |
+ |
621 |
+ if ! use alsa; then |
622 |
+ rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die |
623 |
+ fi |
624 |
+ |
625 |
+ if ! use examples ; then |
626 |
+ rm -vr demo/ || die |
627 |
+ fi |
628 |
+ |
629 |
+ if ! use source ; then |
630 |
+ rm -v src.zip || die |
631 |
+ fi |
632 |
+ |
633 |
+ dodir "${dest}" |
634 |
+ cp -pPR * "${ddest}" || die |
635 |
+ |
636 |
+ einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/" |
637 |
+ mkdir "${T}/certgen" && cd "${T}/certgen" || die |
638 |
+ cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die |
639 |
+ for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do |
640 |
+ openssl x509 -text -in "${c}" >> all.crt || die |
641 |
+ done |
642 |
+ ./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die |
643 |
+ cp -vRP cacerts "${ddest}/jre/lib/security/" || die |
644 |
+ chmod 644 "${ddest}/jre/lib/security/cacerts" || die |
645 |
+ |
646 |
+ use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh |
647 |
+ java-vm_set-pax-markings "${ddest}" |
648 |
+ java-vm_revdep-mask |
649 |
+ java-vm_sandbox-predict /dev/random /proc/self/coredump_filter |
650 |
+ |
651 |
+ if use doc ; then |
652 |
+ insinto /usr/share/doc/${PF}/html |
653 |
+ doins -r "${S}"/build/*-release/docs/* |
654 |
+ fi |
655 |
+} |
656 |
+ |
657 |
+pkg_postinst() { |
658 |
+ java-vm-2_pkg_postinst |
659 |
+ |
660 |
+ if use gentoo-vm ; then |
661 |
+ ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK" |
662 |
+ ewarn "recognised by the system. This will almost certainly break things." |
663 |
+ else |
664 |
+ ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK" |
665 |
+ ewarn "will not be recognised by the system. For example, simply calling" |
666 |
+ ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo" |
667 |
+ ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its" |
668 |
+ ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}." |
669 |
+ fi |
670 |
+} |