Gentoo Archives: gentoo-commits

From: "Ralph Sennhauser (sera)" <sera@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/sun-jdk: ChangeLog sun-jdk-1.6.0.29-r1.ebuild
Date: Mon, 21 Nov 2011 13:26:24
Message-Id: 20111121132603.3C9792004B@flycatcher.gentoo.org
1 sera 11/11/21 13:26:03
2
3 Modified: ChangeLog
4 Added: sun-jdk-1.6.0.29-r1.ebuild
5 Log:
6 Use java-vm-2.eclass to set PaX markings
7
8 (Portage version: 2.1.10.35/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.312 dev-java/sun-jdk/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/sun-jdk/ChangeLog?rev=1.312&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/sun-jdk/ChangeLog?rev=1.312&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/sun-jdk/ChangeLog?r1=1.311&r2=1.312
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/ChangeLog,v
20 retrieving revision 1.311
21 retrieving revision 1.312
22 diff -u -r1.311 -r1.312
23 --- ChangeLog 18 Nov 2011 22:11:13 -0000 1.311
24 +++ ChangeLog 21 Nov 2011 13:26:03 -0000 1.312
25 @@ -1,6 +1,11 @@
26 # ChangeLog for dev-java/sun-jdk
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/ChangeLog,v 1.311 2011/11/18 22:11:13 sera Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/ChangeLog,v 1.312 2011/11/21 13:26:03 sera Exp $
30 +
31 +*sun-jdk-1.6.0.29-r1 (21 Nov 2011)
32 +
33 + 21 Nov 2011; Ralph Sennhauser <sera@g.o> +sun-jdk-1.6.0.29-r1.ebuild:
34 + Use java-vm-2.eclass to set PaX markings
35
36 18 Nov 2011; Ralph Sennhauser <sera@g.o> sun-jdk-1.6.0.29.ebuild:
37 Add missing pax markings for x86. Bug 389751
38
39
40
41 1.1 dev-java/sun-jdk/sun-jdk-1.6.0.29-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.6.0.29-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.6.0.29-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: sun-jdk-1.6.0.29-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.6.0.29-r1.ebuild,v 1.1 2011/11/21 13:26:03 sera Exp $
51
52 EAPI="4"
53
54 inherit java-vm-2 eutils prefix versionator
55
56 MY_PV="$(get_version_component_range 2)u$(get_version_component_range 4)"
57 S_PV="$(replace_version_separator 3 '_')"
58
59 X86_AT="jdk-${MY_PV}-linux-i586.bin"
60 AMD64_AT="jdk-${MY_PV}-linux-x64.bin"
61
62 # check the URIs when bumping, no idea about their stability yet
63 JDK_URI="http://www.oracle.com/technetwork/java/javase/downloads/jdk-${MY_PV}-download-513648.html"
64
65 DESCRIPTION="Oracle's Java SE Development Kit"
66 HOMEPAGE="http://www.oracle.com/technetwork/java/javase/"
67 SRC_URI="x86? ( ${X86_AT} )
68 amd64? ( ${AMD64_AT} )"
69
70 LICENSE="Oracle-BCLA-JavaSE"
71 KEYWORDS="~amd64 ~x86"
72 SLOT="1.6"
73 IUSE="X alsa derby doc examples jce nsplugin"
74
75 RESTRICT="fetch strip"
76 QA_TEXTRELS_x86="
77 opt/${P}/jre/lib/i386/client/libjvm.so
78 opt/${P}/jre/lib/i386/motif21/libmawt.so
79 opt/${P}/jre/lib/i386/server/libjvm.so"
80
81 RDEPEND="${DEPEND}
82 doc? ( dev-java/java-sdk-docs:1.6.0 )
83 !prefix? ( sys-libs/glibc )
84 alsa? ( media-libs/alsa-lib )
85 X? (
86 x11-libs/libXext
87 x11-libs/libXi
88 x11-libs/libXrender
89 x11-libs/libXtst
90 x11-libs/libX11
91 )"
92 DEPEND="jce? ( dev-java/sun-jce-bin:1.6 )"
93
94 S="${WORKDIR}/jdk${S_PV}"
95
96 pkg_nofetch() {
97 if use x86; then
98 AT=${X86_AT}
99 elif use amd64; then
100 AT=${AMD64_AT}
101 fi
102
103 einfo "Due to Oracle no longer providing the distro-friendly DLJ bundles, the package has become fetch restricted again."
104 einfo "Alternatives are switching to dev-java/icedtea-bin:6 or the source-based dev-java/icedtea:6"
105
106 einfo "Please download ${AT} from:"
107 einfo "${JDK_URI}"
108 einfo "and move it to ${DISTDIR}"
109 }
110
111 src_unpack() {
112 sh "${DISTDIR}"/${A} -noregister || die "Failed to unpack"
113 }
114
115 src_compile() {
116 # This needs to be done before CDS - #215225
117 java-vm_set-pax-markings "${S}"
118
119 # see bug #207282
120 einfo "Creating the Class Data Sharing archives"
121 if use x86; then
122 "${S}"/bin/java -client -Xshare:dump || die
123 fi
124 "${S}"/bin/java -server -Xshare:dump || die
125 }
126
127 src_install() {
128 # We should not need the ancient plugin for Firefox 2 anymore, plus it has
129 # writable executable segments
130 if use x86; then
131 rm -vf {,jre/}lib/i386/libjavaplugin_oji.so \
132 {,jre/}lib/i386/libjavaplugin_nscp*.so
133 rm -vrf jre/plugin/i386
134 fi
135 # Without nsplugin flag, also remove the new plugin
136 local arch=${ARCH};
137 use x86 && arch=i386;
138 if ! use nsplugin; then
139 rm -vf {,jre/}lib/${arch}/libnpjp2.so \
140 {,jre/}lib/${arch}/libjavaplugin_jni.so
141 fi
142
143 dodir /opt/${P}
144 cp -pPR bin include jre lib man src.zip "${ED}"/opt/${P} || die
145
146 if use derby; then
147 cp -pPR db "${ED}"/opt/${P} || die
148 fi
149
150 if use examples; then
151 cp -pPR demo sample "${ED}"/opt/${P} || die
152 fi
153
154 # Remove empty dirs we might have copied
155 rmdir -v $(find "${D}" -type d -empty) || die
156
157 dodoc COPYRIGHT
158 dohtml README.html
159
160 if use jce; then
161 dodir /opt/${P}/jre/lib/security/strong-jce
162 mv "${ED}"/opt/${P}/jre/lib/security/US_export_policy.jar \
163 "${ED}"/opt/${P}/jre/lib/security/strong-jce || die
164 mv "${ED}"/opt/${P}/jre/lib/security/local_policy.jar \
165 "${ED}"/opt/${P}/jre/lib/security/strong-jce || die
166 dosym /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/US_export_policy.jar \
167 /opt/${P}/jre/lib/security/US_export_policy.jar
168 dosym /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/local_policy.jar \
169 /opt/${P}/jre/lib/security/local_policy.jar
170 fi
171
172 if use nsplugin; then
173 install_mozilla_plugin /opt/${P}/jre/lib/${arch}/libnpjp2.so
174 fi
175
176 # Install desktop file for the Java Control Panel. Using VMHANDLE as file
177 # name to prevent file collision with jre and or other slots.
178 [[ -f "${ED}"/opt/${P}/jre/lib/desktop/applications/sun_java.desktop ]] || die
179 sed -e "s/\(Name=\)Java/\1 Java Control Panel for Oracle JDK ${SLOT} (sun-jdk)/" \
180 -e "s#Exec=.*#Exec=/opt/${P}/jre/bin/jcontrol#" \
181 -e "s#Icon=.*#Icon=/opt/${P}/jre/lib/desktop/icons/hicolor/48x48/apps/sun-jcontrol.png#" \
182 "${ED}"/opt/${P}/jre/lib/desktop/applications/sun_java.desktop > \
183 "${T}"/${VMHANDLE}.desktop
184
185 domenu "${T}"/${VMHANDLE}.desktop
186
187 # bug #56444
188 cp "${FILESDIR}"/fontconfig.Gentoo.properties-r1 "${T}"/fontconfig.properties || die
189 eprefixify "${T}"/fontconfig.properties
190 insinto /opt/${P}/jre/lib/
191 doins "${T}"/fontconfig.properties
192
193 set_java_env "${FILESDIR}/${VMHANDLE}.env-r1"
194 java-vm_revdep-mask
195 }