| 1 |
# Copyright 1999-2011 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/emul-linux-x86-java/emul-linux-x86-java-1.6.0.29.ebuild,v 1.4 2011/11/05 21:34:26 caster Exp $ |
| 4 |
|
| 5 |
EAPI="4" |
| 6 |
|
| 7 |
inherit java-vm-2 eutils pax-utils prefix versionator |
| 8 |
|
| 9 |
MY_PV="$(get_version_component_range 2)u$(get_version_component_range 4)" |
| 10 |
S_PV="$(replace_version_separator 3 '_')" |
| 11 |
|
| 12 |
X86_AT="jre-${MY_PV}-linux-i586.bin" |
| 13 |
|
| 14 |
# check the URIs when bumping, no idea about their stability yet |
| 15 |
JRE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jre-${MY_PV}-download-513650.html" |
| 16 |
|
| 17 |
DESCRIPTION="Oracle's Java SE Runtime Environment (32bit)" |
| 18 |
HOMEPAGE="http://www.oracle.com/technetwork/java/javase/" |
| 19 |
SRC_URI="${X86_AT}" |
| 20 |
|
| 21 |
LICENSE="Oracle-BCLA-JavaSE" |
| 22 |
KEYWORDS="-* amd64" |
| 23 |
SLOT="1.6" |
| 24 |
IUSE="X alsa nsplugin" |
| 25 |
|
| 26 |
RESTRICT="fetch strip" |
| 27 |
QA_TEXTRELS=" |
| 28 |
opt/${P}/lib/i386/client/libjvm.so |
| 29 |
opt/${P}/lib/i386/motif21/libmawt.so |
| 30 |
opt/${P}/lib/i386/server/libjvm.so" |
| 31 |
|
| 32 |
JAVA_VM_NO_GENERATION1=true |
| 33 |
|
| 34 |
RDEPEND="alsa? ( app-emulation/emul-linux-x86-soundlibs ) |
| 35 |
X? ( app-emulation/emul-linux-x86-xlibs )" |
| 36 |
|
| 37 |
S="${WORKDIR}/jre${S_PV}" |
| 38 |
|
| 39 |
pkg_nofetch() { |
| 40 |
einfo "Due to Oracle no longer providing the distro-friendly DLJ bundles, the package has become fetch restricted again." |
| 41 |
|
| 42 |
einfo "Please download ${X86_AT} from:" |
| 43 |
einfo "${JRE_URI}" |
| 44 |
einfo "and move it to ${DISTDIR}" |
| 45 |
} |
| 46 |
|
| 47 |
src_unpack() { |
| 48 |
sh "${DISTDIR}"/${A} -noregister || die "Failed to unpack" |
| 49 |
} |
| 50 |
|
| 51 |
src_compile() { |
| 52 |
# Set PaX markings on all JDK/JRE executables to allow code-generation on |
| 53 |
# the heap by the JIT compiler. This needs to be done before CDS - #215225 |
| 54 |
pax-mark m $(list-paxables "${S}"/bin/*) |
| 55 |
|
| 56 |
# see bug #207282 |
| 57 |
einfo "Creating the Class Data Sharing archives" |
| 58 |
"${S}"/bin/java -client -Xshare:dump || die |
| 59 |
"${S}"/bin/java -server -Xshare:dump || die |
| 60 |
} |
| 61 |
|
| 62 |
src_install() { |
| 63 |
# We should not need the ancient plugin for Firefox 2 anymore, plus it has |
| 64 |
# writable executable segments |
| 65 |
rm -vf lib/i386/libjavaplugin_oji.so \ |
| 66 |
lib/i386/libjavaplugin_nscp*.so |
| 67 |
rm -vrf plugin/i386 |
| 68 |
# Without nsplugin flag, also remove the new plugin |
| 69 |
arch=i386; |
| 70 |
if ! use nsplugin; then |
| 71 |
rm -vf lib/${arch}/libnpjp2.so \ |
| 72 |
lib/${arch}/libjavaplugin_jni.so |
| 73 |
fi |
| 74 |
|
| 75 |
dodir /opt/${P} |
| 76 |
cp -pPR bin lib man "${ED}"/opt/${P} || die |
| 77 |
|
| 78 |
# Remove empty dirs we might have copied |
| 79 |
rmdir -v $(find "${D}" -type d -empty) || die |
| 80 |
|
| 81 |
dodoc COPYRIGHT README |
| 82 |
|
| 83 |
if use nsplugin; then |
| 84 |
install_mozilla_plugin /opt/${P}/lib/${arch}/libnpjp2.so |
| 85 |
fi |
| 86 |
|
| 87 |
# FIXME figure out how to handle the control pannel conflict with |
| 88 |
# sun-jdk |
| 89 |
|
| 90 |
# Install desktop file for the Java Control Panel. Using VMHANDLE as file |
| 91 |
# name to prevent file collision with jdk and or other slots. |
| 92 |
# [[ -f "${ED}"/opt/${P}/lib/desktop/applications/sun_java.desktop ]] || die |
| 93 |
# sed -e "s/\(Name=\)Java/\1 Java Control Panel for Oracle JRE ${SLOT} (sun-jre-bin)/" \ |
| 94 |
# -e "s#Exec=.*#Exec=/opt/${P}/bin/jcontrol#" \ |
| 95 |
# -e "s#Icon=.*#Icon=/opt/${P}/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png#" \ |
| 96 |
# "${ED}"/opt/${P}/lib/desktop/applications/sun_java.desktop > \ |
| 97 |
# "${T}"/${VMHANDLE}.desktop |
| 98 |
# |
| 99 |
# domenu "${T}"/${VMHANDLE}.desktop |
| 100 |
|
| 101 |
# bug #56444 |
| 102 |
cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die |
| 103 |
eprefixify "${T}"/fontconfig.properties |
| 104 |
insinto /opt/${P}/lib/ |
| 105 |
doins "${T}"/fontconfig.properties |
| 106 |
|
| 107 |
set_java_env "${FILESDIR}/${VMHANDLE}.env-r1" |
| 108 |
java-vm_revdep-mask |
| 109 |
} |