diff --git a/eclipse-swt-mozprofile.patch b/eclipse-swt-mozprofile.patch new file mode 100644 index 0000000..7b4965e --- /dev/null +++ b/eclipse-swt-mozprofile.patch @@ -0,0 +1,63 @@ +### Eclipse Workspace Patch 1.0 +#P org.eclipse.swt +Index: Eclipse_SWT_Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT_Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java,v +retrieving revision 1.10 +diff -u -r1.10 AppFileLocProvider.java +--- Eclipse_SWT_Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java 23 Aug 2007 17:10:46 -0000 1.10 ++++ Eclipse_SWT_Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java 14 May 2008 18:08:48 -0000 +@@ -12,7 +12,7 @@ + + import java.util.Vector; + +-import org.eclipse.swt.internal.C; ++import org.eclipse.swt.internal.*; + import org.eclipse.swt.internal.mozilla.*; + + class AppFileLocProvider { +@@ -119,6 +119,19 @@ + + void setProfilePath (String path) { + profilePath = path; ++ if (!Compatibility.fileExists (path, "")) { //$NON-NLS-1$ ++ int /*long*/[] result = new int /*long*/[1]; ++ nsEmbedString pathString = new nsEmbedString (path); ++ int rc = XPCOM.NS_NewLocalFile (pathString.getAddress (), true, result); ++ if (rc != XPCOM.NS_OK) Mozilla.error (rc); ++ if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); ++ pathString.dispose (); ++ ++ nsILocalFile file = new nsILocalFile (result [0]); ++ rc = file.Create (nsILocalFile.DIRECTORY_TYPE, 0700); ++ if (rc != XPCOM.NS_OK) Mozilla.error (rc); ++ file.Release (); ++ } + } + + /* nsIDirectoryServiceProvider2 */ +Index: Eclipse_SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse_SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java,v +retrieving revision 1.28 +diff -u -r1.28 Compatibility.java +--- Eclipse_SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java 10 Oct 2007 18:36:05 -0000 1.28 ++++ Eclipse_SWT/common_j2se/org/eclipse/swt/internal/Compatibility.java 14 May 2008 18:08:48 -0000 +@@ -99,6 +99,17 @@ + } + + /** ++ * Answers whether the indicated file exists or not. ++ * ++ * @param parent the file's parent directory ++ * @param child the file's name ++ * @return true if the file exists ++ */ ++public static boolean fileExists(String parent, String child) { ++ return new File (parent, child).exists(); ++} ++ ++/** + * Answers the most positive (i.e. closest to positive infinity) + * integer value which is less than the number obtained by dividing + * the first argument p by the second argument q. diff --git a/eclipse.spec b/eclipse.spec index 69b8b91..d70332f 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -20,7 +20,7 @@ Epoch: 1 Summary: An open, extensible IDE Name: eclipse Version: %{eclipse_majmin}.%{eclipse_micro} -Release: 11%{?dist} +Release: 12%{?dist} License: Eclipse Public License Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ @@ -99,6 +99,16 @@ Patch31: %{name}-ia64-packaging.patch # sed --in-place "s/Eclipse\ SWT\ PI/Eclipse_SWT_PI/g" eclipse-buildagainstxulrunner.patch Patch32: %{name}-buildagainstxulrunner.patch +# Back-port from 3.4 +# https://bugs.eclipse.org/bugs/show_bug.cgi?id=206432 +# https://bugzilla.redhat.com/show_bug.cgi?id=446064 +# Note: I made this patch from within Eclipse and then did the following to +# it due to spaces in the paths: +# sed --in-place \ +# "s/Eclipse\ SWT\ Mozilla/Eclipse_SWT_Mozilla/g;s/Eclipse\ SWT/Eclipse_SWT/g" \ +# eclipse-swt-mozprofile.patch +Patch33: %{name}-swt-mozprofile.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ant BuildRequires: jpackage-utils >= 0:1.5, make, gcc @@ -617,11 +627,18 @@ for plugin in jdt.apt.pluggable.core jdt.compiler.tool jdt.compiler.apt; do sed --in-place -e "$(expr $linenum - 2),$(expr $linenum + 1)d" assemble.org.eclipse.sdk.linux.gtk.%{eclipse_arch}.xml done -# Build mozilla bindings against xulrunner pushd plugins/org.eclipse.swt +# Build mozilla bindings against xulrunner mv "Eclipse SWT PI" Eclipse_SWT_PI %patch32 mv Eclipse_SWT_PI "Eclipse SWT PI" + +# Create eclipse mozilla profile if it doesn't exist +mv "Eclipse SWT Mozilla" Eclipse_SWT_Mozilla +mv "Eclipse SWT" Eclipse_SWT +%patch33 +mv Eclipse_SWT "Eclipse SWT" +mv Eclipse_SWT_Mozilla "Eclipse SWT Mozilla" popd @@ -1652,6 +1669,9 @@ fi %endif %changelog +* Wed May 14 2008 Andrew Overholt 3.3.2-12 +- Back-port patch for e.o#206432 (rh#446064). + * Sat Apr 26 2008 Mat Booth 3.3.2-11 - Fixed some benign errors in copy-platform when calling pdebuild multiple times.