rpms/eclipse/devel eclipse-gnuformatterjdt.patch, NONE, 1.1 eclipse-gnuformatterjdtui.patch, NONE, 1.1 eclipse-updatehomedir.patch, NONE, 1.1 eclipse.spec, 1.105, 1.106

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Apr 20 02:44:12 UTC 2005


Update of /cvs/dist/rpms/eclipse/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21547

Modified Files:
	eclipse.spec 
Added Files:
	eclipse-gnuformatterjdt.patch eclipse-gnuformatterjdtui.patch 
	eclipse-updatehomedir.patch 
Log Message:
* Mon Apr 18 2005 Andrew Overholt <overholt at redhat.com> 3.1.0_fc-0.M6.7
- Add %if %{gcj_support} blocks.
- Add %{_libdir}/%{name}/plugins to native %files section of each sub-rpm.
- Add GNU-style JDT code formatting option (e.o#91770).
- Add patch to install plugins from update site in home dir (e.o#90630).
- Change gcc-java requirements to libgcj as gcj-dbtool is now in the latter.


eclipse-gnuformatterjdt.patch:
 core/formatter/DefaultCodeFormatterConstants.java   |   10 +
 internal/formatter/DefaultCodeFormatterOptions.java |  190 ++++++++++++++++++++
 2 files changed, 200 insertions(+)

--- NEW FILE eclipse-gnuformatterjdt.patch ---
Index: formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java,v
retrieving revision 1.61
diff -u -r1.61 DefaultCodeFormatterConstants.java
--- formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java	1 Apr 2005 10:54:15 -0000	1.61
+++ formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java	18 Apr 2005 18:17:47 -0000
@@ -3134,6 +3134,16 @@
 		return DefaultCodeFormatterOptions.getEclipseDefaultSettings().getMap();
 	}
 
+  /**
+   * Returns the default GNU formatter settings
+   * 
+   * @return the GNU default settings
+   * @since 3.1
+   */
+  public static Map getGNUSettings() {
+    return DefaultCodeFormatterOptions.getGNUSettings().getMap();
+  }
+  
 	/**
 	 * <p>Return the force value of the given alignment value.
 	 * The given alignment value should be created using the <code>createAlignmentValue(boolean, int, int)</code>
Index: formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java,v
retrieving revision 1.63
diff -u -r1.63 DefaultCodeFormatterOptions.java
--- formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java	1 Apr 2005 10:54:15 -0000	1.63
+++ formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java	18 Apr 2005 18:17:48 -0000
@@ -39,6 +39,12 @@
 		return options;
 	}
 
+  public static DefaultCodeFormatterOptions getGNUSettings() {
+    DefaultCodeFormatterOptions options = new DefaultCodeFormatterOptions();
+    options.setGNUDefaultSettings();
+    return options;
+  }
+  
 	public static DefaultCodeFormatterOptions getJavaConventionsSettings() {
 		DefaultCodeFormatterOptions options = new DefaultCodeFormatterOptions();
 		options.setJavaConventionsSettings();
@@ -2036,6 +2042,190 @@
 		this.tab_size = 4;
 	}
 
+  public void setGNUDefaultSettings() {
+    this.comment_clear_blank_lines = true;
+    this.comment_format = true;
+    this.comment_format_header = false;
+    this.comment_format_html = true;
+    this.comment_format_source = true;
+    this.comment_indent_parameter_description = true;
+    this.comment_indent_root_tags = true;
+    this.comment_line_length = 80;
+    this.comment_insert_new_line_for_parameter = true;
+    this.comment_indent_root_tags = true;
+    this.align_type_members_on_columns = false;
+    this.alignment_for_arguments_in_allocation_expression = 18;
+    this.alignment_for_arguments_in_explicit_constructor_call = 18;
+    this.alignment_for_arguments_in_method_invocation = 18;
+    this.alignment_for_arguments_in_qualified_allocation_expression = 18;
+    this.alignment_for_binary_expression = 18;
+    this.alignment_for_compact_if = 16;
+    this.alignment_for_conditional_expression = 82;
+    this.alignment_for_expressions_in_array_initializer = 18;
+    this.alignment_for_multiple_fields = 16;
+    this.alignment_for_parameters_in_constructor_declaration = 18;
+    this.alignment_for_parameters_in_method_declaration = 18;
+    this.alignment_for_selector_in_method_invocation = 0;
+    this.alignment_for_superclass_in_type_declaration = 16;
+    this.alignment_for_superinterfaces_in_type_declaration = 16;
+    this.alignment_for_throws_clause_in_constructor_declaration = 16;
+    this.alignment_for_throws_clause_in_method_declaration = 16;
+    this.blank_lines_after_imports = 1;
+    this.blank_lines_after_package = 1;
+    this.blank_lines_before_field = 1;
+    this.blank_lines_before_first_class_body_declaration = 0;
+    this.blank_lines_before_imports = 1;
+    this.blank_lines_before_member_type = 1;
+    this.blank_lines_before_method = 1;
+    this.blank_lines_before_new_chunk = 1;
+    this.blank_lines_before_package = 2;
+    this.blank_lines_between_type_declarations = 1;
+    this.brace_position_for_anonymous_type_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
+    this.brace_position_for_array_initializer = DefaultCodeFormatterConstants.END_OF_LINE;
+    this.brace_position_for_block = DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED;
+    this.brace_position_for_block_in_case = DefaultCodeFormatterConstants.NEXT_LINE;
+    this.brace_position_for_constructor_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
+    this.brace_position_for_method_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
+    this.brace_position_for_switch = DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED;
+    this.brace_position_for_type_declaration = DefaultCodeFormatterConstants.NEXT_LINE;
+    this.compact_else_if = true;
+    this.continuation_indentation = 2;
+    this.continuation_indentation_for_array_initializer = 2;
+    this.keep_guardian_clause_on_one_line = false;
+    this.indent_body_declarations_compare_to_type_header = true;
+    this.indent_breaks_compare_to_cases = true;
+    this.indent_statements_compare_to_block = true;
+    this.indent_statements_compare_to_body = true;
+    this.indent_switchstatements_compare_to_cases = true;
+    this.indent_switchstatements_compare_to_switch = false;
+    this.insert_new_line_after_opening_brace_in_array_initializer = false;
+    this.insert_new_line_before_catch_in_try_statement = true;
+    this.insert_new_line_before_closing_brace_in_array_initializer = false;
+    this.insert_new_line_before_else_in_if_statement = true;
+    this.insert_new_line_before_finally_in_try_statement = true;
+    this.insert_new_line_before_while_in_do_statement = true;
+    this.insert_new_line_in_empty_anonymous_type_declaration = true;
+    this.insert_new_line_in_empty_block = true;
+    this.insert_new_line_in_empty_method_body = true;
+    this.insert_new_line_in_empty_type_declaration = true;
+    this.insert_space_after_assignment_operator = true;
+    this.insert_space_after_binary_operator = true;
+    this.insert_space_after_closing_brace_in_block = true;
+    this.insert_space_after_closing_paren_in_cast = true;
+    this.insert_space_after_colon_in_assert = true;
+    this.insert_space_after_colon_in_case = true;
+    this.insert_space_after_colon_in_conditional = true;
+    this.insert_space_after_colon_in_labeled_statement = true;
+    this.insert_space_after_comma_in_allocation_expression = true;
+    this.insert_space_after_comma_in_array_initializer = true;
+    this.insert_space_after_comma_in_constructor_declaration_parameters = true;
+    this.insert_space_after_comma_in_constructor_declaration_throws = true;
+    this.insert_space_after_comma_in_explicit_constructor_call_arguments = true;
+    this.insert_space_after_comma_in_for_increments = true;
+    this.insert_space_after_comma_in_for_inits = true;
+    this.insert_space_after_comma_in_method_declaration_parameters = true;
+    this.insert_space_after_comma_in_method_declaration_throws = true;
+    this.insert_space_after_comma_in_method_invocation_arguments = true;
+    this.insert_space_after_comma_in_multiple_field_declarations = true;
+    this.insert_space_after_comma_in_multiple_local_declarations = true;
+    this.insert_space_after_comma_in_superinterfaces = true;
+    this.insert_space_after_opening_brace_in_array_initializer = true;
+    this.insert_space_after_opening_bracket_in_array_allocation_expression = false;
+    this.insert_space_after_opening_bracket_in_array_reference = false;
+    this.insert_space_after_opening_paren_in_cast = false;
+    this.insert_space_after_opening_paren_in_catch = false;
+    this.insert_space_after_opening_paren_in_constructor_declaration = false;
+    this.insert_space_after_opening_paren_in_for = false;
+    this.insert_space_after_opening_paren_in_if = false;
+    this.insert_space_after_opening_paren_in_method_declaration = false;
+    this.insert_space_after_opening_paren_in_method_invocation = false;
+    this.insert_space_after_opening_paren_in_parenthesized_expression = false;
+    this.insert_space_after_opening_paren_in_switch = false;
+    this.insert_space_after_opening_paren_in_synchronized = false;
+    this.insert_space_after_opening_paren_in_while = false;
+    this.insert_space_after_postfix_operator = false;
+    this.insert_space_after_prefix_operator = false;
+    this.insert_space_after_question_in_conditional = true;
+    this.insert_space_after_semicolon_in_for = true;
+    this.insert_space_after_unary_operator = false;
+    this.insert_space_before_assignment_operator = true;
+    this.insert_space_before_binary_operator = true;
+    this.insert_space_before_closing_brace_in_array_initializer = true;
+    this.insert_space_before_closing_bracket_in_array_allocation_expression = false;
+    this.insert_space_before_closing_bracket_in_array_reference = false;
+    this.insert_space_before_closing_paren_in_cast = false;
+    this.insert_space_before_closing_paren_in_catch = false;
+    this.insert_space_before_closing_paren_in_constructor_declaration = false;
+    this.insert_space_before_closing_paren_in_for = false;
+    this.insert_space_before_closing_paren_in_if = false;
+    this.insert_space_before_closing_paren_in_method_declaration = false;
+    this.insert_space_before_closing_paren_in_method_invocation = false;
+    this.insert_space_before_closing_paren_in_parenthesized_expression = false;
+    this.insert_space_before_closing_paren_in_switch = false;
+    this.insert_space_before_closing_paren_in_synchronized = false;
+    this.insert_space_before_closing_paren_in_while = false;
+    this.insert_space_before_colon_in_assert = true;
+    this.insert_space_before_colon_in_case = false;
+    this.insert_space_before_colon_in_conditional = true;
+    this.insert_space_before_colon_in_default = false;
+    this.insert_space_before_colon_in_labeled_statement = false;
+    this.insert_space_before_comma_in_allocation_expression = false;
+    this.insert_space_before_comma_in_array_initializer = false;
+    this.insert_space_before_comma_in_constructor_declaration_parameters = false;
+    this.insert_space_before_comma_in_constructor_declaration_throws = false;
+    this.insert_space_before_comma_in_explicit_constructor_call_arguments = false;
+    this.insert_space_before_comma_in_for_increments = false;
+    this.insert_space_before_comma_in_for_inits = false;
+    this.insert_space_before_comma_in_method_declaration_parameters = false;
+    this.insert_space_before_comma_in_method_declaration_throws = false;
+    this.insert_space_before_comma_in_method_invocation_arguments = false;
+    this.insert_space_before_comma_in_multiple_field_declarations = false;
+    this.insert_space_before_comma_in_multiple_local_declarations = false;
+    this.insert_space_before_comma_in_superinterfaces = false;
+    this.insert_space_before_opening_brace_in_anonymous_type_declaration = true;
+    this.insert_space_before_opening_brace_in_array_initializer = true;
+    this.insert_space_before_opening_brace_in_block = true;
+    this.insert_space_before_opening_brace_in_constructor_declaration = true;
+    this.insert_space_before_opening_brace_in_method_declaration = true;
+    this.insert_space_before_opening_brace_in_switch = true;
+    this.insert_space_before_opening_brace_in_type_declaration = true;
+    this.insert_space_before_opening_bracket_in_array_allocation_expression = false;
+    this.insert_space_before_opening_bracket_in_array_reference = false;
+    this.insert_space_before_opening_bracket_in_array_type_reference = false;
+    this.insert_space_before_opening_paren_in_catch = true;
+    this.insert_space_before_opening_paren_in_constructor_declaration = false;
+    this.insert_space_before_opening_paren_in_for = true;
+    this.insert_space_before_opening_paren_in_if = true;
+    this.insert_space_before_opening_paren_in_method_declaration = false;
+    this.insert_space_before_opening_paren_in_method_invocation = false;
+    this.insert_space_before_opening_paren_in_parenthesized_expression = false;
+    this.insert_space_before_opening_paren_in_switch = true;
+    this.insert_space_before_opening_paren_in_synchronized = true;
+    this.insert_space_before_opening_paren_in_while = true;
+    this.insert_space_before_postfix_operator = false;
+    this.insert_space_before_prefix_operator = false;
+    this.insert_space_before_question_in_conditional = true;
+    this.insert_space_before_semicolon = false;
+    this.insert_space_before_semicolon_in_for = false;
+    this.insert_space_before_unary_operator = false;
+    this.insert_space_between_brackets_in_array_type_reference = false;
+    this.insert_space_between_empty_braces_in_array_initializer = false;
+    this.insert_space_between_empty_brackets_in_array_allocation_expression = false;
+    this.insert_space_between_empty_parens_in_constructor_declaration = false;
+    this.insert_space_between_empty_parens_in_method_declaration = false;
+    this.insert_space_between_empty_parens_in_method_invocation = false;
+    this.keep_else_statement_on_same_line = false;
+    this.keep_empty_array_initializer_on_one_line = true;
+    this.keep_simple_if_on_one_line = false;
+    this.keep_then_statement_on_same_line = false;
+    this.page_width = 80;
+    this.blank_lines_at_beginning_of_method_body = 0;
+    this.number_of_empty_lines_to_preserve = 1;
+    this.put_empty_statement_on_new_line = true;
+    this.tab_char = SPACE;
+    this.tab_size = 2;
+  }
+  
 	public void setJavaConventionsSettings() {
 		this.alignment_for_arguments_in_allocation_expression = Alignment.M_COMPACT_SPLIT;
 		this.alignment_for_arguments_in_enum_constant = Alignment.M_COMPACT_SPLIT;

eclipse-gnuformatterjdtui.patch:
 FormatterMessages.properties |    1 +
 ProfileManager.java          |   19 +++++++++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

--- NEW FILE eclipse-gnuformatterjdtui.patch ---
Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties,v
retrieving revision 1.39
diff -u -r1.39 FormatterMessages.properties
--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties	1 Apr 2005 13:45:00 -0000	1.39
+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/FormatterMessages.properties	18 Apr 2005 18:26:05 -0000
@@ -522,6 +522,7 @@
 
 ProfileManager.default_profile.name=Eclipse 2.1 [built-in]
 ProfileManager.eclipse_profile.name=Eclipse [built-in]
+ProfileManager.gnu_profile.name=GNU [built-in]
 ProfileManager.unnamed_profile.name0=Unnamed profile
 ProfileManager.java_conventions_profile.name=Java Conventions [built-in]
 
Index: ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java,v
retrieving revision 1.19
diff -u -r1.19 ProfileManager.java
--- ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java	1 Apr 2005 13:45:00 -0000	1.19
+++ ui/org/eclipse/jdt/internal/ui/preferences/formatter/ProfileManager.java	18 Apr 2005 18:26:05 -0000
@@ -292,6 +292,7 @@
 	 */
 	public final static String ECLIPSE21_PROFILE= "org.eclipse.jdt.ui.default_profile"; //$NON-NLS-1$
 	public final static String ECLIPSE_PROFILE= "org.eclipse.jdt.ui.default.eclipse_profile"; //$NON-NLS-1$
+	public final static String GNU_PROFILE= "org.eclipse.jdt.ui.default.gnu_profile"; //$NON-NLS-1$
 	public final static String JAVA_PROFILE= "org.eclipse.jdt.ui.default.sun_profile"; //$NON-NLS-1$
 	public final static String SHARED_PROFILE= "org.eclipse.jdt.ui.default.shared"; //$NON-NLS-1$
 	
@@ -582,6 +583,10 @@
 		final Profile eclipse21Profile= new BuiltInProfile(ECLIPSE21_PROFILE, FormatterMessages.getString("ProfileManager.default_profile.name"), getEclipse21Settings(), 3); //$NON-NLS-1$
 		profiles.put(eclipse21Profile.getID(), eclipse21Profile);
 		profilesByName.add(eclipse21Profile);
+    
+		final Profile gnuProfile = new BuiltInProfile(GNU_PROFILE, FormatterMessages.getString("ProfileManager.gnu_profile.name"), getGNUSettings(), 4); //$NON-NLS-1$
+		profiles.put(gnuProfile.getID(), gnuProfile);
+		profilesByName.add(gnuProfile);
 	}
 	
 	
