rpms/eclipse/devel eclipse-efj.patch, NONE, 1.1 eclipse-swttools.patch, NONE, 1.1 eclipse.spec, 1.98, 1.99

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Apr 6 21:47:56 UTC 2005


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

Modified Files:
	eclipse.spec 
Added Files:
	eclipse-efj.patch eclipse-swttools.patch 
Log Message:
* Wed Apr 06 2005 Andrew Overholt <overholt at redhat.com> 3.1.0_fc-0.M5.18
- Fix typo in gcj db building loops.
- Add -O1 to x86_64 jar.so compilation.
- Add EFJ (Eclipse Formatter for Java) patches (bkonrath) (e.o#75333).
- Add patch to build swttools.jar (e.o#90364).


eclipse-efj.patch:
 formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java              |    2 
 formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java   |  427 ++++++++++
 formatter/org/eclipse/jdt/core/formatter/FormatterAppMessages.properties |   47 +
 plugin.xml                                                               |   11 
 4 files changed, 486 insertions(+), 1 deletion(-)

--- NEW FILE eclipse-efj.patch ---
Index: plugin.xml
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/plugin.xml,v
retrieving revision 1.76
diff -u -r1.76 plugin.xml
--- plugin.xml	4 Jan 2005 10:43:40 -0000	1.76
+++ plugin.xml	25 Jan 2005 05:04:57 -0000
@@ -209,4 +209,15 @@
    <initializer class="org.eclipse.jdt.internal.core.JavaCorePreferenceInitializer"/>
 </extension>
 
+<!-- =================================================================================== -->
+<!-- Extension: Java Code Formatter                                                      -->
+<!-- =================================================================================== -->
+<extension
+      id="JavaCodeFormatter"
+      point="org.eclipse.core.runtime.applications">
+      	<application>
+      		<run class="org.eclipse.jdt.core.formatter.CodeFormatterApplication" />
+		</application>
+</extension>
+
 </plugin>
Index: formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java
===================================================================
RCS file: /home/eclipse/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java,v
retrieving revision 1.8
diff -u -r1.8 CodeFormatter.java
--- formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java	7 Jun 2004 15:46:28 -0000	1.8
+++ formatter/org/eclipse/jdt/core/formatter/CodeFormatter.java	25 Jan 2005 05:04:58 -0000
@@ -62,7 +62,7 @@
 	 *      level of zero or below has no effect.
 	 * @param lineSeparator the line separator to use in formatted source,
 	 *     if set to <code>null</code>, then the platform default one will be used.
-	 * @return the text edit
+	 * @return the text edit or <code>null</code> if the given string cannot be formatted.
 	 * @throws IllegalArgumentException if offset is lower than 0, length is lower than 0 or
 	 * length is greater than source length.
 	 */
Index: formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java
===================================================================
RCS file: formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java
diff -N formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ formatter/org/eclipse/jdt/core/formatter/CodeFormatterApplication.java	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,427 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Ben Konrath <ben at bagu.org>
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Ben Konrath <ben at bagu.org> - initial implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.core.formatter;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.runtime.IPlatformRunnable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jdt.core.ToolFactory;
+import org.eclipse.jdt.internal.core.util.Util;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.text.edits.TextEdit;
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * Class that handles the org.eclipse.jdt.core.JavaCodeFormatter the
+ * application. The map file reading code is based on code in ProfileStore.java
+ * (org.eclipse.jdf.ui).
+ * 
+ * There are a couple improvments that could be made:
+ * 1. Add an import clean up option (requires stuff from org.eclipse.jdt.ui).
+ * 2. Make a list of all the files first and then format. You could then 
+ *    remove duplicate files. 
+ * 
+ * @author Ben Konrath <ben at bagu.org>
+ */
+public class CodeFormatterApplication implements IPlatformRunnable {
+
+    /**
+     * A SAX event handler to parse the config xml.
+     */
+    private final static class ConfigHandler extends DefaultHandler {
+
+        /**
+         * Identifiers for the XML file.
+         */
+        private final String XML_NODE_ROOT = "profiles"; //$NON-NLS-1$
+
+        private final String XML_NODE_PROFILE = "profile"; //$NON-NLS-1$
+
+        private final String XML_NODE_SETTING = "setting"; //$NON-NLS-1$
+
+        private final String XML_ATTRIBUTE_VERSION = "version"; //$NON-NLS-1$
+
+        private final String XML_ATTRIBUTE_ID = "id"; //$NON-NLS-1$
+
+        private final String XML_ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+
+        private final String XML_ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
+
+        private int fVersion;
+
+        private String fName;
+
+        private Map fSettings;
+
+        public void startElement(String uri, String localName, String qName,
+                Attributes attributes) throws SAXException {
+
+            if (qName.equals(XML_NODE_SETTING)) {
+
+                final String key = attributes.getValue(XML_ATTRIBUTE_ID);
+                final String value = attributes.getValue(XML_ATTRIBUTE_VALUE);
+                fSettings.put(key, value);
+
+            } else if (qName.equals(XML_NODE_PROFILE)) {
+
+                fName = attributes.getValue(XML_ATTRIBUTE_NAME);
+                fSettings = new HashMap(200);
+
+            } else if (qName.equals(XML_NODE_ROOT)) {
+
+                try {
+                    fVersion = Integer.parseInt(attributes
+                            .getValue(XML_ATTRIBUTE_VERSION));
+                } catch (NumberFormatException ex) {
+                    throw new SAXException(ex);
+                }
+
+            }
+        }
+
+        public Map getSettings() {
+            return fSettings;
+        }
+
+        public int getVersion() {
+            return fVersion;
+        }
+
+        public String getName() {
+            return fName;
+        }
+
+    }
+
+    /**
+     * Deals with the messages in the properties file (cut n' pasted from a
+     * generated class).
+     */
+    private final static class FormatterAppMessages {
+        private static final String BUNDLE_NAME = "org.eclipse.jdt.core.formatter.FormatterAppMessages";//$NON-NLS-1$
+
+        private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+                .getBundle(BUNDLE_NAME);
+
+        public static String getString(String key) {
+            try {
+                return RESOURCE_BUNDLE.getString(key);
+            } catch (MissingResourceException e) {
+                return '!' + key + '!';
+            }
+        }
+
+        public static String getFormattedString(String key, String arg) {
+            return getFormattedString(key, new String[] { arg });
+        }
+
+        public static String getFormattedString(String key, String[] args) {
+            return MessageFormat.format(getString(key), args);
+        }
+    }
+    
+    /*
+     * FIXME This value should come from ProfileVersioner.CURRENT_VERSION, however
+     * this class cannot be included here because it is internal to
+     * org.eclipse.jdt.ui and becuase this plugin (org.eclipse.jdt.core) does
+     * not require org.eclipse.jdt.ui (nor should it). Refactoring this to make
+     * it an external class of org.eclipse.jdt.core would solve these problems.
+     */
+    int CURRENT_VERSION = 6;
+
+    /**
+     * Read the xml config file and return a Map representing the options that
+     * are in the specified config file.
+     */
+    public Map readConfig(String filename) {
+
+        try {
+            final FileInputStream reader = new FileInputStream(new File(
+                    filename));
+            final ConfigHandler handler = new ConfigHandler();
+
+            try {
+                InputSource inputSource = new InputSource(reader);
+                final SAXParserFactory factory = SAXParserFactory.newInstance();
+                final SAXParser parser = factory.newSAXParser();
+                parser.parse(inputSource, handler);
+                if (handler.getVersion() != CURRENT_VERSION)
+                    return null;
+                configName = handler.getName();
+                return handler.getSettings();
+
+            } finally {
+                try { reader.close(); } catch (IOException e) { /* ignore */ }
+            }
+
+        } catch (IOException e) {
+            Util.log(e, FormatterAppMessages
+                    .getString("ConfigFile.reading.error")); //$NON-NLS-1$
+        } catch (SAXException e) {
+            Util.log(e, FormatterAppMessages
+                    .getString("ConfigFile.reading.error")); //$NON-NLS-1$
+        } catch (ParserConfigurationException e) {
+            Util.log(e, FormatterAppMessages
+                    .getString("ConfigFile.reading.error")); //$NON-NLS-1$
+        }
+        return null;
+    }
+    
+    /**
+     * Runs the Java code formatter application
+     */
+    public Object run(Object args) throws Exception {
+        
+        ArrayList fileList = processCommandLine((String[]) args);
+        
+        // nothing to do
+        if (fileList == null || fileList.isEmpty())
+        	return EXIT_OK;
+       
+        if (!quiet) {
+        	if (configName != null)
+        		System.out.println(FormatterAppMessages.getFormattedString("CommandLine.config.file", configName)); //$NON-NLS-1$
+            System.out.println(FormatterAppMessages.getString("CommandLine.start")); //$NON-NLS-1$
+        }
+        
+        // format the list of files and/or directories
+        while (!fileList.isEmpty()) {
+        	File file = (File) fileList.remove(0);
+        		
+            if (file.isDirectory())
+                formatDirTree(file);
+            else
+                formatFile(file);    
+        }
+        
+        if (!quiet) {
+            System.out.println(FormatterAppMessages.getString("CommandLine.done")); //$NON-NLS-1$
+        }
+        
+        return EXIT_OK;
+    }
+
+    private void displayHelp(String message) {
+        System.err.println(message);
+        System.out.println(""); //$NON-NLS-1$
+        displayHelp();
+    }
+
+    private String configName;
+    
+    /*
+     * The output will look like this:
+     * 
+     * "Usage: eclipse -application org.eclipse.jdt.core.JavaCodeFormatter [ OPTIONS ] <files>
+     *     <files>		Java source files and/or directories to format.
+     *					Only files ending with .java will be formatted in the given directory.
+     *  OPTIONS:
+     *	   -config <file>		Use the formatting style from the specified config file.
+     *							This file must be an xml file that has been exported by Eclipse 3.0.
+     *     -help				Display this message.
+     *     -quiet				Only print error messages.
+     *	   -verbose				Be verbose about the formatting job.   
+     */
+    private void displayHelp() {
+        String binaryName = Platform.getOS().equals(Platform.OS_WIN32) ? "eclipse.exe" : "eclipse"; //$NON-NLS-1$ //$NON-NLS-2$
+
+        // this is UG-LY. is there a way to make this look nicer?
+        System.out.println(FormatterAppMessages.getFormattedString("CommandLine.usage", //$NON-NLS-1$
+        		binaryName + " -application org.eclipse.jdt.core.JavaCodeFormatter")); //$NON-NLS-1$
+        System.out.println(""); //$NON-NLS-1$
+        
+        System.out.println("   " + FormatterAppMessages.getString("CommandLine.files") //$NON-NLS-1$ //$NON-NLS-2$
+                + "\t" + FormatterAppMessages.getString("CommandLine.files.msg1")); //$NON-NLS-1$ //$NON-NLS-2$
+        System.out.println("\t\t" //$NON-NLS-1$
+        		+ FormatterAppMessages.getFormattedString("CommandLine.files.msg2", ".java")); //$NON-NLS-1$ //$NON-NLS-2$ 
+        
+        System.out.println(FormatterAppMessages.getString("CommandLine.options")); //$NON-NLS-1$
+        System.out.println("   " + FormatterAppMessages.getFormattedString("CommandLine.config", ARG_CONFIG) //$NON-NLS-1$ //$NON-NLS-2$ 
+        		+ "\t" + FormatterAppMessages.getString("CommandLine.config.msg1")); //$NON-NLS-1$ //$NON-NLS-2$
+        System.out.println("\t\t\t" + FormatterAppMessages.getString("CommandLine.config.msg2")); //$NON-NLS-1$ //$NON-NLS-2$
+        System.out.println("   " + ARG_HELP + "\t\t" + FormatterAppMessages.getString("CommandLine.help")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        System.out.println("   " + ARG_QUIET + "\t\t" + FormatterAppMessages.getString("CommandLine.quiet")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        System.out.println("   " + ARG_VERBOSE +"\t\t" + FormatterAppMessages.getString("CommandLine.verbose")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ 
+    }
+    
+    private final String ARG_HELP =    "-help"; //$NON-NLS-1$
+    private final String ARG_CONFIG =  "-config"; //$NON-NLS-1$
+    private final String ARG_VERBOSE = "-verbose"; //$NON-NLS-1$
+    private final String ARG_QUIET = "-quiet"; //$NON-NLS-1$
+    private boolean verbose = false;
+    private boolean quiet = false;
+    
+    private ArrayList processCommandLine(String[] argsArray) {
+
+        ArrayList args = new ArrayList();
+        for (int i = 0; i < argsArray.length; i++) {
+			args.add(argsArray[i]);
+		}
+        
+        // look for flag-like args
+        if (args.remove(ARG_HELP)) {
+            displayHelp();
+            return null;
+        }
+        if (args.remove(ARG_VERBOSE))
+            verbose = true;
+        if (args.remove(ARG_QUIET)) 
+        	quiet = true;
+        
+        if (quiet && verbose) {
+        	displayHelp(FormatterAppMessages.getFormattedString
+        			("CommandLineError.quiet.verbose", new String[] {ARG_QUIET, ARG_VERBOSE})); //$NON-NLS-1$
+        	return null;
+        }
+        args.remove("-pdelaunch"); //$NON-NLS-1$
+
+        // look for flag/param args
+        int index = args.indexOf(ARG_CONFIG);
+        if (index >= 0) {
+            args.remove(index);
+            String configFile = (String) args.remove(index);
+            options = readConfig(configFile);
+            if (options == null) {
+                displayHelp(FormatterAppMessages
+                        .getFormattedString("CommandLineError.config", configFile)); //$NON-NLS-1$
+                return null;
+            }
+        }
+
+        // only the files and directories should remain
+        ArrayList fileList = new ArrayList();
+        while (!args.isEmpty()) {
+			String fileName = (String) args.remove(0);
+			File file = new File(fileName);
+			if (file.exists()) {
+				fileList.add(file);
+			} else {
+				displayHelp(FormatterAppMessages
+					.getFormattedString("CommandLineError.file", fileName)); //$NON-NLS-1$
+				return null;
+			}
+		}
+        
+        if (fileList.isEmpty())
+        	displayHelp(FormatterAppMessages.getString("CommandLineError.file.dir")); //$NON-NLS-1$
+        	
+        return fileList;
+    }
+
+    /**
+     * Recursively format the Java source code that is contained in the
+     * directory rooted at dir.
+     */
+    private void formatDirTree(File dir) {
+
+        File[] files = dir.listFiles();
+        if (files == null)
+            return;
+
+        for (int i = 0; i < files.length; i++) {
+            File file = files[i];
+            if (file.isDirectory()) {
+                formatDirTree(file);
+            } else if (file.getPath().endsWith(".java")) { //$NON-NLS-1$
+                formatFile(file);
+            }
+        }
+    }
+
+    // internal representation of configuration options in the xml file
+    private Map options = null;
+
+    /**
+     * Format the given Java source file.
+     */
+    private void formatFile(File file) {
+        
+        IDocument doc = new Document();
+        try {
+            // read the file
+            final BufferedReader in = new BufferedReader(new FileReader(file));
+            if (verbose) {           
+                System.out.println(FormatterAppMessages.getFormattedString
+                		("CommandLine.formatting", file.getName())); //$NON-NLS-1$
+            }
+            String line;
+            String contents = ""; //$NON-NLS-1$
+            try {
+                while ((line = in.readLine()) != null)
+                    contents = contents
+                            + System.getProperty("line.separator") + line; //$NON-NLS-1$
+            } finally {
+                try { in.close(); } catch (IOException e) { /* ignore */  }
+            }
+          
+            // format the file (the meat and potatoes)
+            doc.set(contents);
+            TextEdit edit = ToolFactory.createCodeFormatter(options).format(
+                    CodeFormatter.K_COMPILATION_UNIT, doc.get(), 0,
+                    doc.getLength(), 0, null);
+            if (edit != null) {
+                edit.apply(doc);
+            } else {            	
+                System.err.println
+                	(FormatterAppMessages.getFormattedString("Edit.problem", file.getName())); //$NON-NLS-1$
+                return;
+            }
+        
+            // write the file
+            final Writer out = new BufferedWriter(new FileWriter(file, false));
+            try {
+                out.write(doc.get());
+                out.flush();
+            } finally {
+                try { out.close(); } catch (IOException e) { /* ignore */ }
+            }
+            
+        } catch (IOException e) {
+            String errorMessage = FormatterAppMessages.getString("Exception.io") + " " //$NON-NLS-1$ //$NON-NLS-2$
+            	+ e.getLocalizedMessage();
+            Util.log(e, errorMessage);
+            System.err.println(errorMessage); 
+            System.err.println(FormatterAppMessages.getString("Exception.skip")); //$NON-NLS-1$
+            
+        }  catch (BadLocationException e) {
+            String errorMessage = FormatterAppMessages.getString("Exception.bad.location") + " " //$NON-NLS-1$ //$NON-NLS-2$
+    			+ e.getLocalizedMessage();
+            Util.log(e, errorMessage);
+            System.err.println(errorMessage); 
+            System.err.println(FormatterAppMessages.getString("Exception.skip")); //$NON-NLS-1$
+        }
+    }
+
+}
Index: formatter/org/eclipse/jdt/core/formatter/FormatterAppMessages.properties
===================================================================
RCS file: formatter/org/eclipse/jdt/core/formatter/FormatterAppMessages.properties
diff -N formatter/org/eclipse/jdt/core/formatter/FormatterAppMessages.properties
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ formatter/org/eclipse/jdt/core/formatter/FormatterAppMessages.properties	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2004 Ben Konrath <ben at bagu.org>
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     Ben Konrath <ben at bagu.org> - initial implementation
+ *******************************************************************************/
+
+CommandLine.start=Starting format job ...
+CommandLine.done=Done.
+CommandLine.config.file=Configuration Name: {0}
+CommandLine.formatting=Formatting: {0}
+
+CommandLine.usage=Usage: {0} [ OPTIONS ] <files>
+
+CommandLine.files=<files>
+CommandLine.files.msg1=Java source files and/or directories to format.
+CommandLine.files.msg2=Only files ending with {0} will be formatted in the given directory.
+
+CommandLine.options=OPTIONS:
+CommandLine.config={0} <file>
+CommandLine.config.msg1=Use the formatting style from the specified config file.
+CommandLine.config.msg2=This file must be an xml file that has been exported by Eclipse 3.0.
+CommandLine.help=Display this message.
+CommandLine.quiet=Only print error messages.
+CommandLine.verbose=Be verbose about the formatting job.
+
+
+CommandLineError.file={0} does not exsit. Please specify only valid Java Source files.
+CommandLineError.config=There was problem reading the config file, {0}.
+CommandLineError.file.dir=You must specify at least one file or dirctory to format.
+CommandLineError.quiet.verbose=You cannot use the options {0} and {1} together.
+
+
+Exception.io=Caught IOExecption:
+Exception.bad.location=Caught BadLocationException:  
+Exception.skip=Skipping File.
+
+
+ConfigFile.reading.error=Error Reading config file.
+
+
+Edit.problem=The Eclipse formatter had a problem {0}, Skipping.
+
Content-Type: text/plain


eclipse-swttools.patch:
 build.xml |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

--- NEW FILE eclipse-swttools.patch ---
Index: build.xml
===================================================================
RCS file: /home/eclipse/org.eclipse.swt.gtk64/build.xml,v
retrieving revision 1.43
diff -u -r1.43 build.xml
--- build.xml	18 Mar 2005 13:45:25 -0000	1.43
+++ build.xml	5 Apr 2005 22:27:49 -0000
@@ -20,7 +20,6 @@
 
 	<target name="properties" if="eclipse.running">
 		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
-		<!--compile the jar in org.eclipse.swt.tools-->
 	</target>
 
 	<target name="build.update.jar" depends="init">
@@ -188,6 +187,10 @@
 	</target>
 
 	<target name="build.cfiles" depends="build.jars">
+		<!--compile the jar in org.eclipse.swt.tools-->
+		<ant antfile="build.xml" dir="${toolsplugindir}" inheritAll="false" target="clean"/>
+		<ant antfile="build.xml" dir="${toolsplugindir}" inheritAll="false" target="build.jars" />
+
 		<!-- generate the C code from the (64 bit) SWT PI java classes -->
 		<!-- assumes the swt.jar has already been built  -->
 		<java classname="org.eclipse.swt.tools.internal.JNIGeneratorApp" classpath="${toolsplugindir}/bin:${toolsplugindir}/swttools.jar:${basedir}/swt.jar"><arg value="org.eclipse.swt.internal.gtk.OS"/><arg value="${basedir}/src/Eclipse SWT PI/gtk/library/"/><arg value="${build.result.folder}/swt.jar"/></java>


Index: eclipse.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse/devel/eclipse.spec,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -r1.98 -r1.99
--- eclipse.spec	5 Apr 2005 03:24:36 -0000	1.98
+++ eclipse.spec	6 Apr 2005 21:47:54 -0000	1.99
@@ -22,7 +22,7 @@
 Summary:        %{pkg_summary}
 Name:           eclipse
 Version:        %{eclipse_majmin}.%{eclipse_micro}_fc
-Release:	0.M5.17
+Release:	0.M5.18
 License:        CPL
 Group:          Text Editors/Integrated Development Environments (IDE)
 URL:            http://www.eclipse.org/
@@ -80,6 +80,12 @@
 # Bootstrap the build a la https://bugs.eclipse.org/bugs/show_bug.cgi?id=84914
 # ... the patch is a bit hacky at the moment
 Patch17:	%{name}-bootstrap.patch
+# Build swttools.jar
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=90364
+Patch18: 	%{name}-swttools.patch
+# Add command-line source code formatter
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=75333
+Patch19: 	%{name}-efj.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
 BuildRequires:  ant
@@ -224,6 +230,12 @@
 popd
 %patch16 -p0
 %patch17 -p1
+pushd plugins/org.eclipse.swt.gtk64
+%patch18 -p0
+popd
+pushd plugins/org.eclipse.jdt.core
+%patch19 -p0
+popd
 
 # Red Hat splash screen.
 pushd plugins/org.eclipse.platform
@@ -459,7 +471,7 @@
       d=".%{_libdir}/%{name}/`dirname $j | sed 's:\./::'`";
       mkdir -p $d;
       s=`echo $j | sed "s:\./::"`;
-      gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic \
+      gcj -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic -O1 \
         -o $d/`basename $j`.so $j;
   done
 %endif
@@ -694,7 +706,7 @@
 for dir in `cat %{SOURCE7}`; do
     for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
 	lib=`echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
-	if [ -f $RPM_BUILD_ROOT/$lib ]; then
+	if [ -f $lib ]; then
 	  gcj-dbtool -f $gcjdbdir/%{name}-jdt.db \
 	    $j `echo $lib | sed "s:$RPM_BUILD_ROOT/::"`;
 	fi;
@@ -705,7 +717,7 @@
 for dir in `cat %{SOURCE8}`; do
     for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
 	lib=`echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
-	if [ -f $RPM_BUILD_ROOT/$lib ]; then
+	if [ -f $lib ]; then
 	  gcj-dbtool -f $gcjdbdir/%{name}-pde.db \
 	    $j `echo $lib | sed "s:$RPM_BUILD_ROOT/::"`;
 	fi;
@@ -716,7 +728,7 @@
 for dir in `cat %{SOURCE9}`; do
     for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
 	lib=`echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
-	if [ -f $RPM_BUILD_ROOT/$lib ]; then
+	if [ -f $lib ]; then
 	  gcj-dbtool -f $gcjdbdir/%{name}-platform.db \
 	    $j `echo $lib | sed "s:$RPM_BUILD_ROOT/::"`;
 	fi;
@@ -727,7 +739,7 @@
 for dir in `cat %{SOURCE10}`; do
     for j in `find $RPM_BUILD_ROOT/$dir -name \*.jar`; do
 	lib=`echo $j | sed "s:%{_datadir}:%{_libdir}:"`.so;
-	if [ -f $RPM_BUILD_ROOT/$lib ]; then
+	if [ -f $lib ]; then
 	  gcj-dbtool -f $gcjdbdir/libswt3-gtk2.db \
 	    $j `echo $lib | sed "s:$RPM_BUILD_ROOT/::"`;
 	fi;
@@ -980,6 +992,12 @@
 %{_datadir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.*_3.1.0
 
 %changelog
+* Wed Apr 06 2005 Andrew Overholt <overholt at redhat.com> 3.1.0_fc-0.M5.18
+- Fix typo in gcj db building loops.
+- Add -O1 to x86_64 jar.so compilation.
+- Add EFJ (Eclipse Formatter for Java) patches (bkonrath) (e.o#75333).
+- Add patch to build swttools.jar (e.o#90364).
+
 * Mon Apr 04 2005 Andrew Overholt <overholt at redhat.com> 3.1.0_fc-0.M5.17
 - Actually insert .jar-.jar.so combinations into sub-dbs.
 




More information about the fedora-cvs-commits mailing list