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