1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit java-vm-2 prefix versionator
9 dist="https://dev.gentoo.org/~chewi/distfiles"
10 TARBALL_VERSION="${PV}"
12 DESCRIPTION="A Gentoo-made binary build of the IcedTea JDK"
13 HOMEPAGE="http://icedtea.classpath.org"
14 SRC_URI="doc? ( ${dist}/${PN}-doc-${TARBALL_VERSION}.tar.xz )
15 source? ( ${dist}/${PN}-src-${TARBALL_VERSION}.tar.xz )"
17 for arch in amd64 ppc x86; do
20 ${dist}/${PN}-core-${TARBALL_VERSION}-${arch}.tar.xz
21 examples? ( ${dist}/${PN}-examples-${TARBALL_VERSION}-${arch}.tar.xz )
25 LICENSE="GPL-2-with-linking-exception"
27 KEYWORDS="-* amd64 ppc x86"
29 IUSE="+X +alsa cjk +cups doc examples nsplugin selinux source webstart"
30 REQUIRED_USE="nsplugin? ( X )"
37 >=media-libs/alsa-lib-1.0"
41 >=media-libs/freetype-2.5:2
42 >=x11-libs/gtk+-2.24:2
44 >=x11-libs/libXext-1.3
46 >=x11-libs/libXrender-0.9.4
47 >=x11-libs/libXtst-1.2"
50 >=media-libs/giflib-4.1.6-r1
51 >=media-libs/lcms-2.6:2
52 media-libs/libpng:0/16
55 >=sys-libs/zlib-1.2.3-r1
58 RDEPEND="${COMMON_DEP}
63 media-fonts/arphicfonts
64 media-fonts/baekmuk-fonts
66 media-fonts/lohit-fonts
70 alsa? ( ${ALSA_COMMON_DEP} )
71 cups? ( ${CUPS_COMMON_DEP} )
72 selinux? ( sec-policy/selinux-java )"
74 PDEPEND="webstart? ( dev-java/icedtea-web:0 )
75 nsplugin? ( dev-java/icedtea-web:0[nsplugin] )"
78 # Ensures HeadlessGraphicsEnvironment is used.
80 rm -r jre/lib/$(get_system_arch)/xawt || die
83 # Reprefixify because prefix may be different.
84 sed -i 's:=/:=@GENTOO_PORTAGE_EPREFIX@/:' jre/lib/fontconfig.Gentoo.properties || die
85 eprefixify jre/lib/fontconfig.Gentoo.properties
89 local dest="/opt/${P}"
90 local ddest="${ED}${dest#/}"
93 # doins doesn't preserve executable bits.
94 cp -pRP bin include jre lib man "${ddest}" || die
96 dodoc doc/{ASSEMBLY_EXCEPTION,AUTHORS,NEWS,README,THIRD_PARTY_README}
97 use doc && dodoc -r doc/html
100 cp -pRP demo sample "${ddest}" || die
104 cp src.zip "${ddest}" || die
107 if use webstart || use nsplugin; then
108 dosym /usr/libexec/icedtea-web/itweb-settings "${dest}/bin/itweb-settings"
109 dosym /usr/libexec/icedtea-web/itweb-settings "${dest}/jre/bin/itweb-settings"
111 if use webstart; then
112 dosym /usr/libexec/icedtea-web/javaws "${dest}/bin/javaws"
113 dosym /usr/libexec/icedtea-web/javaws "${dest}/jre/bin/javaws"
117 java-vm_revdep-mask "${dest}"
118 java-vm_sandbox-predict /proc/self/coredump_filter
122 if has_version "<=dev-java/icedtea-bin-1.10.4:${SLOT}"; then
123 # portage would preserve the symlink otherwise, related to bug #384397
124 rm -f "${EROOT}/usr/lib/jvm/icedtea6-bin"
125 elog "To unify the layout and simplify scripts, the identifier of Icedtea-bin-6*"
126 elog "has changed from 'icedtea6-bin' to 'icedtea-bin-6' starting from version 6.1.10.4"
127 elog "If you had icedtea6-bin as system VM, the change should be automatic, however"
128 elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed"
129 elog "and the same holds for any user VM settings. Sorry for the inconvenience."
134 if use nsplugin; then
135 if [[ -n ${REPLACING_VERSIONS} ]] && ! version_is_at_least 6.1.13.3-r1 ${REPLACING_VERSIONS} ]]; then
136 elog "The nsplugin for icedtea-bin is now provided by the icedtea-web package"
137 elog "If you had icedtea-bin-6 nsplugin selected, you may see a related error below"
138 elog "The switch should complete properly during the subsequent installation of icedtea-web"
139 elog "Afterwards you may verify the output of 'eselect java-nsplugin list' and adjust accordingly'"
143 # Set as default VM if none exists
144 java-vm-2_pkg_postinst