aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/openjdk6/Makefile82
-rw-r--r--java/openjdk6/distinfo3
-rw-r--r--java/openjdk6/files/Makefile.plugin51
-rw-r--r--java/openjdk6/files/icedtea.patch70
-rw-r--r--java/openjdk6/files/plugin.patch401
-rw-r--r--java/openjdk6/pkg-descr5
6 files changed, 605 insertions, 7 deletions
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile
index a211f14726b0..7a5a824bbccf 100644
--- a/java/openjdk6/Makefile
+++ b/java/openjdk6/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openjdk6
PORTVERSION= b20
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
https://jaxp.dev.java.net/files/documents/913/150648/:jaxp \
@@ -18,6 +18,7 @@ MASTER_SITES= http://download.java.net/openjdk/jdk6/promoted/${PORTVERSION}/ \
http://icedtea.classpath.org/builds/icedtea6/src/drops/:jaxws \
http://icedtea.classpath.org/builds/icedtea6/src/drops/:jaf \
${MASTER_SITE_APACHE:S,%SUBDIR%/,ant/binaries/:ant,} \
+ http://icedtea.classpath.org/download/source/:icedtea \
http://download.java.net/openjdk/jtreg/promoted/${JTREGVERSION}/:jtreg
DISTNAME= openjdk-6-src-${PORTVERSION}-${OPENJDK_BUILDDATE}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
@@ -44,12 +45,14 @@ OPENJDK_BUILDDATE= 21_jun_2010
OPTIONS= DEBUG "Enable legacy debugging support" off \
FASTDEBUG "Include fastdebug build" off \
IPV6 "Enable IPv6 support" off \
+ WEB "Enable the browser plugin and Java Web Start" off \
POLICY "Install the Unlimited Strength Policy Files" off \
TEST "Add support for running regression test" off
# java extracts directly to the cwd
WRKSRC= ${WRKDIR}
+WANT_GNOME= yes
USE_GMAKE= yes
USE_MOTIF= yes
USE_XORG= xtst xi xt x11
@@ -61,6 +64,8 @@ JAXWS_BUILD= b20
JAXWSFILE= jdk6-jaxws-${JAXWS_BUILD}.zip
JAF_BUILD= b20
JAFFILE= jdk6-jaf-${JAF_BUILD}.zip
+ICEDTEAVERSION= 1.9
+ICEDTEAFILE= icedtea6-${ICEDTEAVERSION}${EXTRACT_SUFX}
JTREGVERSION= b03
JTREGFILE= jtreg-4_0-bin-${JTREGVERSION}-31_mar_2009.zip
@@ -140,6 +145,21 @@ OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/}-debug
OPENJDK_OSARCH= bsd-${ARCH:S/i386/i586/}
.endif
+.if defined(WITH_WEB)
+DISTFILES+= ${ICEDTEAFILE}:icedtea
+EXTRACT_ONLY+= ${ICEDTEAFILE}
+EXTRA_PATCHES+= ${FILESDIR}/icedtea.patch ${FILESDIR}/plugin.patch
+USE_GECKO= libxul
+USE_GNOME= glib20 gtk20
+ICEDTEADIR= ${WRKDIR}/icedtea6-${ICEDTEAVERSION}
+ICEDTEA_JAVAC= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/javac
+ICEDTEA_JAR= ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/bin/jar
+.if defined(WITH_DEBUG)
+ICEDTEA_DEBUG_FLAGS=-g
+.endif
+ICEDTEA_JAVAC_FLAGS=${ICEDTEA_DEBUG_FLAGS} -encoding utf-8 -J-Xmx1024m -source 6 -target 6
+.endif
+
.if defined(WITH_TEST)
DISTFILES+= ${JTREGFILE}:jtreg
EXTRACT_ONLY+= ${JTREGFILE}
@@ -221,8 +241,65 @@ post-patch:
${WRKSRC}/jdk/make/javax/crypto/Makefile
.endif
-.if defined(WITH_TEST)
+.if defined(WITH_WEB) || defined(WITH_TEST)
post-build:
+.if defined(WITH_WEB)
+ @${MKDIR} ${ICEDTEADIR}/build/lib
+ @( \
+ cd ${ICEDTEADIR}/plugin/icedteanp; \
+ ${MAKE} -f ${FILESDIR}/Makefile.plugin depend all install \
+ DEBUG_FLAGS="${ICEDTEA_DEBUG_FLAGS}" \
+ LIBDIR=${ICEDTEADIR}/build/lib \
+ LOCALBASE=${LOCALBASE} \
+ JDK_UPDATE_VERSION=${PORTVERSION:S/^b//} \
+ PLUGIN_VERSION="OpenJDK6 ${PORTVERSION}" \
+ )
+ @${FIND} -s ${ICEDTEADIR}/netx -name '*.java' > \
+ ${ICEDTEADIR}/netx-source-files.txt
+ @${MKDIR} ${ICEDTEADIR}/netx.build/lib
+ @${ICEDTEA_JAVAC} ${ICEDTEA_JAVAC_FLAGS} -d ${ICEDTEADIR}/netx.build \
+ @${ICEDTEADIR}/netx-source-files.txt
+ @${CP} -r ${ICEDTEADIR}/netx/net/sourceforge/jnlp/resources \
+ ${ICEDTEADIR}/netx.build/net/sourceforge/jnlp
+ @( \
+ cd ${ICEDTEADIR}/netx.build; \
+ ${ICEDTEA_JAR} cf ${ICEDTEADIR}/build/lib/netx.jar \
+ javax/jnlp net \
+ )
+ @( \
+ cd ${ICEDTEADIR}/netx; \
+ ${ICEDTEA_JAR} uf ${ICEDTEADIR}/build/lib/netx.jar \
+ `${FIND} . -type f -not -name '*.java'` \
+ )
+ @${CP} ${ICEDTEADIR}/netx/net/sourceforge/jnlp/resources/about.jnlp \
+ ${ICEDTEADIR}/build/lib
+ @${FIND} -s ${ICEDTEADIR}/plugin/icedteanp/java -name '*.java' > \
+ ${ICEDTEADIR}/liveconnect-source-files.txt
+ @${MKDIR} ${ICEDTEADIR}/liveconnect/lib
+ @${ICEDTEA_JAVAC} ${ICEDTEA_JAVAC_FLAGS} -d ${ICEDTEADIR}/liveconnect \
+ -classpath ${ICEDTEADIR}/netx.build \
+ @${ICEDTEADIR}/liveconnect-source-files.txt
+ @( \
+ cd ${ICEDTEADIR}/liveconnect; \
+ ${ICEDTEA_JAR} cf ${ICEDTEADIR}/build/lib/plugin.jar \
+ netscape sun/applet \
+ )
+ @${FIND} -s ${ICEDTEADIR}/extra -name '*.java' > \
+ ${ICEDTEADIR}/extra-source-files.txt
+ @${MKDIR} ${ICEDTEADIR}/extra-lib
+ @${ICEDTEA_JAVAC} ${ICEDTEA_JAVAC_FLAGS} -d ${ICEDTEADIR}/extra-lib \
+ -classpath ${ICEDTEADIR}/netx.build \
+ @${ICEDTEADIR}/extra-source-files.txt
+ @${CP} -r ${ICEDTEADIR}/extra/net/sourceforge/jnlp/about/resources \
+ ${ICEDTEADIR}/extra-lib/net/sourceforge/jnlp/about
+ @( \
+ cd ${ICEDTEADIR}/extra-lib; \
+ ${ICEDTEA_JAR} cf ${ICEDTEADIR}/build/lib/about.jar net \
+ )
+ @${CP} -Rp ${ICEDTEADIR}/build/lib \
+ ${WRKSRC}/build/${OPENJDK_OSARCH}/j2sdk-image/jre
+.endif
+.if defined(WITH_TEST)
@${ECHO_MSG} ""
@${ECHO_MSG} "Run \"make test\" to execute regression test (it could take a few hours to complete)."
.if defined(DISPLAY)
@@ -243,6 +320,7 @@ test: build-depends build
@${ECHO_MSG} "You can run \"make test\" again to re-execute only the failed tests."
@${ECHO_MSG} ""
.endif
+.endif
do-install:
@${MKDIR} ${PREFIX}/openjdk6/
diff --git a/java/openjdk6/distinfo b/java/openjdk6/distinfo
index 2a19e0099b45..175afd408eeb 100644
--- a/java/openjdk6/distinfo
+++ b/java/openjdk6/distinfo
@@ -13,6 +13,9 @@ SIZE (jdk6-jaf-b20.zip) = 71243
MD5 (apache-ant-1.7.1-bin.tar.bz2) = 9330447f3763b87570dd1118c49a8efd
SHA256 (apache-ant-1.7.1-bin.tar.bz2) = 24e54c9d90b81d1b7342695a8285a969393fd883e99ffbbc04203c106d9c2f97
SIZE (apache-ant-1.7.1-bin.tar.bz2) = 7641928
+MD5 (icedtea6-1.9.tar.gz) = 24191e3974ea58cb2bc410590221486c
+SHA256 (icedtea6-1.9.tar.gz) = 829ca9d920b60c62c5568fabf0458a7f8ac25294b07a7befbd82a80fe65da867
+SIZE (icedtea6-1.9.tar.gz) = 6330215
MD5 (jtreg-4_0-bin-b03-31_mar_2009.zip) = 99c4c119c2dd8e7a39c184896a56a00e
SHA256 (jtreg-4_0-bin-b03-31_mar_2009.zip) = 919b3da574a8bfb96a53d9550a0cb2482dc08df6ce3e7042235e0e9067c832e6
SIZE (jtreg-4_0-bin-b03-31_mar_2009.zip) = 4824967
diff --git a/java/openjdk6/files/Makefile.plugin b/java/openjdk6/files/Makefile.plugin
new file mode 100644
index 000000000000..b79a58c722d2
--- /dev/null
+++ b/java/openjdk6/files/Makefile.plugin
@@ -0,0 +1,51 @@
+# $FreeBSD$
+#
+# Makefile for IcedTea Mozilla plugin
+#
+
+LIB=
+SHLIB_NAME= IcedTeaPlugin.so
+NO_MAN= yes
+NO_PROFILE= yes
+
+SRCS= IcedTeaJavaRequestProcessor.cc \
+ IcedTeaNPPlugin.cc \
+ IcedTeaPluginRequestProcessor.cc \
+ IcedTeaPluginUtils.cc \
+ IcedTeaScriptablePluginObject.cc
+SRCS+= IcedTeaJavaRequestProcessor.h \
+ IcedTeaNPPlugin.h \
+ IcedTeaPluginRequestProcessor.h \
+ IcedTeaPluginUtils.h \
+ IcedTeaScriptablePluginObject.h
+
+.if empty(DEBUG_FLAGS)
+.undef DEBUG_FLAGS
+STRIP= -s
+.endif
+.if !defined(LOCALBASE)
+.error "LOCALBASE not defined"
+.endif
+.if !defined(JDK_UPDATE_VERSION)
+.error "JDK_UPDATE_VERSION not defined"
+.endif
+.if !defined(PLUGIN_VERSION)
+.error "PLUGIN_VERSION not defined"
+.endif
+
+MOZILLA_PKGS= glib-2.0 gtk+-2.0 mozilla-plugin
+MOZILLA_VERSION!=${LOCALBASE}/bin/pkg-config --modversion mozilla-plugin
+MOZILLA_VERSION2!=/usr/bin/printf "%d%02d%02d%02d" ${MOZILLA_VERSION:C/\./ /g}
+PLUGIN_CFLAGS!= ${LOCALBASE}/bin/pkg-config --cflags ${MOZILLA_PKGS}
+PLUGIN_LIBS!= ${LOCALBASE}/bin/pkg-config --libs ${MOZILLA_PKGS}
+
+CFLAGS+= -DJDK_UPDATE_VERSION="\"${JDK_UPDATE_VERSION}\"" \
+ -DPLUGIN_VERSION="\"${PLUGIN_VERSION}\"" \
+ -DMOZILLA_VERSION_COLLAPSED="${MOZILLA_VERSION2}"
+
+# XXX Need to fix in ports.
+CFLAGS+= ${PLUGIN_CFLAGS:S,/libxul/stable,/libxul,}
+
+LDFLAGS+= ${PLUGIN_LIBS}
+
+.include <bsd.lib.mk>
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<pthread_t, uintmax_t>();
+
+ 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<std::string*>* 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();
+ }
+
diff --git a/java/openjdk6/files/plugin.patch b/java/openjdk6/files/plugin.patch
new file mode 100644
index 000000000000..025392082229
--- /dev/null
+++ b/java/openjdk6/files/plugin.patch
@@ -0,0 +1,401 @@
+$FreeBSD$
+
+Applied patches from IcedTea6-1.9:
+
+patches/icedtea-demo-swingapplet.patch
+patches/update-bootclasspath.patch
+patches/extensions/netx.patch
+patches/extensions/netx-umask.patch
+patches/extensions/liveconnect.patch
+
+Note: patches/update-bootclasspath.patch was applied without rhino support.
+
+--- hotspot/src/share/vm/runtime/os.cpp.orig 2010-06-21 17:12:21.000000000 -0400
++++ hotspot/src/share/vm/runtime/os.cpp 2010-09-09 16:24:52.000000000 -0400
+@@ -884,6 +884,8 @@
+ "%/lib/jsse.jar:"
+ "%/lib/jce.jar:"
+ "%/lib/charsets.jar:"
++ "%/lib/netx.jar:"
++ "%/lib/plugin.jar:"
+ "%/classes";
+ char* sysclasspath = format_boot_path(classpath_format, home, home_len, fileSep, pathSep);
+ if (sysclasspath == NULL) return false;
+--- jdk/make/docs/NON_CORE_PKGS.gmk.orig 2010-06-21 17:15:08.000000000 -0400
++++ jdk/make/docs/NON_CORE_PKGS.gmk 2010-09-09 16:26:01.000000000 -0400
+@@ -84,6 +84,10 @@
+
+ SMARTCARDIO_PKGS = javax.smartcardio
+
++JNLP_PKGS = javax.jnlp
++
++JAVASCRIPT_PKGS = netscape.javascript
++
+ # non-core packages in rt.jar
+ NON_CORE_PKGS = $(DOMAPI_PKGS) \
+ $(MGMT_PKGS) \
+@@ -91,4 +95,6 @@
+ $(JGSS_PKGS) \
+ $(OLD_JSSE_PKGS) \
+ $(HTTPSERVER_PKGS) \
+- $(SMARTCARDIO_PKGS)
++ $(SMARTCARDIO_PKGS) \
++ $(JNLP_PKGS) \
++ $(JAVASCRIPT_PKGS)
+--- jdk/make/launchers/Makefile.orig 2010-06-21 17:15:08.000000000 -0400
++++ jdk/make/launchers/Makefile 2010-09-09 16:25:05.000000000 -0400
+@@ -67,6 +67,7 @@
+ $(call make-launcher, javadoc, com.sun.tools.javadoc.Main, , )
+ $(call make-launcher, javah, com.sun.tools.javah.Main, , )
+ $(call make-launcher, javap, sun.tools.javap.Main, , )
++$(call make-launcher, javaws, net.sourceforge.jnlp.runtime.Boot, , )
+ $(call make-launcher, jconsole, sun.tools.jconsole.JConsole, \
+ -J-Djconsole.showOutputViewer, )
+ $(call make-launcher, jdb, com.sun.tools.example.debug.tty.TTY, , )
+--- jdk/make/launchers/Makefile.launcher.orig 2010-06-21 17:15:08.000000000 -0400
++++ jdk/make/launchers/Makefile.launcher 2010-09-09 16:25:12.000000000 -0400
+@@ -148,6 +148,16 @@
+ endif
+ endif
+
++# pluginappletviewer only
++ifeq ($(PROGRAM), pluginappletviewer)
++ OTHER_CPPFLAGS += -DUSE_UMASK=\"077\"
++endif
++
++# javaws only
++ifeq ($(PROGRAM), javaws)
++ OTHER_CPPFLAGS += -DUSE_UMASK=\"077\"
++endif
++
+ # GUI tools
+ ifeq ($(GUI_TOOL),true)
+ ifneq ($(PLATFORM), windows)
+--- jdk/make/mkdemo/jfc/SwingApplet/Makefile.orig 2010-06-21 17:15:08.000000000 -0400
++++ jdk/make/mkdemo/jfc/SwingApplet/Makefile 2010-09-09 16:24:23.000000000 -0400
+@@ -33,7 +33,7 @@
+ include $(BUILDDIR)/common/Defs.gmk
+
+ DEMO_ROOT = $(SHARE_SRC)/demo/jfc/$(DEMONAME)
+-DEMO_TOPFILES = ./README.txt
++DEMO_TOPFILES = ./README.txt ./SwingApplet.html
+ DEMO_MAINCLASS = $(DEMONAME)
+ DEMO_DESTDIR = $(DEMODIR)/jfc/$(DEMONAME)
+
+--- jdk/make/sun/Makefile.orig 2010-06-21 17:15:08.000000000 -0400
++++ jdk/make/sun/Makefile 2010-09-09 16:26:01.000000000 -0400
+@@ -66,6 +66,7 @@
+ $(HEADLESS_SUBDIR) $(DGA_SUBDIR) \
+ font jpeg cmm applet rmi beans $(JDBC_SUBDIR) \
+ jawt text nio launcher management $(ORG_SUBDIR) \
++ plugin \
+ native2ascii serialver tools jconsole
+
+ all build clean clobber::
+--- jdk/make/sun/plugin/Makefile.orig 2010-09-09 16:26:01.000000000 -0400
++++ jdk/make/sun/plugin/Makefile 2010-09-09 16:26:01.000000000 -0400
+@@ -0,0 +1,53 @@
++#
++# Copyright 1995-2005 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Sun designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Sun in the LICENSE file that accompanied this code.
++#
++# This code 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 General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++
++#
++# Makefile for pluginappletviewer wrapper.
++#
++
++BUILDDIR = ../..
++PACKAGE = sun.applet
++PRODUCT = sun
++PROGRAM = pluginappletviewer
++include $(BUILDDIR)/common/Defs.gmk
++
++#
++# Files to compile.
++#
++AUTO_FILES_JAVA_DIRS = sun/applet
++
++ifneq ($(PLATFORM), windows)
++ #
++ # Anything with a GUI needs X11 to be linked in.
++ #
++ OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11
++endif # PLATFORM
++
++#
++# Rules
++#
++JAVA_ARGS = { "sun.applet.PluginMain" }
++include $(BUILDDIR)/common/Program.gmk
++
+--- jdk/src/share/bin/java.c.orig 2010-06-21 17:15:10.000000000 -0400
++++ jdk/src/share/bin/java.c 2010-09-09 16:25:12.000000000 -0400
+@@ -56,6 +56,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/stat.h>
+
+ #include <jni.h>
+ #include <jvm.h>
+@@ -69,6 +70,8 @@
+ #define FULL_VERSION JDK_MAJOR_VERSION "." JDK_MINOR_VERSION
+ #endif
+
++#define MAXMASK 4095 /* Same as octal 07777 */
++
+ /*
+ * The following environment variable is used to influence the behavior
+ * of the jre exec'd through the SelectVersion routine. The command line
+@@ -184,6 +187,10 @@
+
+ int JNICALL JavaMain(void * args); /* entry point */
+
++/* umask things */
++static int FindUMask(int *, char ***, int *);
++static int VerifyMask(char *, int*);
++
+ struct JavaMainArgs {
+ int argc;
+ char ** argv;
+@@ -307,6 +314,26 @@
+ SetClassPath(s);
+ #endif
+
++#ifdef USE_UMASK
++ /* Set umask */
++ int mask;
++ // Check to see if we can find a umask on the command line.
++ if (FindUMask(&argc, &argv, &mask) < 0)
++ {
++ // We didn't find a umask, so fall back to the default one.
++ char * defaultMask = (char *) JLI_MemAlloc(5 * sizeof(char));
++ strcpy(defaultMask, USE_UMASK);
++ int converted;
++ VerifyMask(defaultMask, &converted);
++ JLI_MemFree(defaultMask);
++ umask(converted); /* from sys/stat.h */
++ }
++ else
++ {
++ umask(mask);
++ }
++#endif
++
+ /*
+ * Parse command line options; if the return value of
+ * ParseArguments is false, the program should exit.
+@@ -2017,3 +2044,87 @@
+ }
+ DoSplashSetFileJarName(file_name, jar_name);
+ }
++
++/**
++ * Searches argv to find any parameters that start with "-umask=".
++ * Sets maskToSet with the mask if a -umask is found, and if the mask
++ * supplied is valid. Returns 1 if a valid mask was found and set,
++ * -1 otherwise.
++ */
++int FindUMask(int *pargc, char *** pargv, int *maskToSet)
++{
++ int found_mask = -1;
++
++ // our handles to the original list
++ int argc = *pargc;
++ char **argv = *pargv;
++
++ // the new set
++ int nargc = argc;
++ char ** nargv = (char **) JLI_MemAlloc((nargc + 1) * sizeof(char *));
++
++ // set the original set to the new set
++ *pargv = nargv;
++ *pargc = nargc;
++
++ char *maskString = (char *) JLI_MemAlloc(6 * sizeof(char *));
++ int i;
++ for (i = 0; i < argc; i++)
++ {
++ char *arg = argv[i];
++ if (strncmp(arg, "-umask=",7) == 0)
++ {
++ strncpy(maskString, arg+7, 5);
++
++ if (VerifyMask(maskString, maskToSet) < 0)
++ {
++ printf("Invalid umask %s, application stopped.\n", maskString);
++ exit(1);
++ }
++
++ found_mask = 1;
++ nargc--;
++ (*pargc)--;
++ }
++ else
++ {
++ *nargv++ = arg;
++ }
++ }
++
++ JLI_MemFree(maskString);
++
++ return found_mask;
++}
++
++/**
++ * Takes an octal mask in string form, and converts it to
++ * decimal form in convertedMask. The decimal form can then be
++ * easily passed to umask(). Returns 1 if the mask is valid, -1 otherwise.
++ */
++int VerifyMask(char * maskString, int * convertedMask)
++{
++ // Borrowed from coreutils modechange.c
++ if ('0' <= *maskString && *maskString < '8')
++ {
++ unsigned int decimal_mode = 0;
++
++ do {
++ decimal_mode = 8 * decimal_mode + *maskString++ - '0';
++ } while ('0' <= *maskString && *maskString < '8');
++
++ if (decimal_mode > MAXMASK)
++ return -1;
++ else if (*maskString)
++ return -1;
++ else
++ *convertedMask = decimal_mode;
++
++ return 1;
++ }
++ else
++ {
++ return -1;
++ }
++
++}
+--- jdk/src/share/classes/sun/applet/AppletViewerPanel.java.orig 2010-06-21 17:15:27.000000000 -0400
++++ jdk/src/share/classes/sun/applet/AppletViewerPanel.java 2010-09-09 16:25:06.000000000 -0400
+@@ -42,25 +42,25 @@
+ *
+ * @author Arthur van Hoff
+ */
+-class AppletViewerPanel extends AppletPanel {
++public class AppletViewerPanel extends AppletPanel {
+
+ /* Are we debugging? */
+- static boolean debug = false;
++ protected static boolean debug = false;
+
+ /**
+ * The document url.
+ */
+- URL documentURL;
++ protected URL documentURL;
+
+ /**
+ * The base url.
+ */
+- URL baseURL;
++ protected URL baseURL;
+
+ /**
+ * The attributes of the applet.
+ */
+- Hashtable atts;
++ protected Hashtable atts;
+
+ /*
+ * JDK 1.1 serialVersionUID
+@@ -70,7 +70,7 @@
+ /**
+ * Construct an applet viewer and start the applet.
+ */
+- AppletViewerPanel(URL documentURL, Hashtable atts) {
++ protected AppletViewerPanel(URL documentURL, Hashtable atts) {
+ this.documentURL = documentURL;
+ this.atts = atts;
+
+@@ -202,12 +202,12 @@
+ return (AppletContext)getParent();
+ }
+
+- static void debug(String s) {
++ protected static void debug(String s) {
+ if(debug)
+ System.err.println("AppletViewerPanel:::" + s);
+ }
+
+- static void debug(String s, Throwable t) {
++ protected static void debug(String s, Throwable t) {
+ if(debug) {
+ t.printStackTrace();
+ debug(s);
+--- jdk/src/share/classes/sun/applet/AppletPanel.java.orig 2010-06-21 17:15:27.000000000 -0400
++++ jdk/src/share/classes/sun/applet/AppletPanel.java 2010-09-09 16:25:06.000000000 -0400
+@@ -68,7 +68,7 @@
+ /**
+ * The applet (if loaded).
+ */
+- Applet applet;
++ protected Applet applet;
+
+ /**
+ * Applet will allow initialization. Should be
+@@ -117,7 +117,7 @@
+ /**
+ * The thread for the applet.
+ */
+- Thread handler;
++ protected Thread handler;
+
+
+ /**
+@@ -162,7 +162,8 @@
+ * Creates a thread to run the applet. This method is called
+ * each time an applet is loaded and reloaded.
+ */
+- synchronized void createAppletThread() {
++ //Overridden by NetxPanel.
++ protected synchronized void createAppletThread() {
+ // Create a thread group for the applet, and start a new
+ // thread to load the applet.
+ String nm = "applet-" + getCode();
+@@ -306,7 +307,7 @@
+ /**
+ * Get an event from the queue.
+ */
+- synchronized AppletEvent getNextEvent() throws InterruptedException {
++ protected synchronized AppletEvent getNextEvent() throws InterruptedException {
+ while (queue == null || queue.isEmpty()) {
+ wait();
+ }
+@@ -695,7 +696,8 @@
+ * applet event processing so that it can be gracefully interrupted from
+ * things like HotJava.
+ */
+- private void runLoader() {
++ //Overridden by NetxPanel.
++ protected void runLoader() {
+ if (status != APPLET_DISPOSE) {
+ showAppletStatus("notdisposed");
+ return;
diff --git a/java/openjdk6/pkg-descr b/java/openjdk6/pkg-descr
index fdfbcaea649d..74c5ea8d924c 100644
--- a/java/openjdk6/pkg-descr
+++ b/java/openjdk6/pkg-descr
@@ -1,12 +1,7 @@
OpenJDK is an open-source implementation of the Java Platform, Standard Edition.
-The version has all of Sun's bug fixes up to JDK 6 Release 11 and should be
-the runtime equivelent to JDK6 Release 11.
-
Much of the OpenJDK code is licensed under the GPL version 2 with the
Classpath exception. The Java Hotspot virtual machine source code is
licensed under the GPL version 2 only.
-OpenJDK 6 should supercede the java/jdk16 port at some point in time.
-
WWW: http://openjdk.java.net/