diff --git a/eclipse-swt-firefox.patch b/eclipse-swt-firefox.patch new file mode 100644 index 0000000..b5ab917 --- /dev/null +++ b/eclipse-swt-firefox.patch @@ -0,0 +1,83 @@ +Index: Eclipse SWT Mozilla/common/library/xpcom.cpp +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom.cpp,v +retrieving revision 1.29 +diff -u -r1.29 xpcom.cpp +--- Eclipse_SWT_Mozilla/common/library/xpcom.cpp 9 May 2006 21:52:54 -0000 1.29 ++++ Eclipse_SWT_Mozilla/common/library/xpcom.cpp 7 Sep 2006 22:41:43 -0000 +@@ -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 +Index: Eclipse SWT Mozilla/common/library/xpcom_stats.h +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Mozilla/common/library/xpcom_stats.h,v +retrieving revision 1.14 +diff -u -r1.14 xpcom_stats.h +--- Eclipse_SWT_Mozilla/common/library/xpcom_stats.h 9 May 2006 21:52:54 -0000 1.14 ++++ Eclipse_SWT_Mozilla/common/library/xpcom_stats.h 7 Sep 2006 22:41:43 -0000 +@@ -41,7 +41,7 @@ + Call_FUNC, + NS_1GetComponentManager_FUNC, + NS_1GetServiceManager_FUNC, +- NS_1InitEmbedding_FUNC, ++ NS_1InitXPCOM3_FUNC, + NS_1NewLocalFile_FUNC, + NS_1TermEmbedding_FUNC, + PR_1Free_FUNC, +Index: Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/Browser.java,v +retrieving revision 1.61 +diff -u -r1.61 Browser.java +--- Eclipse_SWT_Mozilla/gtk/org/eclipse/swt/browser/Browser.java 9 May 2006 19:47:09 -0000 1.61 ++++ Eclipse_SWT_Mozilla/gtk/org/eclipse/swt/browser/Browser.java 7 Sep 2006 22:41:44 -0000 +@@ -175,11 +175,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); +Index: Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java,v +retrieving revision 1.48 +diff -u -r1.48 XPCOM.java +--- Eclipse_SWT_Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java 9 May 2006 18:54:24 -0000 1.48 ++++ Eclipse_SWT_Mozilla/common/org/eclipse/swt/internal/mozilla/XPCOM.java 7 Sep 2006 22:41:43 -0000 +@@ -102,7 +102,7 @@ + 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); diff --git a/eclipse.spec b/eclipse.spec index f56c1e2..2f6cc0b 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -31,7 +31,7 @@ Epoch: 1 Summary: An open, extensible IDE Name: eclipse Version: %{eclipse_majmin}.%{eclipse_micro} -Release: 4%{?dist} +Release: 5%{?dist} License: EPL Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ @@ -115,6 +115,7 @@ Patch57: %{name}-ecj-gcj.patch # firefox-devel's firefox-xpcom.pc needs to include -I/embed_base # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200929 Patch58: %{name}-libswt-xpcom.patch +Patch59: %{name}-swt-firefox.patch Patch100: customBuildCallbacks.xml-add-pre.gather.bin.parts.patch %if %{gcj_support} @@ -453,6 +454,12 @@ popd %patch55 -p0 rm plugins/org.junit4/junit-4.1.jar +pushd plugins/org.eclipse.swt +mv "Eclipse SWT Mozilla" Eclipse_SWT_Mozilla +%patch59 +mv Eclipse_SWT_Mozilla "Eclipse SWT Mozilla" +popd + # FIXME check if this has been applied upstream pushd plugins/org.eclipse.platform.doc.isv %patch100 -p0 @@ -1593,6 +1600,9 @@ fi %endif %changelog +* Thu Sep 07 2006 Ben Konrath 3.2.0-5 +- Add swt-firefox patch; moves SWT to NS_InitXPCOM3() from NS_InitEmbedding(). + * Wed Sep 06 2006 Ben Konrath 3.2.0-4 - Re-add customBuildCallbacks.xml-add-pre.gather.bin.parts.patch because it has not been applied upstream.