- Back-port patch for e.o#206432 (rh#446064).
This commit is contained in:
parent
e906bd401c
commit
3503180aee
63
eclipse-swt-mozprofile.patch
Normal file
63
eclipse-swt-mozprofile.patch
Normal file
@ -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.
|
24
eclipse.spec
24
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
|
||||
@ -624,6 +634,15 @@ mv "Eclipse SWT PI" Eclipse_SWT_PI
|
||||
mv Eclipse_SWT_PI "Eclipse SWT PI"
|
||||
popd
|
||||
|
||||
# Create eclipse mozilla profile if it doesn't exist
|
||||
pushd plugins/org.eclipse.swt
|
||||
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
|
||||
|
||||
|
||||
# link to the jsch jar
|
||||
rm plugins/com.jcraft.jsch_0.1.31.jar
|
||||
@ -1652,6 +1671,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed May 14 2008 Andrew Overholt <overholt@redhat.com> 3.3.2-12
|
||||
- Back-port patch for e.o#206432 (rh#446064).
|
||||
|
||||
* Sat Apr 26 2008 Mat Booth <fedora@matbooth.co.uk> 3.3.2-11
|
||||
- Fixed some benign errors in copy-platform when calling pdebuild
|
||||
multiple times.
|
||||
|
Loading…
Reference in New Issue
Block a user