1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit java-vm-2 multilib-build toolchain-funcs
10 ${BASE_URI}/${PN}-core-${PV}${3+-r${3}}-${1}.tar.xz
11 examples? ( ${BASE_URI}/${PN}-examples-${PV}${3+-r${3}}-${1}.tar.xz )
15 BASE_URI="https://dev.gentoo.org/~gyakovlev/distfiles"
17 doc? ( ${BASE_URI}/${PN}-doc-${PV}.tar.xz )
18 source? ( ${BASE_URI}/${PN}-src-${PV}.tar.xz )
19 big-endian? ( $(abi_uri ppc64) )
20 !big-endian? ( $(abi_uri ppc64le ppc64) )
27 DESCRIPTION="A Gentoo-made binary build of the IcedTea JDK"
28 HOMEPAGE="http://icedtea.classpath.org"
30 LICENSE="GPL-2-with-classpath-exception"
32 KEYWORDS="-* amd64 ~arm arm64 ppc64 x86"
33 IUSE="+alsa big-endian cups doc examples +gtk headless-awt nsplugin pulseaudio selinux source webstart"
36 gtk? ( !headless-awt )
37 nsplugin? ( !headless-awt )
40 RESTRICT="preserve-libs strip"
43 DEPEND="app-arch/xz-utils"
46 >=dev-libs/glib-2.60.7:2
47 >=media-libs/fontconfig-2.13:1.0
48 >=media-libs/freetype-2.9.1:2
49 >=media-libs/lcms-2.9:2
50 >=sys-apps/baselayout-java-0.1.0-r1
51 >=sys-libs/zlib-1.2.11-r2
52 virtual/jpeg-compat:62
53 alsa? ( >=media-libs/alsa-lib-1.2 )
54 cups? ( >=net-print/cups-2.0 )
57 >=x11-libs/cairo-1.16.0
59 >=x11-libs/gtk+-2.24:2
62 selinux? ( sec-policy/selinux-java )
66 =media-libs/libpng-1.6*
68 >=x11-libs/libXcomposite-0.4
69 >=x11-libs/libXext-1.3
71 >=x11-libs/libXrender-0.9.10
72 >=x11-libs/libXtst-1.2
77 webstart? ( >=dev-java/icedtea-web-1.6.1:0 )
78 nsplugin? ( >=dev-java/icedtea-web-1.6.1:0[nsplugin] )
79 pulseaudio? ( dev-java/icedtea-sound )
85 if [[ "$(tc-is-softfloat)" != "no" ]]; then
86 die "These binaries require a hardfloat system."
93 # I wouldn't normally use -f below but symlinks in the arm files
94 # make this fail otherwise and any other approach would be tedious.
97 rm -fv */jre/lib/*/libjsoundalsa.* || die
100 if use headless-awt; then
101 rm -fvr */jre/lib/*/lib*{[jx]awt,splashscreen}* \
102 */{,jre/}bin/policytool */bin/appletviewer || die
107 local dest="/opt/${P}"
108 local ddest="${ED}${dest#/}"
111 dodoc ${P}-${ABI}/doc/{ASSEMBLY_EXCEPTION,AUTHORS,NEWS,README,THIRD_PARTY_README}
112 use doc && dodoc -r ${P}/doc/html
114 # doins doesn't preserve executable bits.
115 cp -pRP ${P}-${ABI}/{bin,include,jre,lib,man} "${ddest}" || die
117 if use examples; then
118 cp -pRP ${P}-${ABI}/{demo,sample} "${ddest}" || die
122 cp ${P}/src.zip "${ddest}" || die
125 # use system-wide cacert store
126 rm "${ddest}"/jre/lib/security/cacerts || die
127 dosym ../../../../../etc/ssl/certs/java/cacerts "${dest}"/jre/lib/security/cacerts
129 java-vm_install-env "${FILESDIR}/icedtea-bin.env.sh"
131 # Both icedtea itself and the icedtea ebuild set PAX markings but we
132 # disable them for the icedtea-bin build because the line below will
133 # respect end-user settings when icedtea-bin is actually installed.
134 java-vm_set-pax-markings "${ddest}"
136 # Each invocation appends to the config.
137 java-vm_revdep-mask "${EPREFIX}${dest}"
138 java-vm_sandbox-predict /proc/self/coredump_filter