Mercurial > hg > portage
comparison dev-java/sun-jdk/sun-jdk-1.6.0.18.ebuild @ 198:215927006721
bump JDK to 1.6.0.18
author | holger |
---|---|
date | Sat, 16 Jan 2010 11:59:34 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
197:3f6f7997fa44 | 198:215927006721 |
---|---|
1 # Copyright 1999-2009 Gentoo Foundation | |
2 # Distributed under the terms of the GNU General Public License v2 | |
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.6.0.17.ebuild,v 1.3 2009/11/05 21:27:46 maekke Exp $ | |
4 | |
5 inherit versionator java-vm-2 eutils pax-utils | |
6 | |
7 UPDATE="$(get_version_component_range 4)" | |
8 UPDATE="${UPDATE#0}" | |
9 MY_PV="$(get_version_component_range 2)u${UPDATE}" | |
10 X86_AT="jdk-${MY_PV}-dlj-linux-i586.bin" | |
11 AMD64_AT="jdk-${MY_PV}-dlj-linux-amd64.bin" | |
12 | |
13 DESCRIPTION="Sun's Java SE Development Kit" | |
14 HOMEPAGE="http://java.sun.com/javase/6/" | |
15 URL_BASE="http://download.java.net/dlj/binaries" | |
16 SRC_URI="x86? ( ${URL_BASE}/${X86_AT} ) | |
17 amd64? ( ${URL_BASE}/${AMD64_AT} )" | |
18 SLOT="1.6" | |
19 LICENSE="dlj-1.1" | |
20 KEYWORDS="amd64 x86" | |
21 RESTRICT="strip" | |
22 IUSE="X alsa derby doc examples jce nsplugin odbc" | |
23 | |
24 QA_TEXTRELS_x86="opt/${P}/jre/lib/i386/motif21/libmawt.so | |
25 opt/${P}/jre/lib/i386/libdeploy.so | |
26 opt/${P}/jre/lib/i386/client/libjvm.so | |
27 opt/${P}/jre/lib/i386/server/libjvm.so" | |
28 QA_DT_HASH="opt/${P}/.*" | |
29 | |
30 DEPEND="jce? ( =dev-java/sun-jce-bin-1.6.0* )" | |
31 RDEPEND="doc? ( =dev-java/java-sdk-docs-1.6.0* ) | |
32 sys-libs/glibc | |
33 alsa? ( media-libs/alsa-lib ) | |
34 X? ( | |
35 x11-libs/libXext | |
36 x11-libs/libXi | |
37 x11-libs/libXp | |
38 x11-libs/libXtst | |
39 amd64? ( x11-libs/libXt ) | |
40 x11-libs/libX11 | |
41 ) | |
42 odbc? ( dev-db/unixODBC )" | |
43 | |
44 JAVA_PROVIDE="jdbc-stdext jdbc-rowset" | |
45 | |
46 S="${WORKDIR}/jdk$(replace_version_separator 3 _)" | |
47 | |
48 src_unpack() { | |
49 sh "${DISTDIR}"/${A} --accept-license --unpack || die "Failed to unpack" | |
50 } | |
51 | |
52 src_compile() { | |
53 # Set PaX markings on all JDK/JRE executables to allow code-generation on | |
54 # the heap by the JIT compiler. This needs to be done before CDS - #215225 | |
55 pax-mark m $(list-paxables "${S}"{,/jre}/bin/*) | |
56 | |
57 # see bug #207282 | |
58 if use x86; then | |
59 einfo "Creating the Class Data Sharing archives" | |
60 "${S}"/bin/java -client -Xshare:dump || die | |
61 "${S}"/bin/java -server -Xshare:dump || die | |
62 fi | |
63 } | |
64 | |
65 src_install() { | |
66 local dirs="bin include jre lib man" | |
67 | |
68 use derby && dirs="${dirs} db" | |
69 | |
70 dodir /opt/${P} | |
71 | |
72 cp -pPR $dirs "${D}/opt/${P}/" || die "failed to copy" | |
73 dodoc COPYRIGHT || die | |
74 dohtml README.html || die | |
75 | |
76 cp -pP src.zip "${D}/opt/${P}/" || die | |
77 | |
78 if use examples; then | |
79 cp -pPR demo sample "${D}/opt/${P}/" || die | |
80 fi | |
81 | |
82 if use jce; then | |
83 cd "${D}/opt/${P}/jre/lib/security" | |
84 dodir /opt/${P}/jre/lib/security/strong-jce | |
85 mv "${D}"/opt/${P}/jre/lib/security/US_export_policy.jar \ | |
86 "${D}"/opt/${P}/jre/lib/security/strong-jce || die | |
87 mv "${D}"/opt/${P}/jre/lib/security/local_policy.jar \ | |
88 "${D}"/opt/${P}/jre/lib/security/strong-jce || die | |
89 dosym /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/US_export_policy.jar /opt/${P}/jre/lib/security/ | |
90 dosym /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/local_policy.jar /opt/${P}/jre/lib/security/ | |
91 fi | |
92 | |
93 if use nsplugin; then | |
94 local plugin_dir="ns7-gcc29" | |
95 if has_version '>=sys-devel/gcc-3' ; then | |
96 plugin_dir="ns7" | |
97 fi | |
98 | |
99 if use x86 ; then | |
100 install_mozilla_plugin /opt/${P}/jre/plugin/i386/$plugin_dir/libjavaplugin_oji.so | |
101 install_mozilla_plugin /opt/${P}/jre/lib/i386/libnpjp2.so plugin2 | |
102 else | |
103 install_mozilla_plugin /opt/${P}/jre/lib/amd64/libnpjp2.so | |
104 fi | |
105 fi | |
106 | |
107 # create dir for system preferences | |
108 dodir /opt/${P}/jre/.systemPrefs | |
109 # Create files used as storage for system preferences. | |
110 touch "${D}"/opt/${P}/jre/.systemPrefs/.system.lock | |
111 chmod 644 "${D}"/opt/${P}/jre/.systemPrefs/.system.lock | |
112 touch "${D}"/opt/${P}/jre/.systemPrefs/.systemRootModFile | |
113 chmod 644 "${D}"/opt/${P}/jre/.systemPrefs/.systemRootModFile | |
114 | |
115 if [[ -f "${D}"/opt/${P}/jre/plugin/desktop/sun_java.desktop ]]; then | |
116 # install control panel for Gnome/KDE | |
117 # The jre also installs these so make sure that they do not have the same | |
118 # Name | |
119 sed -e "s/\(Name=\)Java/\1 Java Control Panel for Sun JDK ${SLOT}/" \ | |
120 -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/ControlPanel#" \ | |
121 -e "s#Icon=.*#Icon=/opt/${P}/jre/plugin/desktop/sun_java.png#" \ | |
122 "${D}"/opt/${P}/jre/plugin/desktop/sun_java.desktop > \ | |
123 "${T}"/sun_jdk-${SLOT}.desktop | |
124 | |
125 domenu "${T}"/sun_jdk-${SLOT}.desktop | |
126 fi | |
127 | |
128 # bug #56444 | |
129 insinto /opt/${P}/jre/lib/ | |
130 newins "${FILESDIR}"/fontconfig.Gentoo.properties fontconfig.properties | |
131 | |
132 set_java_env | |
133 java-vm_revdep-mask | |
134 } | |
135 | |
136 pkg_postinst() { | |
137 # Set as default VM if none exists | |
138 java-vm-2_pkg_postinst | |
139 | |
140 if use x86 && use nsplugin; then | |
141 elog | |
142 elog "Two variants of the nsplugin are available via eselect java-nsplugin:" | |
143 elog "${VMHANDLE} and ${VMHANDLE}-plugin2 (the Next-Generation Plug-In) " | |
144 ewarn "Note that the ${VMHANDLE}-plugin2 works only in Firefox 3!" | |
145 elog "For more info see https://jdk6.dev.java.net/plugin2/" | |
146 elog | |
147 fi | |
148 | |
149 if use amd64 && use nsplugin; then | |
150 elog | |
151 elog "This version finally brings a browser plugin for amd64" | |
152 elog "It is the so-called Next-Generation Plug-In (plugin2)" | |
153 elog "Use eselect java-nsplugin to select it (${VMHANDLE})." | |
154 ewarn "Note that it works only in Firefox 3 or newer browsers!" | |
155 elog "For more info see https://jdk6.dev.java.net/plugin2/" | |
156 elog | |
157 fi | |
158 | |
159 elog "Please reinstall eclipse-sdk if you have it installed and want" | |
160 elog "workaround for bug #215150." | |
161 } |