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/
Date: Tue, 27 Apr 2021 21:55:03
Message-Id: 1619560485.d72d6ee30a206b9d172e6ec169280104774d7bd1.gyakovlev@gentoo
1 commit: d72d6ee30a206b9d172e6ec169280104774d7bd1
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Tue Apr 27 21:43:45 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Apr 27 21:54:45 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d72d6ee3
7
8 dev-java/openjdk: drop old 11 again
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 dev-java/openjdk/Manifest | 2 -
14 dev-java/openjdk/openjdk-11.0.10_p9.ebuild | 272 -----------------------------
15 dev-java/openjdk/openjdk-11.0.9_p11.ebuild | 272 -----------------------------
16 3 files changed, 546 deletions(-)
17
18 diff --git a/dev-java/openjdk/Manifest b/dev-java/openjdk/Manifest
19 index 0cf213bf2f1..eabaadac69e 100644
20 --- a/dev-java/openjdk/Manifest
21 +++ b/dev-java/openjdk/Manifest
22 @@ -1,6 +1,4 @@
23 -DIST openjdk-11.0.10_p9.tar.bz2 95141294 BLAKE2B f35cd0392b433210eb06b023bd92a168e17363635e27addcdcf1f1f9de7091a9f447a15b0fbbd1b0e3425377cb770de8dedf31c3a1cb1d7ecfc944175be4464d SHA512 755d6b9789ddca274fefa1762a68892ec0597e581d16fa2a26cfce0e5c10232c73706f3beb99fcaf99e80a051d0db7365e3c5402e952c2dec4405626ac2a4ef7
24 DIST openjdk-11.0.11_p9.tar.bz2 95298760 BLAKE2B 7572d297fecffa9d38998c79dda00ea9361c1cf2f6c8bf51bac782da17cd3b6b272d08ab57fff96d523a1299f5514cb3788d05eeb37ef467ee7ad8bbb156d98e SHA512 72deecf32b793fa331deb6a1c0294b1efc68b72af9aebc1ba0528189e0097ff6d226cd0c3947d3cdc35c3cf28b3450cc538d375be0b9d43dca379f244894d20e
25 -DIST openjdk-11.0.9_p11.tar.bz2 91638327 BLAKE2B a04b7fb5ebde3b6c024e5f3931a2efe796e08ad66c0190cddfa4268d5181f46f24685d9d51ae328547916e8ece723967bf653feeac87347ee14ecbe213ad657a SHA512 a0a6726d5adbe95904b78d8b4319bc4386c594a563f80f63d59072cf72d00928b451163b91258b44193a80851400ce8b8d142fecfd2bd902ff7a5e47cb4a9976
26 DIST openjdk-8.272_p10.tar.bz2 457222 BLAKE2B 51e487d36c1922c5fc04d8922f1000a776e4872142517933ef5e8d5fd825f221fa02325bd755bf3f48f7f3221a2da3ca182301fb303675cb7d712d7b2f1c7751 SHA512 488b7fa0ed725936d483efd54242dbf4409752c685f29277023fb47c4375b5700b34e743d819d7d7c2406a2f8845d1c3d4fc548c156b6c7c30e43574c1b51527
27 DIST openjdk-8.282_p08.tar.bz2 457358 BLAKE2B 4451b2de340136ceb152615a32e33a3db60ff0f000d00e758d992f549af0110c4f64e3724abdd6ca7d679862e927557d475a2a36e923f0c3c5dd48fcb81b9b45 SHA512 40ccce0a25da6a6eef5cadfc0d6b208d0243ccd1fbc2a7aaef4c627802144122dbda96677c2d3ba45e05c5ac123a058ed37f59b8f035f0afcf34e832d50e8c35
28 DIST openjdk-8.292_p10.tar.bz2 457861 BLAKE2B 043c1d6f7d040dedaadd05091ce4fdf3f516c1cd241e3603c81f2c49fd81df9c4f1082822a5471255381d56f3ab838a24e499b4ec647f3354ee051078c496b2c SHA512 6e1ac380db32fa5f1decc80291dcdb5e1d3d9afb0dc4587966c5a1b840588a984bc07109c23cb0c69c60509c6db8152e7306509280063f7d2e853aed41e391cc
29
30 diff --git a/dev-java/openjdk/openjdk-11.0.10_p9.ebuild b/dev-java/openjdk/openjdk-11.0.10_p9.ebuild
31 deleted file mode 100644
32 index ca908bb4c18..00000000000
33 --- a/dev-java/openjdk/openjdk-11.0.10_p9.ebuild
34 +++ /dev/null
35 @@ -1,272 +0,0 @@
36 -# Copyright 1999-2021 Gentoo Authors
37 -# Distributed under the terms of the GNU General Public License v2
38 -
39 -EAPI=6
40 -
41 -inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs
42 -
43 -# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to
44 -# set build version properly
45 -MY_PV="${PV%_p*}-ga"
46 -SLOT="${MY_PV%%[.+]*}"
47 -
48 -DESCRIPTION="Open source implementation of the Java programming language"
49 -HOMEPAGE="https://openjdk.java.net"
50 -SRC_URI="https://hg.${PN}.java.net/jdk-updates/jdk${SLOT}u/archive/jdk-${MY_PV}.tar.bz2 -> ${P}.tar.bz2"
51 -
52 -LICENSE="GPL-2"
53 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
54 -
55 -IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap +pch selinux source systemtap"
56 -
57 -COMMON_DEPEND="
58 - media-libs/freetype:2=
59 - media-libs/giflib:0/7
60 - media-libs/libpng:0=
61 - media-libs/lcms:2=
62 - sys-libs/zlib
63 - virtual/jpeg:0=
64 - systemtap? ( dev-util/systemtap )
65 -"
66 -
67 -# Many libs are required to build, but not to run, make is possible to remove
68 -# by listing conditionally in RDEPEND unconditionally in DEPEND
69 -RDEPEND="
70 - ${COMMON_DEPEND}
71 - >=sys-apps/baselayout-java-0.1.0-r1
72 - !headless-awt? (
73 - x11-libs/libX11
74 - x11-libs/libXext
75 - x11-libs/libXi
76 - x11-libs/libXrandr
77 - x11-libs/libXrender
78 - x11-libs/libXt
79 - x11-libs/libXtst
80 - )
81 - alsa? ( media-libs/alsa-lib )
82 - cups? ( net-print/cups )
83 - selinux? ( sec-policy/selinux-java )
84 -"
85 -
86 -DEPEND="
87 - ${COMMON_DEPEND}
88 - app-arch/zip
89 - media-libs/alsa-lib
90 - net-print/cups
91 - x11-base/xorg-proto
92 - x11-libs/libX11
93 - x11-libs/libXext
94 - x11-libs/libXi
95 - x11-libs/libXrandr
96 - x11-libs/libXrender
97 - x11-libs/libXt
98 - x11-libs/libXtst
99 - javafx? ( dev-java/openjfx:${SLOT}= )
100 - || (
101 - dev-java/openjdk-bin:${SLOT}
102 - dev-java/openjdk:${SLOT}
103 - )
104 -"
105 -
106 -REQUIRED_USE="javafx? ( alsa !headless-awt )"
107 -
108 -S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
109 -
110 -# The space required to build varies wildly depending on USE flags,
111 -# ranging from 2GB to 16GB. This function is certainly not exact but
112 -# should be close enough to be useful.
113 -openjdk_check_requirements() {
114 - local M
115 - M=2048
116 - M=$(( $(usex jbootstrap 2 1) * $M ))
117 - M=$(( $(usex debug 3 1) * $M ))
118 - M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M ))
119 -
120 - CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
121 -}
122 -
123 -pkg_pretend() {
124 - openjdk_check_requirements
125 - if [[ ${MERGE_TYPE} != binary ]]; then
126 - has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876"
127 - fi
128 -}
129 -
130 -pkg_setup() {
131 - openjdk_check_requirements
132 - java-vm-2_pkg_setup
133 -
134 - JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}"
135 - JAVA_PKG_WANT_SOURCE="${SLOT}"
136 - JAVA_PKG_WANT_TARGET="${SLOT}"
137 -
138 - # The nastiness below is necessary while the gentoo-vm USE flag is
139 - # masked. First we call java-pkg-2_pkg_setup if it looks like the
140 - # flag was unmasked against one of the possible build VMs. If not,
141 - # we try finding one of them in their expected locations. This would
142 - # have been slightly less messy if openjdk-bin had been installed to
143 - # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env
144 - # file but disable it so that it would not normally be selectable.
145 -
146 - local vm
147 - for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
148 - if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then
149 - java-pkg-2_pkg_setup
150 - return
151 - fi
152 - done
153 -
154 - if has_version --host-root dev-java/openjdk:${SLOT}; then
155 - export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT}
156 - else
157 - if [[ ${MERGE_TYPE} != "binary" ]]; then
158 - JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT})
159 - [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
160 - JDK_HOME=${JDK_HOME#*/}
161 - JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*}
162 - export JDK_HOME
163 - fi
164 - fi
165 -}
166 -
167 -src_prepare() {
168 - default
169 - chmod +x configure || die
170 -}
171 -
172 -src_configure() {
173 - # Work around stack alignment issue, bug #647954. in case we ever have x86
174 - use x86 && append-flags -mincoming-stack-boundary=2
175 -
176 - # Work around -fno-common ( GCC10 default ), bug #713180
177 - append-flags -fcommon
178 -
179 - # Enabling full docs appears to break doc building. If not
180 - # explicitly disabled, the flag will get auto-enabled if pandoc and
181 - # graphviz are detected. pandoc has loads of dependencies anyway.
182 -
183 - local myconf=(
184 - --disable-ccache
185 - --enable-full-docs=no
186 - --with-boot-jdk="${JDK_HOME}"
187 - --with-extra-cflags="${CFLAGS}"
188 - --with-extra-cxxflags="${CXXFLAGS}"
189 - --with-extra-ldflags="${LDFLAGS}"
190 - --with-giflib=system
191 - --with-lcms=system
192 - --with-libjpeg=system
193 - --with-libpng=system
194 - --with-native-debug-symbols=$(usex debug internal none)
195 - --with-vendor-name="Gentoo"
196 - --with-vendor-url="https://gentoo.org"
197 - --with-vendor-bug-url="https://bugs.gentoo.org"
198 - --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
199 - --with-vendor-version-string="${PVR}"
200 - --with-version-pre=""
201 - --with-version-string="${PV%_p*}"
202 - --with-version-build="${PV#*_p}"
203 - --with-zlib=system
204 - --enable-dtrace=$(usex systemtap yes no)
205 - --enable-headless-only=$(usex headless-awt yes no)
206 - $(tc-is-clang && echo "--with-toolchain-type=clang")
207 - )
208 -
209 - if use javafx; then
210 - local zip="${EROOT%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
211 - if [[ -r ${zip} ]]; then
212 - myconf+=( --with-import-modules="${zip}" )
213 - else
214 - die "${zip} not found or not readable"
215 - fi
216 - fi
217 -
218 - # PaX breaks pch, bug #601016
219 - if use pch && ! host-is-pax; then
220 - myconf+=( --enable-precompiled-headers )
221 - else
222 - myconf+=( --disable-precompiled-headers )
223 - fi
224 -
225 - (
226 - unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS
227 - CFLAGS= CXXFLAGS= LDFLAGS= \
228 - CONFIG_SITE=/dev/null \
229 - econf "${myconf[@]}"
230 - )
231 -}
232 -
233 -src_compile() {
234 - local myemakeargs=(
235 - JOBS=$(makeopts_jobs)
236 - LOG=debug
237 - CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
238 - $(usex doc docs '')
239 - $(usex jbootstrap bootcycle-images product-images)
240 - )
241 - emake "${myemakeargs[@]}" -j1 #nowarn
242 -}
243 -
244 -src_install() {
245 - local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
246 - local ddest="${ED}${dest#/}"
247 -
248 - cd "${S}"/build/*-release/images/jdk || die
249 -
250 - # Create files used as storage for system preferences.
251 - mkdir .systemPrefs || die
252 - touch .systemPrefs/.system.lock || die
253 - touch .systemPrefs/.systemRootModFile || die
254 -
255 - # Oracle and IcedTea have libjsoundalsa.so depending on
256 - # libasound.so.2 but OpenJDK only has libjsound.so. Weird.
257 - if ! use alsa ; then
258 - rm -v lib/libjsound.* || die
259 - fi
260 -
261 - if ! use examples ; then
262 - rm -vr demo/ || die
263 - fi
264 -
265 - if ! use source ; then
266 - rm -v lib/src.zip || die
267 - fi
268 -
269 - rm -v lib/security/cacerts || die
270 -
271 - dodir "${dest}"
272 - cp -pPR * "${ddest}" || die
273 -
274 - dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
275 -
276 - # must be done before running itself
277 - java-vm_set-pax-markings "${ddest}"
278 -
279 - einfo "Creating the Class Data Sharing archives and disabling usage tracking"
280 - "${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
281 -
282 - use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
283 - java-vm_revdep-mask
284 - java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
285 -
286 - if use doc ; then
287 - docinto html
288 - dodoc -r "${S}"/build/*-release/images/docs/*
289 - dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
290 - fi
291 -}
292 -
293 -pkg_postinst() {
294 - java-vm-2_pkg_postinst
295 -
296 - if use gentoo-vm ; then
297 - ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK"
298 - ewarn "recognised by the system. This will almost certainly break"
299 - ewarn "many java ebuilds as they are not ready for openjdk-11"
300 - else
301 - ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK"
302 - ewarn "will not be recognised by the system. For example, simply calling"
303 - ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
304 - ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its"
305 - ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}."
306 - fi
307 -}
308
309 diff --git a/dev-java/openjdk/openjdk-11.0.9_p11.ebuild b/dev-java/openjdk/openjdk-11.0.9_p11.ebuild
310 deleted file mode 100644
311 index ca908bb4c18..00000000000
312 --- a/dev-java/openjdk/openjdk-11.0.9_p11.ebuild
313 +++ /dev/null
314 @@ -1,272 +0,0 @@
315 -# Copyright 1999-2021 Gentoo Authors
316 -# Distributed under the terms of the GNU General Public License v2
317 -
318 -EAPI=6
319 -
320 -inherit autotools check-reqs flag-o-matic java-pkg-2 java-vm-2 multiprocessing pax-utils toolchain-funcs
321 -
322 -# we need -ga tag to fetch tarball and unpack it, but exact number everywhere else to
323 -# set build version properly
324 -MY_PV="${PV%_p*}-ga"
325 -SLOT="${MY_PV%%[.+]*}"
326 -
327 -DESCRIPTION="Open source implementation of the Java programming language"
328 -HOMEPAGE="https://openjdk.java.net"
329 -SRC_URI="https://hg.${PN}.java.net/jdk-updates/jdk${SLOT}u/archive/jdk-${MY_PV}.tar.bz2 -> ${P}.tar.bz2"
330 -
331 -LICENSE="GPL-2"
332 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
333 -
334 -IUSE="alsa cups debug doc examples gentoo-vm headless-awt javafx +jbootstrap +pch selinux source systemtap"
335 -
336 -COMMON_DEPEND="
337 - media-libs/freetype:2=
338 - media-libs/giflib:0/7
339 - media-libs/libpng:0=
340 - media-libs/lcms:2=
341 - sys-libs/zlib
342 - virtual/jpeg:0=
343 - systemtap? ( dev-util/systemtap )
344 -"
345 -
346 -# Many libs are required to build, but not to run, make is possible to remove
347 -# by listing conditionally in RDEPEND unconditionally in DEPEND
348 -RDEPEND="
349 - ${COMMON_DEPEND}
350 - >=sys-apps/baselayout-java-0.1.0-r1
351 - !headless-awt? (
352 - x11-libs/libX11
353 - x11-libs/libXext
354 - x11-libs/libXi
355 - x11-libs/libXrandr
356 - x11-libs/libXrender
357 - x11-libs/libXt
358 - x11-libs/libXtst
359 - )
360 - alsa? ( media-libs/alsa-lib )
361 - cups? ( net-print/cups )
362 - selinux? ( sec-policy/selinux-java )
363 -"
364 -
365 -DEPEND="
366 - ${COMMON_DEPEND}
367 - app-arch/zip
368 - media-libs/alsa-lib
369 - net-print/cups
370 - x11-base/xorg-proto
371 - x11-libs/libX11
372 - x11-libs/libXext
373 - x11-libs/libXi
374 - x11-libs/libXrandr
375 - x11-libs/libXrender
376 - x11-libs/libXt
377 - x11-libs/libXtst
378 - javafx? ( dev-java/openjfx:${SLOT}= )
379 - || (
380 - dev-java/openjdk-bin:${SLOT}
381 - dev-java/openjdk:${SLOT}
382 - )
383 -"
384 -
385 -REQUIRED_USE="javafx? ( alsa !headless-awt )"
386 -
387 -S="${WORKDIR}/jdk${SLOT}u-jdk-${MY_PV}"
388 -
389 -# The space required to build varies wildly depending on USE flags,
390 -# ranging from 2GB to 16GB. This function is certainly not exact but
391 -# should be close enough to be useful.
392 -openjdk_check_requirements() {
393 - local M
394 - M=2048
395 - M=$(( $(usex jbootstrap 2 1) * $M ))
396 - M=$(( $(usex debug 3 1) * $M ))
397 - M=$(( $(usex doc 320 0) + $(usex source 128 0) + 192 + $M ))
398 -
399 - CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
400 -}
401 -
402 -pkg_pretend() {
403 - openjdk_check_requirements
404 - if [[ ${MERGE_TYPE} != binary ]]; then
405 - has ccache ${FEATURES} && die "FEATURES=ccache doesn't work with ${PN}, bug #677876"
406 - fi
407 -}
408 -
409 -pkg_setup() {
410 - openjdk_check_requirements
411 - java-vm-2_pkg_setup
412 -
413 - JAVA_PKG_WANT_BUILD_VM="openjdk-${SLOT} openjdk-bin-${SLOT}"
414 - JAVA_PKG_WANT_SOURCE="${SLOT}"
415 - JAVA_PKG_WANT_TARGET="${SLOT}"
416 -
417 - # The nastiness below is necessary while the gentoo-vm USE flag is
418 - # masked. First we call java-pkg-2_pkg_setup if it looks like the
419 - # flag was unmasked against one of the possible build VMs. If not,
420 - # we try finding one of them in their expected locations. This would
421 - # have been slightly less messy if openjdk-bin had been installed to
422 - # /opt/${PN}-${SLOT} or if there was a mechanism to install a VM env
423 - # file but disable it so that it would not normally be selectable.
424 -
425 - local vm
426 - for vm in ${JAVA_PKG_WANT_BUILD_VM}; do
427 - if [[ -d ${EPREFIX}/usr/lib/jvm/${vm} ]]; then
428 - java-pkg-2_pkg_setup
429 - return
430 - fi
431 - done
432 -
433 - if has_version --host-root dev-java/openjdk:${SLOT}; then
434 - export JDK_HOME=${EPREFIX}/usr/$(get_libdir)/openjdk-${SLOT}
435 - else
436 - if [[ ${MERGE_TYPE} != "binary" ]]; then
437 - JDK_HOME=$(best_version --host-root dev-java/openjdk-bin:${SLOT})
438 - [[ -n ${JDK_HOME} ]] || die "Build VM not found!"
439 - JDK_HOME=${JDK_HOME#*/}
440 - JDK_HOME=${EPREFIX}/opt/${JDK_HOME%-r*}
441 - export JDK_HOME
442 - fi
443 - fi
444 -}
445 -
446 -src_prepare() {
447 - default
448 - chmod +x configure || die
449 -}
450 -
451 -src_configure() {
452 - # Work around stack alignment issue, bug #647954. in case we ever have x86
453 - use x86 && append-flags -mincoming-stack-boundary=2
454 -
455 - # Work around -fno-common ( GCC10 default ), bug #713180
456 - append-flags -fcommon
457 -
458 - # Enabling full docs appears to break doc building. If not
459 - # explicitly disabled, the flag will get auto-enabled if pandoc and
460 - # graphviz are detected. pandoc has loads of dependencies anyway.
461 -
462 - local myconf=(
463 - --disable-ccache
464 - --enable-full-docs=no
465 - --with-boot-jdk="${JDK_HOME}"
466 - --with-extra-cflags="${CFLAGS}"
467 - --with-extra-cxxflags="${CXXFLAGS}"
468 - --with-extra-ldflags="${LDFLAGS}"
469 - --with-giflib=system
470 - --with-lcms=system
471 - --with-libjpeg=system
472 - --with-libpng=system
473 - --with-native-debug-symbols=$(usex debug internal none)
474 - --with-vendor-name="Gentoo"
475 - --with-vendor-url="https://gentoo.org"
476 - --with-vendor-bug-url="https://bugs.gentoo.org"
477 - --with-vendor-vm-bug-url="https://bugs.openjdk.java.net"
478 - --with-vendor-version-string="${PVR}"
479 - --with-version-pre=""
480 - --with-version-string="${PV%_p*}"
481 - --with-version-build="${PV#*_p}"
482 - --with-zlib=system
483 - --enable-dtrace=$(usex systemtap yes no)
484 - --enable-headless-only=$(usex headless-awt yes no)
485 - $(tc-is-clang && echo "--with-toolchain-type=clang")
486 - )
487 -
488 - if use javafx; then
489 - local zip="${EROOT%/}/usr/$(get_libdir)/openjfx-${SLOT}/javafx-exports.zip"
490 - if [[ -r ${zip} ]]; then
491 - myconf+=( --with-import-modules="${zip}" )
492 - else
493 - die "${zip} not found or not readable"
494 - fi
495 - fi
496 -
497 - # PaX breaks pch, bug #601016
498 - if use pch && ! host-is-pax; then
499 - myconf+=( --enable-precompiled-headers )
500 - else
501 - myconf+=( --disable-precompiled-headers )
502 - fi
503 -
504 - (
505 - unset _JAVA_OPTIONS JAVA JAVA_TOOL_OPTIONS JAVAC XARGS
506 - CFLAGS= CXXFLAGS= LDFLAGS= \
507 - CONFIG_SITE=/dev/null \
508 - econf "${myconf[@]}"
509 - )
510 -}
511 -
512 -src_compile() {
513 - local myemakeargs=(
514 - JOBS=$(makeopts_jobs)
515 - LOG=debug
516 - CFLAGS_WARNINGS_ARE_ERRORS= # No -Werror
517 - $(usex doc docs '')
518 - $(usex jbootstrap bootcycle-images product-images)
519 - )
520 - emake "${myemakeargs[@]}" -j1 #nowarn
521 -}
522 -
523 -src_install() {
524 - local dest="/usr/$(get_libdir)/${PN}-${SLOT}"
525 - local ddest="${ED}${dest#/}"
526 -
527 - cd "${S}"/build/*-release/images/jdk || die
528 -
529 - # Create files used as storage for system preferences.
530 - mkdir .systemPrefs || die
531 - touch .systemPrefs/.system.lock || die
532 - touch .systemPrefs/.systemRootModFile || die
533 -
534 - # Oracle and IcedTea have libjsoundalsa.so depending on
535 - # libasound.so.2 but OpenJDK only has libjsound.so. Weird.
536 - if ! use alsa ; then
537 - rm -v lib/libjsound.* || die
538 - fi
539 -
540 - if ! use examples ; then
541 - rm -vr demo/ || die
542 - fi
543 -
544 - if ! use source ; then
545 - rm -v lib/src.zip || die
546 - fi
547 -
548 - rm -v lib/security/cacerts || die
549 -
550 - dodir "${dest}"
551 - cp -pPR * "${ddest}" || die
552 -
553 - dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
554 -
555 - # must be done before running itself
556 - java-vm_set-pax-markings "${ddest}"
557 -
558 - einfo "Creating the Class Data Sharing archives and disabling usage tracking"
559 - "${ddest}/bin/java" -server -Xshare:dump -Djdk.disableLastUsageTracking || die
560 -
561 - use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
562 - java-vm_revdep-mask
563 - java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
564 -
565 - if use doc ; then
566 - docinto html
567 - dodoc -r "${S}"/build/*-release/images/docs/*
568 - dosym ../../../usr/share/doc/"${PF}" /usr/share/doc/"${PN}-${SLOT}"
569 - fi
570 -}
571 -
572 -pkg_postinst() {
573 - java-vm-2_pkg_postinst
574 -
575 - if use gentoo-vm ; then
576 - ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK"
577 - ewarn "recognised by the system. This will almost certainly break"
578 - ewarn "many java ebuilds as they are not ready for openjdk-11"
579 - else
580 - ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK"
581 - ewarn "will not be recognised by the system. For example, simply calling"
582 - ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
583 - ewarn "fully supports Java ${SLOT}. This JDK must therefore be invoked using its"
584 - ewarn "absolute location under ${EPREFIX}/usr/$(get_libdir)/${PN}-${SLOT}."
585 - fi
586 -}