@@ -604,8 +609,18 @@
 		ProfileVersioner.setLatestCompliance(options);
 		return options;
 	}
-
-	/** 
+	
+	/**
+	 * @return Returns the settings for the GNU profile.
+	 */
+	public static Map getGNUSettings() {
+		final Map options = DefaultCodeFormatterConstants.getGNUSettings();
+		
+		ProfileVersioner.setLatestCompliance(options);
+		return options;
+	}
+	
+	/**
 	 * @return Returns the settings for the Java Conventions profile.
 	 */
 	public static Map getJavaSettings() {

eclipse-updatehomedir.patch:
 TargetPage.java |   77 ++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 59 insertions(+), 18 deletions(-)

--- NEW FILE eclipse-updatehomedir.patch ---
Index: src/org/eclipse/update/internal/ui/wizards/TargetPage.java
===================================================================
RCS file: /home/eclipse/org.eclipse.update.ui/src/org/eclipse/update/internal/ui/wizards/TargetPage.java,v
retrieving revision 1.67
diff -u -r1.67 TargetPage.java
--- src/org/eclipse/update/internal/ui/wizards/TargetPage.java	1 Mar 2005 20:29:25 -0000	1.67
+++ src/org/eclipse/update/internal/ui/wizards/TargetPage.java	18 Apr 2005 19:11:43 -0000
@@ -10,24 +10,46 @@
  *******************************************************************************/
 package org.eclipse.update.internal.ui.wizards;
 
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.util.HashSet;
+import java.util.Iterator;
+ 
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
 
 import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.resource.*;
-import org.eclipse.jface.viewers.*;
-import org.eclipse.swt.*;
-import org.eclipse.swt.events.*;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.*;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.ui.help.*;
-import org.eclipse.update.configuration.*;
-import org.eclipse.update.core.*;
-import org.eclipse.update.internal.operations.*;
-import org.eclipse.update.internal.ui.*;
-import org.eclipse.update.internal.ui.parts.*;
-import org.eclipse.update.operations.*;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.help.WorkbenchHelp;
+import org.eclipse.update.configuration.IConfiguredSite;
+import org.eclipse.update.configuration.IInstallConfiguration;
+import org.eclipse.update.configuration.IInstallConfigurationChangedListener;
+import org.eclipse.update.configuration.LocalSystemInfo;
+import org.eclipse.update.core.IFeature;
+import org.eclipse.update.internal.operations.UpdateUtils;
+import org.eclipse.update.internal.ui.UpdateLabelProvider;
+import org.eclipse.update.internal.ui.UpdateUI;
+import org.eclipse.update.internal.ui.UpdateUIImages;
+import org.eclipse.update.internal.ui.parts.DefaultContentProvider;
+import org.eclipse.update.internal.ui.parts.SWTUtil;
+import org.eclipse.update.operations.IInstallFeatureOperation;
 
 public class TargetPage extends BannerPage implements IDynamicPage {
 	private TableViewer jobViewer;
@@ -149,7 +171,7 @@
         label.setLayoutData(gd);
 
 		installLocation = new Label(client, SWT.NULL);
-        installLocation.setText("foo");
+        installLocation.setText("");
         gd = new GridData(GridData.FILL_HORIZONTAL);
         installLocation.setLayoutData(gd);
         
@@ -363,7 +385,26 @@
 				continue;
 			}
 
-			jobs[i].setTargetSite(getFirstTargetSite(jobs[i]));
+			IConfiguredSite csite = getFirstTargetSite(jobs[i]);
+			
+			if (csite == null) {
+				// there are no updateable sites, make one in the user's home direcotry
+				String sitePath = System.getProperty("user.home") + File.separator  + ".eclipse/updates"; //$NON-NLS-1$ //$NON-NLS-2$
+
+				try {	
+					csite = config.createConfiguredSite(new File(sitePath));
+					config.addConfiguredSite(csite);
+					IStatus status = csite.verifyUpdatableStatus();
+					if (!status.isOK())
+						throw new CoreException(status);
+				
+				} catch (CoreException e) {
+						// there was a problem, the user must choose an installation site
+						csite = null;
+				}
+			}
+			
+			jobs[i].setTargetSite(csite);
 
 		}
 	}


