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/
Date: Fri, 08 Oct 2021 15:03:00
Message-Id: 1633705136.9c51b1abf1fc4bf7987fc51d55ade7059d3caa33.gyakovlev@gentoo
1 commit: 9c51b1abf1fc4bf7987fc51d55ade7059d3caa33
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 8 13:48:05 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 8 14:58:56 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c51b1ab
7
8 dev-java/openjdk-bin: remove stray file
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 dev-java/openjdk-bin/2 | 135 -------------------------------------------------
13 1 file changed, 135 deletions(-)
14
15 diff --git a/dev-java/openjdk-bin/2 b/dev-java/openjdk-bin/2
16 deleted file mode 100644
17 index e12c387ddb3..00000000000
18 --- a/dev-java/openjdk-bin/2
19 +++ /dev/null
20 @@ -1,135 +0,0 @@
21 -# Copyright 1999-2021 Gentoo Authors
22 -# Distributed under the terms of the GNU General Public License v2
23 -
24 -EAPI=6
25 -
26 -inherit java-vm-2 toolchain-funcs
27 -
28 -abi_uri() {
29 - local os=linux
30 - case ${2} in
31 - *-macos) os=mac ;;
32 - *-solaris) os=solaris ;;
33 - esac
34 - echo "${2-$1}? (
35 - https://github.com/adoptium/temurin${SLOT}-binaries/releases/download/jdk-${MY_PV}/OpenJDK${SLOT}U-jdk_${1}_${os}_hotspot_${MY_PV//+/_}.tar.gz
36 - )"
37 -}
38 -
39 -MY_PV=${PV/_p/+}
40 -SLOT=${MY_PV%%[.+]*}
41 -
42 -SRC_URI="
43 - $(abi_uri aarch64 arm64)
44 - $(abi_uri ppc64le ppc64)
45 - $(abi_uri x64 amd64)
46 - $(abi_uri x64 x64-macos)
47 -"
48 -
49 -DESCRIPTION="Prebuilt Java JDK binaries provided by Eclipse Temurin"
50 -HOMEPAGE="https://adoptium.net"
51 -LICENSE="GPL-2-with-classpath-exception"
52 -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x64-macos"
53 -IUSE="alsa cups +gentoo-vm headless-awt selinux source"
54 -
55 -RDEPEND="
56 - >=sys-apps/baselayout-java-0.1.0-r1
57 - kernel_linux? (
58 - media-libs/fontconfig:1.0
59 - media-libs/freetype:2
60 - media-libs/harfbuzz
61 - >=sys-libs/glibc-2.2.5:*
62 - sys-libs/zlib
63 - alsa? ( media-libs/alsa-lib )
64 - cups? ( net-print/cups )
65 - selinux? ( sec-policy/selinux-java )
66 - !headless-awt? (
67 - x11-libs/libX11
68 - x11-libs/libXext
69 - x11-libs/libXi
70 - x11-libs/libXrender
71 - x11-libs/libXtst
72 - )
73 - )"
74 -
75 -RESTRICT="preserve-libs splitdebug"
76 -QA_PREBUILT="*"
77 -
78 -S="${WORKDIR}/jdk-${MY_PV}"
79 -
80 -pkg_pretend() {
81 - if [[ "$(tc-is-softfloat)" != "no" ]]; then
82 - die "These binaries require a hardfloat system."
83 - fi
84 -}
85 -
86 -src_unpack() {
87 - default
88 - if [[ ${A} == *_mac_* ]] ; then
89 - mv -v "${S}/Contents/Home/"* "${S}" || die
90 - rm -Rf "${S}/Contents" # drop macOS executable
91 - fi
92 -}
93 -
94 -src_install() {
95 - local dest="/opt/${P}"
96 - local ddest="${ED%/}/${dest#/}"
97 -
98 - # on macOS if they would exist they would be called .dylib, but most
99 - # importantly, there are no different providers, so everything
100 - # that's shipped works.
101 - if [[ ${A} != *_mac_* ]] ; then
102 - # Not sure why they bundle this as it's commonly available and they
103 - # only do so on x86_64. It's needed by libfontmanager.so. IcedTea
104 - # also has an explicit dependency while Oracle seemingly dlopens it.
105 - rm -vf lib/libfreetype.so || die
106 -
107 - # prefer system copy # https://bugs.gentoo.org/776676
108 - rm -vf lib/libharfbuzz.so || die
109 -
110 - # Oracle and IcedTea have libjsoundalsa.so depending on
111 - # libasound.so.2 but AdoptOpenJDK only has libjsound.so. Weird.
112 - if ! use alsa ; then
113 - rm -v lib/libjsound.* || die
114 - fi
115 -
116 - if use headless-awt ; then
117 - rm -v lib/lib*{[jx]awt,splashscreen}* || die
118 - fi
119 - fi
120 -
121 - if ! use source ; then
122 - rm -v lib/src.zip || die
123 - fi
124 -
125 - rm -v lib/security/cacerts || die
126 - dosym ../../../../etc/ssl/certs/java/cacerts \
127 - "${dest}"/lib/security/cacerts
128 -
129 - dodir "${dest}"
130 - cp -pPR * "${ddest}" || die
131 -
132 - # provide stable symlink
133 - dosym "${P}" "/opt/${PN}-${SLOT}"
134 -
135 - use gentoo-vm && java-vm_install-env "${FILESDIR}"/${PN}-${SLOT}.env.sh
136 - java-vm_set-pax-markings "${ddest}"
137 - java-vm_revdep-mask
138 - java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
139 -}
140 -
141 -pkg_postinst() {
142 - java-vm-2_pkg_postinst
143 -
144 - if use gentoo-vm ; then
145 - ewarn "WARNING! You have enabled the gentoo-vm USE flag, making this JDK"
146 - ewarn "recognised by the system. This will almost certainly break"
147 - ewarn "many java ebuilds as they are not ready for openjdk-11"
148 - else
149 - ewarn "The experimental gentoo-vm USE flag has not been enabled so this JDK"
150 - ewarn "will not be recognised by the system. For example, simply calling"
151 - ewarn "\"java\" will launch a different JVM. This is necessary until Gentoo"
152 - ewarn "fully supports Java 11. This JDK must therefore be invoked using its"
153 - ewarn "absolute location under ${EPREFIX}/opt/${P}."
154 - fi
155 -}