[packages/icedtea7: 89/103] - Version: 1.9.13
jajcus
jajcus at pld-linux.org
Fri Apr 19 13:15:17 CEST 2013
commit 17ad8c05331b88a3c2bb03d27a2944a6777b1980
Author: Jacek Konieczny <jajcus at pld-linux.org>
Date: Tue Mar 20 14:35:15 2012 +0000
- Version: 1.9.13
Changed files:
icedtea6-build.patch -> 1.2
icedtea6-ecj_single_thread.patch -> 1.2
icedtea6-libpath.patch -> 1.2
icedtea6-no_dtdtype_patch.patch -> 1.2
icedtea6-rpath.patch -> 1.2
icedtea6-system_tray.patch -> 1.2
icedtea6.spec -> 1.81
openjdk-__LEAF.patch -> 1.1
icedtea6-build.patch | 83 ---------
icedtea6-ecj_single_thread.patch | 10 --
icedtea6-libpath.patch | 28 +--
icedtea6-no_dtdtype_patch.patch | 14 --
icedtea6-rpath.patch | 6 +-
icedtea6-system_tray.patch | 364 ---------------------------------------
icedtea6.spec | 84 ++++-----
openjdk-__LEAF.patch | 216 +++++++++++++++++++++++
8 files changed, 275 insertions(+), 530 deletions(-)
---
diff --git a/icedtea6.spec b/icedtea6.spec
index 81aa8f9..e437bb1 100644
--- a/icedtea6.spec
+++ b/icedtea6.spec
@@ -1,10 +1,12 @@
# TODO:
# - install .ttf fonts (same as in sun-java-base-jre-X11 package) or configure
# it to use system fonts (is it possible?).
+# - prepare the icedtea-web package to provide the plugin and WebStart
%bcond_with bootstrap # don't use gcj, use an installed icedtea6 instead
-%bcond_without plugin # don't build browser plugin
-%bcond_without nss # don't use NSS
+%bcond_with plugin # build browser plugin (icedtea-web is recommended instead)
+%bcond_with webstart # build webstart (icedtea-web is recommended instead)
+%bcond_without nss # don't use NSS
%if %{with bootstrap}
%define use_jdk java-gcj-compat
@@ -20,29 +22,27 @@
Summary: OpenJDK and GNU Classpath code
Summary(pl.UTF-8): Kod OpenJDK i GNU Classpath
Name: icedtea6
-Version: 1.8.3
-Release: 7
+Version: 1.9.13
+Release: 0.1
License: GPL v2
Group: Development/Languages/Java
Source0: http://icedtea.classpath.org/download/source/%{name}-%{version}.tar.gz
-# Source0-md5: 879bdc0160da9e0d0210bda75c8f6054
+# Source0-md5: 6a5c0d0ad2fe4bdb6cd851bcc24eac31
# following sources should match those in Makefile.am
-Source1: http://download.java.net/openjdk/jdk6/promoted/b18/openjdk-6-src-b18-16_feb_2010.tar.gz
-# Source1-md5: 94db01691ab38f98b7d42b2ebf4d5c0b
-Source2: http://kenai.com/projects/jdk6-drops/downloads/download/jdk6-jaxws-2009_10_27.zip
-# Source2-md5: 3ea5728706169498b722b898a1008acf
-Source3: http://kenai.com/projects/jdk6-drops/downloads/download/jdk6-jaf-2009_10_27.zip
-# Source3-md5: 7a50bb540a27cdd0001885630088b758
-Source4: https://jaxp.dev.java.net/files/documents/913/147329/jdk6-jaxp-2009_10_13.zip
-# Source4-md5: a2f7b972124cd776ff71e7754eb9a429
+Source1: http://download.java.net/openjdk/jdk6/promoted/b20/openjdk-6-src-b20-21_jun_2010.tar.gz
+# Source1-md5: 0b36adbf67e4f261e1b827ed4be4f447
+Source2: http://icedtea.classpath.org/download/drops/jdk6-jaxws-b20.zip
+# Source2-md5: 91adfd41e6f001add4f92ae31216b1e3
+Source3: http://icedtea.classpath.org/download/drops/jdk6-jaf-b20.zip
+# Source3-md5: bc95c133620bd68c161cac9891592901
+Source4: http://icedtea.classpath.org/download/drops/jdk6-jaxp-b20.zip
+# Source4-md5: 22e95fbdb9fb7d8b6b6fc0a1d76d1fbd
Patch0: %{name}-i486.patch
-Patch1: %{name}-ecj_single_thread.patch
-Patch2: %{name}-no_dtdtype_patch.patch
-Patch3: %{name}-rpath.patch
-Patch4: %{name}-libpath.patch
-Patch5: %{name}-system_tray.patch
-Patch6: %{name}-xul.patch
-Patch7: %{name}-build.patch
+Patch1: %{name}-rpath.patch
+Patch2: %{name}-xul.patch
+Patch3: %{name}-libpath.patch
+# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7103224
+Patch4: openjdk-__LEAF.patch
URL: http://icedtea.classpath.org/wiki/Main_Page
BuildRequires: alsa-lib-devel
BuildRequires: ant-nodeps
@@ -399,24 +399,14 @@ Wtyczka z obsługą Javy dla przeglądarek WWW.
%setup -q
%patch0 -p1
-
-# workaround for an ECJ bug
-#%patch1 -p1
-
-%patch2 -p1
-
# rpath so IcedTeaPlugin.so can find libxul.so and libxpcom.so
-%patch3 -p1
-
-%patch4 -p1
+%patch1 -p1
+%patch2 -p1
# patches to applied to the extracted sources
mkdir -p pld-patches
-cp "%{PATCH5}" pld-patches
-
-%patch6 -p1
-
-cp "%{PATCH7}" pld-patches
+cp "%{PATCH3}" pld-patches
+cp "%{PATCH4}" pld-patches
# let the build system extract the sources where it wants them
mkdir drops
@@ -424,6 +414,7 @@ ln -s %{SOURCE1} .
ln -s %{SOURCE2} drops
ln -s %{SOURCE3} drops
ln -s %{SOURCE4} drops
+ln -s %{SOURCE5} drops
%build
# Make sure we have /proc mounted - otherwise idlc will fail later.
@@ -452,6 +443,11 @@ export PATH="$JAVA_HOME/bin:$PATH"
%else
--disable-plugin \
%endif
+%if %{with webstart}
+ --enable-webstart \
+%else
+ --disable-webstart \
+%endif
%{!?with_nss:--disable-nss} \
--with-xalan2-jar=%{_javadir}/xalan.jar \
--with-xalan2-serializer-jar=%{_javadir}/serializer.jar \
@@ -480,7 +476,7 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{dstdir},%{_mandir}/ja,%{_browserpluginsd
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}
# install the 'JDK image', it contains the JRE too
-cp -a openjdk/build/linux-*/j2sdk-image/* $RPM_BUILD_ROOT%{dstdir}
+cp -a openjdk.build/j2sdk-image/* $RPM_BUILD_ROOT%{dstdir}
# convenience symlinks without version number
ln -s %{dstreldir} $RPM_BUILD_ROOT%{_jvmdir}/%{name}
@@ -636,8 +632,8 @@ rm -rf $RPM_BUILD_ROOT
%files jdk-base
%defattr(644,root,root,755)
-%doc openjdk/build/linux-*/j2sdk-image/THIRD_PARTY_README
-%doc openjdk/build/linux-*/j2sdk-image/ASSEMBLY_EXCEPTION
+%doc openjdk.build/j2sdk-image/THIRD_PARTY_README
+%doc openjdk.build/j2sdk-image/ASSEMBLY_EXCEPTION
%dir %{dstdir}
%{_jvmdir}/%{name}
%attr(755,root,root) %{dstdir}/bin/appletviewer
@@ -686,7 +682,7 @@ rm -rf $RPM_BUILD_ROOT
%files jre
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/java
-%attr(755,root,root) %{_bindir}/javaws
+%{?with_webstart:%attr(755,root,root) %{_bindir}/javaws}
%attr(755,root,root) %{_bindir}/keytool
%attr(755,root,root) %{_bindir}/orbd
%attr(755,root,root) %{_bindir}/pack200
@@ -696,7 +692,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/tnameserv
%attr(755,root,root) %{_bindir}/unpack200
%{_mandir}/man1/java.1*
-%{_mandir}/man1/javaws.1*
+%{?with_webstart:%{_mandir}/man1/javaws.1*}
%{_mandir}/man1/keytool.1*
%{_mandir}/man1/orbd.1*
%{_mandir}/man1/pack200.1*
@@ -707,7 +703,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/unpack200.1*
%lang(ja) %{_mandir}/ja/man1/java.1*
%ifnarch x86_64
-%lang(ja) %{_mandir}/ja/man1/javaws.1*
+%{?with_webstart:%lang(ja) %{_mandir}/ja/man1/javaws.1*}
%endif
%lang(ja) %{_mandir}/ja/man1/keytool.1*
%lang(ja) %{_mandir}/ja/man1/orbd.1*
@@ -720,8 +716,8 @@ rm -rf $RPM_BUILD_ROOT
%files jre-base
%defattr(644,root,root,755)
-%doc openjdk/build/linux-*/j2sdk-image/THIRD_PARTY_README
-%doc openjdk/build/linux-*/j2sdk-image/ASSEMBLY_EXCEPTION
+%doc openjdk.build/j2sdk-image/THIRD_PARTY_README
+%doc openjdk.build/j2sdk-image/ASSEMBLY_EXCEPTION
%dir %{_sysconfdir}/%{name}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*
%dir %{dstdir}
@@ -731,8 +727,10 @@ rm -rf $RPM_BUILD_ROOT
%dir %{dstdir}/bin
%attr(755,root,root) %{jredir}/bin/java
%attr(755,root,root) %{dstdir}/bin/java
+%if %{with webstart}
%attr(755,root,root) %{jredir}/bin/javaws
%attr(755,root,root) %{dstdir}/bin/javaws
+%endif
%attr(755,root,root) %{jredir}/bin/keytool
%attr(755,root,root) %{dstdir}/bin/keytool
%attr(755,root,root) %{jredir}/bin/orbd
@@ -804,8 +802,10 @@ rm -rf $RPM_BUILD_ROOT
%{jredir}/lib/security
%{jredir}/lib/zi
#
+%if %{with webstart}
%{jredir}/lib/about.jar
%{jredir}/lib/about.jnlp
+%endif
%{jredir}/lib/calendars.properties
%{jredir}/lib/charsets.jar
%{jredir}/lib/classlist
diff --git a/icedtea6-build.patch b/icedtea6-build.patch
deleted file mode 100644
index b98545b..0000000
--- a/icedtea6-build.patch
+++ /dev/null
@@ -1,83 +0,0 @@
---- openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp.org 2012-02-11 15:04:57.730027726 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp 2012-02-11 15:05:11.420335355 +0100
-@@ -46,7 +46,7 @@
- }
- };
-
--// InterfaceSupport provides functionality used by the __LEAF and __ENTRY
-+// InterfaceSupport provides functionality used by the __JDK_LEAF and __ENTRY
- // macros. These macros are used to guard entry points into the VM and
- // perform checks upon leave of the VM.
-
-@@ -391,7 +391,7 @@
-
- // LEAF routines do not lock, GC or throw exceptions
-
--#define __LEAF(result_type, header) \
-+#define __JDK_LEAF(result_type, header) \
- TRACE_CALL(result_type, header) \
- debug_only(NoHandleMark __hm;) \
- /* begin of body */
-@@ -427,7 +427,7 @@
-
- #define IRT_LEAF(result_type, header) \
- result_type header { \
-- __LEAF(result_type, header) \
-+ __JDK_LEAF(result_type, header) \
- debug_only(No_Safepoint_Verifier __nspv(true);)
-
-
-@@ -461,7 +461,7 @@
-
- #define JRT_LEAF(result_type, header) \
- result_type header { \
-- __LEAF(result_type, header) \
-+ __JDK_LEAF(result_type, header) \
- debug_only(JRT_Leaf_Verifier __jlv;)
-
-
-@@ -521,7 +521,7 @@
- result_type JNICALL header { \
- JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
- assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
-- __LEAF(result_type, header)
-+ __JDK_LEAF(result_type, header)
-
-
- // Close the routine and the extern "C"
-@@ -562,7 +562,7 @@
- extern "C" { \
- result_type JNICALL header { \
- VM_Exit::block_if_vm_exited(); \
-- __LEAF(result_type, header)
-+ __JDK_LEAF(result_type, header)
-
-
- #define JVM_END } }
---- openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c.org 2012-02-11 15:20:11.416431939 +0100
-+++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2012-02-11 15:26:24.905098592 +0100
-@@ -36,7 +36,7 @@
- {
- png_uint_32 check;
-
-- SplashStream * stream = (SplashStream*)png_ptr->io_ptr;
-+ SplashStream * stream = (SplashStream*)png_get_io_ptr(png_ptr);
- check = stream->read(stream, data, length);
- if (check != length)
- png_error(png_ptr, "Read Error");
-@@ -71,12 +71,12 @@
- goto done;
- }
-
-- if (setjmp(png_ptr->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png_ptr))) {
- goto done;
- }
-
-- png_ptr->io_ptr = io_ptr;
-- png_ptr->read_data_fn = read_func;
-+ png_get_io_ptr(png_ptr);
-+ png_set_read_fn(png_ptr, NULL, read_func);
-
- png_set_sig_bytes(png_ptr, SIG_BYTES); /* we already read the 8 signature bytes */
-
diff --git a/icedtea6-ecj_single_thread.patch b/icedtea6-ecj_single_thread.patch
deleted file mode 100644
index 368c707..0000000
--- a/icedtea6-ecj_single_thread.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- icedtea6-1.8/javac.in.orig 2010-03-25 15:10:41.000000000 +0100
-+++ icedtea6-1.8/javac.in 2010-04-16 18:23:37.258022591 +0200
-@@ -36,6 +36,6 @@
- @ECJ@ -1.5 -nowarn $bcoption $NEW_ARGS
- else
- CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \
-- @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
-+ @JAVA@ -Djdt.compiler.useSingleThread=true org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
- fi
-
diff --git a/icedtea6-libpath.patch b/icedtea6-libpath.patch
index 66bab4e..1096ad0 100644
--- a/icedtea6-libpath.patch
+++ b/icedtea6-libpath.patch
@@ -1,14 +1,14 @@
---- icedtea6-1.8/patches/hotspot/original/icedtea-6778662-lib64.patch.orig 2010-06-07 11:05:44.906948049 +0200
-+++ icedtea6-1.8/patches/hotspot/original/icedtea-6778662-lib64.patch 2010-06-07 11:06:24.229865044 +0200
-@@ -7,9 +7,9 @@
- -#define DEFAULT_LIBPATH "/lib:/usr/lib"
- +
- +#if defined(AMD64) || defined(_LP64) && (defined(PPC) || defined(S390))
--+#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
-++#define DEFAULT_LIBPATH "/usr/lib64/java:/usr/lib64:/lib64:/lib:/usr/lib"
- +#else
--+#define DEFAULT_LIBPATH "/lib:/usr/lib"
-++#define DEFAULT_LIBPATH "/usr/lib/java:/lib:/usr/lib"
- +#endif
-
- #define EXTENSIONS_DIR "/lib/ext"
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig 2012-03-20 14:24:27.002521200 +0100
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2012-03-20 14:24:59.150654944 +0100
+@@ -286,9 +286,9 @@
+ * 7: The default directories, normally /lib and /usr/lib.
+ */
+ #if defined(AMD64) || defined(_LP64) && (defined(SPARC) || defined(PPC) || defined(S390))
+-#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
++#define DEFAULT_LIBPATH "/usr/lib64/java:/usr/lib64:/lib64:/lib:/usr/lib"
+ #else
+-#define DEFAULT_LIBPATH "/lib:/usr/lib"
++#define DEFAULT_LIBPATH "/usr/lib/java:/lib:/usr/lib"
+ #endif
+
+ #define EXTENSIONS_DIR "/lib/ext"
diff --git a/icedtea6-no_dtdtype_patch.patch b/icedtea6-no_dtdtype_patch.patch
deleted file mode 100644
index 2456479..0000000
--- a/icedtea6-no_dtdtype_patch.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- icedtea6-1.8/Makefile.am.orig 2010-04-12 23:55:51.000000000 +0200
-+++ icedtea6-1.8/Makefile.am 2010-04-16 19:40:57.496933541 +0200
-@@ -408,11 +408,6 @@
- patches/ecj/getannotation-cast.patch \
- patches/ecj/override.patch
-
--if DTDTYPE_QNAME
--ICEDTEA_ECJ_PATCHES += \
-- patches/ecj/icedtea-jaxws-getdtdtype.patch
--endif
--
- ICEDTEA_ECJ_PATCHES += $(DISTRIBUTION_ECJ_PATCHES)
-
- # OpenJDK build environment.
diff --git a/icedtea6-rpath.patch b/icedtea6-rpath.patch
index df30de3..2430b85 100644
--- a/icedtea6-rpath.patch
+++ b/icedtea6-rpath.patch
@@ -1,6 +1,6 @@
---- icedtea6-1.8/Makefile.am~ 2010-04-12 23:55:51.754838172 +0200
-+++ icedtea6-1.8/Makefile.am 2010-04-18 20:37:41.955980316 +0200
-@@ -1546,6 +1546,7 @@
+--- icedtea6-1.9.13/Makefile.am.orig 2012-02-10 14:53:28.000000000 +0100
++++ icedtea6-1.9.13/Makefile.am 2012-03-20 14:20:43.542323616 +0100
+@@ -1703,6 +1703,7 @@
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(MOZILLA_LIBS)\
diff --git a/icedtea6-system_tray.patch b/icedtea6-system_tray.patch
deleted file mode 100644
index 4a0cb00..0000000
--- a/icedtea6-system_tray.patch
+++ /dev/null
@@ -1,364 +0,0 @@
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/jdk/src/share/classes/java/awt/SystemTray.java openjdk/jdk/src/share/classes/java/awt/SystemTray.java
---- openjdk.orig/jdk/src/share/classes/java/awt/SystemTray.java 2010-02-17 04:14:21.000000000 +0100
-+++ openjdk/jdk/src/share/classes/java/awt/SystemTray.java 2010-11-27 19:29:43.661160073 +0100
-@@ -125,6 +125,8 @@
-
- transient private SystemTrayPeer peer;
-
-+ private static final TrayIcon[] EMPTY_TRAY_ARRAY = new TrayIcon[0];
-+
- /**
- * Private <code>SystemTray</code> constructor.
- *
-@@ -164,16 +166,14 @@
- if (GraphicsEnvironment.isHeadless()) {
- throw new HeadlessException();
- }
-+
-+ initializeSystemTrayIfNeeded();
-+
- if (!isSupported()) {
- throw new UnsupportedOperationException(
- "The system tray is not supported on the current platform.");
- }
-
-- synchronized (SystemTray.class) {
-- if (systemTray == null) {
-- systemTray = new SystemTray();
-- }
-- }
- return systemTray;
- }
-
-@@ -203,15 +203,18 @@
- * functionality is supported for the current platform
- */
- public static boolean isSupported() {
-- if (Toolkit.getDefaultToolkit() instanceof SunToolkit) {
--
-- return ((SunToolkit)Toolkit.getDefaultToolkit()).isTraySupported();
--
-- } else if (Toolkit.getDefaultToolkit() instanceof HeadlessToolkit) {
--
-- return ((HeadlessToolkit)Toolkit.getDefaultToolkit()).isTraySupported();
-+ Toolkit toolkit = Toolkit.getDefaultToolkit();
-+ if (toolkit instanceof SunToolkit) {
-+ // connecting tray to native resource
-+ initializeSystemTrayIfNeeded();
-+ return ((SunToolkit)toolkit).isTraySupported();
-+ } else if (toolkit instanceof HeadlessToolkit) {
-+ // skip initialization as the init routine
-+ // throws HeadlessException
-+ return ((HeadlessToolkit)toolkit).isTraySupported();
-+ } else {
-+ return false;
- }
-- return false;
- }
-
- /**
-@@ -323,7 +326,7 @@
- if (icons != null) {
- return (TrayIcon[])icons.toArray(new TrayIcon[icons.size()]);
- }
-- return new TrayIcon[0];
-+ return EMPTY_TRAY_ARRAY;
- }
-
- /**
-@@ -343,19 +346,32 @@
- }
-
- /**
-- * Adds a {@code PropertyChangeListener} to the listener list for a
-- * specific property. Currently supported property:
-- * <ul>
-- * <li>{@code trayIcons}<p>
-- * <p>
-- * This {@code SystemTray}'s array of {@code TrayIcon}s.
-- * The array is accessed via {@link SystemTray#getTrayIcons}.<br>
-- * This property is changed when a {@code TrayIcon} is added to
-- * (or removed from) the {@code SystemTray}.<br> For example, this property
-- * is changed when the native {@code SystemTray} becomes unavailable on the
-- * desktop<br> and the {@code TrayIcon}s are automatically removed.</li>
-- * </ul>
-- * <p>
-+ * Adds a {@code PropertyChangeListener} to the list of listeners for the
-+ * specific property. The following properties are currently supported:
-+ * <p> </p>
-+ * <table border=1 summary="SystemTray properties">
-+ * <tr>
-+ * <th>Property</th>
-+ * <th>Description</th>
-+ * </tr>
-+ * <tr>
-+ * <td>{@code trayIcons}</td>
-+ * <td>The {@code SystemTray}'s array of {@code TrayIcon} objects.
-+ * The array is accessed via the {@link #getTrayIcons} method.<br>
-+ * This property is changed when a tray icon is added to (or removed
-+ * from) the system tray.<br> For example, this property is changed
-+ * when the system tray becomes unavailable on the desktop<br>
-+ * and the tray icons are automatically removed.</td>
-+ * </tr>
-+ * <tr>
-+ * <td>{@code systemTray}</td>
-+ * <td>This property contains {@code SystemTray} instance when the system tray
-+ * is available or <code>null</code> otherwise.<br> This property is changed
-+ * when the system tray becomes available or unavailable on the desktop.<br>
-+ * The property is accessed by the {@link #getSystemTray} method.</td>
-+ * </tr>
-+ * </table>
-+ * <p> </p>
- * The {@code listener} listens to property changes only in this context.
- * <p>
- * If {@code listener} is {@code null}, no exception is thrown
-@@ -462,7 +478,12 @@
-
- synchronized void addNotify() {
- if (peer == null) {
-- peer = ((SunToolkit)Toolkit.getDefaultToolkit()).createSystemTray(this);
-+ Toolkit toolkit = Toolkit.getDefaultToolkit();
-+ if (toolkit instanceof SunToolkit) {
-+ peer = ((SunToolkit)Toolkit.getDefaultToolkit()).createSystemTray(this);
-+ } else if (toolkit instanceof HeadlessToolkit) {
-+ peer = ((HeadlessToolkit)Toolkit.getDefaultToolkit()).createSystemTray(this);
-+ }
- }
- }
-
-@@ -472,4 +493,12 @@
- security.checkPermission(SecurityConstants.ACCESS_SYSTEM_TRAY_PERMISSION);
- }
- }
-+
-+ private static void initializeSystemTrayIfNeeded() {
-+ synchronized (SystemTray.class) {
-+ if (systemTray == null) {
-+ systemTray = new SystemTray();
-+ }
-+ }
-+ }
- }
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XMSelection.java openjdk/jdk/src/solaris/classes/sun/awt/X11/XMSelection.java
---- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XMSelection.java 2010-02-17 04:14:46.000000000 +0100
-+++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XMSelection.java 2010-11-27 19:29:43.661160073 +0100
-@@ -254,7 +254,7 @@
- }
-
- public synchronized void removeSelectionListener(XMSelectionListener listener) {
-- if (listeners == null) {
-+ if (listeners != null) {
- listeners.remove(listener);
- }
- }
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java openjdk/jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java
---- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java 2010-02-17 04:14:46.000000000 +0100
-+++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XSystemTrayPeer.java 2010-11-27 19:29:43.661160073 +0100
-@@ -27,47 +27,94 @@
-
- import java.awt.*;
- import java.awt.peer.SystemTrayPeer;
-+import java.lang.reflect.Method;
-+import java.lang.reflect.InvocationTargetException;
-+import java.util.logging.Logger;
-+import sun.awt.SunToolkit;
-+import sun.awt.AppContext;
-+
-+public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener {
-+ private static final Logger log = Logger.getLogger("sun.awt.X11.XSystemTrayPeer");
-
--public class XSystemTrayPeer implements SystemTrayPeer {
- SystemTray target;
-- long tray_owner;
- static XSystemTrayPeer peerInstance; // there is only one SystemTray peer per application
-
-- final static XAtom _NET_SYSTEM_TRAY = XAtom.get("_NET_SYSTEM_TRAY_S0");
-- final static XAtom _XEMBED_INFO = XAtom.get("_XEMBED_INFO");
-- final static XAtom _NET_SYSTEM_TRAY_OPCODE = XAtom.get("_NET_SYSTEM_TRAY_OPCODE");
-- final static XAtom _NET_WM_ICON = XAtom.get("_NET_WM_ICON");
-- final static long SYSTEM_TRAY_REQUEST_DOCK = 0;
-+ private volatile boolean available;
-+ private final XMSelection selection = new XMSelection("_NET_SYSTEM_TRAY");
-+
-+ private static final Method firePropertyChangeMethod =
-+ XToolkit.getMethod(SystemTray.class, "firePropertyChange", new Class[] {String.class, Object.class, Object.class});
-+ private static final Method addNotifyMethod = XToolkit.getMethod(TrayIcon.class, "addNotify", null);
-+ private static final Method removeNotifyMethod = XToolkit.getMethod(TrayIcon.class, "removeNotify", null);
-+
-+ private static final int SCREEN = 0;
-+ private static final String SYSTEM_TRAY_PROPERTY_NAME = "systemTray";
-+ private static final XAtom _NET_SYSTEM_TRAY = XAtom.get("_NET_SYSTEM_TRAY_S" + SCREEN);
-+ private static final XAtom _XEMBED_INFO = XAtom.get("_XEMBED_INFO");
-+ private static final XAtom _NET_SYSTEM_TRAY_OPCODE = XAtom.get("_NET_SYSTEM_TRAY_OPCODE");
-+ private static final XAtom _NET_WM_ICON = XAtom.get("_NET_WM_ICON");
-+ private static final long SYSTEM_TRAY_REQUEST_DOCK = 0;
-
- XSystemTrayPeer(SystemTray target) {
- this.target = target;
- peerInstance = this;
-
-- XToolkit.awtLock();
-- try {
-- tray_owner = XlibWrapper.XGetSelectionOwner(XToolkit.getDisplay(), _NET_SYSTEM_TRAY.getAtom());
-- } finally {
-- XToolkit.awtUnlock();
-+ selection.addSelectionListener(this);
-+
-+ long selection_owner = selection.getOwner(SCREEN);
-+ available = (selection_owner != XConstants.None);
-+
-+ log.fine(" check if system tray is available. selection owner: " + selection_owner);
-+ }
-+
-+ public void ownerChanged(int screen, XMSelection sel, long newOwner, long data, long timestamp) {
-+ if (screen != SCREEN) {
-+ return;
-+ }
-+ if (!available) {
-+ available = true;
-+ firePropertyChange(SYSTEM_TRAY_PROPERTY_NAME, null, target);
-+ } else {
-+ removeTrayPeers();
- }
-+ createTrayPeers();
-+ }
-+
-+ public void ownerDeath(int screen, XMSelection sel, long deadOwner) {
-+ if (screen != SCREEN) {
-+ return;
-+ }
-+ if (available) {
-+ available = false;
-+ firePropertyChange(SYSTEM_TRAY_PROPERTY_NAME, target, null);
-+ removeTrayPeers();
-+ }
-+ }
-+
-+ public void selectionChanged(int screen, XMSelection sel, long owner, XPropertyEvent event) {
- }
-
- public Dimension getTrayIconSize() {
- return new Dimension(XTrayIconPeer.TRAY_ICON_HEIGHT, XTrayIconPeer.TRAY_ICON_WIDTH);
- }
-
-+ boolean isAvailable() {
-+ return available;
-+ }
-+
-+ void dispose() {
-+ selection.removeSelectionListener(this);
-+ }
-+
- // ***********************************************************************
- // ***********************************************************************
-
- void addTrayIcon(XTrayIconPeer tiPeer) throws AWTException {
-- tray_owner = 0;
-- XToolkit.awtLock();
-- try {
-- tray_owner = XlibWrapper.XGetSelectionOwner(XToolkit.getDisplay(), _NET_SYSTEM_TRAY.getAtom());
-- } finally {
-- XToolkit.awtUnlock();
-- }
-+ long selection_owner = selection.getOwner(SCREEN);
-
-- if (tray_owner == 0) {
-+ log.fine(" send SYSTEM_TRAY_REQUEST_DOCK message to owner: " + selection_owner);
-+
-+ if (selection_owner == XConstants.None) {
- throw new AWTException("TrayIcon couldn't be displayed.");
- }
-
-@@ -77,7 +124,7 @@
-
- _XEMBED_INFO.setAtomData(tray_window, data_ptr, data.length);
-
-- sendMessage(tray_owner, SYSTEM_TRAY_REQUEST_DOCK, tray_window, 0, 0);
-+ sendMessage(selection_owner, SYSTEM_TRAY_REQUEST_DOCK, tray_window, 0, 0);
- }
-
- void sendMessage(long win, long msg, long data1, long data2, long data3) {
-@@ -109,4 +156,51 @@
- static XSystemTrayPeer getPeerInstance() {
- return peerInstance;
- }
-+
-+ private void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) {
-+ Runnable runnable = new Runnable() {
-+ public void run() {
-+ Object[] args = new Object[] {propertyName, oldValue, newValue};
-+ invokeMethod(firePropertyChangeMethod, target, args);
-+ }
-+ };
-+ invokeOnEachAppContext(runnable);
-+ }
-+
-+ private void createTrayPeers() {
-+ invokeOnEachTrayIcon(addNotifyMethod);
-+ }
-+
-+ private void removeTrayPeers() {
-+ invokeOnEachTrayIcon(removeNotifyMethod);
-+ }
-+
-+ private void invokeOnEachTrayIcon(final Method method) {
-+ Runnable runnable = new Runnable() {
-+ public void run() {
-+ TrayIcon[] icons = target.getTrayIcons();
-+ for (TrayIcon ti : icons) {
-+ invokeMethod(method, ti, (Object[]) null);
-+ }
-+ }
-+ };
-+ invokeOnEachAppContext(runnable);
-+ }
-+
-+ private void invokeMethod(Method method, Object obj, Object[] args) {
-+ try{
-+ method.invoke(obj, args);
-+ } catch (InvocationTargetException e){
-+ e.printStackTrace();
-+ } catch (IllegalAccessException e) {
-+ e.printStackTrace();
-+ }
-+ }
-+
-+ private void invokeOnEachAppContext(Runnable runnable) {
-+ for (AppContext appContext : AppContext.getAppContexts()) {
-+ SunToolkit.invokeLaterOnAppContext(appContext, runnable);
-+ }
-+ }
-+
- }
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java openjdk/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java
---- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2010-11-27 18:09:50.051823664 +0100
-+++ openjdk/jdk/src/solaris/classes/sun/awt/X11/XToolkit.java 2010-11-27 19:30:50.372032878 +0100
-@@ -300,6 +300,14 @@
- }
- }
- });
-+ Runtime.getRuntime().addShutdownHook(new Thread() {
-+ public void run() {
-+ XSystemTrayPeer peer = XSystemTrayPeer.getPeerInstance();
-+ if (peer != null) {
-+ peer.dispose();
-+ }
-+ }
-+ });
- }
-
- static String getCorrectXIDString(String val) {
-@@ -1066,10 +1074,9 @@
- }
-
- public boolean isTraySupported() {
-- int wm = XWM.getWMID();
-- if (wm == XWM.METACITY_WM || wm == XWM.KDE2_WM)
-- {
-- return true;
-+ XSystemTrayPeer peer = XSystemTrayPeer.getPeerInstance();
-+ if (peer != null) {
-+ return peer.isAvailable();
- }
- return false;
- }
diff --git a/openjdk-__LEAF.patch b/openjdk-__LEAF.patch
new file mode 100644
index 0000000..6baace1
--- /dev/null
+++ b/openjdk-__LEAF.patch
@@ -0,0 +1,216 @@
+
+7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
+Reviewed-by: never
+Contributed-by: Omair Majid <omajid at redhat.com>
+
+--- openjdk.orig/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -107,7 +107,7 @@ extern "C" {
+ if (env != xenv) { \
+ NativeReportJNIFatalError(thr, warn_wrong_jnienv); \
+ } \
+- __ENTRY(result_type, header, thr)
++ VM_ENTRY_BASE(result_type, header, thr)
+
+
+ #define UNCHECKED() (unchecked_jni_NativeInterface)
+--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 08:17:15 2011 -0700
+@@ -426,7 +426,7 @@ struct jvmtiInterface_1_ jvmti</xsl:text
+ <xsl:value-of select="$space"/>
+ <xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
+ <xsl:value-of select="$space"/>
+- <xsl:text>__ENTRY(jvmtiError, </xsl:text>
++ <xsl:text>VM_ENTRY_BASE(jvmtiError, </xsl:text>
+ <xsl:apply-templates select="." mode="functionid"/>
+ <xsl:text> , current_thread)</xsl:text>
+ <xsl:value-of select="$space"/>
+--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -173,7 +173,7 @@ JvmtiEnv::GetThreadLocalStorage(jthread
+ // from native so as to resolve the jthread.
+
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
++ VM_ENTRY_BASE(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ oop thread_oop = JNIHandles::resolve_external_guard(thread);
+--- openjdk.orig/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -373,7 +373,7 @@ JvmtiExport::get_jvmti_interface(JavaVM
+ JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
+ // transition code: native to VM
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
++ VM_ENTRY_BASE(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
+--- openjdk.orig/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 08:17:15 2011 -0700
+@@ -72,9 +72,9 @@ class HandleMarkCleaner: public StackObj
+ }
+ };
+
+-// InterfaceSupport provides functionality used by the __LEAF and __ENTRY
+-// macros. These macros are used to guard entry points into the VM and
+-// perform checks upon leave of the VM.
++// InterfaceSupport provides functionality used by the VM_LEAF_BASE and
++// VM_ENTRY_BASE macros. These macros are used to guard entry points into
++// the VM and perform checks upon leave of the VM.
+
+
+ class InterfaceSupport: AllStatic {
+@@ -433,7 +433,7 @@ class RuntimeHistogramElement : public H
+
+ // LEAF routines do not lock, GC or throw exceptions
+
+-#define __LEAF(result_type, header) \
++#define VM_LEAF_BASE(result_type, header) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ /* begin of body */
+@@ -441,7 +441,7 @@ class RuntimeHistogramElement : public H
+
+ // ENTRY routines may lock, GC and throw exceptions
+
+-#define __ENTRY(result_type, header, thread) \
++#define VM_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ HandleMarkCleaner __hm(thread); \
+ Thread* THREAD = thread; \
+@@ -450,7 +450,7 @@ class RuntimeHistogramElement : public H
+
+ // QUICK_ENTRY routines behave like ENTRY but without a handle mark
+
+-#define __QUICK_ENTRY(result_type, header, thread) \
++#define VM_QUICK_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ Thread* THREAD = thread; \
+@@ -463,20 +463,20 @@ class RuntimeHistogramElement : public H
+ #define IRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define IRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(No_Safepoint_Verifier __nspv(true);)
+
+
+ #define IRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Another special case for nmethod_entry_point so the nmethod that the
+@@ -487,7 +487,7 @@ class RuntimeHistogramElement : public H
+ result_type header { \
+ nmethodLocker _nmlock(nm); \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+ #define IRT_END }
+
+@@ -497,20 +497,20 @@ class RuntimeHistogramElement : public H
+ #define JRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define JRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(JRT_Leaf_Verifier __jlv;)
+
+
+ #define JRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Same as JRT Entry but allows for return value after the safepoint
+@@ -543,11 +543,11 @@ extern "C" {
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ // Ensure that the VMNativeEntryWrapper constructor, which can cause
+-// a GC, is called outside the NoHandleMark (set via __QUICK_ENTRY).
++// a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE).
+ #define JNI_QUICK_ENTRY(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+@@ -555,7 +555,7 @@ extern "C" {
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JNI_LEAF(result_type, header) \
+@@ -563,7 +563,7 @@ extern "C" {
+ result_type JNICALL header { \
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ // Close the routine and the extern "C"
+@@ -579,7 +579,7 @@ extern "C" {
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_ENTRY_NO_ENV(result_type, header) \
+@@ -588,7 +588,7 @@ extern "C" {
+ JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_QUICK_ENTRY(result_type, header) \
+@@ -597,14 +597,14 @@ extern "C" {
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_LEAF(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+ VM_Exit::block_if_vm_exited(); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ #define JVM_END } }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/icedtea7.git/commitdiff/f360048b2271851d733c2fc755b8e7cae2f337cf
More information about the pld-cvs-commit
mailing list