Index: eclipse.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse/devel/eclipse.spec,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- eclipse.spec	18 Apr 2005 14:26:42 -0000	1.105
+++ eclipse.spec	20 Apr 2005 02:44:10 -0000	1.106
@@ -1,6 +1,7 @@
 Epoch:	1
 ExclusiveArch: i386 x86_64 ppc
 
+%define gcj_support 	1
 %define pkg_summary     An open, extensible IDE
 %define section         free
 %define swt_version     3128
@@ -22,7 +23,7 @@
 Summary:        %{pkg_summary}
 Name:           eclipse
 Version:        %{eclipse_majmin}.%{eclipse_micro}_fc
-Release:        0.M6.6
+Release:        0.M6.7
 License:        EPL
 Group:          Text Editors/Integrated Development Environments (IDE)
 URL:            http://www.eclipse.org/
@@ -80,6 +81,12 @@
 # Add command-line source code formatter
 # https://bugs.eclipse.org/bugs/show_bug.cgi?id=75333
 Patch19: 	%{name}-efj.patch
+# GNU-style JDT formatter
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=91770
+Patch20: 	%{name}-gnuformatterjdt.patch
+Patch21: 	%{name}-gnuformatterjdtui.patch
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=90630
+Patch22: 	%{name}-updatehomedir.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildRequires:  ant
@@ -92,8 +99,12 @@
 BuildRequires:  mozilla-devel >= 1.7.7
 BuildRequires:  mozilla-nspr-devel >= 1.7.7
 BuildRequires:  xorg-x11-devel
