1 |
sera 11/11/28 15:29:59 |
2 |
|
3 |
Modified: ChangeLog metadata.xml |
4 |
Added: icedtea-6.1.10.4-r2.ebuild icedtea-7.2.0-r2.ebuild |
5 |
Log: |
6 |
Install Gentoo specific fontconfig properties file. #390663 |
7 |
Add missing dependency on pkgconfig. #391987 |
8 |
Add use flag X and cjk to install expected fonts. #349916 |
9 |
Add use flag source and install src.zip conditionally. |
10 |
Add use flag jbootstrap and make bootstrap optional where possible. |
11 |
Remove use flag xrender and require libXrender for icedtea:6, icedtea:7 does this already. #382867 |
12 |
Use @SLOT@ substitution in set_java_env. |
13 |
Prefixify. |
14 |
|
15 |
(Portage version: 2.1.10.37/cvs/Linux x86_64) |
16 |
|
17 |
Revision Changes Path |
18 |
1.56 dev-java/icedtea/ChangeLog |
19 |
|
20 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/ChangeLog?rev=1.56&view=markup |
21 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/ChangeLog?rev=1.56&content-type=text/plain |
22 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/ChangeLog?r1=1.55&r2=1.56 |
23 |
|
24 |
Index: ChangeLog |
25 |
=================================================================== |
26 |
RCS file: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v |
27 |
retrieving revision 1.55 |
28 |
retrieving revision 1.56 |
29 |
diff -u -r1.55 -r1.56 |
30 |
--- ChangeLog 25 Nov 2011 18:19:47 -0000 1.55 |
31 |
+++ ChangeLog 28 Nov 2011 15:29:59 -0000 1.56 |
32 |
@@ -1,6 +1,22 @@ |
33 |
# ChangeLog for dev-java/icedtea |
34 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
35 |
-# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v 1.55 2011/11/25 18:19:47 caster Exp $ |
36 |
+# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/ChangeLog,v 1.56 2011/11/28 15:29:59 sera Exp $ |
37 |
+ |
38 |
+*icedtea-7.2.0-r2 (28 Nov 2011) |
39 |
+*icedtea-6.1.10.4-r2 (28 Nov 2011) |
40 |
+ |
41 |
+ 28 Nov 2011; Ralph Sennhauser <sera@g.o> +icedtea-6.1.10.4-r2.ebuild, |
42 |
+ +icedtea-7.2.0-r2.ebuild, +files/fontconfig.Gentoo.properties.src, |
43 |
+ files/icedtea.env, metadata.xml: |
44 |
+ Install Gentoo specific fontconfig properties file. #390663 |
45 |
+ Add missing dependency on pkgconfig. #391987 |
46 |
+ Add use flag X and cjk to install expected fonts. #349916 |
47 |
+ Add use flag source and install src.zip conditionally. |
48 |
+ Add use flag jbootstrap and make bootstrap optional where possible. |
49 |
+ Remove use flag xrender and require libXrender for icedtea:6, icedtea:7 does |
50 |
+ this already. #382867 |
51 |
+ Use @SLOT@ substitution in set_java_env. |
52 |
+ Prefixify. |
53 |
|
54 |
25 Nov 2011; Vlastimil Babka <caster@g.o> ChangeLog: |
55 |
Restore Changelog truncated by mistake, bug #391253. |
56 |
|
57 |
|
58 |
|
59 |
1.11 dev-java/icedtea/metadata.xml |
60 |
|
61 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/metadata.xml?rev=1.11&view=markup |
62 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/metadata.xml?rev=1.11&content-type=text/plain |
63 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/metadata.xml?r1=1.10&r2=1.11 |
64 |
|
65 |
Index: metadata.xml |
66 |
=================================================================== |
67 |
RCS file: /var/cvsroot/gentoo-x86/dev-java/icedtea/metadata.xml,v |
68 |
retrieving revision 1.10 |
69 |
retrieving revision 1.11 |
70 |
diff -u -r1.10 -r1.11 |
71 |
--- metadata.xml 4 Nov 2011 11:19:30 -0000 1.10 |
72 |
+++ metadata.xml 28 Nov 2011 15:29:59 -0000 1.11 |
73 |
@@ -17,6 +17,7 @@ |
74 |
<flag name="cacao">Use the CACAO virtual machine instead of HotSpot on x86, amd64 or SPARC architectures.</flag> |
75 |
<flag name="hs20">Use the new version of HotSpot (20).</flag> |
76 |
<flag name="jamvm">Use the JamVM virtual machine instead of HotSpot.</flag> |
77 |
+ <flag name="jbootstrap">If possible, recompile the final IcedTea executables with itself.</flag> |
78 |
<flag name="nio2">Enable backport of NIO2 to OpenJDK6.</flag> |
79 |
<flag name="nss">Enable NSS security provider support.</flag> |
80 |
<flag name="nsplugin">Enable browser plugin (NPPlugin), requires also the webstart flag to be enabled.</flag> |
81 |
|
82 |
|
83 |
|
84 |
1.1 dev-java/icedtea/icedtea-6.1.10.4-r2.ebuild |
85 |
|
86 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-6.1.10.4-r2.ebuild?rev=1.1&view=markup |
87 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-6.1.10.4-r2.ebuild?rev=1.1&content-type=text/plain |
88 |
|
89 |
Index: icedtea-6.1.10.4-r2.ebuild |
90 |
=================================================================== |
91 |
# Copyright 1999-2011 Gentoo Foundation |
92 |
# Distributed under the terms of the GNU General Public License v2 |
93 |
# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-6.1.10.4-r2.ebuild,v 1.1 2011/11/28 15:29:59 sera Exp $ |
94 |
# Build written by Andrew John Hughes (gnu_andrew@××××××××××.org) |
95 |
|
96 |
# ********************************************************* |
97 |
# * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-7.* AS WELL * |
98 |
# ********************************************************* |
99 |
|
100 |
EAPI="4" |
101 |
|
102 |
inherit java-pkg-2 java-vm-2 pax-utils prefix versionator |
103 |
|
104 |
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" |
105 |
SLOT="6" |
106 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" |
107 |
|
108 |
DESCRIPTION="A harness to build the OpenJDK using Free Software build tools and dependencies" |
109 |
ICEDTEA_VER="$(get_version_component_range 2-4)" |
110 |
ICEDTEA_PKG=icedtea${SLOT}-${ICEDTEA_VER} |
111 |
OPENJDK_BUILD="22" |
112 |
OPENJDK_DATE="28_feb_2011" |
113 |
OPENJDK_TARBALL="openjdk-6-src-b${OPENJDK_BUILD}-${OPENJDK_DATE}.tar.gz" |
114 |
JAXP_TARBALL="jaxp144_01.zip" |
115 |
JAXWS_TARBALL="jdk6-jaxws-b20.zip" |
116 |
JAF_TARBALL="jdk6-jaf-b20.zip" |
117 |
HOTSPOT_TARBALL="f0f676c5a2c6.tar.gz" |
118 |
SRC_URI="http://icedtea.classpath.org/download/source/${ICEDTEA_PKG}.tar.gz |
119 |
http://download.java.net/openjdk/jdk6/promoted/b${OPENJDK_BUILD}/${OPENJDK_TARBALL} |
120 |
http://icedtea.classpath.org/download/drops/${JAXWS_TARBALL} |
121 |
http://icedtea.classpath.org/download/drops/${JAF_TARBALL} |
122 |
http://icedtea.classpath.org/download/drops/${JAXP_TARBALL} |
123 |
hs20? ( http://hg.openjdk.java.net/hsx/hsx20/master/archive/${HOTSPOT_TARBALL} )" |
124 |
HOMEPAGE="http://icedtea.classpath.org" |
125 |
S=${WORKDIR}/${ICEDTEA_PKG} |
126 |
|
127 |
# Missing options: |
128 |
# shark - needs adding |
129 |
IUSE="X debug cjk doc examples +hs20 javascript +jbootstrap nio2 +nsplugin +nss pulseaudio +source systemtap +webstart" |
130 |
|
131 |
# JTReg doesn't pass at present |
132 |
RESTRICT="test" |
133 |
|
134 |
# media-fonts/lklug needs ppc ppc64 keywords, needs adding to use cjk |
135 |
RDEPEND="!dev-java/icedtea6 |
136 |
>=media-libs/alsa-lib-1.0 |
137 |
>=media-libs/freetype-2.3.5 |
138 |
>=media-libs/giflib-4.1.6 |
139 |
>=media-libs/libpng-1.2 |
140 |
>=net-print/cups-1.2.12 |
141 |
>=sys-libs/zlib-1.2.3 |
142 |
virtual/jpeg |
143 |
>=x11-libs/gtk+-2.8:2 |
144 |
>=x11-libs/libX11-1.1.3 |
145 |
>=x11-libs/libXau-1.0.3 |
146 |
>=x11-libs/libXdmcp-1.0.2 |
147 |
>=x11-libs/libXi-1.1.3 |
148 |
>=x11-libs/libXinerama-1.0.2 |
149 |
>=x11-libs/libXp-1.0.0 |
150 |
>=x11-libs/libXrender-0.9.4 |
151 |
>=x11-libs/libXtst-1.0.3 |
152 |
x11-proto/inputproto |
153 |
x11-proto/xineramaproto |
154 |
X? ( |
155 |
media-fonts/dejavu |
156 |
cjk? ( |
157 |
media-fonts/arphicfonts |
158 |
media-fonts/baekmuk-fonts |
159 |
media-fonts/lohit-fonts |
160 |
media-fonts/sazanami |
161 |
) |
162 |
) |
163 |
javascript? ( dev-java/rhino:1.6 ) |
164 |
nss? ( >=dev-libs/nss-3.12.5-r1 ) |
165 |
ppc64? ( virtual/libffi ) |
166 |
ppc? ( virtual/libffi ) |
167 |
pulseaudio? ( >=media-sound/pulseaudio-0.9.11 ) |
168 |
systemtap? ( >=dev-util/systemtap-1 )" |
169 |
|
170 |
# Additional dependencies for building: |
171 |
# zip: extract OpenJDK tarball, and needed by configure |
172 |
# xalan/xerces: automatic code generation (also needed for Ant 1.8.0 to work properly) |
173 |
# ant, ecj, jdk: required to build Java code |
174 |
# Only ant-core-1.7.1-r2 and later contain a version of Ant that |
175 |
# properly respects environment variables, if the build |
176 |
# sets some environment variables. |
177 |
# ca-certificates, perl and openssl are used for the cacerts keystore generation |
178 |
# xext headers have two variants depending on version - bug #288855 |
179 |
DEPEND="${RDEPEND} |
180 |
|| ( |
181 |
( >=dev-java/gcj-jdk-4.3 >=app-admin/eselect-ecj-0.5-r1 ) |
182 |
dev-java/icedtea-bin:6 |
183 |
dev-java/icedtea:${SLOT} |
184 |
) |
185 |
app-arch/zip |
186 |
dev-util/pkgconfig |
187 |
>=dev-java/xalan-2.7.0:0 |
188 |
>=dev-java/xerces-2.9.1:2 |
189 |
>=dev-java/ant-core-1.7.1-r2 |
190 |
dev-java/ant-nodeps |
191 |
app-misc/ca-certificates |
192 |
dev-lang/perl |
193 |
dev-libs/openssl |
194 |
>=x11-libs/libXext-1.1.1 |
195 |
>=x11-proto/xextproto-7.1.1 |
196 |
x11-proto/xproto |
197 |
sys-apps/lsb-release |
198 |
app-arch/cpio" |
199 |
|
200 |
PDEPEND="webstart? ( dev-java/icedtea-web:6 ) |
201 |
nsplugin? ( dev-java/icedtea-web:6[nsplugin] )" |
202 |
|
203 |
# a bit of hack so the VM switching is triggered without causing dependency troubles |
204 |
JAVA_PKG_NV_DEPEND=">=virtual/jdk-1.5" |
205 |
JAVA_PKG_WANT_SOURCE="1.5" |
206 |
JAVA_PKG_WANT_TARGET="1.5" |
207 |
|
208 |
pkg_setup() { |
209 |
if use nsplugin && ! use webstart ; then |
210 |
elog "Note that the nsplugin flag implies the webstart flag. Enable it to remove this message." |
211 |
fi |
212 |
|
213 |
[[ "${MERGE_TYPE}" == "binary" ]] && return #258423 |
214 |
|
215 |
# icedtea doesn't like some locales. #330433 #389717 |
216 |
export LANG="C" LC_ALL="C" |
217 |
|
218 |
# quite a hack since java-config does not provide a way for a package |
219 |
# to limit supported VM's for building and their preferred order |
220 |
if [[ -n "${JAVA_PKG_FORCE_VM}" ]]; then |
221 |
einfo "Honoring user-set JAVA_PKG_FORCE_VM" |
222 |
elif has_version "<=dev-java/icedtea-6.1.10.4:${SLOT}"; then |
223 |
JAVA_PKG_FORCE_VM="icedtea6" |
224 |
elif has_version ">dev-java/icedtea-6.1.10.4:${SLOT}"; then |
225 |
JAVA_PKG_FORCE_VM="icedtea-6" |
226 |
elif has_version "<dev-java/icedtea-bin-6.1.10.4:6"; then |
227 |
JAVA_PKG_FORCE_VM="icedtea6-bin" |
228 |
elif has_version ">=dev-java/icedtea-bin-6.1.10.4:6"; then |
229 |
JAVA_PKG_FORCE_VM="icedtea-bin-6" |
230 |
elif has_version dev-java/gcj-jdk; then |
231 |
JAVA_PKG_FORCE_VM="gcj-jdk" |
232 |
else |
233 |
die "Unable to find a supported VM for building" |
234 |
fi |
235 |
|
236 |
einfo "Forced vm ${JAVA_PKG_FORCE_VM}" |
237 |
java-vm-2_pkg_setup |
238 |
java-pkg-2_pkg_setup |
239 |
} |
240 |
|
241 |
src_unpack() { |
242 |
unpack ${ICEDTEA_PKG}.tar.gz |
243 |
} |
244 |
|
245 |
unset_vars() { |
246 |
unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS |
247 |
} |
248 |
|
249 |
src_configure() { |
250 |
local config procs rhino_jar |
251 |
local vm=$(java-pkg_get-current-vm) |
252 |
|
253 |
# IcedTea6 can't be built using IcedTea7; its class files are too new |
254 |
if has "${vm}" icedtea6 icedtea-6 icedtea6-bin icedtea-bin-6; then |
255 |
if host-is-pax; then |
256 |
if use jbootstrap; then |
257 |
einfo "We can't currently bootstrap with a PaX enabled kernel :(" |
258 |
einfo "bootstrap forced off, ignoring use jbootstrap" |
259 |
fi |
260 |
config="${config} --disable-bootstrap" |
261 |
else |
262 |
config="${config} $(use_enable jbootstrap bootstrap)" |
263 |
fi |
264 |
elif has "${vm}" gcj-jdk; then |
265 |
if host-is-pax; then |
266 |
eerror "Can't currently bootstrap IcedTea using gcj-jdk or cacao on a PaX enabled host" |
267 |
eerror "Sorry for the inconvenience" |
268 |
die "Use an existing IcedTea build instead or disable PaX on the host" |
269 |
fi |
270 |
if ! use jbootstrap; then |
271 |
einfo "bootstrap forced on for ${vm}, ignoring use jbootstrap" |
272 |
fi |
273 |
# For other 1.5 JDKs e.g. GCJ |
274 |
config="${config} --with-ecj-jar=${EPREFIX}/usr/share/eclipse-ecj/ecj.jar" |
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)" |
278 |
fi |
279 |
|
280 |
# OpenJDK-specific parallelism support. Bug #389791, #337827 |
281 |
# Implementation modified from waf-utils.eclass |
282 |
# Note that "-j" is converted to "-j1" as the system doesn't support --load-average |
283 |
local procs=$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/\2/" ) |
284 |
config="${config} --with-parallel-jobs=${procs}"; |
285 |
einfo "Configuring using --with-parallel-jobs=${procs}" |
286 |
|
287 |
if need_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 hs20 ; then |
298 |
config="${config} --with-hotspot-build=hs20 --with-hotspot-src-zip=${DISTDIR}/${HOTSPOT_TARBALL}" |
299 |
fi |
300 |
|
301 |
unset_vars |
302 |
|
303 |
econf ${config} \ |
304 |
--with-openjdk-src-zip="${DISTDIR}/${OPENJDK_TARBALL}" \ |
305 |
--with-jaxp-drop-zip="${DISTDIR}/${JAXP_TARBALL}" \ |
306 |
--with-jaxws-drop-zip="${DISTDIR}/${JAXWS_TARBALL}" \ |
307 |
--with-jaf-drop-zip="${DISTDIR}/${JAF_TARBALL}" \ |
308 |
--with-jdk-home="$(java-config -O)" \ |
309 |
--with-abs-install-dir=/usr/$(get_libdir)/icedtea${SLOT} \ |
310 |
$(use_enable !debug optimizations) \ |
311 |
$(use_enable doc docs) \ |
312 |
$(use_with javascript rhino ${rhino_jar}) \ |
313 |
--disable-cacao \ |
314 |
--disable-jamvm \ |
315 |
$(use_enable pulseaudio pulse-java) \ |
316 |
--enable-xrender \ |
317 |
$(use_enable systemtap) \ |
318 |
$(use_enable nio2) \ |
319 |
$(use_enable nss) |
320 |
} |
321 |
|
322 |
src_compile() { |
323 |
# Newer versions of Gentoo's ant add |
324 |
# an environment variable so it works properly... |
325 |
export ANT_RESPECT_JAVA_HOME=TRUE |
326 |
|
327 |
# ant -diagnostics in Ant 1.8.0 fails without these |
328 |
# otherwise we try to load the least that's needed to avoid possible classpath collisions |
329 |
export ANT_TASKS="xerces-2 xalan ant-nodeps" |
330 |
|
331 |
emake |
332 |
} |
333 |
|
334 |
src_install() { |
335 |
local dest="/usr/$(get_libdir)/icedtea${SLOT}" |
336 |
local ddest="${ED}/${dest}" |
337 |
dodir "${dest}" |
338 |
|
339 |
dodoc README NEWS AUTHORS THANKYOU |
340 |
dosym /usr/share/doc/${PF} /usr/share/doc/${PN}${SLOT} |
341 |
|
342 |
cd openjdk.build/j2sdk-image || die |
343 |
|
344 |
# doins can't handle symlinks. |
345 |
cp -vRP bin include jre lib man "${ddest}" || die |
346 |
|
347 |
dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README |
348 |
|
349 |
if use doc; then |
350 |
# java-pkg_dohtml needed for package-list #302654 |
351 |
java-pkg_dohtml -r ../docs/* || die |
352 |
fi |
353 |
|
354 |
if use examples; then |
355 |
dodir "${dest}/share"; |
356 |
cp -vRP demo sample "${ddest}/share/" || die |
357 |
fi |
358 |
|
359 |
if use source; then |
360 |
cp src.zip "${ddest}" || die |
361 |
fi |
362 |
|
363 |
# Fix the permissions. |
364 |
find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die |
365 |
|
366 |
# Needs to be done before generating cacerts |
367 |
java-vm_set-pax-markings "${ddest}" |
368 |
|
369 |
# We need to generate keystore - bug #273306 |
370 |
einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/" |
371 |
mkdir "${T}/certgen" && cd "${T}/certgen" || die |
372 |
cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die |
373 |
for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do |
374 |
openssl x509 -text -in "${c}" >> all.crt || die |
375 |
done |
376 |
./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die |
377 |
cp -vRP cacerts "${ddest}/jre/lib/security/" || die |
378 |
chmod 644 "${ddest}/jre/lib/security/cacerts" || die |
379 |
|
380 |
# Bug 390663 |
381 |
cp "${FILESDIR}"/fontconfig.Gentoo.properties.src "${T}"/fontconfig.Gentoo.properties || die |
382 |
eprefixify "${T}"/fontconfig.Gentoo.properties |
383 |
insinto "${dest}"/jre/lib |
384 |
doins "${T}"/fontconfig.Gentoo.properties |
385 |
|
386 |
set_java_env "${FILESDIR}/icedtea.env" |
387 |
} |
388 |
|
389 |
need_zero() { |
390 |
! use amd64 && ! use x86 && ! use sparc |
391 |
} |
392 |
|
393 |
pkg_preinst() { |
394 |
if has_version "<=dev-java/icedtea-6.1.10.4:${SLOT}"; then |
395 |
# portage would preserve the symlink otherwise, related to bug #384397 |
396 |
rm -f "${EROOT}/usr/lib/jvm/icedtea6" |
397 |
elog "To unify the layout and simplify scripts, the identifier of Icedtea-6*" |
398 |
elog "has changed from 'icedtea6' to 'icedtea-6' starting from version 6.1.10.4-r1" |
399 |
elog "If you had icedtea6 as system VM, the change should be automatic, however" |
400 |
elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed" |
401 |
elog "and the same holds for any user VM settings. Sorry for the inconvenience." |
402 |
fi |
403 |
} |
404 |
|
405 |
|
406 |
|
407 |
1.1 dev-java/icedtea/icedtea-7.2.0-r2.ebuild |
408 |
|
409 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-7.2.0-r2.ebuild?rev=1.1&view=markup |
410 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/icedtea/icedtea-7.2.0-r2.ebuild?rev=1.1&content-type=text/plain |
411 |
|
412 |
Index: icedtea-7.2.0-r2.ebuild |
413 |
=================================================================== |
414 |
# Copyright 1999-2011 Gentoo Foundation |
415 |
# Distributed under the terms of the GNU General Public License v2 |
416 |
# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea/icedtea-7.2.0-r2.ebuild,v 1.1 2011/11/28 15:29:59 sera Exp $ |
417 |
# Build written by Andrew John Hughes (gnu_andrew@××××××××××.org) |
418 |
|
419 |
# ********************************************************* |
420 |
# * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-6.* AS WELL * |
421 |
# ********************************************************* |
422 |
|
423 |
EAPI="4" |
424 |
|
425 |
inherit java-pkg-2 java-vm-2 pax-utils prefix versionator |
426 |
|
427 |
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" |
428 |
SLOT="7" |
429 |
KEYWORDS="~amd64 ~x86" |
430 |
|
431 |
DESCRIPTION="A harness to build OpenJDK using Free Software build tools and dependencies" |
432 |
ICEDTEA_VER="$(get_version_component_range 2-3)" |
433 |
ICEDTEA_PKG=icedtea-${ICEDTEA_VER} |
434 |
OPENJDK_TARBALL="0a76e5390e68.tar.gz" |
435 |
CORBA_TARBALL="4d9e4fb8af09.tar.gz" |
436 |
HOTSPOT_TARBALL="b28ae681bae0.tar.gz" |
437 |
JAXP_TARBALL="948e734135ea.tar.gz" |
438 |
JAXWS_TARBALL="a2ebfdc9db7e.tar.gz" |
439 |
JDK_TARBALL="2054526dd141.tar.gz" |
440 |
LANGTOOLS_TARBALL="9b85f1265346.tar.gz" |
441 |
SRC_URI="http://icedtea.classpath.org/download/source/${ICEDTEA_PKG}.tar.gz |
442 |
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0/archive/${OPENJDK_TARBALL} |
443 |
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0/corba/archive/${CORBA_TARBALL} |
444 |
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0/jaxp/archive/${JAXP_TARBALL} |
445 |
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0/jaxws/archive/${JAXWS_TARBALL} |
446 |
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0/jdk/archive/${JDK_TARBALL} |
447 |
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0/hotspot/archive/${HOTSPOT_TARBALL} |
448 |
http://icedtea.classpath.org/hg/release/icedtea7-forest-2.0/langtools/archive/${LANGTOOLS_TARBALL}" |
449 |
HOMEPAGE="http://icedtea.classpath.org" |
450 |
S=${WORKDIR}/${ICEDTEA_PKG} |
451 |
|
452 |
# Missing options: |
453 |
# shark - needs adding |
454 |
IUSE="X debug cjk doc examples javascript +jbootstrap +nsplugin pulseaudio +source systemtap +webstart" |
455 |
|
456 |
RDEPEND="!dev-java/icedtea:0 |
457 |
>=dev-libs/glib-2.26 |
458 |
>=media-libs/alsa-lib-1.0 |
459 |
media-libs/fontconfig |
460 |
>=media-libs/freetype-2.3.5 |
461 |
>=media-libs/giflib-4.1.6 |
462 |
media-libs/lcms:2 |
463 |
>=media-libs/libpng-1.2 |
464 |
>=net-print/cups-1.2.12 |
465 |
sys-apps/attr |
466 |
>=sys-libs/zlib-1.2.3 |
467 |
virtual/jpeg |
468 |
>=x11-libs/gtk+-2.8:2 |
469 |
>=x11-libs/libX11-1.1.3 |
470 |
>=x11-libs/libXau-1.0.3 |
471 |
>=x11-libs/libXdmcp-1.0.2 |
472 |
>=x11-libs/libXext-1.1.1 |
473 |
>=x11-libs/libXi-1.1.3 |
474 |
>=x11-libs/libXinerama-1.0.2 |
475 |
>=x11-libs/libXp-1.0.0 |
476 |
>=x11-libs/libXrender-0.9.4 |
477 |
>=x11-libs/libXtst-1.0.3 |
478 |
x11-proto/inputproto |
479 |
x11-proto/xineramaproto |
480 |
X? ( |
481 |
media-fonts/dejavu |
482 |
cjk? ( |
483 |
media-fonts/arphicfonts |
484 |
media-fonts/baekmuk-fonts |
485 |
media-fonts/lklug |
486 |
media-fonts/lohit-fonts |
487 |
media-fonts/sazanami |
488 |
) |
489 |
) |
490 |
javascript? ( dev-java/rhino:1.6 ) |
491 |
ppc64? ( virtual/libffi ) |
492 |
ppc? ( virtual/libffi ) |
493 |
pulseaudio? ( >=media-sound/pulseaudio-0.9.11 ) |
494 |
systemtap? ( >=dev-util/systemtap-1 )" |
495 |
|
496 |
# Additional dependencies for building: |
497 |
# zip: extract OpenJDK tarball, and needed by configure |
498 |
# ant, ecj, jdk: required to build Java code |
499 |
# Only ant-core-1.8.1 has fixed ant -diagnostics when xerces+xalan are not present. |
500 |
# ca-certificates, perl and openssl are used for the cacerts keystore generation |
501 |
# xext headers have two variants depending on version - bug #288855 |
502 |
# autoconf - as long as we use eautoreconf, version restrictions for bug #294918 |
503 |
DEPEND="${RDEPEND} |
504 |
|| ( |
505 |
>=dev-java/gcj-jdk-4.3 |
506 |
dev-java/icedtea-bin:7 |
507 |
dev-java/icedtea-bin:6 |
508 |
dev-java/icedtea:7 |
509 |
dev-java/icedtea:6 |
510 |
) |
511 |
app-arch/zip |
512 |
dev-util/pkgconfig |
513 |
>=dev-libs/libxslt-1.1.26 |
514 |
>=x11-proto/xextproto-7.1.1 |
515 |
x11-proto/xproto |
516 |
>=dev-java/ant-core-1.8.1 |
517 |
dev-java/ant-nodeps |
518 |
app-misc/ca-certificates |
519 |
dev-lang/perl |
520 |
dev-libs/openssl |
521 |
sys-apps/lsb-release |
522 |
app-arch/cpio" |
523 |
# || ( >=sys-devel/autoconf-2.65:2.5 <sys-devel/autoconf-2.64:2.5 )" |
524 |
|
525 |
PDEPEND="webstart? ( dev-java/icedtea-web:7 ) |
526 |
nsplugin? ( dev-java/icedtea-web:7[nsplugin] )" |
527 |
|
528 |
# a bit of hack so the VM switching is triggered without causing dependency troubles |
529 |
JAVA_PKG_NV_DEPEND=">=virtual/jdk-1.5" |
530 |
JAVA_PKG_WANT_SOURCE="1.5" |
531 |
JAVA_PKG_WANT_TARGET="1.5" |
532 |
|
533 |
pkg_setup() { |
534 |
if use nsplugin && ! use webstart ; then |
535 |
elog "Note that the nsplugin flag implies the webstart flag. Enable it to remove this message." |
536 |
fi |
537 |
|
538 |
[[ "${MERGE_TYPE}" == "binary" ]] && return #258423 |
539 |
|
540 |
# icedtea doesn't like some locales. #330433 #389717 |
541 |
export LANG="C" LC_ALL="C" |
542 |
|
543 |
# quite a hack since java-config does not provide a way for a package |
544 |
# to limit supported VM's for building and their preferred order |
545 |
if [[ -n "${JAVA_PKG_FORCE_VM}" ]]; then |
546 |
einfo "Honoring user-set JAVA_PKG_FORCE_VM" |
547 |
elif has_version "<=dev-java/icedtea-7.2.0:7"; then |
548 |
JAVA_PKG_FORCE_VM="icedtea7" |
549 |
elif has_version ">dev-java/icedtea-7.2.0:7"; then |
550 |
JAVA_PKG_FORCE_VM="icedtea-7" |
551 |
elif has_version "dev-java/icedtea-bin:7"; then |
552 |
JAVA_PKG_FORCE_VM="icedtea-bin-7" |
553 |
elif has_version "<=dev-java/icedtea-6.1.10.4:6"; then |
554 |
JAVA_PKG_FORCE_VM="icedtea6" |
555 |
elif has_version ">dev-java/icedtea-6.1.10.4:6"; then |
556 |
JAVA_PKG_FORCE_VM="icedtea-6" |
557 |
elif has_version "<dev-java/icedtea-bin-6.1.10.4:6"; then |
558 |
JAVA_PKG_FORCE_VM="icedtea6-bin" |
559 |
elif has_version ">=dev-java/icedtea-bin-6.1.10.4:6"; then |
560 |
JAVA_PKG_FORCE_VM="icedtea-bin-6" |
561 |
elif has_version dev-java/gcj-jdk; then |
562 |
JAVA_PKG_FORCE_VM="gcj-jdk" |
563 |
else |
564 |
die "Unable to find a supported VM for building" |
565 |
fi |
566 |
|
567 |
einfo "Forced vm ${JAVA_PKG_FORCE_VM}" |
568 |
java-vm-2_pkg_setup |
569 |
java-pkg-2_pkg_setup |
570 |
|
571 |
# without this, access violation is thrown |
572 |
addpredict "/proc/self/coredump_filter" |
573 |
} |
574 |
|
575 |
src_unpack() { |
576 |
unpack ${ICEDTEA_PKG}.tar.gz |
577 |
} |
578 |
|
579 |
java_prepare() { |
580 |
# Fix non bootstrap builds with PaX enabled kernels. Bug #389751 |
581 |
# Move applying test_gamma.patch to before creating boot copy. |
582 |
if host-is-pax; then |
583 |
sed -i -e 's|patches/boot/test_gamma.patch||' Makefile.in || die |
584 |
sed -i -e 's|openjdk-boot|openjdk|g' patches/boot/test_gamma.patch || die |
585 |
export DISTRIBUTION_PATCHES=patches/boot/test_gamma.patch |
586 |
fi |
587 |
} |
588 |
|
589 |
unset_vars() { |
590 |
unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS |
591 |
} |
592 |
|
593 |
src_configure() { |
594 |
local config procs rhino_jar |
595 |
local vm=$(java-pkg_get-current-vm) |
596 |
|
597 |
if has "${vm}" icedtea6 icedtea-6 icedtea6-bin icedtea-bin-6; then |
598 |
if use jbootstrap; then |
599 |
einfo "We can't currently bootstrap with a IcedTea6 JVM :(" |
600 |
einfo "bootstrap forced off, ignoring use jbootstrap" |
601 |
fi |
602 |
config="${config} --disable-bootstrap" |
603 |
elif has "${vm}" icedtea7 icedtea-7 icedtea-bin-7; then |
604 |
if host-is-pax; then |
605 |
if use jbootstrap; then |
606 |
einfo "We can't currently bootstrap with a PaX enabled kernel :(" |
607 |
einfo "bootstrap forced off, ignoring use jbootstrap" |
608 |
fi |
609 |
config="${config} --disable-bootstrap" |
610 |
else |
611 |
config="${config} $(use_enable jbootstrap bootstrap)" |
612 |
fi |
613 |
elif has "${vm}" gcj-jdk; then |
614 |
if host-is-pax; then |
615 |
eerror "Can't currently bootstrap IcedTea using gcj-jdk or cacao on a PaX enabled host" |
616 |
eerror "Sorry for the inconvenience" |
617 |
die "Use an existing IcedTea build instead or disable PaX on the host" |
618 |
fi |
619 |
if ! use jbootstrap; then |
620 |
einfo "bootstrap forced on for ${vm}, ignoring use jbootstrap" |
621 |
fi |
622 |
else |
623 |
eerror "IcedTea must be built with either a JDK based on GNU Classpath or an existing build of IcedTea." |
624 |
die "Install a GNU Classpath JDK (gcj-jdk)" |
625 |
fi |
626 |
|
627 |
# OpenJDK-specific parallelism support. Bug #389791, #337827 |
628 |
# Implementation modified from waf-utils.eclass |
629 |
# Note that "-j" is converted to "-j1" as the system doesn't support --load-average |
630 |
local procs=$(echo -j1 ${MAKEOPTS} | sed -r "s/.*(-j\s*|--jobs=)([0-9]+).*/\2/" ) |
631 |
config="${config} --with-parallel-jobs=${procs}"; |
632 |
einfo "Configuring using --with-parallel-jobs=${procs}" |
633 |
|
634 |
if need_zero ; then |
635 |
config="${config} --enable-zero" |
636 |
else |
637 |
config="${config} --disable-zero" |
638 |
fi |
639 |
|
640 |
if use javascript ; then |
641 |
rhino_jar=$(java-pkg_getjar rhino:1.6 js.jar); |
642 |
fi |
643 |
|
644 |
unset_vars |
645 |
|
646 |
econf ${config} \ |
647 |
--with-openjdk-src-zip="${DISTDIR}/${OPENJDK_TARBALL}" \ |
648 |
--with-corba-src-zip="${DISTDIR}/${CORBA_TARBALL}" \ |
649 |
--with-jaxp-src-zip="${DISTDIR}/${JAXP_TARBALL}" \ |
650 |
--with-jaxws-src-zip="${DISTDIR}/${JAXWS_TARBALL}" \ |
651 |
--with-jdk-src-zip="${DISTDIR}/${JDK_TARBALL}" \ |
652 |
--with-hotspot-src-zip="${DISTDIR}/${HOTSPOT_TARBALL}" \ |
653 |
--with-langtools-src-zip="${DISTDIR}/${LANGTOOLS_TARBALL}" \ |
654 |
--with-jdk-home="$(java-config -O)" \ |
655 |
--with-abs-install-dir=/usr/$(get_libdir)/icedtea${SLOT} \ |
656 |
--disable-jdk-tests \ |
657 |
$(use_enable !debug optimizations) \ |
658 |
$(use_enable doc docs) \ |
659 |
$(use_with javascript rhino ${rhino_jar}) \ |
660 |
--disable-cacao \ |
661 |
--disable-jamvm \ |
662 |
$(use_enable pulseaudio pulse-java) \ |
663 |
$(use_enable systemtap) |
664 |
} |
665 |
|
666 |
src_compile() { |
667 |
# Newer versions of Gentoo's ant add |
668 |
# an environment variable so it works properly... |
669 |
export ANT_RESPECT_JAVA_HOME=TRUE |
670 |
|
671 |
# We try to load the least that's needed to avoid possible classpath collisions |
672 |
export ANT_TASKS="ant-nodeps" |
673 |
|
674 |
emake -j 1 |
675 |
} |
676 |
|
677 |
src_install() { |
678 |
local dest="/usr/$(get_libdir)/icedtea${SLOT}" |
679 |
local ddest="${ED}/${dest}" |
680 |
dodir "${dest}" |
681 |
|
682 |
dodoc README NEWS AUTHORS |
683 |
dosym /usr/share/doc/${PF} /usr/share/doc/${PN}${SLOT} |
684 |
|
685 |
cd openjdk.build/j2sdk-image || die |
686 |
|
687 |
# Don't hide classes |
688 |
rm lib/ct.sym || die |
689 |
|
690 |
# doins can't handle symlinks. |
691 |
cp -vRP bin include jre lib man "${ddest}" || die |
692 |
|
693 |
dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README |
694 |
|
695 |
if use doc; then |
696 |
# java-pkg_dohtml needed for package-list #302654 |
697 |
java-pkg_dohtml -r ../docs/* || die |
698 |
fi |
699 |
|
700 |
if use examples; then |
701 |
dodir "${dest}/share"; |
702 |
cp -vRP demo sample "${ddest}/share/" || die |
703 |
fi |
704 |
|
705 |
if use source; then |
706 |
cp src.zip "${ddest}" || die |
707 |
fi |
708 |
|
709 |
# Fix the permissions. |
710 |
find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die |
711 |
|
712 |
# Needs to be done before generating cacerts |
713 |
java-vm_set-pax-markings "${ddest}" |
714 |
|
715 |
# We need to generate keystore - bug #273306 |
716 |
einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/" |
717 |
mkdir "${T}/certgen" && cd "${T}/certgen" || die |
718 |
cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die |
719 |
for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do |
720 |
openssl x509 -text -in "${c}" >> all.crt || die |
721 |
done |
722 |
./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die |
723 |
cp -vRP cacerts "${ddest}/jre/lib/security/" || die |
724 |
chmod 644 "${ddest}/jre/lib/security/cacerts" || die |
725 |
|
726 |
# OpenJDK7 should be able to use fontconfig instead, but wont hurt to |
727 |
# install it anyway. Bug 390663 |
728 |
cp "${FILESDIR}"/fontconfig.Gentoo.properties.src "${T}"/fontconfig.Gentoo.properties || die |
729 |
eprefixify "${T}"/fontconfig.Gentoo.properties |
730 |
insinto "${dest}"/jre/lib |
731 |
doins "${T}"/fontconfig.Gentoo.properties |
732 |
|
733 |
set_java_env "${FILESDIR}/icedtea.env" |
734 |
java-vm_sandbox-predict /dev/random /proc/self/coredump_filter |
735 |
} |
736 |
|
737 |
need_zero() { |
738 |
! use amd64 && ! use x86 && ! use sparc |
739 |
} |
740 |
|
741 |
pkg_preinst() { |
742 |
if has_version "<=dev-java/icedtea-7.2.0:7"; then |
743 |
# portage would preserve the symlink otherwise, related to bug #384397 |
744 |
rm -f "${EROOT}/usr/lib/jvm/icedtea7" |
745 |
elog "To unify the layout and simplify scripts, the identifier of Icedtea-7*" |
746 |
elog "has changed from 'icedtea7' to 'icedtea-7' starting from version 7.2.0-r1" |
747 |
elog "If you had icedtea7 as system VM, the change should be automatic, however" |
748 |
elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed" |
749 |
elog "and the same holds for any user VM settings. Sorry for the inconvenience." |
750 |
fi |
751 |
} |