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