-BuildRequires:	gcc-java >= 4.0.0-0.35
+%if %{gcj_support}
+BuildRequires:	gcc-java >= 4.0.0-0.42
 BuildRequires:	java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_14rh
+%else
+BuildRequires:	java-devel >= 1.4.2
+%endif
 
 BuildRequires: ant-antlr ant-apache-bcel ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging
 #BuildRequires: ant-apache-bsf ant-commons-net lucene 
@@ -102,7 +113,9 @@
 BuildRequires: jakarta-commons-beanutils jakarta-commons-collections jakarta-commons-digester jakarta-commons-logging jakarta-commons-modeler mx4j
 #BuildRequires: servlet lucene-demo jasper4 tomcat4
 BuildRequires: regexp junit
+%if %{gcj_support}
 Requires(post,postun): java-1.4.2-gcj-compat
+%endif
 
 %description
 The Eclipse Platform is designed for building integrated development
@@ -115,7 +128,11 @@
 Group:          Development/Languages
 Obsoletes:	ecj
 Provides:	ecj
-Requires:	gcc-java >= 4.0.0-0.35
+%if %{gcj_support}
+Requires:	libgcj >= 4.0.0-0.42
+%else
+Requires:	java >= 1.4.2
+%endif
 
 %description    ecj
 Eclipse compiler for Java.
