www-client/brave-bin: add 1.74.48, drop 1.73.105 (#6082)
[gentoo-zh.git] / dev-java / oraclejdk-bin / oraclejdk-bin-8.391.ebuild
blob0ba03ed50c89dbf17e5975d1c090e062ba7e2569
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit java-vm-2
8 MY_PV=${PV/./u}
10 DESCRIPTION="Oracle's Java SE Development Kit"
11 HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
12 SRC_URI="jdk-${MY_PV}-linux-x64.tar.gz"
13 S="${WORKDIR}/jdk1.8.0_${PV/8./}"
14 LICENSE="OTN"
15 SLOT=$(ver_cut 1)
16 KEYWORDS="~amd64"
17 IUSE="+alsa cups headless-awt selinux +source +javafx fontconfig"
18 REQUIRED_USE="javafx? ( alsa )"
20 RDEPEND="
21 >=sys-apps/baselayout-java-0.1.0-r1
22 fontconfig? ( media-libs/fontconfig:1.0 )
23 elibc_glibc? ( >=sys-libs/glibc-2.2.5:* )
24 elibc_musl? ( sys-libs/musl )
25 alsa? ( media-libs/alsa-lib )
26 cups? ( net-print/cups )
27 selinux? ( sec-policy/selinux-java )
28 !headless-awt? (
29 x11-libs/libX11
30 x11-libs/libXext
31 x11-libs/libXi
32 x11-libs/libXrender
33 x11-libs/libXtst
35 javafx? (
36 media-libs/freetype:2
37 dev-libs/glib:2
38 dev-libs/libxml2:2
39 dev-libs/libxslt
40 media-libs/freetype:2
41 x11-libs/cairo
42 x11-libs/gtk+:2
43 x11-libs/gtk+:3
44 x11-libs/libX11
45 x11-libs/libXtst
46 x11-libs/libXxf86vm
47 x11-libs/pango
48 virtual/opengl
51 pkg_nofetch() {
52 ewarn "\e[1;33m############################################################################## \e[0m"
53 ewarn "\e[1;33m# If you're seeing this warning on your screen,please pay attention: # \e[0m"
54 ewarn "\e[1;33m# Portage can not download JDK tar file directly from Oracle's website # \e[0m"
55 ewarn "\e[1;33m# Please download it manually to your distfiles directory # \e[0m"
56 ewarn "\e[1;33m# Distfile directory is '/var/cache/distfile' by default # \e[0m"
57 ewarn "\e[1;33m# Please download 'x64 Compressed Archive' file from following url: # \e[0m"
58 ewarn "\e[1;33m# https://www.oracle.com/java/technologies/downloads/#java8-linux # \e[0m"
59 ewarn "\e[1;33m# If the above mentioned URL does not point to the correct version anymore, # \e[0m"
60 ewarn "\e[1;33m# please download the file from Oracle's Java download archive # \e[0m"
61 ewarn "\e[1;33m# Do Not Continue untill you put it to your distfiles directory # \e[0m"
62 ewarn "\e[1;33m############################################################################## \e[0m"
63 ewarn "\e[1;33m# Portage没法直接从甲骨文官网下载jdk压缩包文件\e[0m"
64 ewarn "\e[1;33m# 请先别急着继续,仔细读上述提示!!\e[0m"
67 RESTRICT="preserve-libs splitdebug fetch"
68 QA_PREBUILT="*"
70 src_install() {
71 local dest="/opt/${P}"
72 local ddest="${ED}/${dest#/}"
73 # Notion:
74 # There is a libav*.so* related problem not yet get fixed
75 # Maybe downgrading ffmpeg version can resolve this,or maybe should wait for Oracle to make
76 # jdk use high versioned .so stuff.
77 rm COPYRIGHT LICENSE README.html THIRDPARTYLICENSEREADME-JAVAFX.txt THIRDPARTYLICENSEREADME.txt || die
79 if ! use alsa ; then
80 rm -v jre/lib/*/libjsoundalsa.so* || die
83 if use headless-awt ; then
84 rm -fvr {,jre/}lib/*/lib*{[jx]awt,splashscreen}* \
85 {,jre/}bin/policytool bin/appletviewer || die
88 if ! use source ; then
89 rm -v src.zip javafx-src.zip || die
90 elif ! use javafx ; then
91 rm -v javafx-src.zip jre/lib/*/lib*{decora,fx,glass,prism}* \
92 jre/lib/*/libgstreamer-lite.* {,jre/}lib/{,ext/}*fx* \
93 bin/*javafx* bin/javapackager || die
96 if use fontconfig ; then
97 rm -v jre/lib/fontconfig.* || die
100 rm -v jre/lib/security/cacerts || die
101 dosym ../../../../../etc/ssl/certs/java/cacerts \
102 "${dest}"/jre/lib/security/cacerts
104 dodir "${dest}"
105 cp -pPR * "${ddest}" || die
107 # provide stable symlink
108 dosym "${P}" "/opt/${PN}-${SLOT}"
110 java-vm_install-env "${FILESDIR}"/"${PN}"-"${SLOT}".env.sh
111 java-vm_set-pax-markings "${ddest}"
112 java-vm_revdep-mask
113 java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
116 pkg_postinst() {
117 java-vm-2_pkg_postinst
118 if ! use headless-awt && ! use javafx ; then
119 ewarn "\e[1;33mYou have disabled the javafx flag. Some modern desktop Java applications\e[0m"
120 ewarn "\e[1;33mrequire this and they may fail with a confusing error message.\e[0m"