annotate dev-java/sun-jdk/sun-jdk-1.4.2.19.ebuild @ 146:44698527bb83

preserve sun-jdk-1.4 from the offical portage
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 18 Nov 2009 10:35:12 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
146
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1 # Copyright 1999-2009 Gentoo Foundation
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.4.2.19.ebuild,v 1.4 2009/05/29 20:30:58 caster Exp $
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
5 JAVA_SUPPORTS_GENERATION_1="true"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
6 inherit pax-utils java-vm-2 eutils
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
8 MY_PV=${PV%.*}_${PV##*.}
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
9 MY_PN=j2sdk
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
10 MY_P=${MY_PN}${MY_PV}
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
11 MY_PVB=${PV%.*}
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
12
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
13 At="j2sdk-${PV//./_}-linux-i586.bin"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
14 jce_policy="jce_policy-${MY_PVB//./_}.zip"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
15
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
16 S="${WORKDIR}/${MY_P}"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
17 DESCRIPTION="Sun's Java SE Development Kit"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
18 HOMEPAGE="http://java.sun.com/j2se/1.4.2/"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
19 SRC_URI="x86? ( ${At} )
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
20 jce? ( ${jce_policy} )"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
21 SLOT="1.4"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
22 LICENSE="sun-bcla-java-vm"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
23 KEYWORDS="x86"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
24 # files are prestripped
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
25 RESTRICT="fetch strip"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
26 IUSE="X alsa doc examples jce nsplugin odbc"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
27
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
28 DEPEND="sys-apps/sed
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
29 app-arch/unzip"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
30
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
31 RDEPEND="
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
32 alsa? ( media-libs/alsa-lib )
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
33 doc? ( =dev-java/java-sdk-docs-1.4.2* )
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
34 X? (
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
35 x11-libs/libXext
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
36 x11-libs/libXi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
37 x11-libs/libXp
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
38 x11-libs/libXtst
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
39 x11-libs/libXt
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
40 x11-libs/libX11
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
41 )
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
42 odbc? ( dev-db/unixODBC )"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
43
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
44 JAVA_PROVIDE="jdbc-stdext"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
45
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
46 DL_PREFIX="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef="
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
47 DOWNLOAD_URL="${DL_PREFIX}${MY_PN}-${MY_PV}-oth-JPR@CDS-CDS_Developer"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
48 DOWNLOAD_URL_JCE="${DL_PREFIX}7503-jce-1.4.2-oth-JPR@CDS-CDS_Developer"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
49
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
50 QA_TEXTRELS_x86="opt/${P}/jre/lib/i386/libawt.so
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
51 opt/${P}/jre/plugin/i386/ns4/libjavaplugin.so
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
52 opt/${P}/jre/plugin/i386/ns610/libjavaplugin_oji.so
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
53 opt/${P}/jre/plugin/i386/ns610-gcc32/libjavaplugin_oji.so"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
54 QA_DT_HASH="opt/${P}/.*"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
55
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
56 pkg_nofetch() {
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
57 einfo "Please download ${At} from:"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
58 einfo ${DOWNLOAD_URL}
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
59 einfo "and move it to ${DISTDIR}"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
60 if use jce; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
61 echo
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
62 einfo "Also download ${jce_policy} from:"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
63 einfo ${DOWNLOAD_URL_JCE}
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
64 einfo "Java(TM) Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
65 einfo "and move it to ${DISTDIR}"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
66 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
67 }
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
68
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
69 src_unpack() {
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
70 if [ ! -r "${DISTDIR}/${At}" ]; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
71 die "cannot read ${At}. Please check the permission and try again."
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
72 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
73 if use jce; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
74 if [ ! -r "${DISTDIR}/${jce_policy}" ]; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
75 die "cannot read ${jce_policy}. Please check the permission and try again."
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
76 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
77 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
78 #Search for the ELF Header
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
79 testExp=$(echo -e '\0177\0105\0114\0106\0001\0001\0001')
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
80 startAt=`grep -aonm 1 ${testExp} ${DISTDIR}/${At} | cut -d: -f1`
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
81 tail -n +${startAt} "${DISTDIR}/${At}" > install.sfx
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
82 chmod +x install.sfx
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
83 ./install.sfx || die
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
84 rm install.sfx
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
85
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
86 if [[ -f ${S}/lib/unpack ]]; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
87 UNPACK_CMD=${S}/lib/unpack
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
88 chmod +x $UNPACK_CMD
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
89 sed -i 's#/tmp/unpack.log#/dev/null\x00\x00\x00\x00\x00\x00#g' $UNPACK_CMD
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
90 local PACKED_JARS="lib/tools.jar jre/lib/rt.jar jre/lib/jsse.jar \
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
91 jre/lib/charsets.jar jre/lib/ext/localedata.jar jre/lib/plugin.jar \
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
92 jre/javaws/javaws.jar"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
93 for i in $PACKED_JARS; do
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
94 PACK_FILE=${S}/`dirname $i`/`basename $i .jar`.pack
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
95 if [ -f ${PACK_FILE} ]; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
96 echo " unpacking: $i"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
97 $UNPACK_CMD ${PACK_FILE} "${S}"/$i
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
98 rm -f ${PACK_FILE}
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
99 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
100 done
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
101 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
102 }
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
103
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
104 src_install() {
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
105 local dirs="bin include jre lib man"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
106 dodir /opt/${P}
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
107
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
108 cp -dPR ${dirs} "${D}/opt/${P}/"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
109
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
110 # Set PaX markings on all JDK/JRE executables to allow code-generation on
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
111 # the heap by the JIT compiler.
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
112 pax-mark srpm $(list-paxables "${D}"/opt/${P}/{,/jre}/bin/*)
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
113
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
114 dodoc COPYRIGHT README THIRDPARTYLICENSEREADME.txt || die
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
115 dohtml README.html || die
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
116 if use examples; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
117 cp -pPR demo "${D}/opt/${P}/" || die
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
118 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
119
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
120 cp -pPR src.zip "${D}/opt/${P}/" || die
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
121
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
122 if use jce ; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
123 # Using unlimited jce while still retaining the strong jce
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
124 # May have repercussions when you find you cannot symlink libraries
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
125 # in classpaths.
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
126 cd "${D}/opt/${P}/jre/lib/security"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
127 unzip "${DISTDIR}/${jce_policy}"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
128 mv jce unlimited-jce
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
129 dodir /opt/${P}/jre/lib/security/strong-jce
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
130 mv "${D}/opt/${P}/jre/lib/security/US_export_policy.jar" \
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
131 "${D}/opt/${P}/jre/lib/security/strong-jce" || die
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
132 mv "${D}/opt/${P}/jre/lib/security/local_policy.jar" \
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
133 "${D}/opt/${P}/jre/lib/security/strong-jce" || die
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
134 dosym /opt/${P}/jre/lib/security/unlimited-jce/US_export_policy.jar /opt/${P}/jre/lib/security/
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
135 dosym /opt/${P}/jre/lib/security/unlimited-jce/local_policy.jar /opt/${P}/jre/lib/security/
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
136 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
137
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
138 if use nsplugin; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
139 local plugin_dir="ns610"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
140 if has_version '>=sys-devel/gcc-3.2' ; then
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
141 plugin_dir="ns610-gcc32"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
142 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
143
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
144 install_mozilla_plugin /opt/${P}/jre/plugin/i386/${plugin_dir}/libjavaplugin_oji.so
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
145 fi
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
146
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
147 # bug #147259
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
148 dosym ../jre/javaws/javaws /opt/${P}/bin/javaws
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
149 dosym ../javaws/javaws /opt/${P}/jre/bin/javaws
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
150
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
151 # create dir for system preferences
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
152 dodir /opt/${P}/.systemPrefs
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
153 # Create files used as storage for system preferences.
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
154 touch "${D}/opt/${P}/.systemPrefs/.system.lock"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
155 chmod 644 "${D}/opt/${P}/.systemPrefs/.system.lock"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
156 touch "${D}/opt/${P}/.systemPrefs/.systemRootModFile"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
157 chmod 644 "${D}/opt/${P}/.systemPrefs/.systemRootModFile"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
158
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
159 # install control panel for Gnome/KDE
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
160 sed -e "s/INSTALL_DIR\/JRE_NAME_VERSION/\/opt\/${P}\/jre/" \
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
161 -e "s/\(Name=Java\)/\1 Control Panel ${SLOT}/" \
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
162 "${D}/opt/${P}/jre/plugin/desktop/sun_java.desktop" > \
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
163 "${T}/sun_java-${SLOT}.desktop"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
164
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
165 domenu "${T}/sun_java-${SLOT}.desktop"
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
166
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
167 set_java_env
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
168 java-vm_revdep-mask
44698527bb83 preserve sun-jdk-1.4 from the offical portage
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
169 }