@@ -128,10 +145,14 @@
 Provides:	%{name}-sdk = %{epoch}:%{version}-%{release}
 Provides:       %{name}-ui = %{epoch}:%{version}-%{release}
 Provides:       %{name}-gtk2 = %{epoch}:%{version}-%{release}
+%if %{gcj_support}
 Requires:	java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_14rh
-Requires:       /usr/bin/perl
-Requires:	gcc-java >= 4.0.0-0.35
+Requires:	libgcj >= 4.0.0-0.42
+%else
+Requires:	java >= 1.4.2
+%endif
 Requires:       %{libname}-gtk2 = %{epoch}:%{version}-%{release}
+Requires:       /usr/bin/perl
 Requires:       /usr/bin/mozilla
 PreReq:         gtk2 >= 2.6
 
@@ -160,7 +181,9 @@
 Group:          Text Editors/Integrated Development Environments (IDE)
 Requires:       %{name}-platform = %{epoch}:%{version}-%{release}
 Requires:       %{name}-ecj = %{epoch}:%{version}-%{release}
-Requires:	gcc-java >= 4.0.0-0.35
+%if %{gcj_support}
+Requires:	libgcj >= 4.0.0-0.42
+%endif
 
 %description    jdt
 Eclipse Java developments tools.
@@ -178,7 +201,9 @@
 Group:          Text Editors/Integrated Development Environments (IDE)
 Requires:       %{name}-jdt = %{epoch}:%{version}-%{release}
 Requires:       %{name}-platform-devel = %{epoch}:%{version}-%{release}
