summaryrefslogtreecommitdiff
path: root/java/eclipse-devel/files/patch-another-extra-patches2
blob: 9d2ded65ca218ba967cb24829b42d0b36686b838 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
--- plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductFile.java.orig	2007-06-26 04:57:03.000000000 +0900
+++ plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ProductFile.java	2007-09-13 13:38:20.000000000 +0900
@@ -214,6 +214,9 @@
 			key = VM_ARGS_WIN;
 		} else if( os.equals(Platform.OS_LINUX)) {
 			key = VM_ARGS_LINUX;
+		} else if( os.equals(Platform.OS_FREEBSD)) {
+		    // You do not like this?
+		        key = VM_ARGS_LINUX;
 		} else if( os.equals(Platform.OS_MACOSX)) {
 			key = VM_ARGS_MAC;
 		} else if(os.equals(Platform.OS_SOLARIS)) {
@@ -237,6 +240,8 @@
 			key = PROGRAM_ARGS_WIN;
 		} else if( os.equals(Platform.OS_LINUX)) {
 			key = PROGRAM_ARGS_LINUX;
+		} else if( os.equals(Platform.OS_FREEBSD)) {
+			key = PROGRAM_ARGS_LINUX;
 		} else if( os.equals(Platform.OS_MACOSX)) {
 			key = PROGRAM_ARGS_MAC;
 		} else if(os.equals(Platform.OS_SOLARIS)) {
@@ -494,7 +499,7 @@
 	}
 
 	private void processLinux(Attributes attributes) {
-		if (!osMatch(Platform.OS_LINUX)) 
+		if (!osMatch(Platform.OS_LINUX) && !osMatch(Platform.OS_FREEBSD) ) 
 			return;
 		result.add(attributes.getValue("icon")); //$NON-NLS-1$
 	}


--- plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java.orig	2007-06-26 04:57:09.000000000 +0900
+++ plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/Utils.java	2007-09-13 15:40:52.000000000 +0900
@@ -419,12 +419,18 @@
 
 	private static void generateLinkInstruction(AntScript script, String dir, String files) {
 		String[] links = Utils.getArrayFromString(files, ","); //$NON-NLS-1$
-		List arguments = new ArrayList(2);
+	    	List arguments = new ArrayList(2);
+		String os_running = "FreeBSD";
+
+		String os = System.getProperty("os.name"); //$NON-NLS-1$
+		if (os != null && os.toLowerCase().indexOf("lin") >= 0) os_running = "Linux"; //$NON-NLS-1$
+		if (os != null && os.toLowerCase().indexOf("free") >= 0) os_running = "FreeBSD"; //$NON-NLS-1$
+
 		for (int i = 0; i < links.length; i += 2) {
 			arguments.add("-sf"); //$NON-NLS-1$
 			arguments.add(links[i]);
 			arguments.add(links[i + 1]);
-			script.printExecTask("ln", dir, arguments, "Linux"); //$NON-NLS-1$ //$NON-NLS-2$
+			script.printExecTask("ln", dir, arguments, os_running); //$NON-NLS-1$ //$NON-NLS-2$
 			arguments.clear();
 		}
 	}


--- plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/JNLPGenerator.java.orig	2007-06-26 04:57:06.000000000 +0900
+++ plugins/org.eclipse.pde.build/src_ant/org/eclipse/pde/internal/build/tasks/JNLPGenerator.java	2007-09-13 13:45:14.000000000 +0900
@@ -307,6 +307,8 @@
 			return "Mac"; //$NON-NLS-1$
 		if ("linux".equalsIgnoreCase(os)) //$NON-NLS-1$
 			return "Linux"; //$NON-NLS-1$
+		if ("freebsd".equalsIgnoreCase(os)) //$NON-NLS-1$
+			return "FreeBSD"; //$NON-NLS-1$
 		if ("solaris".equalsIgnoreCase(os)) //$NON-NLS-1$
 			return "Solaris"; //$NON-NLS-1$
 		if ("hpux".equalsIgnoreCase(os)) //$NON-NLS-1$


--- plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java.orig	2007-06-26 04:57:14.000000000 +0900
+++ plugins/org.eclipse.ui.browser/src/org/eclipse/ui/internal/browser/WebBrowserUtil.java	2007-09-13 13:48:02.000000000 +0900
@@ -70,6 +70,18 @@
 	}
 
 	/**
+	 * Returns true if we're running on freebsd.
+	 * 
+	 * @return boolean
+	 */
+	public static boolean isFreeBSD() {
+		String os = System.getProperty("os.name"); //$NON-NLS-1$
+		if (os != null && os.toLowerCase().indexOf("free") >= 0) //$NON-NLS-1$
+			return true;
+		return false;
+	}
+
+	/**
 	 * Open a dialog window.
 	 * 
 	 * @param message
@@ -293,4 +305,4 @@
 		}
 		return encodedId;
 	}
-}
\ No newline at end of file
+}


--- plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java.orig	2007-06-26 04:57:21.000000000 +0900
+++ plugins/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/builder/ModelBuildScriptGenerator.java	2007-09-13 15:40:33.000000000 +0900
@@ -561,10 +561,15 @@
 	private void generateLinkInstruction(String dir, String files) {
 		String[] links = Utils.getArrayFromString(files, ","); //$NON-NLS-1$
 		List arguments = new ArrayList(2);
+		String os_running = "FreeBSD";
+		String os = System.getProperty("os.name"); //$NON-NLS-1$
+		if (os != null && os.toLowerCase().indexOf("lin") >= 0) os_running = "Linux"; //$NON-NLS-1$
+		if (os != null && os.toLowerCase().indexOf("free") >= 0) os_running = "FreeBSD"; //$NON-NLS-1$
+
 		for (int i = 0; i < links.length; i += 2) {
 			arguments.add(links[i]);
 			arguments.add(links[i + 1]);
-			script.printExecTask("ln -s", dir, arguments, "Linux"); //$NON-NLS-1$ //$NON-NLS-2$
+			script.printExecTask("ln", dir, arguments, os_running); //$NON-NLS-1$ //$NON-NLS-2$
 			arguments.clear();
 		}
 	}