summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2012-03-02 23:21:55 +0000
committerVlastimil Babka <caster@gentoo.org>2012-03-02 23:21:55 +0000
commitc769df7f4cfc49baec3a1010c06a2f1659826daa (patch)
treea5253543ef731dbdfddff398c841fdda2b92eab0 /dev-java/icedtea-web
parentFix uninstall handling to work even after most files are removed. (diff)
downloadhistorical-c769df7f4cfc49baec3a1010c06a2f1659826daa.tar.gz
historical-c769df7f4cfc49baec3a1010c06a2f1659826daa.tar.bz2
historical-c769df7f4cfc49baec3a1010c06a2f1659826daa.zip
Revbump with upstream patch to fix plugin initialization.
Package-Manager: portage-2.2.0_alpha89/cvs/Linux x86_64
Diffstat (limited to 'dev-java/icedtea-web')
-rw-r--r--dev-java/icedtea-web/ChangeLog8
-rw-r--r--dev-java/icedtea-web/Manifest4
-rw-r--r--dev-java/icedtea-web/files/fix-plugin-in-icedtea-7.patch388
-rw-r--r--dev-java/icedtea-web/icedtea-web-1.1.4-r8.ebuild139
4 files changed, 537 insertions, 2 deletions
diff --git a/dev-java/icedtea-web/ChangeLog b/dev-java/icedtea-web/ChangeLog
index d8e9cbf4124b..34ec405b5f0b 100644
--- a/dev-java/icedtea-web/ChangeLog
+++ b/dev-java/icedtea-web/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-java/icedtea-web
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea-web/ChangeLog,v 1.16 2012/02/13 21:19:39 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea-web/ChangeLog,v 1.17 2012/03/02 23:21:54 caster Exp $
+
+*icedtea-web-1.1.4-r8 (02 Mar 2012)
+
+ 02 Mar 2012; Vlastimil Babka <caster@gentoo.org>
+ +icedtea-web-1.1.4-r8.ebuild, +files/fix-plugin-in-icedtea-7.patch:
+ Revbump with upstream patch to fix plugin initialization.
13 Feb 2012; Vlastimil Babka <caster@gentoo.org>
-files/0001-Support-using-NPAPI-SDK-headers-instead-of-whole-xul.patch,
diff --git a/dev-java/icedtea-web/Manifest b/dev-java/icedtea-web/Manifest
index de24f2bcf915..6d986818cf46 100644
--- a/dev-java/icedtea-web/Manifest
+++ b/dev-java/icedtea-web/Manifest
@@ -1,6 +1,8 @@
AUX 0002-Respect-LDFLAGS.patch 352 RMD160 350d3e85929372dc4193834e6994787aceed7003 SHA1 66a60a87bf6b5487a55e036bef9df42918988b9d SHA256 3e4660e84420e2ae85b00eef40e7e20c0df2c6965fda6827ab025e8167e8f866
+AUX fix-plugin-in-icedtea-7.patch 15838 RMD160 a83cca1bc784745d0b7a5108a86e06e0d339ff60 SHA1 5017d985b38756276f1114d56c1ea1e7a6e585bf SHA256 a633c1abbe4533854df4bfee2b02821a2d14ed50962428e70f3b932ae327e5b6
DIST icedtea-web-1.1.4.tar.gz 812273 RMD160 2aac06c05d4513694968f86861225b5329307781 SHA1 9389030878d7c3aee17f641e3095830fe722fb60 SHA256 b17a742af0153b7887cf667a160f8519afad125bc515b0f4783c66e7ee1a7f26
EBUILD icedtea-web-1.1.4-r7.ebuild 3949 RMD160 8f1fea7e178161fd388bc000b30d70c3c6f1954f SHA1 cc4aa774b5a83f4abd642a46d50a9232a0efed00 SHA256 300f7e5e2c9d3474d23b50064da182ec99b39071ef818a583aab00d392e6e2a2
+EBUILD icedtea-web-1.1.4-r8.ebuild 4076 RMD160 8c859f268e8ff0e616f7d87bee28e138c5232e10 SHA1 9e3fe3a1259912f9be43c4371db9fa4f9af2263d SHA256 2471c71d5ae584c8fa439071d5c65faa68658ba0a6cb72f3445536b64e1b95fc
EBUILD icedtea-web-1.1.4.ebuild 3958 RMD160 faf4add9b4ee9e55f7faf4334e4db67687ad2fbe SHA1 703d9b569ccd02f1676525eaa34060b86a2308e6 SHA256 706e4c0419a3707d5618899b2c62cd6e2636e3def77b8ad7c072c3d6b968c860
-MISC ChangeLog 3340 RMD160 c08ed7de9e4651956d4481b4ed112a93d11e8bdf SHA1 7f039c2d883ddef59fa423b17bd2116acead8553 SHA256 5fe7cfbdb7dfd076d0d79ae7be7ca0804e2632770fa2a0da0f1c634d3f412edc
+MISC ChangeLog 3559 RMD160 78488dca49ec46ef697c78d6864f6613e7a70645 SHA1 8adf32a8c9c1f560f7f3226a8379848a636d713a SHA256 8d4d1f09e07e56713315113e8bd824444dea6d2f254ad0bb070464b582f8af9c
MISC metadata.xml 755 RMD160 a76b269fe8cf35dcacf9bc3dcd9714ef764d9bfb SHA1 517488bae5fe80e69a3fb6af061b813816b47364 SHA256 0589029d53503bd941089cf26f3a6eafe4b0bfe9c727e6c4a44cdc8ec03d5abc
diff --git a/dev-java/icedtea-web/files/fix-plugin-in-icedtea-7.patch b/dev-java/icedtea-web/files/fix-plugin-in-icedtea-7.patch
new file mode 100644
index 000000000000..9827bcc6bd65
--- /dev/null
+++ b/dev-java/icedtea-web/files/fix-plugin-in-icedtea-7.patch
@@ -0,0 +1,388 @@
+
+# HG changeset patch
+# User Denis Lila <dlila@redhat.com>
+# Date 1304110685 14400
+# Node ID 77640d74d21c2303b64bbc05583a3850db564894
+# Parent f0647c9385358b4fc3fe747ba7b95b9117c2f681
+Fix appcontext related plugin bugs.
+
+diff -r f0647c938535 -r 77640d74d21c netx/net/sourceforge/jnlp/Launcher.java
+--- a/netx/net/sourceforge/jnlp/Launcher.java Sat Jan 07 02:48:05 2012 -0500
++++ b/netx/net/sourceforge/jnlp/Launcher.java Fri Apr 29 16:58:05 2011 -0400
+@@ -33,7 +33,6 @@
+
+ import net.sourceforge.jnlp.cache.CacheUtil;
+ import net.sourceforge.jnlp.cache.UpdatePolicy;
+-import net.sourceforge.jnlp.runtime.AppThreadGroup;
+ import net.sourceforge.jnlp.runtime.AppletInstance;
+ import net.sourceforge.jnlp.runtime.ApplicationInstance;
+ import net.sourceforge.jnlp.runtime.JNLPClassLoader;
+@@ -707,7 +706,7 @@
+ throw new ClassNotFoundException("Can't do a codebase look up and there are no jars. Failing sooner rather than later");
+ }
+
+- AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup();
++ ThreadGroup group = Thread.currentThread().getThreadGroup();
+
+ String appletName = file.getApplet().getMainClass();
+
+@@ -723,7 +722,6 @@
+ else
+ appletInstance = new AppletInstance(file, group, loader, applet, cont);
+
+- group.setApplication(appletInstance);
+ loader.setApplication(appletInstance);
+
+ setContextClassLoaderForAllThreads(appletInstance.getThreadGroup(), appletInstance.getClassLoader());
+@@ -770,10 +768,9 @@
+ protected ApplicationInstance createApplication(JNLPFile file) throws LaunchException {
+ try {
+ JNLPClassLoader loader = JNLPClassLoader.getInstance(file, updatePolicy);
+- AppThreadGroup group = (AppThreadGroup) Thread.currentThread().getThreadGroup();
++ ThreadGroup group = Thread.currentThread().getThreadGroup();
+
+ ApplicationInstance app = new ApplicationInstance(file, group, loader);
+- group.setApplication(app);
+ loader.setApplication(app);
+
+ return app;
+@@ -789,16 +786,16 @@
+ * then this method simply returns the existing ThreadGroup. The applet
+ * ThreadGroup has to be created at an earlier point in the applet code.
+ */
+- protected AppThreadGroup createThreadGroup(JNLPFile file) {
+- AppThreadGroup appThreadGroup = null;
++ protected ThreadGroup createThreadGroup(JNLPFile file) {
++ ThreadGroup tg = null;
+
+ if (file instanceof PluginBridge) {
+- appThreadGroup = (AppThreadGroup) Thread.currentThread().getThreadGroup();
++ tg = Thread.currentThread().getThreadGroup();
+ } else {
+- appThreadGroup = new AppThreadGroup(mainGroup, file.getTitle());
++ tg = new ThreadGroup(mainGroup, file.getTitle());
+ }
+
+- return appThreadGroup;
++ return tg;
+ }
+
+ /**
+diff -r f0647c938535 -r 77640d74d21c netx/net/sourceforge/jnlp/NetxPanel.java
+--- a/netx/net/sourceforge/jnlp/NetxPanel.java Sat Jan 07 02:48:05 2012 -0500
++++ b/netx/net/sourceforge/jnlp/NetxPanel.java Fri Apr 29 16:58:05 2011 -0400
+@@ -23,12 +23,13 @@
+ package net.sourceforge.jnlp;
+
+ import net.sourceforge.jnlp.AppletLog;
+-import net.sourceforge.jnlp.runtime.AppThreadGroup;
+ import net.sourceforge.jnlp.runtime.AppletInstance;
+ import net.sourceforge.jnlp.runtime.JNLPRuntime;
+
+ import java.net.URL;
+ import java.util.Hashtable;
++import java.util.concurrent.ConcurrentHashMap;
++import java.util.concurrent.ConcurrentMap;
+
+ import sun.applet.AppletViewerPanel;
+ import sun.awt.SunToolkit;
+@@ -44,9 +45,58 @@
+ private boolean exitOnFailure = true;
+ private AppletInstance appInst = null;
+ private boolean appletAlive;
++ private final String uKey;
++
++ // We use this so that we can create exactly one thread group
++ // for all panels with the same uKey.
++ private static final ConcurrentMap<String, ThreadGroup> uKeyToTG =
++ new ConcurrentHashMap<String, ThreadGroup>();
++
++ // This map is actually a set (unfortunately there is no ConcurrentSet
++ // in java.util.concurrent). If KEY is in this map, then we know that
++ // an app context has been created for the panel that has uKey.equals(KEY),
++ // so we avoid creating it a second time for panels with the same uKey.
++ // Because it's a set, only the keys matter. However, we can't insert
++ // null values in because if we did, we couldn't use null checks to see
++ // if a key was absent before a putIfAbsent.
++ private static final ConcurrentMap<String, Boolean> appContextCreated =
++ new ConcurrentHashMap<String, Boolean>();
+
+ public NetxPanel(URL documentURL, Hashtable<String, String> atts) {
+ super(documentURL, atts);
++
++ /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html,
++ * classloaders are shared iff these properties match:
++ * codebase, cache_archive, java_archive, archive
++ *
++ * To achieve this, we create the uniquekey based on those 4 values,
++ * always in the same order. The initial "<NAME>=" parts ensure a
++ * bad tag cannot trick the loader into getting shared with another.
++ */
++
++ // Firefox sometimes skips the codebase if it is default -- ".",
++ // so set it that way if absent
++ String codebaseAttr = atts.get("codebase") != null ?
++ atts.get("codebase") : ".";
++
++ String cache_archiveAttr = atts.get("cache_archive") != null ?
++ atts.get("cache_archive") : "";
++
++ String java_archiveAttr = atts.get("java_archive") != null ?
++ atts.get("java_archive") : "";
++
++ String archiveAttr = atts.get("archive") != null ?
++ atts.get("archive") : "";
++
++ this.uKey = "codebase=" + codebaseAttr +
++ "cache_archive=" + cache_archiveAttr +
++ "java_archive=" + java_archiveAttr +
++ "archive=" + archiveAttr;
++
++ // when this was being done (incorrectly) in Launcher, the call was
++ // new AppThreadGroup(mainGroup, file.getTitle());
++ ThreadGroup tg = new ThreadGroup(Launcher.mainGroup, this.documentURL.toString());
++ uKeyToTG.putIfAbsent(this.uKey, tg);
+ }
+
+ // overloaded constructor, called when initialized via plugin
+@@ -58,18 +108,6 @@
+ }
+
+ @Override
+- public void run() {
+- /*
+- * create an AppContext for this thread associated with this particular
+- * plugin instance (which runs in a different thread group from the rest
+- * of the plugin).
+- */
+- SunToolkit.createNewAppContext();
+-
+- super.run();
+- }
+-
+- @Override
+ protected void showAppletException(Throwable t) {
+ /*
+ * Log any exceptions thrown while loading, initializing, starting,
+@@ -78,7 +116,7 @@
+ AppletLog.log(t);
+ super.showAppletException(t);
+ }
+-
++
+ //Overriding to use Netx classloader. You might need to relax visibility
+ //in sun.applet.AppletPanel for runLoader().
+ protected void runLoader() {
+@@ -90,7 +128,7 @@
+ getCode(),
+ getWidth(),
+ getHeight(),
+- atts);
++ atts, uKey);
+
+ doInit = true;
+ dispatchAppletEvent(APPLET_LOADING, null);
+@@ -154,11 +192,7 @@
+ }
+ }
+
+- // when this was being done (incorrectly) in Launcher, the call was
+- // new AppThreadGroup(mainGroup, file.getTitle());
+- ThreadGroup tg = new AppThreadGroup(Launcher.mainGroup,
+- this.documentURL.toString());
+- handler = new Thread(tg, this);
++ handler = new Thread(getThreadGroup(), this);
+ handler.start();
+ }
+
+@@ -174,4 +208,19 @@
+ public boolean isAlive() {
+ return handler != null && handler.isAlive() && this.appletAlive;
+ }
++
++ public ThreadGroup getThreadGroup() {
++ return uKeyToTG.get(uKey);
++ }
++
++ public void createNewAppContext() {
++ if (Thread.currentThread().getThreadGroup() != getThreadGroup()) {
++ throw new RuntimeException("createNewAppContext called from the wrong thread.");
++ }
++ // only create a new context if one hasn't already been created for the
++ // applets with this unique key.
++ if (null == appContextCreated.putIfAbsent(uKey, Boolean.TRUE)) {
++ SunToolkit.createNewAppContext();
++ }
++ }
+ }
+diff -r f0647c938535 -r 77640d74d21c netx/net/sourceforge/jnlp/PluginBridge.java
+--- a/netx/net/sourceforge/jnlp/PluginBridge.java Sat Jan 07 02:48:05 2012 -0500
++++ b/netx/net/sourceforge/jnlp/PluginBridge.java Fri Apr 29 16:58:05 2011 -0400
+@@ -44,7 +44,8 @@
+ private boolean codeBaseLookup;
+
+ public PluginBridge(URL codebase, URL documentBase, String jar, String main,
+- int width, int height, Hashtable<String, String> atts)
++ int width, int height, Hashtable<String, String> atts,
++ String uKey)
+ throws Exception {
+ specVersion = new Version("1.0");
+ fileVersion = new Version("1.1");
+@@ -132,34 +133,7 @@
+ else
+ security = null;
+
+- /* According to http://download.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/applet-compatibility.html,
+- * classloaders are shared iff these properties match:
+- * codebase, cache_archive, java_archive, archive
+- *
+- * To achieve this, we create the uniquekey based on those 4 values,
+- * always in the same order. The initial "<NAME>=" parts ensure a
+- * bad tag cannot trick the loader into getting shared with another.
+- */
+-
+- // Firefox sometimes skips the codebase if it is default -- ".",
+- // so set it that way if absent
+- String codebaseAttr = atts.get("codebase") != null ?
+- atts.get("codebase") : ".";
+-
+- String cache_archiveAttr = atts.get("cache_archive") != null ?
+- atts.get("cache_archive") : "";
+-
+- String java_archiveAttr = atts.get("java_archive") != null ?
+- atts.get("java_archive") : "";
+-
+- String archiveAttr = atts.get("archive") != null ?
+- atts.get("archive") : "";
+-
+- this.uniqueKey = "codebase=" + codebaseAttr +
+- "cache_archive=" + cache_archiveAttr +
+- "java_archive=" + java_archiveAttr +
+- "archive=" + archiveAttr;
+-
++ this.uniqueKey = uKey;
+ usePack = false;
+ useVersion = false;
+ String jargs = atts.get("java_arguments");
+diff -r f0647c938535 -r 77640d74d21c netx/net/sourceforge/jnlp/runtime/AppThreadGroup.java
+--- a/netx/net/sourceforge/jnlp/runtime/AppThreadGroup.java Sat Jan 07 02:48:05 2012 -0500
++++ /dev/null Thu Jan 01 00:00:00 1970 +0000
+@@ -1,63 +0,0 @@
+-// Copyright (C) 2001-2003 Jon A. Maxwell (JAM)
+-//
+-// This library is free software; you can redistribute it and/or
+-// modify it under the terms of the GNU Lesser General Public
+-// License as published by the Free Software Foundation; either
+-// version 2.1 of the License, or (at your option) any later version.
+-//
+-// This library is distributed in the hope that it will be useful,
+-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-// Lesser General Public License for more details.
+-//
+-// You should have received a copy of the GNU Lesser General Public
+-// License along with this library; if not, write to the Free Software
+-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+-
+-package net.sourceforge.jnlp.runtime;
+-
+-/**
+- * Thread group for a JNLP application.
+- *
+- * @author <a href="mailto:jmaxwell@users.sourceforge.net">Jon A. Maxwell (JAM)</a> - initial author
+- * @version $Revision: 1.1 $
+- */
+-public class AppThreadGroup extends ThreadGroup {
+-
+- /** the app */
+- private ApplicationInstance app = null;
+-
+- /**
+- * Creates new JavaAppThreadGroup
+- *
+- * @param name of the App
+- */
+- public AppThreadGroup(ThreadGroup parent, String name) {
+- super(parent, name);
+- }
+-
+- /**
+- * Sets the JNLP app this group is for; can only be called once.
+- */
+- public void setApplication(ApplicationInstance app) {
+- if (this.app != null)
+- throw new IllegalStateException("Application can only be set once");
+-
+- this.app = app;
+- }
+-
+- /**
+- * Returns the JNLP app for this thread group.
+- */
+- public ApplicationInstance getApplication() {
+- return app;
+- }
+-
+- /**
+- * Handle uncaught exceptions for the app.
+- */
+- public void uncaughtException(Thread t, Throwable e) {
+- super.uncaughtException(t, e);
+- }
+-
+-}
+diff -r f0647c938535 -r 77640d74d21c plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
+--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Sat Jan 07 02:48:05 2012 -0500
++++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Fri Apr 29 16:58:05 2011 -0400
+@@ -123,10 +123,10 @@
+ class PluginAppletPanelFactory {
+
+ public AppletPanel createPanel(PluginStreamHandler streamhandler,
+- int identifier,
+- long handle, int x, int y,
+- final URL doc,
+- final Hashtable<String, String> atts) {
++ final int identifier,
++ final long handle, int x, int y,
++ final URL doc,
++ final Hashtable<String, String> atts) {
+ final NetxPanel panel = AccessController.doPrivileged(new PrivilegedAction<NetxPanel>() {
+ public NetxPanel run() {
+ NetxPanel panel = new NetxPanel(doc, atts, false);
+@@ -136,13 +136,29 @@
+ }
+ });
+
+- // create the frame.
+- PluginAppletViewer.framePanel(identifier, handle, panel);
++ // Framing the panel needs to happen in a thread whose thread group
++ // is the same as the threadgroup of the applet thread. If this
++ // isn't the case, the awt eventqueue thread's context classloader
++ // won't be set to a JNLPClassLoader, and when an applet class needs
++ // to be loaded from the awt eventqueue, it won't be found.
++ Thread panelInit = new Thread(panel.getThreadGroup(), new Runnable() {
++ @Override public void run() {
++ panel.createNewAppContext();
++ // create the frame.
++ PluginAppletViewer.framePanel(identifier, handle, panel);
++ panel.init();
++ // Start the applet
++ initEventQueue(panel);
++ }
++ }, "NetXPanel initializer");
+
+- panel.init();
+-
+- // Start the applet
+- initEventQueue(panel);
++ panelInit.start();
++ while(panelInit.isAlive()) {
++ try {
++ panelInit.join();
++ } catch (InterruptedException e) {
++ }
++ }
+
+ // Wait for the panel to initialize
+ PluginAppletViewer.waitForAppletInit(panel);
+
diff --git a/dev-java/icedtea-web/icedtea-web-1.1.4-r8.ebuild b/dev-java/icedtea-web/icedtea-web-1.1.4-r8.ebuild
new file mode 100644
index 000000000000..789215e5752d
--- /dev/null
+++ b/dev-java/icedtea-web/icedtea-web-1.1.4-r8.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/icedtea-web/icedtea-web-1.1.4-r8.ebuild,v 1.1 2012/03/02 23:21:55 caster Exp $
+# Build written by Andrew John Hughes (ahughes@redhat.com)
+
+EAPI="4"
+
+inherit autotools eutils java-pkg-2 java-vm-2
+
+DESCRIPTION="FOSS Java browser plugin and Web Start implementation"
+HOMEPAGE="http://icedtea.classpath.org"
+SRC_URI="http://icedtea.classpath.org/download/source/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-2-with-linking-exception LGPL-2"
+SLOT="7"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="build doc javascript +nsplugin test"
+
+RDEPEND="dev-java/icedtea:${SLOT}"
+# Need system junit 4.8+. Bug #389795
+DEPEND="${RDEPEND}
+ javascript? ( dev-java/rhino:1.6 )
+ nsplugin? (
+ || ( net-misc/npapi-sdk
+ >=net-libs/xulrunner-1.9.1 ) )
+ test? ( >=dev-java/junit-4.8:4 )"
+
+# a bit of hack so the VM switching is triggered without causing dependency troubles
+JAVA_PKG_NV_DEPEND=">=virtual/jdk-1.6"
+JAVA_PKG_WANT_SOURCE="1.6"
+JAVA_PKG_WANT_TARGET="1.6"
+
+pkg_setup() {
+ [[ "${MERGE_TYPE}" == "binary" ]] && return # bug 258423
+
+ # quite a hack since java-config does not provide a way for a package
+ # to limit supported VM's for building and their preferred order
+ if [[ -n "${JAVA_PKG_FORCE_VM}" ]]; then
+ einfo "Honoring user-set JAVA_PKG_FORCE_VM"
+ else
+ # migration logic
+ if [[ -L /usr/lib/jvm/icedtea${SLOT} ]]; then
+ JAVA_PKG_FORCE_VM="icedtea${SLOT}"
+ else
+ JAVA_PKG_FORCE_VM="icedtea-${SLOT}"
+ fi
+ fi
+
+ einfo "Forced vm ${JAVA_PKG_FORCE_VM}"
+ java-vm-2_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+unset_vars() {
+ unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
+}
+
+src_prepare() {
+ # bug #356645
+ epatch "${FILESDIR}"/0002-Respect-LDFLAGS.patch
+ # this should be included in next release, plugin doesn't work without it
+ epatch "${FILESDIR}"/fix-plugin-in-icedtea-7.patch
+ eautoreconf
+}
+
+src_configure() {
+ local vmhome=$(java-config -O)
+
+ if use build; then
+ icedteadir="${ICEDTEA_BIN_DIR}"
+ [[ -z ${icedteadir} ]] && die "USE=build is an internal flag and should not be enabled"
+ installdir="/opt/icedtea-web-bin-${SLOT}"
+ else
+ icedteadir="/usr/$(get_libdir)/icedtea${SLOT}"
+ installdir="/usr/$(get_libdir)/icedtea${SLOT}-web"
+ fi
+
+ unset_vars
+
+ if use build || [[ ${vmhome} == ${icedteadir} ]] ; then
+ VMHANDLE="icedtea-${SLOT}"
+ else
+ die "Unexpected install location of IcedTea${SLOT}"
+ fi
+
+ einfo "Installing IcedTea-Web in ${installdir}"
+ einfo "Installing IcedTea-Web for Icedtea${SLOT} in ${icedteadir}"
+ if [ ! -e ${vmhome} ] ; then
+ eerror "Could not find JDK install directory ${vmhome}."
+ die
+ fi
+
+ # we need to override all *dir variables that econf sets
+ # man page (javaws) is installed directly to icedteadir because it's easier than symlinking, as we don't know
+ # the suffix the man page will end up compressed with, anyway
+ econf \
+ --prefix=${installdir} --mandir=${icedteadir}/man --infodir=${installdir}/share/info --datadir=${installdir}/share \
+ --with-jdk-home=${icedteadir} \
+ $(use_enable doc docs) \
+ $(use_enable nsplugin plugin) \
+ $(use_with javascript rhino)
+}
+
+src_compile() {
+ # we need this to override the src_compile from java-pkg-2
+ default
+}
+
+src_install() {
+ # parallel make problem bug #372235
+ emake -j1 DESTDIR="${D}" install
+ dodoc AUTHORS README NEWS
+
+ if use nsplugin; then
+ install_mozilla_plugin "${installdir}/$(get_libdir)/IcedTeaPlugin.so";
+ fi
+
+ for binary in javaws itweb-settings; do
+ dosym ${installdir}/bin/${binary} ${icedteadir}/bin/${binary}
+ dosym ${installdir}/bin/${binary} ${icedteadir}/jre/bin/${binary}
+ done
+}
+
+pkg_postinst() {
+ java-vm_check-nsplugin
+ java_mozilla_clean_
+
+ if use nsplugin; then
+ elog "The icedtea browser plugin (NPPlugin) can be enabled using eselect java-nsplugin"
+ elog "Note that the plugin works only in browsers based on xulrunner-1.9.1 or later"
+ elog "such as Firefox 3.5+, Chromium and perhaps some others too."
+ fi
+}
+
+pkg_prerm() {
+ # override the java-vm-2 eclass check for removing a system VM, as it doesn't make sense here
+ :;
+}