-Requires:	gcc-java >= 4.0.0-0.35
+%if %{gcj_support}
+Requires:	libgcj >= 4.0.0-0.42
+%endif
 
 %package        pde-devel
 Summary:        Eclipse PDE Source
@@ -208,31 +233,48 @@
 pushd plugins/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library
 %patch0 -p0
 %patch11 -p0
+%if %{gcj_support}
 %patch14 -p0
+%endif
 popd
+%if %{gcj_support}
 %patch1 -p0
+%endif
 %patch2 -p0
 %patch4 -p0
 %patch5 -p0
 %patch10 -p0
 %patch12 -p0
+%if %{gcj_support}
 %patch13 -p1
+%endif
 pushd plugins/org.eclipse.platform.doc.isv
 rm -f activeHelpSample.jar
 %patch15 -p0
 popd
+%if %{gcj_support}
 %patch16 -p0
+%endif
 pushd plugins/org.eclipse.swt.gtk64
 %patch18 -p0
 popd
 pushd plugins/org.eclipse.jdt.core
 %patch19 -p0
+%patch20 -p0
+popd
+pushd plugins/org.eclipse.jdt.ui
+%patch21 -p0
+popd
+pushd plugins/org.eclipse.update.ui
+%patch22 -p0
 popd
 
-# Red Hat splash screen.
+%if %{gcj_support}
+# Fedora splash screen.
 pushd plugins/org.eclipse.platform
 cp %{SOURCE11} splash.bmp
 popd
+%endif
 
 # Remove existing .sos
 find -name \*.so -exec rm "-f" "{}" ";"
@@ -343,6 +385,7 @@
 %build
 ORIGCLASSPATH=$CLASSPATH
 
+%if %{gcj_support}
 # Bootstrapping is 3 parts:
 # 1. Build ecj with gcj -C 
 # 2. Build ecj with gcj-built ecj ("javac")
@@ -377,8 +420,10 @@
 
 # 2a. Build ecj
 export CLASSPATH=ecj-bootstrap.jar:$ORIGCLASSPATH
