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-bin/, dev-java/openjdk-bin/files/
Date: Fri, 01 Feb 2019 09:09:58
Message-Id: 1549011769.e52efd6be230adda909f76e6cb6166bc53d38c10.gyakovlev@gentoo
1 commit: e52efd6be230adda909f76e6cb6166bc53d38c10
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 1 08:19:22 2019 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 1 09:02:49 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e52efd6b
7
8 dev-java/openjdk-bin: add ~arm64 only openjdk-bin:8
9
10 Bug: https://bugs.gentoo.org/672058
11 Package-Manager: Portage-2.3.59, Repoman-2.3.12
12 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
13
14 dev-java/openjdk-bin/Manifest | 1 +
15 dev-java/openjdk-bin/files/openjdk-bin-8.env.sh | 16 ++++
16 dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild | 101 ++++++++++++++++++++++
17 3 files changed, 118 insertions(+)
18
19 diff --git a/dev-java/openjdk-bin/Manifest b/dev-java/openjdk-bin/Manifest
20 index b22583da608..8214785139f 100644
21 --- a/dev-java/openjdk-bin/Manifest
22 +++ b/dev-java/openjdk-bin/Manifest
23 @@ -4,3 +4,4 @@ DIST OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.1_13.tar.gz 179520284 BLAKE2B 32a
24 DIST OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.2_7.tar.gz 180394013 BLAKE2B b5b82b6cd4121e2fbf66c948435bc84d549a11a793310bf0624898562005d5fc01a2f2de84a18517a75ccb2ed7d9f5173dc0a087500eb897e8d7461838991af1 SHA512 5f1a54e7d2456b42e23488b3699b09d82c57f3cb7056684a15f5aa19b992f4b1638acac716d6ed15c0a409ff1953022892ea55f7ed0542d210f5fd43f33fd8e0
25 DIST OpenJDK11U-jdk_x64_linux_hotspot_11.0.1_13.tar.gz 195710782 BLAKE2B a374afea8de4333488294dcb200e235f7cc42309a56e693a9b5434dc74d0189b57c26adc93ef22454a4ed05f44b90afa8fdfc016feb022c1eaeb706044581f24 SHA512 b5e55cd32daa3b30fb84b8f4fed0ef70e4f8e3e153974c0c9fa0fcdf22cade99613da93f2289798b625adde24d9a1c4c4808a139e9f2feb2543b05f273f3bdd8
26 DIST OpenJDK11U-jdk_x64_linux_hotspot_11.0.2_7.tar.gz 195593592 BLAKE2B 038c88dd4475842ffd27afc9249925baea0230cd993a963e13c2e090a0f6332fbeaebefae5b5e98026a12a7d94696633507a9d08af469b0227372088b5cd4869 SHA512 f9f4d168105e499b0da4923c6fe18c31ea6f6a24a48fc9d47b643460316d75de273f8f6dcbd43c9df6efcfb77127182dab8125c55f63200c5ff53cc9eb0ddcdc
27 +DIST OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gz 75382012 BLAKE2B 9521bb3d0dc08d5069108bb56594d401cbadf7a290652a39c7379e6ded530044e85f1ffae1cd3eb7e881d7c283c06463e6f8b76602d03a7bf5b188b1004f5daf SHA512 156f7a57f095095b72edb4bfc766d575795e496b006fb994566b0207d346e89863cf377ce97290bf1b47923c5d6aee5558eaa7a54f394f95a270b1cfec4308e2
28
29 diff --git a/dev-java/openjdk-bin/files/openjdk-bin-8.env.sh b/dev-java/openjdk-bin/files/openjdk-bin-8.env.sh
30 new file mode 100644
31 index 00000000000..264572a4b21
32 --- /dev/null
33 +++ b/dev-java/openjdk-bin/files/openjdk-bin-8.env.sh
34 @@ -0,0 +1,16 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +VERSION="AdoptOpenJDK ${PV}"
39 +JAVA_HOME="${EPREFIX}/opt/${P}"
40 +JDK_HOME="${EPREFIX}/opt/${P}"
41 +JAVAC="\${JAVA_HOME}/bin/javac"
42 +PATH="\${JAVA_HOME}/bin"
43 +ROOTPATH="\${JAVA_HOME}/bin"
44 +LDPATH="\${JAVA_HOME}/lib/:\${JAVA_HOME}/lib/server/"
45 +MANPATH="\${JAVA_HOME}/man"
46 +PROVIDES_TYPE="JDK JRE"
47 +PROVIDES_VERSION="1.${SLOT}"
48 +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"
49 +GENERATION="2"
50 +ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
51
52 diff --git a/dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild b/dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild
53 new file mode 100644
54 index 00000000000..baff27abbc5
55 --- /dev/null
56 +++ b/dev-java/openjdk-bin/openjdk-bin-8.191_p12.ebuild
57 @@ -0,0 +1,101 @@
58 +# Copyright 1999-2019 Gentoo Authors
59 +# Distributed under the terms of the GNU General Public License v2
60 +
61 +EAPI=6
62 +
63 +inherit eapi7-ver java-vm-2
64 +
65 +abi_uri() {
66 + echo "${2-$1}? (
67 + https://github.com/AdoptOpenJDK/openjdk${SLOT}-binaries/releases/download/jdk${MY_PV}/OpenJDK8U-jdk_${1}_linux_hotspot_${MY_PV/-/}.tar.gz
68 + )"
69 +}
70 +
71 +MY_PV=$(ver_rs 1 'u' 2 '-' ${PV//p/b})
72 +SLOT="$(ver_cut 1)"
73 +
74 +DESCRIPTION="Prebuilt Java JDK binaries provided by AdoptOpenJDK"
75 +HOMEPAGE="https://adoptopenjdk.net"
76 +SRC_URI="
77 + $(abi_uri aarch64 arm64)
78 +"
79 +
80 +LICENSE="GPL-2-with-classpath-exception"
81 +KEYWORDS="~arm64"
82 +
83 +IUSE="alsa cups doc examples +gentoo-vm headless-awt nsplugin selinux source +webstart"
84 +
85 +RDEPEND="
86 + media-libs/fontconfig:1.0
87 + media-libs/freetype:2
88 + >=sys-libs/glibc-2.2.5:*
89 + sys-libs/zlib
90 + alsa? ( media-libs/alsa-lib )
91 + cups? ( net-print/cups )
92 + doc? ( dev-java/java-sdk-docs:1.${SLOT} )
93 + selinux? ( sec-policy/selinux-java )
94 + !headless-awt? (
95 + x11-libs/libX11
96 + x11-libs/libXext
97 + x11-libs/libXi
98 + x11-libs/libXrender
99 + x11-libs/libXtst
100 + )"
101 +
102 +PDEPEND="webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
103 + nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )"
104 +
105 +RESTRICT="preserve-libs splitdebug"
106 +QA_PREBUILT="*"
107 +
108 +S="${WORKDIR}/jdk${MY_PV}"
109 +
110 +src_install() {
111 + local dest="/opt/${P}"
112 + local ddest="${ED}${dest#/}"
113 +
114 + rm ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README || die
115 +
116 + # this does not exist on arm64 hence -f
117 + rm -fv jre/lib/*/libfreetype.so* || die
118 +
119 + if ! use alsa ; then
120 + rm -v jre/lib/*/libjsoundalsa.so* || die
121 + fi
122 +
123 + if ! use examples ; then
124 + rm -vr sample || die
125 + fi
126 +
127 + if use headless-awt ; then
128 + rm -fvr */jre/lib/*/lib*{[jx]awt,splashscreen}* \
129 + {,jre/}bin/policytool bin/appletviewer || die
130 + fi
131 +
132 + if ! use source ; then
133 + rm -v src.zip || die
134 + fi
135 +
136 + dodir "${dest}"
137 + cp -pPR * "${ddest}" || die
138 +
139 + use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
140 + java-vm_set-pax-markings "${ddest}"
141 + java-vm_revdep-mask
142 + java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
143 +}
144 +
145 +pkg_postinst() {
146 + java-vm-2_pkg_postinst
147 +
148 + if use gentoo-vm ; then
149 + ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK"
150 + ewarn "recognised by the system. This will almost certainly break things."
151 + else
152 + ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK"
153 + ewarn "will not be recognised by the system. For example, simply calling"
154 + ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
155 + ewarn "fully supports OpenJDK 8. This JDK must therefore be invoked using its"
156 + ewarn "absolute location under ${EPREFIX}/opt/${P}."
157 + fi
158 +}