From d7e6be6929a6fd57f02326b2991287689fa42692 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 16 Sep 2010 00:32:48 +0000 Subject: Introducing support for Web Start and Mozilla plugin from IcedTea6 1.9. Note the feature is turned off by default because it adds experimental and unofficial patches from icedtea.classpath.org. You need to select WEB option from config menu or define WITH_WEB variable to enable the feature. Also, note that a symlink for web browser is not created automatically with same reasoning. Thus, you need to create a symlink for your browser, e.g., ln -s ${LOCALBASE}/openjdk6/jre/lib/IcedTeadPlugin.so ~/.mozilla/plugins Remove some stale comments in package message while I am here. --- java/openjdk6/files/icedtea.patch | 70 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 java/openjdk6/files/icedtea.patch (limited to 'java/openjdk6/files/icedtea.patch') diff --git a/java/openjdk6/files/icedtea.patch b/java/openjdk6/files/icedtea.patch new file mode 100644 index 000000000000..a69d7551c863 --- /dev/null +++ b/java/openjdk6/files/icedtea.patch @@ -0,0 +1,70 @@ +$FreeBSD$ + +This patch works around POSIX thread anomalies in the IcedTea6 plugin. +Somehow Linux can use mutexes and condition variables uninitialized. + +--- icedtea6-1.9/plugin/icedteanp/IcedTeaNPPlugin.cc.orig 2010-08-06 07:05:21.916103000 -0400 ++++ icedtea6-1.9/plugin/icedteanp/IcedTeaNPPlugin.cc 2010-09-13 12:39:38.000000000 -0400 +@@ -237,6 +237,7 @@ static guint appletviewer_watch_id = -1; + int plugin_debug = getenv ("ICEDTEAPLUGIN_DEBUG") != NULL; + + pthread_cond_t cond_message_available = PTHREAD_COND_INITIALIZER; ++pthread_mutex_t wait_mutex = PTHREAD_MUTEX_INITIALIZER; + + // Functions prefixed by ITNP_ are instance functions. They are called + // by the browser and operate on instances of ITNPPluginData. +--- icedtea6-1.9/plugin/icedteanp/IcedTeaNPPlugin.h.orig 2010-08-06 07:05:21.942208000 -0400 ++++ icedtea6-1.9/plugin/icedteanp/IcedTeaNPPlugin.h 2010-09-13 12:39:13.000000000 -0400 +@@ -94,6 +94,7 @@ static pthread_t plugin_request_processo + + // Condition on which the queue processor waits + extern pthread_cond_t cond_message_available; ++extern pthread_mutex_t wait_mutex; + + // debug switch + extern int plugin_debug; +--- icedtea6-1.9/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc.orig 2010-08-06 07:05:21.996828000 -0400 ++++ icedtea6-1.9/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc 2010-09-13 12:55:28.000000000 -0400 +@@ -63,6 +63,11 @@ PluginRequestProcessor::PluginRequestPro + this->pendingRequests = new std::map(); + + internal_req_ref_counter = 0; ++ pthread_mutex_init(&message_queue_mutex, NULL); ++ pthread_mutex_init(&syn_write_mutex, NULL); ++ pthread_mutex_init(&tc_mutex, NULL); ++ pthread_mutex_init(&wait_mutex, NULL); ++ pthread_cond_init(&cond_message_available, NULL); + } + + /** +@@ -77,6 +82,11 @@ PluginRequestProcessor::~PluginRequestPr + + if (pendingRequests) + delete pendingRequests; ++ pthread_mutex_destroy(&message_queue_mutex); ++ pthread_mutex_destroy(&syn_write_mutex); ++ pthread_mutex_destroy(&tc_mutex); ++ pthread_mutex_destroy(&wait_mutex); ++ pthread_cond_destroy(&cond_message_available); + } + + /** +@@ -709,7 +719,6 @@ queue_processor(void* data) + PluginRequestProcessor* processor = (PluginRequestProcessor*) data; + std::vector* message_parts = NULL; + std::string command; +- pthread_mutex_t wait_mutex = PTHREAD_MUTEX_INITIALIZER; // This is needed for API compat. and is unused + + PLUGIN_DEBUG("Queue processor initialized. Queue = %p\n", message_queue); + +@@ -780,7 +789,9 @@ queue_processor(void* data) + + } else + { +- pthread_cond_wait(&cond_message_available, &wait_mutex); ++ pthread_mutex_lock(&wait_mutex); ++ pthread_cond_wait(&cond_message_available, &wait_mutex); ++ pthread_mutex_unlock(&wait_mutex); + pthread_testcancel(); + } + -- cgit v1.2.3