[pkg-java] r2585 - in trunk/eclipse/debian: . patches
Matthias Klose
doko at costa.debian.org
Mon Oct 9 23:37:46 UTC 2006
Author: doko
Date: 2006-10-09 23:37:46 +0000 (Mon, 09 Oct 2006)
New Revision: 2585
Added:
trunk/eclipse/debian/patches/eclipse-libswt-firefox2.dpatch
trunk/eclipse/debian/patches/eclipse-libswt-xpcomgcc4.dpatch
Modified:
trunk/eclipse/debian/changelog
trunk/eclipse/debian/patches/eclipse-libswt-firefox.dpatch
trunk/eclipse/debian/rules
Log:
- update patches; untested, the current state in svn is broken :-/
Modified: trunk/eclipse/debian/changelog
===================================================================
--- trunk/eclipse/debian/changelog 2006-10-09 19:26:38 UTC (rev 2584)
+++ trunk/eclipse/debian/changelog 2006-10-09 23:37:46 UTC (rev 2585)
@@ -53,6 +53,9 @@
with mozilla.
* debian/rules: Fix libswt-gtk.jar symlink.
* Build swt bindings with -O2.
+ * debian/patches/eclipse-libswt-xpcomgcc4.dpatch: New, taken from FC.
+ * debian/patches/eclipse-libswt-firefox.dpatch: Updated from FC.
+ * debian/patches/eclipse-libswt-firefox2.dpatch: New, taken from FC.
-- Michael Koch <konqueror at gmx.de> Tue, 3 Oct 2006 17:22:09 +0000
Modified: trunk/eclipse/debian/patches/eclipse-libswt-firefox.dpatch
===================================================================
--- trunk/eclipse/debian/patches/eclipse-libswt-firefox.dpatch 2006-10-09 19:26:38 UTC (rev 2584)
+++ trunk/eclipse/debian/patches/eclipse-libswt-firefox.dpatch 2006-10-09 23:37:46 UTC (rev 2585)
@@ -24,14 +24,441 @@
diff -r -u --exclude='*.rej' --exclude='*.orig' source-tree.orig/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh source-tree/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh
--- source-tree.orig/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh 2006-01-28 18:46:37.000000000 +0100
+++ source-tree/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh 2006-01-28 18:54:42.000000000 +0100
-@@ -23,6 +23,10 @@
+@@ -45,6 +45,9 @@
+ MODEL=`uname -m`
+ fi
+ fi
++if [ ${MODEL} = 'unknown' ]; then
++ MODEL=`uname -m`
++fi
+ case $MODEL in
+ "x86_64")
+ SWT_ARCH=x86_64
+@@ -87,9 +87,9 @@
+ fi
- case $OS in
- "Linux")
-+ GECKO_INCLUDES="`pkg-config --cflags firefox-gtkmozembed`"
-+ GECKO_LIBS="`pkg-config --libs firefox-gtkmozembed`"
-+ # Set this to something to override the presets
-+ GECKO_SDK="_"
- case $MODEL in
- "x86_64")
- CC=gcc
+ if [ -z "${GECKO_INCLUDES}" -a -z "${GECKO_LIBS}" ]; then
+- if [ x`pkg-config --exists mozilla-xpcom && echo YES` = "xYES" ]; then
+- GECKO_INCLUDES=`pkg-config --cflags mozilla-xpcom`
+- GECKO_LIBS=`pkg-config --libs mozilla-xpcom`
++ if [ x`pkg-config --exists firefox-xpcom && echo YES` = "xYES" ]; then
++ GECKO_INCLUDES=`pkg-config --cflags firefox-xpcom`
++ GECKO_LIBS=`pkg-config --libs firefox-xpcom`
+ export GECKO_INCLUDES
+ export GECKO_LIBS
+ MAKE_MOZILLA=make_mozilla
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak.orig 2006-10-09 18:57:26.776969250 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak 2006-10-09 18:57:38.953730250 +0200
+@@ -199,7 +199,7 @@
+ #
+ # Mozilla lib
+ #
+-make_mozilla:$(MOZILLA_LIB) $(PROFILE14_LIB) $(PROFILE17_LIB) $(PROFILE18_LIB)
++make_mozilla:$(MOZILLA_LIB)
+
+ $(MOZILLA_LIB): $(MOZILLA_OBJECTS)
+ $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${GECKO_LIBS}
+@@ -217,22 +217,22 @@
+ $(CXX) $(MOZILLACFLAGS) ${GECKO_INCLUDES} -c xpcom_stats.cpp
+
+ $(PROFILE14_OBJECTS): xpcom_profile.cpp
+- $(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} -c xpcom_profile.cpp
++ $(CXX) -o $(PROFILE14_OBJECTS) $(MOZILLACFLAGS) ${PROFILE14_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp
+
+ $(PROFILE17_OBJECTS): xpcom_profile.cpp
+- $(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} -c xpcom_profile.cpp
++ $(CXX) -o $(PROFILE17_OBJECTS) $(MOZILLACFLAGS) ${PROFILE17_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp
+
+ $(PROFILE18_OBJECTS): xpcom_profile.cpp
+- $(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} -c xpcom_profile.cpp
++ $(CXX) -o $(PROFILE18_OBJECTS) $(MOZILLACFLAGS) ${PROFILE18_INCLUDES} ${GECKO_INCLUDES} -c xpcom_profile.cpp
+
+ $(PROFILE14_LIB): $(PROFILE14_OBJECTS)
+- $(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS}
++ $(CXX) -o $(PROFILE14_LIB) $(PROFILE14_OBJECTS) $(MOZILLALIBS) ${PROFILE14_LIBS} ${GECKO_LIBS}
+
+ $(PROFILE17_LIB): $(PROFILE17_OBJECTS)
+- $(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS}
++ $(CXX) -o $(PROFILE17_LIB) $(PROFILE17_OBJECTS) $(MOZILLALIBS) ${PROFILE17_LIBS} ${GECKO_LIBS}
+
+ $(PROFILE18_LIB): $(PROFILE18_OBJECTS)
+- $(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS}
++ $(CXX) -o $(PROFILE18_LIB) $(PROFILE18_OBJECTS) $(MOZILLALIBS) ${PROFILE18_LIBS} ${GECKO_LIBS}
+
+ #
+ # GLX lib
+@@ -261,4 +261,4 @@
+ # Clean
+ #
+ clean:
+- rm -f *.o *.so
++ rm -f *.o *.so
+\ No newline at end of file
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java.orig 2006-09-21 16:57:23.000000000 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java 2006-10-09 18:39:38.154184500 +0200
+@@ -89,6 +89,7 @@
+ public static final int NS_ERROR_HTMLPARSER_UNRESOLVEDDTD = 0x804e03f3;
+ public static final int NS_ERROR_FILE_NOT_FOUND = 0x80520012;
+ public static final String NS_APP_APPLICATION_REGISTRY_DIR = "AppRegD"; //$NON-NLS-1$
++ public static final String NS_APP_USER_PROFILE_50_DIR = "ProfD"; //$NON-NLS-1$
+
+ public static final native void memmove(nsID dest, int /*long*/ src, int nbytes);
+ public static final native void memmove(int /*long*/ dest, nsID src, int nbytes);
+@@ -103,9 +104,8 @@
+ public static final native void memmove(byte[] dest, char[] src, int nbytes);
+ public static final native int NS_GetComponentManager(int /*long*/[] result);
+ public static final native int NS_GetServiceManager(int /*long*/[] result);
+-public static final native int NS_InitEmbedding(int /*long*/ aMozBinDirectory, int /*long*/ aAppFileLocProvider);
++public static final native int NS_InitXPCOM3(int /*long*/ result, int /*long*/ binDirectory, int /*long*/ appFileLocationProvider, int /*long*/ staticComponents, int componentCount);
+ public static final native int NS_NewLocalFile(int /*long*/ path, boolean followLinks, int /*long*/[] result);
+-public static final native int NS_TermEmbedding();
+ public static final native int strlen_PRUnichar(int /*long*/ s);
+ public static final native int /*long*/ nsEmbedCString_new();
+ public static final native int /*long*/ nsEmbedCString_new(byte[] aString, int length);
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp.orig 2006-10-09 18:15:24.031307500 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp 2006-10-09 18:39:38.154184500 +0200
+@@ -85,14 +85,16 @@
+ }
+ #endif
+
+-#ifndef NO_NS_1InitEmbedding
+-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitEmbedding)
+- (JNIEnv *env, jclass that, jint arg0, jint arg1)
++#ifndef NO_NS_1InitXPCOM3
++JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1InitXPCOM3)
++ (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4)
+ {
+ jint rc = 0;
+- XPCOM_NATIVE_ENTER(env, that, NS_1InitEmbedding_FUNC);
+- rc = (jint)NS_InitEmbedding((nsILocalFile *)arg0, (nsIDirectoryServiceProvider *)arg1);
+- XPCOM_NATIVE_EXIT(env, that, NS_1InitEmbedding_FUNC);
++ XPCOM_NATIVE_ENTER(env, that, NS_1GetComponentRegistrar_FUNC);
++ rc = (jint)NS_InitXPCOM3((nsIServiceManager **)arg0, (nsIFile *)arg1,
++ (nsIDirectoryServiceProvider *)arg2, (nsStaticModuleInfo *)arg3,
++ (PRUint32) arg4);
++ XPCOM_NATIVE_EXIT(env, that, NS_1GetComponentRegistrar_FUNC);
+ return rc;
+ }
+ #endif
+@@ -113,18 +115,6 @@
+ }
+ #endif
+
+-#ifndef NO_NS_1TermEmbedding
+-JNIEXPORT jint JNICALL XPCOM_NATIVE(NS_1TermEmbedding)
+- (JNIEnv *env, jclass that)
+-{
+- jint rc = 0;
+- XPCOM_NATIVE_ENTER(env, that, NS_1TermEmbedding_FUNC);
+- rc = (jint)NS_TermEmbedding();
+- XPCOM_NATIVE_EXIT(env, that, NS_1TermEmbedding_FUNC);
+- return rc;
+-}
+-#endif
+-
+ #ifndef NO_PR_1Free
+ JNIEXPORT void JNICALL XPCOM_NATIVE(PR_1Free)
+ (JNIEnv *env, jclass that, jint arg0)
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp.orig 2006-09-21 16:57:23.000000000 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.cpp 2006-10-09 18:39:38.150184250 +0200
+@@ -31,15 +31,14 @@
+
+ #ifdef NATIVE_STATS
+
+-int XPCOM_nativeFunctionCount = 132;
+-int XPCOM_nativeFunctionCallCount[132];
++int XPCOM_nativeFunctionCount = 131;
++int XPCOM_nativeFunctionCallCount[131];
+ char * XPCOM_nativeFunctionNames[] = {
+ "Call",
+ "NS_1GetComponentManager",
+ "NS_1GetServiceManager",
+- "NS_1InitEmbedding",
++ "NS_1InitXPCOM3_FUNC",
+ "NS_1NewLocalFile",
+- "NS_1TermEmbedding",
+ "PR_1Free",
+ "PR_1Malloc",
+ "VtblCall__II",
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_profile.h.orig 2006-09-21 16:57:32.000000000 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_profile.h 2006-10-09 18:39:38.150184250 +0200
+@@ -32,7 +32,7 @@
+ #define NDEBUG
+
+ #include "nsCOMPtr.h"
+-#include "nsProfileDirServiceProvider.h"
++#include "profdirserviceprovider/nsProfileDirServiceProvider.h"
+ #include "xpcom_stats.h"
+
+ #endif /* INC_xpcom_profile_H */
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.h.orig 2006-09-21 16:57:20.000000000 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.h 2006-10-09 18:39:38.150184250 +0200
+@@ -32,7 +32,6 @@
+ #define NDEBUG
+
+ #include "nsXPCOM.h"
+-#include "nsEmbedAPI.h"
+ #include "nsEmbedString.h"
+ #include "nsIInputStream.h"
+ #include "nsISupportsUtils.h"
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h.orig 2006-09-21 16:57:34.000000000 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h 2006-10-09 18:39:38.154184500 +0200
+@@ -41,9 +41,8 @@
+ Call_FUNC,
+ NS_1GetComponentManager_FUNC,
+ NS_1GetServiceManager_FUNC,
+- NS_1InitEmbedding_FUNC,
++ NS_1InitXPCOM3_FUNC,
+ NS_1NewLocalFile_FUNC,
+- NS_1TermEmbedding_FUNC,
+ PR_1Free_FUNC,
+ PR_1Malloc_FUNC,
+ VtblCall__II_FUNC,
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java.orig 2006-09-21 16:57:19.000000000 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java 2006-10-09 18:39:38.154184500 +0200
+@@ -10,15 +10,75 @@
+ *******************************************************************************/
+ package org.eclipse.swt.browser;
+
+-import java.io.*;
+-import java.util.*;
+-import org.eclipse.swt.*;
+-import org.eclipse.swt.widgets.*;
+-import org.eclipse.swt.graphics.*;
+-import org.eclipse.swt.internal.*;
+-import org.eclipse.swt.internal.gtk.*;
+-import org.eclipse.swt.internal.mozilla.*;
+-import org.eclipse.swt.layout.*;
++import java.io.File;
++import java.io.UnsupportedEncodingException;
++import java.util.Locale;
++import java.util.StringTokenizer;
++
++import org.eclipse.swt.SWT;
++import org.eclipse.swt.SWTError;
++import org.eclipse.swt.SWTException;
++import org.eclipse.swt.graphics.Point;
++import org.eclipse.swt.graphics.Rectangle;
++import org.eclipse.swt.internal.Callback;
++import org.eclipse.swt.internal.Converter;
++import org.eclipse.swt.internal.Library;
++import org.eclipse.swt.internal.gtk.GdkEvent;
++import org.eclipse.swt.internal.gtk.LONG;
++import org.eclipse.swt.internal.gtk.OS;
++import org.eclipse.swt.internal.mozilla.XPCOM;
++import org.eclipse.swt.internal.mozilla.XPCOMObject;
++import org.eclipse.swt.internal.mozilla.nsEmbedString;
++import org.eclipse.swt.internal.mozilla.nsIAppShell;
++import org.eclipse.swt.internal.mozilla.nsIBaseWindow;
++import org.eclipse.swt.internal.mozilla.nsICategoryManager;
++import org.eclipse.swt.internal.mozilla.nsIComponentManager;
++import org.eclipse.swt.internal.mozilla.nsIComponentRegistrar;
++import org.eclipse.swt.internal.mozilla.nsIContextMenuListener;
++import org.eclipse.swt.internal.mozilla.nsICookie;
++import org.eclipse.swt.internal.mozilla.nsICookieManager;
++import org.eclipse.swt.internal.mozilla.nsID;
++import org.eclipse.swt.internal.mozilla.nsIDOMEvent;
++import org.eclipse.swt.internal.mozilla.nsIDOMMouseEvent;
++import org.eclipse.swt.internal.mozilla.nsIDOMWindow;
++import org.eclipse.swt.internal.mozilla.nsIDirectoryService;
++import org.eclipse.swt.internal.mozilla.nsIDocShell;
++import org.eclipse.swt.internal.mozilla.nsIEmbeddingSiteWindow;
++import org.eclipse.swt.internal.mozilla.nsIFile;
++import org.eclipse.swt.internal.mozilla.nsIIOService;
++import org.eclipse.swt.internal.mozilla.nsIInterfaceRequestor;
++import org.eclipse.swt.internal.mozilla.nsILocalFile;
++import org.eclipse.swt.internal.mozilla.nsIPrefBranch;
++import org.eclipse.swt.internal.mozilla.nsIPrefLocalizedString;
++import org.eclipse.swt.internal.mozilla.nsIPrefService;
++import org.eclipse.swt.internal.mozilla.nsIProperties;
++import org.eclipse.swt.internal.mozilla.nsIRequest;
++import org.eclipse.swt.internal.mozilla.nsIServiceManager;
++import org.eclipse.swt.internal.mozilla.nsISimpleEnumerator;
++import org.eclipse.swt.internal.mozilla.nsISupports;
++import org.eclipse.swt.internal.mozilla.nsISupportsWeakReference;
++import org.eclipse.swt.internal.mozilla.nsITooltipListener;
++import org.eclipse.swt.internal.mozilla.nsIURI;
++import org.eclipse.swt.internal.mozilla.nsIURIContentListener;
++import org.eclipse.swt.internal.mozilla.nsIWeakReference;
++import org.eclipse.swt.internal.mozilla.nsIWebBrowser;
++import org.eclipse.swt.internal.mozilla.nsIWebBrowserChrome;
++import org.eclipse.swt.internal.mozilla.nsIWebBrowserChromeFocus;
++import org.eclipse.swt.internal.mozilla.nsIWebBrowserFocus;
++import org.eclipse.swt.internal.mozilla.nsIWebBrowserStream;
++import org.eclipse.swt.internal.mozilla.nsIWebNavigation;
++import org.eclipse.swt.internal.mozilla.nsIWebProgress;
++import org.eclipse.swt.internal.mozilla.nsIWebProgressListener;
++import org.eclipse.swt.internal.mozilla.nsIWindowWatcher;
++import org.eclipse.swt.layout.FillLayout;
++import org.eclipse.swt.widgets.Composite;
++import org.eclipse.swt.widgets.Display;
++import org.eclipse.swt.widgets.Event;
++import org.eclipse.swt.widgets.Label;
++import org.eclipse.swt.widgets.Listener;
++import org.eclipse.swt.widgets.Menu;
++import org.eclipse.swt.widgets.Shell;
++import org.eclipse.swt.widgets.Widget;
+
+ /**
+ * Instances of this class implement the browser user interface
+@@ -175,40 +235,43 @@
+ * - mozilla17profile/mozilla17profile-gcc should succeed for mozilla 1.7.x and firefox
+ * - mozilla18profile/mozilla18profile-gcc should succeed for mozilla 1.8.x (seamonkey)
+ */
+- try {
+- Library.loadLibrary ("swt-mozilla14-profile"); //$NON-NLS-1$
+- usingProfile = true;
+- } catch (UnsatisfiedLinkError e1) {
+- try {
+- Library.loadLibrary ("swt-mozilla17-profile"); //$NON-NLS-1$
+- usingProfile = true;
+- } catch (UnsatisfiedLinkError e2) {
+- try {
+- Library.loadLibrary ("swt-mozilla14-profile-gcc3"); //$NON-NLS-1$
+- usingProfile = true;
+- } catch (UnsatisfiedLinkError e3) {
+- try {
+- Library.loadLibrary ("swt-mozilla17-profile-gcc3"); //$NON-NLS-1$
+- usingProfile = true;
+- } catch (UnsatisfiedLinkError e4) {
+- try {
+- Library.loadLibrary ("swt-mozilla18-profile"); //$NON-NLS-1$
+- usingProfile = true;
+- } catch (UnsatisfiedLinkError e5) {
+- try {
+- Library.loadLibrary ("swt-mozilla18-profile-gcc3"); //$NON-NLS-1$
+- usingProfile = true;
+- } catch (UnsatisfiedLinkError e6) {
+- /*
+- * fail silently, the Browser will still work without profile support
+- * but will abort any attempts to navigate to HTTPS pages
+- */
+- }
+- }
+- }
+- }
+- }
+- }
++// Library.loadLibrary("swt-mozilla17-profile");
++ // We build the profile stuff without the need for a separate DSO
++ usingProfile = true;
++// try {
++// Library.loadLibrary ("swt-mozilla14-profile"); //$NON-NLS-1$
++// usingProfile = true;
++// } catch (UnsatisfiedLinkError e1) {
++// try {
++// Library.loadLibrary ("swt-mozilla17-profile"); //$NON-NLS-1$
++// usingProfile = true;
++// } catch (UnsatisfiedLinkError e2) {
++// try {
++// Library.loadLibrary ("swt-mozilla14-profile-gcc3"); //$NON-NLS-1$
++// usingProfile = true;
++// } catch (UnsatisfiedLinkError e3) {
++// try {
++// Library.loadLibrary ("swt-mozilla17-profile-gcc3"); //$NON-NLS-1$
++// usingProfile = true;
++// } catch (UnsatisfiedLinkError e4) {
++// try {
++// Library.loadLibrary ("swt-mozilla18-profile"); //$NON-NLS-1$
++// usingProfile = true;
++// } catch (UnsatisfiedLinkError e5) {
++// try {
++// Library.loadLibrary ("swt-mozilla18-profile-gcc3"); //$NON-NLS-1$
++// usingProfile = true;
++// } catch (UnsatisfiedLinkError e6) {
++// /*
++// * fail silently, the Browser will still work without profile support
++// * but will abort any attempts to navigate to HTTPS pages
++// */
++// }
++// }
++// }
++// }
++// }
++// }
+
+ int /*long*/[] retVal = new int /*long*/[1];
+ nsEmbedString pathString = new nsEmbedString(mozillaPath);
+@@ -218,11 +281,11 @@
+ if (retVal[0] == 0) error(XPCOM.NS_ERROR_NULL_POINTER);
+
+ nsILocalFile localFile = new nsILocalFile(retVal[0]);
+- rc = XPCOM.NS_InitEmbedding(localFile.getAddress(), 0);
++ rc = XPCOM.NS_InitXPCOM3(0, localFile.getAddress(), 0, 0, 0);
+ localFile.Release();
+ if (rc != XPCOM.NS_OK) {
+ dispose();
+- SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitEmbedding "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
++ SWT.error(SWT.ERROR_NO_HANDLES, null, " [NS_InitXPCOM3 "+mozillaPath+" error "+rc+"]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ rc = XPCOM.NS_GetComponentManager(result);
+@@ -283,7 +346,7 @@
+ rc = properties.Get(buffer, nsIFile.NS_IFILE_IID, result);
+ if (rc != XPCOM.NS_OK) error(rc);
+ if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
+- properties.Release();
++ // properties.Release() is now after the Set below
+
+ nsIFile profileDir = new nsIFile(result[0]);
+ result[0] = 0;
+@@ -305,24 +368,15 @@
+ pathString.dispose(); //
+
+ profileDir = new nsIFile(result[0]);
+- result[0] = 0;
+-
+- rc = XPCOM_PROFILE.NS_NewProfileDirServiceProvider(true, result);
++
++ // Set the profile dir property so that it's initialized for
++ // things like password manager and https
++ buffer = Converter.wcsToMbcs(null, XPCOM.NS_APP_USER_PROFILE_50_DIR, true);
++ rc = properties.Set(buffer, profileDir.getAddress());
+ if (rc != XPCOM.NS_OK) error(rc);
+- if (result[0] == 0) error(XPCOM.NS_NOINTERFACE);
+-
+- final int /*long*/ dirServiceProvider = result[0];
++ properties.Release();
++
+ result[0] = 0;
+- rc = XPCOM_PROFILE.ProfileDirServiceProvider_Register(dirServiceProvider);
+- if (rc != XPCOM.NS_OK) error(rc);
+- rc = XPCOM_PROFILE.ProfileDirServiceProvider_SetProfileDir(dirServiceProvider, profileDir.getAddress());
+- if (rc != XPCOM.NS_OK) error(rc);
+-
+- getDisplay().addListener(SWT.Dispose, new Listener() {
+- public void handleEvent(Event e) {
+- XPCOM_PROFILE.ProfileDirServiceProvider_Shutdown(dirServiceProvider);
+- }
+- });
+ }
+
+ /*
+@@ -1354,27 +1408,6 @@
+ tip = null;
+
+ BrowserCount--;
+- /*
+- * This code is intentionally commented. It is not possible to reinitialize
+- * Mozilla once it has been terminated. NS_InitEmbedding always fails after
+- * NS_TermEmbedding has been called. The workaround is to call NS_InitEmbedding
+- * once and never call NS_TermEmbedding.
+- */
+-// if (BrowserCount == 0) {
+-// if (AppShell != null) {
+-// // Shutdown the appshell service.
+-// rc = AppShell.Spindown();
+-// if (rc != XPCOM.NS_OK) error(rc);
+-// AppShell.Release();
+-// AppShell = null;
+-// }
+-// WindowCreator.Release();
+-// WindowCreator = null;
+-// PromptService.Release();
+-// PromptService = null;
+-// XPCOM.NS_TermEmbedding();
+-// mozilla = false;
+-// }
+ }
+
+ void Activate() {
Added: trunk/eclipse/debian/patches/eclipse-libswt-firefox2.dpatch
===================================================================
--- trunk/eclipse/debian/patches/eclipse-libswt-firefox2.dpatch (rev 0)
+++ trunk/eclipse/debian/patches/eclipse-libswt-firefox2.dpatch 2006-10-09 23:37:46 UTC (rev 2585)
@@ -0,0 +1,56 @@
+#! /bin/sh -e
+##
+## DP: Debian specific patch, converted from eclipse-libswt-mozilla.patch
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $patch_opts -p0 < $0;;
+ -unpatch)
+ patch $patch_opts -p0 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+exit 0
+
+ at DPATCH@
+### Eclipse Workspace Patch 1.0
+#P org.eclipse.swt.tools
+Index: source-tree/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties
+===================================================================
+RCS file: /cvsroot/eclipse/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties,v
+retrieving revision 1.11.2.1
+diff -u -r1.11.2.1 org.eclipse.swt.internal.mozilla.XPCOM.properties
+--- source-tree/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties 26 Jul 2006 16:33:11 -0000 1.11.2.1
++++ source-tree/plugins/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/org.eclipse.swt.internal.mozilla.XPCOM.properties 29 Sep 2006 04:51:03 -0000
+@@ -24,17 +24,18 @@
+ XPCOM_NS_GetServiceManager=
+ XPCOM_NS_GetServiceManager_0=cast=(nsIServiceManager**)
+
+-XPCOM_NS_InitEmbedding=
+-XPCOM_NS_InitEmbedding_0=cast=(nsILocalFile *)
+-XPCOM_NS_InitEmbedding_1=cast=(nsIDirectoryServiceProvider *)
++XPCOM_NS_InitXPCOM3=
++XPCOM_NS_InitXPCOM3_0=cast=(nsIServiceManager**)
++XPCOM_NS_InitXPCOM3_1=cast=(nsIFile *)
++XPCOM_NS_InitXPCOM3_2=cast=(nsIDirectoryServiceProvider *)
++XPCOM_NS_InitXPCOM3_3=cast=(const nsStaticModuleInfo *)
++XPCOM_NS_InitXPCOM3_4=cast=(PRUint32)
+
+ XPCOM_NS_NewLocalFile=
+ XPCOM_NS_NewLocalFile_0=cast=(nsAString *),flags=struct
+ XPCOM_NS_NewLocalFile_1=
+ XPCOM_NS_NewLocalFile_2=cast=(nsILocalFile**)
+
+-XPCOM_NS_TermEmbedding=
+-
+ XPCOM_PR_Free=
+ XPCOM_PR_Free_0=cast=(void *)
+
Added: trunk/eclipse/debian/patches/eclipse-libswt-xpcomgcc4.dpatch
===================================================================
--- trunk/eclipse/debian/patches/eclipse-libswt-xpcomgcc4.dpatch (rev 0)
+++ trunk/eclipse/debian/patches/eclipse-libswt-xpcomgcc4.dpatch 2006-10-09 23:37:46 UTC (rev 2585)
@@ -0,0 +1,124 @@
+#! /bin/sh -e
+##
+## DP: Fix swt mozilla build.
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+if [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $patch_opts -p0 < $0;;
+ -unpatch)
+ patch $patch_opts -p0 -R < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+exit 0
+
+ at DPATCH@
+--- source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp.orig 2006-09-21 16:57:23.000000000 +0200
++++ source-tree/plugins/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp 2006-10-09 18:10:42.081686750 +0200
+@@ -141,7 +141,7 @@
+ {
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, PR_1Malloc_FUNC);
+- rc = (jint)PR_Malloc(arg0);
++ rc = (long)PR_Malloc(arg0);
+ XPCOM_NATIVE_EXIT(env, that, PR_1Malloc_FUNC);
+ return rc;
+ }
+@@ -2091,7 +2091,7 @@
+ {
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsEmbedCString_1get_FUNC);
+- rc = (jint)((nsEmbedCString *)arg0)->get();
++ rc = (long)((nsEmbedCString *)arg0)->get();
+ XPCOM_NATIVE_EXIT(env, that, nsEmbedCString_1get_FUNC);
+ return rc;
+ }
+@@ -2103,7 +2103,7 @@
+ {
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsEmbedCString_1new___FUNC);
+- rc = (jint)new nsEmbedCString();
++ rc = (long)new nsEmbedCString();
+ XPCOM_NATIVE_EXIT(env, that, nsEmbedCString_1new___FUNC);
+ return rc;
+ }
+@@ -2117,7 +2117,7 @@
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsEmbedCString_1new___3BI_FUNC);
+ if (arg0) if ((lparg0 = env->GetByteArrayElements(arg0, NULL)) == NULL) goto fail;
+- rc = (jint)new nsEmbedCString((const char *)lparg0, arg1);
++ rc = (long)new nsEmbedCString((const char *)lparg0, arg1);
+ fail:
+ if (arg0 && lparg0) env->ReleaseByteArrayElements(arg0, lparg0, 0);
+ XPCOM_NATIVE_EXIT(env, that, nsEmbedCString_1new___3BI_FUNC);
+@@ -2131,7 +2131,7 @@
+ {
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1Length_FUNC);
+- rc = (jint)((nsEmbedString *)arg0)->Length();
++ rc = (long)((nsEmbedString *)arg0)->Length();
+ XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1Length_FUNC);
+ return rc;
+ }
+@@ -2153,7 +2153,7 @@
+ {
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1get_FUNC);
+- rc = (jint)((nsEmbedString *)arg0)->get();
++ rc = (long)((nsEmbedString *)arg0)->get();
+ XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1get_FUNC);
+ return rc;
+ }
+@@ -2165,7 +2165,7 @@
+ {
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1new___FUNC);
+- rc = (jint)new nsEmbedString();
++ rc = (long)new nsEmbedString();
+ XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1new___FUNC);
+ return rc;
+ }
+@@ -2179,7 +2179,7 @@
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsEmbedString_1new___3C_FUNC);
+ if (arg0) if ((lparg0 = env->GetCharArrayElements(arg0, NULL)) == NULL) goto fail;
+- rc = (jint)new nsEmbedString(lparg0);
++ rc = (long)new nsEmbedString(lparg0);
+ fail:
+ if (arg0 && lparg0) env->ReleaseCharArrayElements(arg0, lparg0, 0);
+ XPCOM_NATIVE_EXIT(env, that, nsEmbedString_1new___3C_FUNC);
+@@ -2193,7 +2193,7 @@
+ {
+ jboolean rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsID_1Equals_FUNC);
+- rc = (jboolean)((nsID *)arg0)->Equals(*(nsID *)arg1);
++ rc = (long)((nsID *)arg0)->Equals(*(nsID *)arg1);
+ XPCOM_NATIVE_EXIT(env, that, nsID_1Equals_FUNC);
+ return rc;
+ }
+@@ -2207,7 +2207,7 @@
+ jboolean rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsID_1Parse_FUNC);
+ if (arg1) if ((lparg1 = env->GetStringUTFChars(arg1, NULL)) == NULL) goto fail;
+- rc = (jboolean)((nsID *)arg0)->Parse((const char *)lparg1);
++ rc = (long)((nsID *)arg0)->Parse((const char *)lparg1);
+ fail:
+ if (arg1 && lparg1) env->ReleaseStringUTFChars(arg1, lparg1);
+ XPCOM_NATIVE_EXIT(env, that, nsID_1Parse_FUNC);
+@@ -2231,7 +2231,7 @@
+ {
+ jint rc = 0;
+ XPCOM_NATIVE_ENTER(env, that, nsID_1new_FUNC);
+- rc = (jint)new nsID();
++ rc = (long)new nsID();
+ XPCOM_NATIVE_EXIT(env, that, nsID_1new_FUNC);
+ return rc;
+ }
Property changes on: trunk/eclipse/debian/patches/eclipse-libswt-xpcomgcc4.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/eclipse/debian/rules
===================================================================
--- trunk/eclipse/debian/rules 2006-10-09 19:26:38 UTC (rev 2584)
+++ trunk/eclipse/debian/rules 2006-10-09 23:37:46 UTC (rev 2585)
@@ -100,6 +100,9 @@
with_browser := xulrunner
#with_browser := mozilla
#with_browser := firefox
+ifeq ($(DISTRIBUTION),Ubuntu)
+ with_browser := firefox
+endif
with_dpatch = yes
#with_dpatch = no
@@ -115,6 +118,7 @@
eclipse-libupdatebuild2 \
eclipse-jsch \
eclipse-disable-junit4-apt \
+ eclipse-libswt-xpcomgcc4 \
# eclipse-awt-libpath \
# eclipse-icon \
@@ -167,7 +171,8 @@
ifeq ($(with_browser),firefox)
eclipse_patches += \
- eclipse-libswt-firefox
+ eclipse-libswt-firefox \
+ eclipse-libswt-firefox2
BUILD_DEPS += , firefox-dev
# MOZILLA_DEP = firefox (>= 1.4.99) | mozilla-browser (>= 2:1.7.0) | mozilla-firefox (>= 1.0.7)
More information about the pkg-java-commits
mailing list