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