+%endif
 ant -buildfile jdtcoresrc/compilejdtcorewithjavac.xml
 
+%if %{gcj_support}
 ## 2b. Natively-compile ecj
 #gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
 #  -o jdtcoresrc/ecj.jar.so jdtcoresrc/ecj.jar
@@ -390,11 +435,13 @@
 # Remove our gcj-built ecj
 #rm bootstrap.db ecj-bootstrap.jar
 rm ecj-bootstrap.jar
+%endif
 
 # 3. Use this ecj to rebuild itself
 export CLASSPATH=`pwd`/jdtcoresrc/jdtcore.jar:$ORIGCLASSPATH
 ant -buildfile jdtcoresrc/compilejdtcore.xml
 
+#%if %{gcj_support}
 ## Natively-compile it
 #gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
 #  -o ecj.jar.so ecj.jar
@@ -403,6 +450,7 @@
 
 # Remove old native bits
 #rm jdtcoresrc/ecj.db jdtcoresrc/ecj.jar.so
+#%endif
 
 # Build the rest of Eclipse
 export CLASSPATH=`pwd`/jdtcore.jar:$ORIGCLASSPATH
@@ -412,6 +460,7 @@
   -DinstallOs=linux -DinstallWs=gtk -DinstallArch=%{eclipse_arch} \
   -Dlibsconfig=true
 
+%if %{gcj_support}
 pushd result
 # De-compress resulting tarball
 tar zxf org.eclipse.sdk-%{build_id}-linux.gtk.%{eclipse_arch}.tar.gz
@@ -479,6 +528,7 @@
 # Remove expanded eclipse build
 rm -rf eclipse
 popd
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -491,11 +541,14 @@
 # Binaries, libraries, and natively-built shared libraries
 install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/%{name}
 
+%if %{gcj_support}
 # Natively-compiled jars (shared libraries)
 tar -C $RPM_BUILD_ROOT -zxf result/%{name}-nativelycompiledjars.tar.gz
+%endif
 
 install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
 
+%if %{gcj_support}
 # Install ecj binary
 mv $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/ecj \
   $RPM_BUILD_ROOT%{_bindir}
