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/, dev-java/openjdk-jre-bin/files/
Date: Wed, 17 Apr 2019 22:22:59
Message-Id: 1555527400.c911af24a08f45287d97080fbad1ace48c4aa5b5.gyakovlev@gentoo
1 commit: c911af24a08f45287d97080fbad1ace48c4aa5b5
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 17 18:48:01 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 17 18:56:40 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c911af24
7
8 dev-java/openjdk-jre-bin: introduce opejdk-jre-bin:11
9
10 Package-Manager: Portage-2.3.63, Repoman-2.3.12
11 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
12
13 dev-java/openjdk-jre-bin/Manifest | 1 +
14 .../files/openjdk-jre-bin-11.env.sh | 16 ++++
15 .../openjdk-jre-bin-11.0.2_p9.ebuild | 93 ++++++++++++++++++++++
16 3 files changed, 110 insertions(+)
17
18 diff --git a/dev-java/openjdk-jre-bin/Manifest b/dev-java/openjdk-jre-bin/Manifest
19 index cb18026f0a4..d9d0ed15a23 100644
20 --- a/dev-java/openjdk-jre-bin/Manifest
21 +++ b/dev-java/openjdk-jre-bin/Manifest
22 @@ -1 +1,2 @@
23 +DIST OpenJDK11U-jre_x64_linux_hotspot_11.0.2_9.tar.gz 41525058 BLAKE2B da456e8415ef45d07968c12082f2351910284b47bac92a952d4962fbc4c63cb2fa006696b6b175e0d1073b1fca76cca61460465d0959afe80d2f5ce9006d9350 SHA512 96b527be34c49e6351bed0d000153c1bc9491cf89f8a7f90190feccd2984cce1e3d18747e108d476c4417f15947d436f20cd34fe88f8126edecf4a789d725b0a
24 DIST OpenJDK8U-jre_x64_linux_hotspot_8u202b08.tar.gz 40856726 BLAKE2B d9d4599989a0232bcc145aaf58b20dbfcedbe33adb2b3ee65b7e726dea350210f66eb81b321268a29d3234244c517642cfe908531242afb220509666e02c0617 SHA512 f9bb03cd0876f6b3b36d8ba821a14648b5ac2ec6dc6eefb95dc333aae77b55c940153cdd1715b21feaf7d7f2148bf8c272777c8afab911965e514f9792287962
25
26 diff --git a/dev-java/openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh b/dev-java/openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh
27 new file mode 100644
28 index 00000000000..ec0dca401e6
29 --- /dev/null
30 +++ b/dev-java/openjdk-jre-bin/files/openjdk-jre-bin-11.env.sh
31 @@ -0,0 +1,16 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +VERSION="AdoptOpenJDK JRE ${PV}"
36 +JAVA_HOME="${EPREFIX}/opt/${P}"
37 +JDK_HOME="${EPREFIX}/opt/${P}"
38 +JAVAC="\${JAVA_HOME}/bin/javac"
39 +PATH="\${JAVA_HOME}/bin"
40 +ROOTPATH="\${JAVA_HOME}/bin"
41 +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/"
42 +MANPATH="\${JAVA_HOME}/man"
43 +PROVIDES_TYPE="JRE"
44 +PROVIDES_VERSION="${SLOT}"
45 +BOOTCLASSPATH=""
46 +GENERATION="2"
47 +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
48
49 diff --git a/dev-java/openjdk-jre-bin/openjdk-jre-bin-11.0.2_p9.ebuild b/dev-java/openjdk-jre-bin/openjdk-jre-bin-11.0.2_p9.ebuild
50 new file mode 100644
51 index 00000000000..1f10efc0264
52 --- /dev/null
53 +++ b/dev-java/openjdk-jre-bin/openjdk-jre-bin-11.0.2_p9.ebuild
54 @@ -0,0 +1,93 @@
55 +# Copyright 1999-2019 Gentoo Authors
56 +# Distributed under the terms of the GNU General Public License v2
57 +
58 +EAPI=6
59 +
60 +inherit java-vm-2
61 +
62 +abi_uri() {
63 + echo "${2-$1}? (
64 + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jre_${1}_linux_hotspot_${MY_PV//+/_}.tar.gz
65 + )"
66 +}
67 +
68 +MY_PV=${PV/_p/+}
69 +SLOT=${MY_PV%%[.+]*}
70 +
71 +SRC_URI="
72 + $(abi_uri x64 amd64)
73 +"
74 +
75 +DESCRIPTION="Prebuilt Java JRE binaries provided by AdoptOpenJDK"
76 +HOMEPAGE="https://adoptopenjdk.net"
77 +LICENSE="GPL-2-with-classpath-exception"
78 +KEYWORDS="~amd64"
79 +IUSE="alsa cups +gentoo-vm headless-awt nsplugin selinux +webstart"
80 +
81 +RDEPEND="
82 + media-libs/fontconfig:1.0
83 + media-libs/freetype:2
84 + >net-libs/libnet-1.1
85 + >=sys-libs/glibc-2.2.5:*
86 + sys-libs/zlib
87 + alsa? ( media-libs/alsa-lib )
88 + cups? ( net-print/cups )
89 + selinux? ( sec-policy/selinux-java )
90 + !headless-awt? (
91 + x11-libs/libX11
92 + x11-libs/libXext
93 + x11-libs/libXi
94 + x11-libs/libXrender
95 + x11-libs/libXtst
96 + )"
97 +
98 +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
99 + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )"
100 +
101 +RESTRICT="preserve-libs splitdebug"
102 +QA_PREBUILT="*"
103 +
104 +S="${WORKDIR}/jdk-${MY_PV}-jre"
105 +
106 +src_install() {
107 + local dest="/opt/${P}"
108 + local ddest="${ED}${dest#/}"
109 +
110 + # Not sure why they bundle this as it's commonly available and they
111 + # only do so on x86_64. It's needed by libfontmanager.so. IcedTea
112 + # also has an explicit dependency while Oracle seemingly dlopens it.
113 + rm -vf lib/libfreetype.so || die
114 +
115 + # Oracle and IcedTea have libjsoundalsa.so depending on
116 + # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird.
117 + if ! use alsa ; then
118 + rm -v lib/libjsound.* || die
119 + fi
120 +
121 + if use headless-awt ; then
122 + rm -v lib/lib*{[jx]awt,splashscreen}* || die
123 + fi
124 +
125 + dodir "${dest}"
126 + cp -pPR * "${ddest}" || die
127 +
128 + use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
129 + java-vm_set-pax-markings "${ddest}"
130 + java-vm_revdep-mask
131 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
132 +}
133 +
134 +pkg_postinst() {
135 + java-vm-2_pkg_postinst
136 +
137 + if use gentoo-vm ; then
138 + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JRE"
139 + ewarn "recognised by the system. This will almost certainly break things."
140 + else
141 + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JRE"
142 + ewarn "will not be recognised by the system. For example, simply calling"
143 + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
144 + ewarn "fully supports Java 11. This JRE must therefore be invoked using its"
145 + ewarn "absolute location under ${EPREFIX}/opt/${P}."
146 + fi
147 +}