Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/icedtea-web/files/, dev-java/icedtea-web/
Date: Fri, 01 Jan 2016 22:50:12
Message-Id: 1451688554.d08ce156e9c3f25c13d73e23c041114c901aaf36.chewi@gentoo
1 commit: d08ce156e9c3f25c13d73e23c041114c901aaf36
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 1 17:15:56 2016 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 1 22:49:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d08ce156
7
8 dev-java/icedtea-web: Version bump, addressing many issues
9
10 * Bump to version 1.6.1 (#530860)
11 * Respect java-config's VM selection (#538144, #552640)
12 * Use new eselect-java that looks for itweb-javaws (#504678)
13 * Fix USE=doc under stricter Java 8 (#558718)
14 * Don't call hg because .hg directory is missing (#528268)
15
16 This version no longer relies on eselect java-nsplugin as it installs
17 the plugin directly under /usr/lib/nsbrowser/plugins. It blocks the
18 Oracle plugins because Firefox cannot disable them individually.
19
20 Package-Manager: portage-2.2.26
21
22 dev-java/icedtea-web/Manifest | 1 +
23 dev-java/icedtea-web/files/README.gentoo-r1 | 56 +++++++++++++++
24 .../files/icedtea-web-1.6-javadoc.patch | 11 +++
25 .../files/icedtea-web-1.6-launchers.patch | 79 ++++++++++++++++++++
26 .../icedtea-web/files/icedtea-web-1.6-no-hg.patch | 49 +++++++++++++
27 .../files/icedtea-web-1.6-respect-ldflags.patch | 20 ++++++
28 dev-java/icedtea-web/icedtea-web-1.6.1.ebuild | 83 ++++++++++++++++++++++
29 7 files changed, 299 insertions(+)
30
31 diff --git a/dev-java/icedtea-web/Manifest b/dev-java/icedtea-web/Manifest
32 index 6b08126..cb9393d 100644
33 --- a/dev-java/icedtea-web/Manifest
34 +++ b/dev-java/icedtea-web/Manifest
35 @@ -1 +1,2 @@
36 DIST icedtea-web-1.5.1.tar.gz 1616344 SHA256 03f16356fa84564f1ae32286e0a090a464c87ec123b40602dcea925757900195 SHA512 ef47eecbbb52fcb44ec9585db4c4428025201b04968dfcfc26061160d80b29ee649752f21ffe891cfa5c6bf775d0bc1dbb7dbd9a79794e052bb8b865fa94d039 WHIRLPOOL 955b5cc565fa62d2f5eb85a3253751cd284a4cb926619afe60920123878281a77f348a7c26cdafea2c6d4cd760fe4d399041b665b86ff1bbaf441e25f9f18379
37 +DIST icedtea-web-1.6.1.tar.gz 1776222 SHA256 a9b46ab6c9dc303c89651143596bc5abea29242b9bdcabdd2dab7c606592c920 SHA512 dae39818f74a098289acd0736d27c2e68b10b603a3fb0a180cf4b6444345cbe71ab1ba77dfb198f053f9567bb18aa96de09049c3b595b3d292d142a7ae7d3ef9 WHIRLPOOL 96826d17daee16dfa99f6439678cc509c94556955839b7e8bc43c1993ee04740f35b0547d56649bb9f7a625b5b2515be9d173b642ccb15cb1dead83a03586a6e
38
39 diff --git a/dev-java/icedtea-web/files/README.gentoo-r1 b/dev-java/icedtea-web/files/README.gentoo-r1
40 new file mode 100644
41 index 0000000..219e14e
42 --- /dev/null
43 +++ b/dev-java/icedtea-web/files/README.gentoo-r1
44 @@ -0,0 +1,56 @@
45 +Browser plugin
46 +--------------
47 +
48 +The IcedTea browser plugin (NPPlugin) is now made immediately
49 +available to supporting browsers without the need for eselect. Note
50 +that Chromium-based browsers no longer support NPAPI-based plugins
51 +since the code was removed in September 2015. The list of supporting
52 +browsers is shrinking but still includes Firefox as of version 46.
53 +
54 +JVM selection
55 +-------------
56 +
57 +By default, IcedTea's browser plugin and Web Start uses the JVM
58 +selected via eselect or the GENTOO_VM environment variable. Note that
59 +this doesn't have to be an IcedTea JVM. An Oracle JVM will also
60 +work. The choice can be overridden using the itweb-settings
61 +program. Simply blank out the field to restore the default behaviour.
62 +
63 +Coexistence with Oracle's plugin
64 +--------------------------------
65 +
66 +The IcedTea browser plugin can no longer be installed alongside
67 +Oracle's plugin. This used to be possible thanks to eselect
68 +java-nsplugin but this was removed in an effort to simplify things. No
69 +one is likely to need both, especially with plugins being all but
70 +outlawed these days. To avoid any blockers, simply enable the nsplugin
71 +USE flag on icedtea-web or the Oracle packages, but not both.
72 +
73 +If you're wondering why we don't just leave plugin selection to the
74 +browser, it's because Firefox (and probably others) only allows you to
75 +disable all the Java plugins together, not individually.
76 +
77 +Coexistence with Oracle's Web Start
78 +-----------------------------------
79 +
80 +/usr/bin/javaws, the executable used to launch JNLP files from a
81 +browser, will always use IcedTea's implementation over Oracle's when
82 +icedtea-web is installed, regardless of which JVM has been
83 +selected. This is primarily for consistency with the browser
84 +plugin. If you want to use Oracle's implementation then simply
85 +uninstall icedtea-web.
86 +
87 +32-bit plugin on 64-bit systems
88 +-------------------------------
89 +
90 +This is no longer supported as the 64-bit plugin can launch a 32-bit
91 +JVM. Other reasons for running a 32-bit browser on a 64-bit system
92 +have long passed.
93 +
94 +32-bit JVM on 64-bit systems
95 +----------------------------
96 +
97 +The emul-linux-x86-java package was removed in 2015 with the migration
98 +to full multilib. icedtea-bin now provides this feature via the
99 +multilib USE flag. Once installed, using the 32-bit variant is simply
100 +a case of selecting that VM as described above.
101
102 diff --git a/dev-java/icedtea-web/files/icedtea-web-1.6-javadoc.patch b/dev-java/icedtea-web/files/icedtea-web-1.6-javadoc.patch
103 new file mode 100644
104 index 0000000..f69db9b
105 --- /dev/null
106 +++ b/dev-java/icedtea-web/files/icedtea-web-1.6-javadoc.patch
107 @@ -0,0 +1,11 @@
108 +--- Makefile.am.orig 2015-09-11 14:02:04.245280051 +0100
109 ++++ Makefile.am 2016-01-01 14:00:49.857225492 +0000
110 +@@ -652,7 +652,7 @@
111 +
112 + stamps/netx-docs.stamp:
113 + if ENABLE_DOCS
114 +- $(SYSTEM_JDK_DIR)/bin/javadoc $(JAVADOC_MEM_OPTS) $( _OPTS) \
115 ++ $(SYSTEM_JDK_DIR)/bin/javadoc $(JAVADOC_MEM_OPTS) $(JAVADOC_OPTS) \
116 + -d ${abs_top_builddir}/docs/netx -sourcepath $(NETX_SRCDIR) \
117 + -doctitle 'IcedTea-Web: NetX API Specification' \
118 + -windowtitle 'IcedTea-Web: NetX ' \
119
120 diff --git a/dev-java/icedtea-web/files/icedtea-web-1.6-launchers.patch b/dev-java/icedtea-web/files/icedtea-web-1.6-launchers.patch
121 new file mode 100644
122 index 0000000..57f793a
123 --- /dev/null
124 +++ b/dev-java/icedtea-web/files/icedtea-web-1.6-launchers.patch
125 @@ -0,0 +1,79 @@
126 +--- launcher/launchers.in.orig 2015-09-11 14:02:04.252280131 +0100
127 ++++ launcher/launchers.in 2015-12-18 23:06:35.721135526 +0000
128 +@@ -7,7 +7,7 @@
129 + BINARY_LOCATION=@BIN_LOCATION@
130 + SPLASH_LOCATION=@JAVAWS_SPLASH_LOCATION@
131 + PROGRAM_NAME=@PROGRAM_NAME@
132 +-CP=@JRE@/lib/rt.jar:@JRE@/lib/jfxrt.jar
133 ++CP=$(java-config -r)
134 +
135 + CONFIG_HOME=$XDG_CONFIG_HOME
136 + if [ "x$CONFIG_HOME" = "x" ] ; then
137 +--- plugin/icedteanp/IcedTeaNPPlugin.cc.orig 2015-09-11 14:02:04.219279754 +0100
138 ++++ plugin/icedteanp/IcedTeaNPPlugin.cc 2015-12-19 22:35:23.479775591 +0000
139 +@@ -137,8 +137,7 @@
140 + static DIR *data_directory_descriptor;
141 +
142 + // Fully-qualified appletviewer default executable and rt.jar
143 +-static const char* appletviewer_default_executable = ICEDTEA_WEB_JRE "/bin/java";
144 +-static const char* appletviewer_default_rtjar = ICEDTEA_WEB_JRE "/lib/rt.jar";
145 ++static const char* appletviewer_default_executable = ICEDTEA_WEB_JAVA;
146 + //javaws name and binary
147 + static const char* javaws_bin_property = "-Dicedtea-web.bin.location=" JAVAWS_BIN;
148 + static const char* javaws_name_property = "-Dicedtea-web.bin.name=" JAVAWS_NAME;
149 +@@ -298,7 +297,15 @@
150 + PLUGIN_ERROR("Your custom jre (/lib/rt.jar check) %s is not valid. Please fix %s in your %s. In attempt to run using default one. \n", custom_jre.c_str(), custom_jre_key.c_str(), default_file_ITW_deploy_props_name.c_str());
151 + }
152 + }
153 +- return appletviewer_default_rtjar;
154 ++ gchar *stdout;
155 ++ if (g_spawn_command_line_sync("java-config -r", &stdout, NULL, NULL, NULL)) {
156 ++ std::string result = g_strchomp(stdout);
157 ++ g_free(stdout);
158 ++ return result;
159 ++ } else {
160 ++ PLUGIN_ERROR("Failed to query jre bootclasspath with java-config.\n");
161 ++ return "";
162 ++ }
163 + }
164 +
165 + static void cleanUpDir(){
166 +--- plugin/icedteanp/IcedTeaParseProperties.cc.orig 2015-09-11 14:02:04.220279765 +0100
167 ++++ plugin/icedteanp/IcedTeaParseProperties.cc 2015-12-19 23:06:05.095409132 +0000
168 +@@ -151,7 +151,15 @@
169 + }
170 +
171 + string default_java_properties_file(){
172 +- return ICEDTEA_WEB_JRE "/lib/"+default_file_ITW_deploy_props_name;
173 ++ gchar *stdout;
174 ++ if (g_spawn_command_line_sync("java-config -o", &stdout, NULL, NULL, NULL)) {
175 ++ string result = g_strchomp(stdout);
176 ++ g_free(stdout);
177 ++ return result+"/lib/"+default_file_ITW_deploy_props_name;
178 ++ } else {
179 ++ PLUGIN_ERROR("Failed to query jre location with java-config.\n");
180 ++ return "";
181 ++ }
182 + }
183 +
184 +
185 +@@ -224,7 +232,7 @@
186 + dest = custom_jre_file;
187 + return true;
188 + }
189 +- } else {
190 ++ } else if (!default_java_file.empty()) {
191 + if(IcedTeaPluginUtilities::file_exists(default_java_file)) {
192 + dest = default_java_file;
193 + return true;
194 +--- Makefile.am.orig 2015-09-11 14:02:04.245280051 +0100
195 ++++ Makefile.am 2015-12-19 22:37:35.460518630 +0000
196 +@@ -353,7 +353,7 @@
197 + -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \
198 + -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \
199 + -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
200 +- -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
201 ++ -DICEDTEA_WEB_JAVA="\"$(JAVA)\"" \
202 + -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
203 + $(GLIB_CFLAGS) \
204 + $(MOZILLA_CFLAGS) \
205
206 diff --git a/dev-java/icedtea-web/files/icedtea-web-1.6-no-hg.patch b/dev-java/icedtea-web/files/icedtea-web-1.6-no-hg.patch
207 new file mode 100644
208 index 0000000..a76780e
209 --- /dev/null
210 +++ b/dev-java/icedtea-web/files/icedtea-web-1.6-no-hg.patch
211 @@ -0,0 +1,49 @@
212 +--- html-gen.sh.orig 2015-09-11 14:02:04.250280108 +0100
213 ++++ html-gen.sh 2016-01-01 14:13:46.693307166 +0000
214 +@@ -67,13 +67,18 @@
215 + if [ -z "$CHANGESETS" ] || [ "$CHANGESETS" -lt 0 ]; then CHANGESETS=10; fi
216 +
217 + NEWS_ITEMS=2
218 +-REPO_URL="$(hg paths default | sed -r 's/.*icedtea.classpath.org\/(.*)/\1/')"
219 ++
220 ++if [ -d .hg ]; then
221 ++ REPO_URL="$(hg paths default | sed -r 's/.*icedtea.classpath.org\/(.*)/\1/')"
222 ++else
223 ++ unset REPO_URL
224 ++fi
225 +
226 + start_time="$(date +%s.%N)"
227 +
228 + cd html-gen
229 +
230 +-print_debug "Generating HTML content for javaws -about for $REPO_URL. $CHANGESETS changesets, $NEWS_ITEMS news items"
231 ++print_debug "Generating HTML content for javaws -about${REPO_URL:+ for }$REPO_URL. $CHANGESETS changesets, $NEWS_ITEMS news items"
232 + print_debug "Starting sed substitutions"
233 + for FILE in NEWS AUTHORS COPYING ChangeLog
234 + do
235 +@@ -99,7 +104,9 @@
236 + sed -i '5i <br><img src="jamIcon.jpg" alt="Jam Icon" width="87" height="84"><br><br>' AUTHORS.html
237 + echo "</center>" >> AUTHORS.html
238 +
239 +-REVS=(`hg log -l"$CHANGESETS" | grep 'changeset:' | cut -d: -f3 | tr '\n' ' '`)
240 ++if [ -n "${REPO_URL}" ]; then
241 ++ REVS=(`hg log -l"$CHANGESETS" | grep 'changeset:' | cut -d: -f3 | tr '\n' ' '`)
242 ++fi
243 +
244 + print_debug "Done. Starting formatting (bolding, mailto and hyperlink creation)"
245 +
246 +@@ -132,9 +139,11 @@
247 + if [[ "$LINE" =~ $date_regex* ]] # Matches line starting with eg 2013-07-01
248 + then
249 + html_space="\&ensp;\&ensp;"
250 +- REV="${REVS["$COUNTER"]}"
251 +- # Turn the date into a hyperlink for the revision this changelog entry describes
252 +- LINE=$(echo "$LINE" | sed -r "s|($date_regex)($html_space.*$html_space.*)|<a href=http://icedtea.classpath.org/$REPO_URL/rev/$REV>\1</a>\2|")
253 ++ if [ -n "${REPO_URL}" ]; then
254 ++ REV="${REVS["$COUNTER"]}"
255 ++ # Turn the date into a hyperlink for the revision this changelog entry describes
256 ++ LINE=$(echo "$LINE" | sed -r "s|($date_regex)($html_space.*$html_space.*)|<a href=http://icedtea.classpath.org/$REPO_URL/rev/$REV>\1</a>\2|")
257 ++ fi
258 + COUNTER="$(( COUNTER + 1 ))"
259 + fi
260 + if [ "$COUNTER" -gt "$CHANGESETS" ] # Cut to ten changesets
261
262 diff --git a/dev-java/icedtea-web/files/icedtea-web-1.6-respect-ldflags.patch b/dev-java/icedtea-web/files/icedtea-web-1.6-respect-ldflags.patch
263 new file mode 100644
264 index 0000000..1d03b7c
265 --- /dev/null
266 +++ b/dev-java/icedtea-web/files/icedtea-web-1.6-respect-ldflags.patch
267 @@ -0,0 +1,20 @@
268 +--- Makefile.am.orig 2015-09-11 14:02:04.245280051 +0100
269 ++++ Makefile.am 2015-12-18 21:37:43.328862431 +0000
270 +@@ -344,7 +344,7 @@
271 + $(PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc
272 + mkdir -p $(PLUGIN_DIR) && \
273 + cd $(PLUGIN_DIR) && \
274 +- $(CXX) $(CXXFLAGS) \
275 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) \
276 + $(DEFS) $(VERSION_DEFS) \
277 + -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \
278 + -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \
279 +@@ -362,7 +362,7 @@
280 +
281 + $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS))
282 + cd $(PLUGIN_DIR) && \
283 +- $(CXX) $(CXXFLAGS) \
284 ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) \
285 + $(PLUGIN_OBJECTS) \
286 + $(GLIB_LIBS) \
287 + $(MOZILLA_LIBS) \
288
289 diff --git a/dev-java/icedtea-web/icedtea-web-1.6.1.ebuild b/dev-java/icedtea-web/icedtea-web-1.6.1.ebuild
290 new file mode 100644
291 index 0000000..94dc000
292 --- /dev/null
293 +++ b/dev-java/icedtea-web/icedtea-web-1.6.1.ebuild
294 @@ -0,0 +1,83 @@
295 +# Copyright 1999-2016 Gentoo Foundation
296 +# Distributed under the terms of the GNU General Public License v2
297 +# $Id$
298 +
299 +EAPI="5"
300 +
301 +README_GENTOO_SUFFIX="-r1"
302 +
303 +inherit autotools eutils multilib readme.gentoo-r1 java-pkg-2
304 +
305 +DESCRIPTION="FOSS Java browser plugin and Web Start implementation"
306 +HOMEPAGE="http://icedtea.classpath.org"
307 +SRC_URI="http://icedtea.classpath.org/download/source/${P}.tar.gz"
308 +LICENSE="GPL-2 GPL-2-with-linking-exception LGPL-2"
309 +SLOT="0"
310 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
311 +IUSE="doc javascript +nsplugin tagsoup test"
312 +RESTRICT="test"
313 +
314 +CDEPEND="javascript? ( dev-java/rhino:1.6 )
315 + nsplugin? ( >=dev-libs/glib-2.16 )
316 + tagsoup? ( dev-java/tagsoup:0 )"
317 +
318 +DEPEND="${CDEPEND}
319 + app-arch/zip
320 + >=virtual/jdk-1.7
321 + virtual/pkgconfig
322 + nsplugin? ( net-misc/npapi-sdk )
323 + test? ( >=dev-java/junit-4.8:4 )"
324 +
325 +RDEPEND="${CDEPEND}
326 + >=app-eselect/eselect-java-0.2.0
327 + >=virtual/jre-1.7
328 + nsplugin? (
329 + !dev-java/oracle-jdk-bin[nsplugin]
330 + !dev-java/oracle-jre-bin[nsplugin]
331 + )"
332 +
333 +src_prepare() {
334 + # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2779
335 + # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2780
336 + epatch "${FILESDIR}"/${PN}-1.6-{javadoc,no-hg,launchers,respect-ldflags}.patch
337 +
338 + if java-pkg_is-vm-version-ge "1.8" ; then
339 + sed -i 's/JAVADOC_OPTS=/\0-Xdoclint:none /g' Makefile.am || die
340 + fi
341 +
342 + eautoreconf
343 +}
344 +
345 +src_configure() {
346 + local tagsoup
347 + use tagsoup && tagsoup="$(java-pkg_getjars tagsoup)"
348 +
349 + local config=(
350 + # Rename javaws to itweb-javaws as eselect java-vm manages
351 + # javaws to prevent a clash with Oracle's implementation.
352 + --program-transform-name='s/^javaws$/itweb-javaws/'
353 + --libdir="${EPREFIX}"/usr/$(get_libdir)/nsbrowser/plugins
354 + --with-java="${EPREFIX}"/usr/bin/java
355 + --with-jdk-home="${JAVA_HOME}"
356 + $(use_enable doc docs)
357 + $(use_enable nsplugin plugin)
358 + $(use_with javascript rhino)
359 + $(use_with tagsoup tagsoup "${tagsoup}")
360 + )
361 +
362 + unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
363 + econf "${config[@]}"
364 +}
365 +
366 +src_compile() {
367 + default
368 +}
369 +
370 +src_install() {
371 + default
372 + readme.gentoo_create_doc
373 +}
374 +
375 +pkg_postinst() {
376 + readme.gentoo_print_elog
377 +}