@@ -504,6 +557,7 @@
 # Directory to hold all the .jar->.so mapping dbs
 install -d -m 755 $RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`
 install -d -m 755 $RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
+%endif
 
 # Eclipse binary
 mv $RPM_BUILD_ROOT%{_datadir}/%{name}/eclipse \
@@ -684,6 +738,7 @@
 ln -s %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}/jdtcore.jar \
   $RPM_BUILD_ROOT%{_datadir}/java/jdtcore.jar
 
+%if %{gcj_support}
 # Create the gcj dbs for libswt, ecj, platform, jdt, and pde
 gcjdbdir=$RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
 mkdir -p $gcjdbdir
@@ -744,10 +799,12 @@
 	fi;
     done;
 done
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{gcj_support}
 %post ecj
 rebuild-gcj-db %{_libdir}
 
@@ -757,16 +814,20 @@
 %post pde
 rebuild-gcj-db %{_libdir}
 
+%post -n %{libname}-gtk2
+rebuild-gcj-db %{_libdir}
+%endif
+
 %post platform
+%if %{gcj_support}
 rebuild-gcj-db %{_libdir}
+%endif
 touch --no-create %{_datadir}/icons/hicolor
 if [ -x /usr/bin/gtk-update-icon-cache ]; then
   gtk-update-icon-cache %{_datadir}/icons/hicolor
 fi
 
-%post -n %{libname}-gtk2
-rebuild-gcj-db %{_libdir}
-
+%if %{gcj_support}
 %postun ecj
 rebuild-gcj-db %{_libdir}
 
@@ -776,27 +837,33 @@
 %postun pde
 rebuild-gcj-db %{_libdir}
 
+%postun -n %{libname}-gtk2
+rebuild-gcj-db %{_libdir}
+%endif
+
 %postun platform
+%if %{gcj_support}
 rebuild-gcj-db %{_libdir}
+%endif
 touch --no-create %{_datadir}/icons/hicolor
 if [ -x /usr/bin/gtk-update-icon-cache ]; then
   gtk-update-icon-cache %{_datadir}/icons/hicolor
 fi
 
-%postun -n %{libname}-gtk2
-rebuild-gcj-db %{_libdir}
-
 # FIXME:  add the native directories to these lists
 %files ecj
 %defattr(0644,root,root,0755)
 %dir %{_datadir}/%{name}
 %{_datadir}/%{name}/plugins/org.eclipse.jdt.core_3.*
 %{_datadir}/java/jdtcore*.jar
+%if %{gcj_support}
 # Native bits
 %{_libdir}/gcj-4.0.0/classmap.db.d/%{name}-ecj.db
+%dir %{_libdir}/%{name}/plugins
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtcore.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0/jdtCompilerAdapter.jar.so
 %attr(0755,root,root) %{_bindir}/ecj
+%endif
 
 %files -n %{libname}-gtk2 -f %{libname}-gtk2.install
 %defattr(0644,root,root,0755)
@@ -811,8 +878,10 @@
 #%{_javadir}/swt-pi-gtk*.jar
 #%{_javadir}/swt-mozilla*.jar
 #%{_javadir}/swt-cairo*.jar
+%if %{gcj_support}
 # Native bits
 %{_libdir}/gcj-4.0.0/classmap.db.d/libswt3-gtk2.db
+%dir %{_libdir}/%{name}/plugins
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt_3.1.0.jar.so
 %ifarch alpha ia64 ppc64 sparc64 x86_64
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk64_3.1.0.jar.so
@@ -821,12 +890,15 @@
 %endif
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jface_3.1.0.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jface.text_3.1.0/jfacetext.jar.so
+%endif
 
 %files jdt -f %{name}-jdt.install
 %defattr(0644,root,root,0755)
 %attr(0755,root,root) %{_bindir}/efj
+%if %{gcj_support}
 # Native bits
 %{_libdir}/gcj-4.0.0/classmap.db.d/%{name}-jdt.db
+%dir %{_libdir}/%{name}/plugins
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug.ui_3.1.0/jdiui.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug.ui_3.1.0/snippetsupport.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug_3.1.0/jdimodel.jar.so
@@ -838,6 +910,7 @@
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.ui_3.1.0/jdt.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.jdt.ui_3.1.0/serialsupport.jar.so
 #%attr(0755,root,root) %{_libdir}/%{name}/plugins/org.junit_3.8.1/junit.jar.so
+%endif
 
 %files jdt-devel
 %{_datadir}/%{name}/plugins/org.eclipse.jdt.source_3.*
@@ -845,8 +918,10 @@
 
 %files pde -f %{name}-pde.install
 %defattr(0644,root,root,0755)
+%if %{gcj_support}
 # Native bits
 %{_libdir}/gcj-4.0.0/classmap.db.d/%{name}-pde.db
+%dir %{_libdir}/%{name}/plugins
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.build_3.1.0/lib/pdebuild-ant.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.build_3.1.0/pdebuild.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.core_3.1.0/pdecore.jar.so
@@ -856,6 +931,7 @@
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde.ui_3.1.0/pdeui.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde_3.1.0/pde.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.pde_3.1.0/ant_tasks/pde-ant.jar.so
+%endif
 
 %files pde-devel
 %{_datadir}/%{name}/plugins/org.eclipse.pde.source_3.*
@@ -878,8 +954,10 @@
 %{_datadir}/pixmaps/*
 %{_datadir}/icons/*/*/apps/*
 %config(noreplace) %{_sysconfdir}/eclipse.conf
+%if %{gcj_support}
 # Native bits
 %{_libdir}/gcj-4.0.0/classmap.db.d/%{name}-platform.db
+%dir %{_libdir}/%{name}/plugins
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.ant.core_3.1.0/antsupport.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.compare_3.1.0/compare.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.core.boot_3.0.0/boot.jar.so
@@ -980,6 +1058,7 @@
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.help.webapp_3.1.0/WEB-INF/lib/jsp.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.help.webapp_3.1.0/WEB-INF/lib/servlets.jar.so
 %attr(0755,root,root) %{_libdir}/%{name}/plugins/org.eclipse.ui.console_3.1.0/console.jar.so
+%endif
 
 %files platform-devel
 %{_datadir}/%{name}/plugins/org.eclipse.platform.source_3.*
@@ -987,6 +1066,13 @@
 %{_datadir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.*_3.1.0
 
 %changelog
+* Mon Apr 18 2005 Andrew Overholt <overholt at redhat.com> 3.1.0_fc-0.M6.7
+- Add %if %{gcj_support} blocks.
+- Add %{_libdir}/%{name}/plugins to native %files section of each sub-rpm.
+- Add GNU-style JDT code formatting option (e.o#91770).
+- Add patch to install plugins from update site in home dir (e.o#90630).
+- Change gcc-java requirements to libgcj as gcj-dbtool is now in the latter.
+
 * Mon Apr 18 2005 Ben Konrath <bkonrath at redhat.com> 3.1.0_fc-0.M6.6
 - Bump version number. 
 




More information about the fedora-cvs-commits mailing list