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