Gentoo Archives: gentoo-commits

From: "Vlastimil Babka (caster)" <caster@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/icedtea: icedtea-6.1.9.4.ebuild ChangeLog icedtea-6.1.9.5.ebuild icedtea-6.1.9.3.ebuild
Date: Wed, 02 Feb 2011 00:06:18
Message-Id: 20110202000607.B2D9B20057@flycatcher.gentoo.org
1 caster 11/02/02 00:06:07
2
3 Modified: icedtea-6.1.9.4.ebuild ChangeLog
4 Added: icedtea-6.1.9.5.ebuild
5 Removed: icedtea-6.1.9.3.ebuild
6 Log:
7 Version bump, security bug #353418. Use get_libdir to set proper lib dir in the env file.
8
9 (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.3 dev-java/icedtea/icedtea-6.1.9.4.ebuild
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.4.ebuild?rev=1.3&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.4.ebuild?rev=1.3&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.4.ebuild?r1=1.2&r2=1.3
17
18 Index: icedtea-6.1.9.4.ebuild
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.4.ebuild,v
21 retrieving revision 1.2
22 retrieving revision 1.3
23 diff -u -r1.2 -r1.3
24 --- icedtea-6.1.9.4.ebuild 21 Jan 2011 22:51:23 -0000 1.2
25 +++ icedtea-6.1.9.4.ebuild 2 Feb 2011 00:06:07 -0000 1.3
26 @@ -1,6 +1,6 @@
27 # Copyright 1999-2011 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.4.ebuild,v 1.2 2011/01/21 22:51:23 caster Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.4.ebuild,v 1.3 2011/02/02 00:06:07 caster Exp $
31 # Build written by Andrew John Hughes (gnu_andrew@××××××××××.org)
32
33 # *********************************************************
34 @@ -306,7 +306,7 @@
35
36 sed -e "s/@SLOT@/${SLOT}/g" \
37 -e "s/@PV@/${ICEDTEA_VER}/g" \
38 - < "${FILESDIR}/icedtea.env" > "${T}/icedtea.env"
39 + < "${FILESDIR}/icedtea-old.env" > "${T}/icedtea.env"
40 set_java_env "${T}/icedtea.env"
41 }
42
43
44
45
46 1.22 dev-java/icedtea/ChangeLog
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/ChangeLog?rev=1.22&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/ChangeLog?rev=1.22&content-type=text/plain
50 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/ChangeLog?r1=1.21&r2=1.22
51
52 Index: ChangeLog
53 ===================================================================
54 RCS file: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v
55 retrieving revision 1.21
56 retrieving revision 1.22
57 diff -u -r1.21 -r1.22
58 --- ChangeLog 21 Jan 2011 22:51:23 -0000 1.21
59 +++ ChangeLog 2 Feb 2011 00:06:07 -0000 1.22
60 @@ -1,6 +1,14 @@
61 # ChangeLog for dev-java/icedtea
62 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
63 -# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v 1.21 2011/01/21 22:51:23 caster Exp $
64 +# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v 1.22 2011/02/02 00:06:07 caster Exp $
65 +
66 +*icedtea-6.1.9.5 (02 Feb 2011)
67 +
68 + 02 Feb 2011; Vlastimil Babka <caster@g.o> +files/6.1.9.5-sparc.patch,
69 + +icedtea-6.1.9.5.ebuild, +files/icedtea-old.env, -files/6.1.9.3-sparc.patch,
70 + -icedtea-6.1.9.3.ebuild, icedtea-6.1.9.4.ebuild, files/icedtea.env:
71 + Version bump, security bug #353418. Use get_libdir to set proper lib dir in
72 + the env file.
73
74 21 Jan 2011; Vlastimil Babka <caster@g.o> icedtea-6.1.9.3.ebuild,
75 icedtea-6.1.9.4.ebuild:
76
77
78
79 1.1 dev-java/icedtea/icedtea-6.1.9.5.ebuild
80
81 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.5.ebuild?rev=1.1&view=markup
82 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.5.ebuild?rev=1.1&content-type=text/plain
83
84 Index: icedtea-6.1.9.5.ebuild
85 ===================================================================
86 # Copyright 1999-2011 Gentoo Foundation
87 # Distributed under the terms of the GNU General Public License v2
88 # $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-6.1.9.5.ebuild,v 1.1 2011/02/02 00:06:07 caster Exp $
89 # Build written by Andrew John Hughes (gnu_andrew@××××××××××.org)
90
91 # *********************************************************
92 # * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-7.* AS WELL *
93 # *********************************************************
94
95 EAPI="2"
96
97 inherit autotools pax-utils java-pkg-2 java-vm-2 versionator
98
99 LICENSE="Apache-1.1 Apache-2.0 GPL-1 GPL-2 GPL-2-with-linking-exception LGPL-2 MPL-1.0 MPL-1.1 public-domain W3C"
100 SLOT="6"
101 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
102
103 DESCRIPTION="A harness to build the OpenJDK using Free Software build tools and dependencies"
104 ICEDTEA_VER="$(get_version_component_range 2-4)"
105 ICEDTEA_PKG=icedtea${SLOT}-${ICEDTEA_VER}
106 OPENJDK_BUILD="20"
107 OPENJDK_DATE="21_jun_2010"
108 OPENJDK_TARBALL="openjdk-6-src-b${OPENJDK_BUILD}-${OPENJDK_DATE}.tar.gz"
109 JAXP_TARBALL="jdk6-jaxp-b20.zip"
110 JAXWS_TARBALL="jdk6-jaxws-b20.zip"
111 JAF_TARBALL="jdk6-jaf-b20.zip"
112 HOTSPOT_TARBALL="13edc857b967.tar.gz"
113 CACAO_TARBALL="e321b101a9ee.tar.bz2"
114 SRC_URI="http://icedtea.classpath.org/download/source/${ICEDTEA_PKG}.tar.gz
115 http://download.java.net/openjdk/jdk6/promoted/b${OPENJDK_BUILD}/${OPENJDK_TARBALL}
116 http://icedtea.classpath.org/download/drops/${JAXWS_TARBALL}
117 http://icedtea.classpath.org/download/drops/${JAF_TARBALL}
118 http://icedtea.classpath.org/download/drops/${JAXP_TARBALL}
119 http://hg.openjdk.java.net/hsx/hsx19/master/archive/${HOTSPOT_TARBALL}
120 cacao? ( http://mips.complang.tuwien.ac.at/hg/cacao/archive/${CACAO_TARBALL} )"
121 HOMEPAGE="http://icedtea.classpath.org"
122 S=${WORKDIR}/${ICEDTEA_PKG}
123
124 # Missing options:
125 # shark - needs adding
126 IUSE="cacao debug doc examples +hs19 javascript nio2 +nsplugin +nss pulseaudio systemtap +webstart +xrender zero"
127
128 # JTReg doesn't pass at present
129 RESTRICT="test"
130
131 RDEPEND=">=net-print/cups-1.2.12
132 >=x11-libs/libX11-1.1.3
133 >=media-libs/freetype-2.3.5
134 >=media-libs/alsa-lib-1.0
135 >=x11-libs/gtk+-2.8
136 >=x11-libs/libXinerama-1.0.2
137 >=x11-libs/libXp-1.0.0
138 >=x11-libs/libXi-1.1.3
139 >=x11-libs/libXau-1.0.3
140 >=x11-libs/libXdmcp-1.0.2
141 >=x11-libs/libXtst-1.0.3
142 virtual/jpeg
143 >=media-libs/libpng-1.2
144 >=media-libs/giflib-4.1.6
145 >=sys-libs/zlib-1.2.3
146 x11-proto/inputproto
147 x11-proto/xineramaproto
148 nsplugin? ( >=net-libs/xulrunner-1.9.1 )
149 pulseaudio? ( >=media-sound/pulseaudio-0.9.11 )
150 javascript? ( dev-java/rhino:1.6 )
151 zero? ( virtual/libffi )
152 xrender? ( >=x11-libs/libXrender-0.9.4 )
153 systemtap? ( >=dev-util/systemtap-1 )
154 !dev-java/icedtea6
155 nss? ( >=dev-libs/nss-3.12.5-r1 )"
156
157 # Additional dependencies for building:
158 # zip: extract OpenJDK tarball, and needed by configure
159 # xalan/xerces: automatic code generation (also needed for Ant 1.8.0 to work properly)
160 # ant, ecj, jdk: required to build Java code
161 # Only ant-core-1.7.1-r2 and later contain a version of Ant that
162 # properly respects environment variables, if the build
163 # sets some environment variables.
164 # ca-certificates, perl and openssl are used for the cacerts keystore generation
165 # xext headers have two variants depending on version - bug #288855
166 DEPEND="${RDEPEND}
167 || (
168 ( >=dev-java/gcj-jdk-4.3 >=app-admin/eselect-ecj-0.5-r1 )
169 ( >=dev-java/cacao-0.99.2 >=app-admin/eselect-ecj-0.5-r1 )
170 dev-java/icedtea6-bin
171 dev-java/icedtea:${SLOT}
172 )
173 app-arch/zip
174 >=dev-java/xalan-2.7.0:0
175 >=dev-java/xerces-2.9.1:2
176 >=dev-java/ant-core-1.7.1-r2
177 dev-java/ant-nodeps
178 app-misc/ca-certificates
179 dev-lang/perl
180 dev-libs/openssl
181 || (
182 (
183 >=x11-libs/libXext-1.1.1
184 >=x11-proto/xextproto-7.1.1
185 x11-proto/xproto
186 )
187 <x11-libs/libXext-1.1.1
188 )
189 sys-apps/lsb-release"
190
191 # a bit of hack so the VM switching is triggered without causing dependency troubles
192 JAVA_PKG_NV_DEPEND=">=virtual/jdk-1.5"
193 JAVA_PKG_WANT_SOURCE="1.5"
194 JAVA_PKG_WANT_TARGET="1.5"
195
196 pkg_setup() {
197 # Shark support disabled for now - still experimental and needs sys-devel/llvm
198 # if use shark ; then
199 # if ( ! use x86 && ! use sparc && ! use ppc ) ; then
200 # eerror "The Shark JIT has known issues on 64-bit platforms. Please rebuild"
201 # errror "without the shark USE flag turned on."
202 # die "Rebuild without the shark USE flag on."
203 # fi
204 # if ( ! use zero ) ; then
205 # eerror "The use of the Shark JIT is only applicable when used with the zero assembler port.";
206 # die "Rebuild without the shark USE flag on or with the zero USE flag turned on."
207 # fi
208 # fi
209
210 if use nsplugin && ! use webstart ; then
211 eerror "WebStart is required if building the plugin."
212 die 'Re-try with USE="webstart"'
213 fi
214
215 # quite a hack since java-config does not provide a way for a package
216 # to limit supported VM's for building and their preferred order
217 if [[ -n "${JAVA_PKG_FORCE_VM}" ]]; then
218 einfo "Honoring user-set JAVA_PKG_FORCE_VM"
219 elif has_version "dev-java/icedtea:${SLOT}"; then
220 JAVA_PKG_FORCE_VM="icedtea6"
221 elif has_version dev-java/icedtea6; then
222 JAVA_PKG_FORCE_VM="icedtea6"
223 elif has_version dev-java/icedtea6-bin; then
224 JAVA_PKG_FORCE_VM="icedtea6-bin"
225 elif has_version dev-java/gcj-jdk; then
226 JAVA_PKG_FORCE_VM="gcj-jdk"
227 elif has_version dev-java/cacao; then
228 JAVA_PKG_FORCE_VM="cacao"
229 else
230 JAVA_PKG_FORCE_VM=""
231 # don't die just yet if merging a binpkg - bug #258423
232 DIE_IF_NOT_BINPKG=true
233 fi
234
235 # if the previous failed, don't even run java eclasses pkg_setup
236 # as it might also die when no VM is present
237 if [[ -n "${JAVA_PKG_FORCE_VM}" ]]; then
238 einfo "Forced vm ${JAVA_PKG_FORCE_VM}"
239 java-vm-2_pkg_setup
240 java-pkg-2_pkg_setup
241 fi
242
243 VMHANDLE="icedtea${SLOT}"
244 }
245
246 src_unpack() {
247 if [[ -n ${DIE_IF_NOT_BINPKG} ]]; then
248 die "Unable to find a supported VM for building"
249 fi
250 unpack ${ICEDTEA_PKG}.tar.gz
251 }
252
253 unset_vars() {
254 unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
255 }
256
257 src_prepare() {
258 epatch "${FILESDIR}/${PV}-sparc.patch"
259 eautoreconf
260 }
261
262 src_configure() {
263 local config procs rhino_jar
264 local vm=$(java-pkg_get-current-vm)
265 local vmhome="/usr/$(get_libdir)/jvm/${vm}"
266
267 # IcedTea6 can't be built using IcedTea7; its class files are too new
268 if [[ "${vm}" == "icedtea6" ]] || [[ "${vm}" == "icedtea6-bin" ]] ; then
269 # If we are upgrading icedtea, then we don't need to bootstrap.
270 config="${config} --with-openjdk=$(java-config -O)"
271 elif [[ "${vm}" == "gcj-jdk" || "${vm}" == "cacao" ]] ; then
272 # For other 1.5 JDKs e.g. GCJ, CACAO.
273 config="${config} --with-ecj-jar=/usr/share/eclipse-ecj/ecj.jar" \
274 config="${config} --with-gcj-home=${vmhome}"
275 else
276 eerror "IcedTea${SLOT} must be built with either a JDK based on GNU Classpath or an existing build of IcedTea${SLOT}."
277 die "Install a GNU Classpath JDK (gcj-jdk, cacao)"
278 fi
279
280 # OpenJDK-specific parallelism support.
281 procs=$(echo ${MAKEOPTS} | sed -r 's/.*-j\W*([0-9]+).*/\1/')
282 if [[ -n ${procs} ]] ; then
283 config="${config} --with-parallel-jobs=${procs}";
284 einfo "Configuring using --with-parallel-jobs=${procs}"
285 fi
286
287 if use_zero ; then
288 config="${config} --enable-zero"
289 else
290 config="${config} --disable-zero"
291 fi
292
293 if use javascript ; then
294 rhino_jar=$(java-pkg_getjar rhino:1.6 js.jar);
295 fi
296
297 if use hs19 ; then
298 config="${config} --with-hotspot-build=hs19"
299 fi
300
301 unset_vars
302
303 econf ${config} \
304 --with-openjdk-src-zip="${DISTDIR}/${OPENJDK_TARBALL}" \
305 --with-hotspot-src-zip="${DISTDIR}/${HOTSPOT_TARBALL}" \
306 --with-jaxp-drop-zip="${DISTDIR}/${JAXP_TARBALL}" \
307 --with-jaxws-drop-zip="${DISTDIR}/${JAXWS_TARBALL}" \
308 --with-jaf-drop-zip="${DISTDIR}/${JAF_TARBALL}" \
309 --with-cacao-src-zip="${DISTDIR}/${CACAO_TARBALL}" \
310 --with-java="${vmhome}/bin/java" \
311 --with-javac="${vmhome}/bin/javac" \
312 --with-javah="${vmhome}/bin/javah" \
313 --with-abs-install-dir=/usr/$(get_libdir)/icedtea${SLOT} \
314 $(use_enable !debug optimizations) \
315 $(use_enable doc docs) \
316 $(use_enable nsplugin plugin) \
317 $(use_with javascript rhino ${rhino_jar}) \
318 $(use_enable cacao) \
319 $(use_enable pulseaudio pulse-java) \
320 $(use_enable xrender) \
321 $(use_enable systemtap) \
322 $(use_enable nio2) \
323 $(use_enable nss) \
324 $(use_enable webstart) \
325 || die "configure failed"
326 }
327
328 src_compile() {
329 # Newer versions of Gentoo's ant add
330 # an environment variable so it works properly...
331 export ANT_RESPECT_JAVA_HOME=TRUE
332 # ant -diagnostics in Ant 1.8.0 fails without these
333 # otherwise we try to load the least that's needed to avoid possible classpath collisions
334 export ANT_TASKS="xerces-2 xalan ant-nodeps"
335
336 # Paludis does not respect unset from src_configure
337 unset_vars
338 emake -j 1 || die "make failed"
339 }
340
341 src_install() {
342 local dest="/usr/$(get_libdir)/icedtea${SLOT}"
343 local ddest="${D}/${dest}"
344 dodir "${dest}" || die
345
346 dodoc README NEWS AUTHORS THANKYOU || die
347 dosym "/usr/share/doc/${PF}" "/usr/share/doc/${PN}${SLOT}"
348
349 cd "${S}/openjdk.build/j2sdk-image" || die
350
351 if use doc ; then
352 # java-pkg_dohtml needed for package-list #302654
353 java-pkg_dohtml -r ../docs/* || die "Failed to install documentation"
354 fi
355
356 # doins can't handle symlinks.
357 cp -vRP bin include jre lib man "${ddest}" || die "failed to copy"
358
359 # Set PaX markings on all JDK/JRE executables to allow code-generation on
360 # the heap by the JIT compiler.
361 pax-mark m $(list-paxables "${ddest}"{,/jre}/bin/*)
362
363 dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README || die
364
365 if use examples; then
366 dodir "${dest}/share";
367 cp -vRP demo sample "${ddest}/share/" || die
368 fi
369
370 cp src.zip "${ddest}" || die
371
372 # Fix the permissions.
373 find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die
374
375 if use nsplugin; then
376 local arch=${ARCH};
377 use x86 && arch=i386;
378 install_mozilla_plugin "${dest}/jre/lib/${arch}/IcedTeaPlugin.so";
379 fi
380
381 # We need to generate keystore - bug #273306
382 einfo "Generating cacerts file from certificates in /usr/share/ca-certificates/"
383 mkdir "${T}/certgen" && cd "${T}/certgen" || die
384 cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die
385 for c in /usr/share/ca-certificates/*/*.crt; do
386 openssl x509 -text -in "${c}" >> all.crt || die
387 done
388 ./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die
389 cp -vRP cacerts "${ddest}/jre/lib/security/" || die
390 chmod 644 "${ddest}/jre/lib/security/cacerts" || die
391
392 sed -e "s#@SLOT@#${SLOT}#g" \
393 -e "s#@PV@#${ICEDTEA_VER}#g" \
394 -e "s#@LIBDIR@#$(get_libdir)#g" \
395 < "${FILESDIR}/icedtea.env" > "${T}/icedtea.env"
396 set_java_env "${T}/icedtea.env"
397 }
398
399 use_zero() {
400 use zero || ( ! use amd64 && ! use x86 && ! use sparc )
401 }
402
403 pkg_postinst() {
404 # Set as default VM if none exists
405 java-vm-2_pkg_postinst
406
407 if use nsplugin; then
408 elog "The icedtea${SLOT} browser plugin (NPPlugin) can be enabled using eselect java-nsplugin"
409 elog "Note that the plugin works only in browsers based on xulrunner-1.9.1 or later"
410 elog "such as Firefox 3.5+, Chromium and perhaps some others too."
411 fi
412 }