/[gentoo-x86]/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.7.0.7.ebuild
Gentoo

Contents of /dev-java/oracle-jdk-bin/oracle-jdk-bin-1.7.0.7.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu Sep 13 07:17:17 2012 UTC (21 months, 3 weeks ago) by phajdan.jr
Branch: MAIN
Changes since 1.3: +2 -2 lines
x86 stable wrt bug #433094

(Portage version: 2.1.11.9/cvs/Linux i686)

1 caster 1.1 # Copyright 1999-2012 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 phajdan.jr 1.4 # $Header: /var/cvsroot/gentoo-x86/dev-java/oracle-jdk-bin/oracle-jdk-bin-1.7.0.7.ebuild,v 1.3 2012/08/31 17:53:07 mr_bones_ Exp $
4 caster 1.1
5     EAPI="4"
6    
7     inherit java-vm-2 eutils prefix versionator
8    
9     # This URIs need to be updated when bumping!
10 caster 1.2 JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html"
11 caster 1.1 JCE_URI="http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html"
12    
13     UPDATE="$(get_version_component_range 4)"
14     MY_PV="$(get_version_component_range 2)u${UPDATE}"
15     S_PV="$(get_version_component_range 1-3)_0${UPDATE}"
16     # Brilliant, just brilliant...
17     DEMOS_PV="7u6"
18     DEMOS_S_PV="1.7.0_06"
19    
20     X86_AT="jdk-${MY_PV}-linux-i586.tar.gz"
21     AMD64_AT="jdk-${MY_PV}-linux-x64.tar.gz"
22     SOL_X86_AT="jdk-${MY_PV}-solaris-i586.tar.gz"
23     SOL_AMD64_AT="jdk-${MY_PV}-solaris-x64.tar.gz"
24     SOL_SPARC_AT="jdk-${MY_PV}-solaris-sparc.tar.gz"
25     SOL_SPARCv9_AT="jdk-${MY_PV}-solaris-sparcv9.tar.gz"
26    
27     X86_DEMOS="jdk-${DEMOS_PV}-linux-i586-demos.tar.gz"
28     AMD64_DEMOS="jdk-${DEMOS_PV}-linux-x64-demos.tar.gz"
29     SOL_X86_DEMOS="jdk-${DEMOS_PV}-solaris-i586-demos.tar.gz"
30     SOL_AMD64_DEMOS="jdk-${DEMOS_PV}-solaris-x64-demos.tar.gz"
31     SOL_SPARC_DEMOS="jdk-${DEMOS_PV}-solaris-sparc-demos.tar.gz"
32     SOL_SPARCv9_DEMOS="jdk-${DEMOS_PV}-solaris-sparcv9-demos.tar.gz"
33    
34     JCE_DIR="UnlimitedJCEPolicy"
35     JCE_FILE="${JCE_DIR}JDK7.zip"
36    
37     DESCRIPTION="Oracle's Java SE Development Kit"
38     HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
39     SRC_URI="
40     x86? ( ${X86_AT}
41     examples? ( ${X86_DEMOS} ) )
42     amd64? ( ${AMD64_AT}
43     examples? ( ${AMD64_DEMOS} ) )
44     x86-solaris? ( ${SOL_X86_AT}
45     examples? ( ${SOL_X86_DEMOS} ) )
46     x64-solaris? ( ${SOL_X86_AT} ${SOL_AMD64_AT}
47     examples? ( ${SOL_X86_DEMOS} ${SOL_AMD64_DEMOS} ) )
48     sparc-solaris? ( ${SOL_SPARC_AT}
49     examples? ( ${SOL_SPARC_DEMOS} ) )
50     sparc64-solaris? ( ${SOL_SPARC_AT} ${SOL_SPARCv9_AT}
51     examples? ( ${SOL_SPARC_DEMOS} ${SOL_SPARCv9_DEMOS} ) )
52     jce? ( ${JCE_FILE} )"
53    
54     LICENSE="Oracle-BCLA-JavaSE examples? ( BSD )"
55     SLOT="1.7"
56 phajdan.jr 1.4 KEYWORDS="~amd64 x86 ~amd64-linux ~x86-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
57 caster 1.1
58     IUSE="+X alsa derby doc examples +fontconfig jce nsplugin pax_kernel +source"
59     RESTRICT="fetch strip"
60    
61     RDEPEND="
62     X? (
63     x11-libs/libXext
64     x11-libs/libXi
65     x11-libs/libXrender
66     x11-libs/libXtst
67     x11-libs/libX11
68     )
69     alsa? ( media-libs/alsa-lib )
70     doc? ( dev-java/java-sdk-docs:1.7 )
71     fontconfig? ( media-libs/fontconfig )
72     !prefix? ( sys-libs/glibc )"
73     # scanelf won't create a PaX header, so depend on paxctl to avoid fallback
74     # marking. #427642
75     DEPEND="
76     jce? ( app-arch/unzip )
77     pax_kernel? ( sys-apps/paxctl )"
78    
79     S="${WORKDIR}/jdk${S_PV}"
80    
81     pkg_nofetch() {
82     if use x86; then
83     AT=${X86_AT}
84     elif use amd64; then
85     AT=${AMD64_AT}
86     elif use x86-solaris; then
87     AT=${SOL_X86_AT}
88     elif use x64-solaris; then
89     AT="${SOL_X86_AT} and ${SOL_AMD64_AT}"
90     elif use sparc-solaris; then
91     AT=${SOL_SPARC_AT}
92     elif use sparc64-solaris; then
93     AT="${SOL_SPARC_AT} and ${SOL_SPARCv9_AT}"
94     fi
95    
96     if use x86; then
97     DEMOS=${X86_DEMOS}
98     elif use amd64; then
99     DEMOS=${AMD64_DEMOS}
100     elif use x86-solaris; then
101     DEMOS=${SOL_X86_DEMOS}
102     elif use x64-solaris; then
103     DEMOS="${SOL_X86_DEMOS} and ${SOL_AMD64_DEMOS}"
104     elif use sparc-solaris; then
105     DEMOS=${SOL_SPARC_AT}
106     elif use sparc64-solaris; then
107     DEMOS="${SOL_SPARC_AT_DEMOS} and ${SOL_SPARCv9_DEMOS}"
108     fi
109    
110     einfo "Please download ${AT} from:"
111     einfo "${JDK_URI}"
112     einfo "and move it to ${DISTDIR}"
113    
114     if use examples; then
115     einfo "Also download ${DEMOS} from:"
116     einfo "${JDK_URI}"
117     einfo "and move it to ${DISTDIR}"
118     fi
119    
120     if use jce; then
121     einfo "Also download ${JCE_FILE} from:"
122     einfo "${JCE_URI}"
123     einfo "and move it to ${DISTDIR}"
124     fi
125     }
126    
127     src_prepare() {
128     [[ ${PV} != 1.7.0.7 ]] && die "Check if new demos are provided before bumping. Adjust DEMOS_(S)PV accordingly."
129 mr_bones_ 1.3
130 caster 1.1 if use jce; then
131     mv "${WORKDIR}"/${JCE_DIR} "${S}"/jre/lib/security/ || die
132     fi
133     }
134    
135     src_compile() {
136     # This needs to be done before CDS - #215225
137     java-vm_set-pax-markings "${S}"
138    
139     # see bug #207282
140     einfo "Creating the Class Data Sharing archives"
141     if use x86; then
142     bin/java -client -Xshare:dump || die
143     fi
144     bin/java -server -Xshare:dump || die
145    
146     # Create files used as storage for system preferences.
147     mkdir jre/.systemPrefs || die
148     touch jre/.systemPrefs/.system.lock || die
149     touch jre/.systemPrefs/.systemRootModFile || die
150     }
151    
152     src_install() {
153     local dest="/opt/${P}"
154     local ddest="${ED}${dest}"
155    
156     # We should not need the ancient plugin for Firefox 2 anymore, plus it has
157     # writable executable segments
158     if use x86; then
159     rm -vf {,jre/}lib/i386/libjavaplugin_oji.so \
160     {,jre/}lib/i386/libjavaplugin_nscp*.so
161     rm -vrf jre/plugin/i386
162     fi
163     # Without nsplugin flag, also remove the new plugin
164     local arch=${ARCH};
165     use x86 && arch=i386;
166     if ! use nsplugin; then
167     rm -vf {,jre/}lib/${arch}/libnpjp2.so \
168     {,jre/}lib/${arch}/libjavaplugin_jni.so
169     fi
170    
171     dodir "${dest}"
172     cp -pPR bin include jre lib man "${ddest}" || die
173    
174     if use derby; then
175     cp -pPR db "${ddest}" || die
176     fi
177    
178     if use examples; then
179     cp -pPR "${WORKDIR}/jdk${DEMOS_S_PV}"/{demo,sample} "${ddest}" || die
180     fi
181    
182     # Remove empty dirs we might have copied
183     find "${D}" -type d -empty -exec rmdir {} + || die
184    
185     dodoc COPYRIGHT
186     dohtml README.html
187    
188     if use jce; then
189     dodir "${dest}"/jre/lib/security/strong-jce
190     mv "${ddest}"/jre/lib/security/US_export_policy.jar \
191     "${ddest}"/jre/lib/security/strong-jce || die
192     mv "${ddest}"/jre/lib/security/local_policy.jar \
193     "${ddest}"/jre/lib/security/strong-jce || die
194     dosym "${dest}"/jre/lib/security/${JCE_DIR}/US_export_policy.jar \
195     "${dest}"/jre/lib/security/US_export_policy.jar
196     dosym "${dest}"/jre/lib/security/${JCE_DIR}/local_policy.jar \
197     "${dest}"/jre/lib/security/local_policy.jar
198     fi
199    
200     if use nsplugin; then
201     install_mozilla_plugin "${dest}"/jre/lib/${arch}/libnpjp2.so
202     fi
203    
204     if use source; then
205     cp src.zip "${ddest}" || die
206     fi
207    
208     # Install desktop file for the Java Control Panel.
209     # Using ${PN}-${SLOT} to prevent file collision with jre and or other slots.
210     # make_desktop_entry can't be used as ${P} would end up in filename.
211     newicon jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png \
212     sun-jcontrol-${PN}-${SLOT}.png || die
213     sed -e "s#Name=.*#Name=Java Control Panel for Oracle JDK ${SLOT}#" \
214     -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
215     -e "s#Icon=.*#Icon=sun-jcontrol-${PN}-${SLOT}.png#" \
216     jre/lib/desktop/applications/sun_java.desktop > \
217     "${T}"/jcontrol-${PN}-${SLOT}.desktop || die
218     domenu "${T}"/jcontrol-${PN}-${SLOT}.desktop
219    
220     # Prune all fontconfig files so libfontconfig will be used and only install
221     # a Gentoo specific one if fontconfig is disabled.
222     # http://docs.oracle.com/javase/7/docs/technotes/guides/intl/fontconfig.html
223     rm "${ddest}"/jre/lib/fontconfig.*
224     if ! use fontconfig; then
225     cp "${FILESDIR}"/fontconfig.Gentoo.properties "${T}"/fontconfig.properties || die
226     eprefixify "${T}"/fontconfig.properties
227     insinto "${dest}"/jre/lib/
228     doins "${T}"/fontconfig.properties
229     fi
230    
231     set_java_env
232     java-vm_revdep-mask
233     java-vm_sandbox-predict /dev/random /proc/self/coredump_filter
234     }
235    
236     QA_PREBUILT="
237     opt/${P}/jre/lib/i386/client/libjvm.so
238     opt/${P}/jre/lib/i386/server/libjvm.so
239     /opt/${P}/bin/appletviewer
240     /opt/${P}/bin/apt
241     /opt/${P}/bin/extcheck
242     /opt/${P}/bin/idlj
243     /opt/${P}/bin/jar
244     /opt/${P}/bin/jarsigner
245     /opt/${P}/bin/java
246     /opt/${P}/bin/javac
247     /opt/${P}/bin/javadoc
248     /opt/${P}/bin/javah
249     /opt/${P}/bin/javap
250     /opt/${P}/bin/javaws
251     /opt/${P}/bin/jcmd
252     /opt/${P}/bin/jconsole
253     /opt/${P}/bin/jdb
254     /opt/${P}/bin/jhat
255     /opt/${P}/bin/jinfo
256     /opt/${P}/bin/jmap
257     /opt/${P}/bin/jps
258     /opt/${P}/bin/jrunscript
259     /opt/${P}/bin/jsadebugd
260     /opt/${P}/bin/jstack
261     /opt/${P}/bin/jstat
262     /opt/${P}/bin/jstatd
263     /opt/${P}/bin/keytool
264     /opt/${P}/bin/native2ascii
265     /opt/${P}/bin/orbd
266     /opt/${P}/bin/pack200
267     /opt/${P}/bin/policytool
268     /opt/${P}/bin/rmic
269     /opt/${P}/bin/rmid
270     /opt/${P}/bin/rmiregistry
271     /opt/${P}/bin/schemagen
272     /opt/${P}/bin/serialver
273     /opt/${P}/bin/servertool
274     /opt/${P}/bin/tnameserv
275     /opt/${P}/bin/unpack200
276     /opt/${P}/bin/wsgen
277     /opt/${P}/bin/wsimport
278     /opt/${P}/bin/xjc
279     /opt/${P}/demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so
280     /opt/${P}/demo/jvmti/gctest/lib/libgctest.so
281     /opt/${P}/demo/jvmti/heapTracker/lib/libheapTracker.so
282     /opt/${P}/demo/jvmti/heapViewer/lib/libheapViewer.so
283     /opt/${P}/demo/jvmti/hprof/lib/libhprof.so
284     /opt/${P}/demo/jvmti/minst/lib/libminst.so
285     /opt/${P}/demo/jvmti/mtrace/lib/libmtrace.so
286     /opt/${P}/demo/jvmti/versionCheck/lib/libversionCheck.so
287     /opt/${P}/demo/jvmti/waiters/lib/libwaiters.so
288     /opt/${P}/jre/bin/java
289     /opt/${P}/jre/bin/java_vm
290     /opt/${P}/jre/bin/javaws
291     /opt/${P}/jre/bin/keytool
292     /opt/${P}/jre/bin/orbd
293     /opt/${P}/jre/bin/pack200
294     /opt/${P}/jre/bin/policytool
295     /opt/${P}/jre/bin/rmid
296     /opt/${P}/jre/bin/rmiregistry
297     /opt/${P}/jre/bin/servertool
298     /opt/${P}/jre/bin/tnameserv
299     /opt/${P}/jre/bin/unpack200
300     /opt/${P}/jre/lib/jexec
301     /opt/${P}/lib/jexec
302     /opt/${P}/lib/visualvm/profiler/lib/deployed/jdk15/linux-amd64/libprofilerinterface.so
303     /opt/${P}/lib/visualvm/profiler/lib/deployed/jdk16/linux-amd64/libprofilerinterface.so"
304     for java_system_arch in amd64 i386; do
305     QA_PREBUILT+="
306     /opt/${P}/jre/lib/${java_system_arch}/headless/libmawt.so
307     /opt/${P}/jre/lib/${java_system_arch}/jli/libjli.so
308     /opt/${P}/jre/lib/${java_system_arch}/libattach.so
309     /opt/${P}/jre/lib/${java_system_arch}/libawt.so
310     /opt/${P}/jre/lib/${java_system_arch}/libcmm.so
311     /opt/${P}/jre/lib/${java_system_arch}/libdcpr.so
312     /opt/${P}/jre/lib/${java_system_arch}/libdeploy.so
313     /opt/${P}/jre/lib/${java_system_arch}/libdt_socket.so
314     /opt/${P}/jre/lib/${java_system_arch}/libfontmanager.so
315     /opt/${P}/jre/lib/${java_system_arch}/libhprof.so
316     /opt/${P}/jre/lib/${java_system_arch}/libinstrument.so
317     /opt/${P}/jre/lib/${java_system_arch}/libioser12.so
318     /opt/${P}/jre/lib/${java_system_arch}/libj2gss.so
319     /opt/${P}/jre/lib/${java_system_arch}/libj2pcsc.so
320     /opt/${P}/jre/lib/${java_system_arch}/libj2pkcs11.so
321     /opt/${P}/jre/lib/${java_system_arch}/libjaas_unix.so
322     /opt/${P}/jre/lib/${java_system_arch}/libjava_crw_demo.so
323     /opt/${P}/jre/lib/${java_system_arch}/libjavaplugin_jni.so
324     /opt/${P}/jre/lib/${java_system_arch}/libjava.so
325     /opt/${P}/jre/lib/${java_system_arch}/libjawt.so
326     /opt/${P}/jre/lib/${java_system_arch}/libJdbcOdbc.so
327     /opt/${P}/jre/lib/${java_system_arch}/libjdwp.so
328     /opt/${P}/jre/lib/${java_system_arch}/libjfr.so
329     /opt/${P}/jre/lib/${java_system_arch}/libjpeg.so
330     /opt/${P}/jre/lib/${java_system_arch}/libjsdt.so
331     /opt/${P}/jre/lib/${java_system_arch}/libjsig.so
332     /opt/${P}/jre/lib/${java_system_arch}/libjsoundalsa.so
333     /opt/${P}/jre/lib/${java_system_arch}/libjsound.so
334     /opt/${P}/jre/lib/${java_system_arch}/libkcms.so
335     /opt/${P}/jre/lib/${java_system_arch}/libmanagement.so
336     /opt/${P}/jre/lib/${java_system_arch}/libmlib_image.so
337     /opt/${P}/jre/lib/${java_system_arch}/libnative_chmod_g.so
338     /opt/${P}/jre/lib/${java_system_arch}/libnative_chmod.so
339     /opt/${P}/jre/lib/${java_system_arch}/libnet.so
340     /opt/${P}/jre/lib/${java_system_arch}/libnio.so
341     /opt/${P}/jre/lib/${java_system_arch}/libnpjp2.so
342     /opt/${P}/jre/lib/${java_system_arch}/libnpt.so
343     /opt/${P}/jre/lib/${java_system_arch}/librmi.so
344     /opt/${P}/jre/lib/${java_system_arch}/libsaproc.so
345     /opt/${P}/jre/lib/${java_system_arch}/libsctp.so
346     /opt/${P}/jre/lib/${java_system_arch}/libsplashscreen.so
347     /opt/${P}/jre/lib/${java_system_arch}/libsunec.so
348     /opt/${P}/jre/lib/${java_system_arch}/libt2k.so
349     /opt/${P}/jre/lib/${java_system_arch}/libunpack.so
350     /opt/${P}/jre/lib/${java_system_arch}/libverify.so
351     /opt/${P}/jre/lib/${java_system_arch}/libzip.so
352     /opt/${P}/jre/lib/${java_system_arch}/motif21/libmawt.so
353     /opt/${P}/jre/lib/${java_system_arch}/native_threads/libhpi.so
354     /opt/${P}/jre/lib/${java_system_arch}/server/libjvm.so
355     /opt/${P}/jre/lib/${java_system_arch}/xawt/libmawt.so"
356     done

  ViewVC Help
Powered by ViewVC 1.1.20