www-client/brave-bin: add 1.74.48, drop 1.73.105 (#6082)
[gentoo-zh.git] / dev-java / oraclejdk-bin / oraclejdk-bin-21.0.1.ebuild
blob8d4a9a13bc85e5d800c438dd59a5fbc98394a597
1 # Copyright 2023-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit java-vm-2
8 DESCRIPTION="Oracle's Java SE Development Kit"
9 HOMEPAGE="https://www.oracle.com/java"
10 SRC_URI="https://download.oracle.com/java/21/archive/jdk-${PV}_linux-x64_bin.tar.gz"
11 S="${WORKDIR}/jdk-${PV}"
12 LICENSE="NFTC"
13 SLOT="21"
14 KEYWORDS="~amd64"
15 IUSE="alsa +commercial cups headless-awt +source"
16 RESTRICT="bindist mirror preserve-libs strip"
17 QA_PREBUILT="*"
19 RDEPEND="(
20 alsa? ( media-libs/alsa-lib )
21 media-libs/fontconfig:1.0
22 media-libs/freetype:2
23 media-libs/harfbuzz
24 !headless-awt? (
25 x11-libs/libX11
26 x11-libs/libXext
27 x11-libs/libXi
28 x11-libs/libXrender
29 x11-libs/libXtst
31 cups? ( net-print/cups )
33 src_install() {
34 local dest="/opt/${P}"
35 local ddest="${ED}/${dest#/}"
36 rm LICENSE README release || die
37 # Create files used as storage for system preferences.
38 mkdir .systemPrefs || die
39 touch .systemPrefs/.system.lock || die
40 touch .systemPrefs/.systemRootModFile || die
41 # Seems like that we do not need alsa anymore
42 if ! use alsa ; then
43 rm -v lib/libjsound.so || die
46 if ! use commercial ; then
47 rm -vfr bin/jfr jmods/*.jfr.* lib/jfr* legal/*.jfr || die
50 if use headless-awt ; then
51 rm -vf lib/lib*{[jx]awt,splashscreen}* || die
54 if ! use source ; then
55 rm -v lib/src.zip || die
58 rm -v lib/security/cacerts || die
59 dosym -r /etc/ssl/certs/java/cacerts "${dest}"/lib/security/cacerts
61 dodir "${dest}"
62 cp -pPR * "${ddest}" || die
64 java-vm_install-env "${FILESDIR}"/"${PN}"-"${SLOT}".env.sh
65 java-vm_set-pax-markings "${ddest}"
66 java-vm_revdep-mask
67 java-vm_sandbox-predict /dev/random /proc/self/coredump_filter