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-jre-bin/
Date: Thu, 09 May 2019 23:05:52
Message-Id: 1557443097.5639d638e79f48967589eaef945193eac8607d28.gyakovlev@gentoo
1 commit: 5639d638e79f48967589eaef945193eac8607d28
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 9 23:01:27 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Thu May 9 23:04:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5639d638
7
8 dev-java/openjdk-jre-bin: revbump :11, use system-wide ca-certificates
9
10 Closes: https://bugs.gentoo.org/682308
11 Package-Manager: Portage-2.3.66, Repoman-2.3.12
12 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
13
14 .../openjdk-jre-bin-11.0.3_p7-r1.ebuild | 97 ++++++++++++++++++++++
15 1 file changed, 97 insertions(+)
16
17 diff --git a/dev-java/openjdk-jre-bin/openjdk-jre-bin-11.0.3_p7-r1.ebuild b/dev-java/openjdk-jre-bin/openjdk-jre-bin-11.0.3_p7-r1.ebuild
18 new file mode 100644
19 index 00000000000..a02b5cf2958
20 --- /dev/null
21 +++ b/dev-java/openjdk-jre-bin/openjdk-jre-bin-11.0.3_p7-r1.ebuild
22 @@ -0,0 +1,97 @@
23 +# Copyright 1999-2019 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=6
27 +
28 +inherit java-vm-2
29 +
30 +abi_uri() {
31 + echo "${2-$1}? (
32 + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jre_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz
33 + )"
34 +}
35 +
36 +MY_PV=${PV/_p/+}
37 +SLOT=${MY_PV%%[.+]*}
38 +
39 +SRC_URI="
40 + $(abi_uri x64 amd64)
41 +"
42 +
43 +DESCRIPTION="Prebuilt Java JRE binaries provided by AdoptOpenJDK"
44 +HOMEPAGE="https://adoptopenjdk.net"
45 +LICENSE="GPL-2-with-classpath-exception"
46 +KEYWORDS="~amd64"
47 +IUSE="alsa cups +gentoo-vm headless-awt nsplugin selinux +webstart"
48 +
49 +RDEPEND="
50 + media-libs/fontconfig:1.0
51 + media-libs/freetype:2
52 + >net-libs/libnet-1.1
53 + >=sys-libs/glibc-2.2.5:*
54 + sys-libs/zlib
55 + alsa? ( media-libs/alsa-lib )
56 + cups? ( net-print/cups )
57 + selinux? ( sec-policy/selinux-java )
58 + !headless-awt? (
59 + x11-libs/libX11
60 + x11-libs/libXext
61 + x11-libs/libXi
62 + x11-libs/libXrender
63 + x11-libs/libXtst
64 + )"
65 +
66 +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
67 + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )"
68 +
69 +RESTRICT="preserve-libs splitdebug"
70 +QA_PREBUILT="*"
71 +
72 +S="${WORKDIR}/jdk-${MY_PV}-jre"
73 +
74 +src_install() {
75 + local dest="/opt/${P}"
76 + local ddest="${ED%/}/${dest#/}"
77 +
78 + # Not sure why they bundle this as it's commonly available and they
79 + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea
80 + # also has an explicit dependency while Oracle seemingly dlopens it.
81 + rm -vf lib/libfreetype.so || die
82 +
83 + # Oracle and IcedTea have libjsoundalsa.so depending on
84 + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird.
85 + if ! use alsa ; then
86 + rm -v lib/libjsound.* || die
87 + fi
88 +
89 + if use headless-awt ; then
90 + rm -v lib/lib*{[jx]awt,splashscreen}* || die
91 + fi
92 +
93 + mv lib/security/cacerts lib/security/cacerts.orig || die
94 +
95 + dodir "${dest}"
96 + cp -pPR * "${ddest}" || die
97 +
98 + dosym "${EPREFIX}"/etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
99 +
100 + use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
101 + java-vm_set-pax-markings "${ddest}"
102 + java-vm_revdep-mask
103 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
104 +}
105 +
106 +pkg_postinst() {
107 + java-vm-2_pkg_postinst
108 +
109 + if use gentoo-vm ; then
110 + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JRE"
111 + ewarn "recognised by the system. This will almost certainly break things."
112 + else
113 + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JRE"
114 + ewarn "will not be recognised by the system. For example, simply calling"
115 + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
116 + ewarn "fully supports Java 11. This JRE must therefore be invoked using its"
117 + ewarn "absolute location under ${EPREFIX}/opt/${P}."
118 + fi
119 +}