[ecj/f17] Update to 4.2.1 upstream version.

Jon VanAlten jvanalte at fedoraproject.org
Thu Oct 11 03:12:46 UTC 2012


commit 458c2cac2fae5947d3250c2cf4a0bbe1db4c47fa
Author: Jon VanAlten <jon.vanalten at redhat.com>
Date:   Wed Oct 10 22:41:07 2012 -0400

    Update to 4.2.1 upstream version.

 .gitignore                    |    2 +-
 ecj-defaultto1.5.patch        |   44 +++---------
 ecj-include-props.patch       |   10 +++
 ecj-rpmdebuginfo.patch        |  157 -----------------------------------------
 ecj.spec                      |   20 ++++--
 eclipse-gcj-compat4.2.1.patch |   20 +++++
 sources                       |    4 +-
 7 files changed, 59 insertions(+), 198 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7f5edd1..b831267 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
 ecj-gcj.tar.bz2
-ecjsrc-3.4.2.zip
+ecjsrc-4.2.1.jar
diff --git a/ecj-defaultto1.5.patch b/ecj-defaultto1.5.patch
index e96a403..3444386 100644
--- a/ecj-defaultto1.5.patch
+++ b/ecj-defaultto1.5.patch
@@ -7,38 +7,16 @@ retrieving revision 1.203
 diff -u -r1.203 CompilerOptions.java
 --- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java	14 Apr 2008 19:41:33 -0000	1.203
 +++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java	15 Dec 2008 19:50:02 -0000
-@@ -253,9 +253,9 @@
- 	// By default only lines and source attributes are generated.
- 	public int produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES;
+@@ -1145,9 +1145,9 @@
+ 		
+ 		// by default only lines and source attributes are generated.
+ 		this.produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES;
+-		this.complianceLevel = this.originalComplianceLevel = ClassFileConstants.JDK1_4; // by default be compliant with 1.4
+-		this.sourceLevel = this.originalSourceLevel = ClassFileConstants.JDK1_3; //1.3 source behavior by default
+-		this.targetJDK = ClassFileConstants.JDK1_2; // default generates for JVM1.2
++		this.complianceLevel = this.originalComplianceLevel = ClassFileConstants.JDK1_5;
++		this.sourceLevel = this.originalSourceLevel = ClassFileConstants.JDK1_5;
++		this.targetJDK = ClassFileConstants.JDK1_5;
  
--	public long complianceLevel = ClassFileConstants.JDK1_4; // by default be compliant with 1.4
--	public long sourceLevel = ClassFileConstants.JDK1_3; //1.3 source behavior by default
--	public long targetJDK = ClassFileConstants.JDK1_2; // default generates for JVM1.2
-+	public long complianceLevel = ClassFileConstants.JDK1_5; // by default be compliant with 1.4
-+	public long sourceLevel = ClassFileConstants.JDK1_5; //1.3 source behavior by default
-+	public long targetJDK = ClassFileConstants.JDK1_5; // default generates for JVM1.2
+ 		this.defaultEncoding = null; // will use the platform default encoding
  
- 	// source encoding format
- 	public String defaultEncoding = null; // will use the platform default encoding
-@@ -757,7 +757,7 @@
- 			} else if (DISABLED.equals(optionValue)) {
- 				this.reportUnusedParameterIncludeDocCommentReference = false;
- 			}
--		}		
-+		}
- 		if ((optionValue = optionsMap.get(OPTION_ReportSpecialParameterHidingField)) != null) {
- 			if (ENABLED.equals(optionValue)) {
- 				this.reportSpecialParameterHidingField = true;
-@@ -944,10 +944,10 @@
- 		}
- 		if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocComments)) != null) {
- 			updateSeverity(MissingJavadocComments, optionValue);
--		}		
-+		}
- 		if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocTagDescription)) != null) {
- 			this.reportMissingJavadocTagDescription = (String) optionValue;
--		}		
-+		}
- 		if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocCommentsVisibility)) != null) {
- 			if (PUBLIC.equals(optionValue)) {
- 				this.reportMissingJavadocCommentsVisibility = ClassFileConstants.AccPublic;
diff --git a/ecj-include-props.patch b/ecj-include-props.patch
new file mode 100644
index 0000000..990442c
--- /dev/null
+++ b/ecj-include-props.patch
@@ -0,0 +1,10 @@
+--- a/build.xml	2012-10-09 13:56:47.695928242 -0400
++++ b/build.xml	2012-10-09 13:57:06.822893233 -0400
+@@ -46,6 +46,7 @@
+ 				<include name="**/*.rsc"/>
+ 				<include name="META-INF/**"/>
+ 				<include name="**/*.properties"/>
++				<include name="**/*.props"/>
+ 				<exclude name="META-INF/eclipse.inf"/>
+ 			</fileset>
+ 		</zip>
diff --git a/ecj-rpmdebuginfo.patch b/ecj-rpmdebuginfo.patch
index 0721f13..e2727a1 100644
--- a/ecj-rpmdebuginfo.patch
+++ b/ecj-rpmdebuginfo.patch
@@ -7,136 +7,6 @@ retrieving revision 1.327
 diff -u -r1.327 Main.java
 --- batch/org/eclipse/jdt/internal/compiler/batch/Main.java	21 Apr 2008 15:00:59 -0000	1.327
 +++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java	20 Nov 2008 19:26:57 -0000
-@@ -268,22 +268,22 @@
- 			if ((startPosition > endPosition)
- 				|| ((startPosition < 0) && (endPosition < 0))
- 				|| length == 0)
--				return Messages.problem_noSourceInformation; 
-+				return Messages.problem_noSourceInformation;
- 
- 			StringBuffer errorBuffer = new StringBuffer();
- 			if ((bits & Main.Logger.EMACS) == 0) {
--				errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber()))); 
-+				errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber())));
- 				errorBuffer.append(Util.LINE_SEPARATOR);
- 			}
- 			errorBuffer.append('\t');
--			
-+
- 			char c;
- 			final char SPACE = '\u0020';
- 			final char MARK = '^';
- 			final char TAB = '\t';
- 			//the next code tries to underline the token.....
- 			//it assumes (for a good display) that token source does not
--			//contain any \r \n. This is false on statements ! 
-+			//contain any \r \n. This is false on statements !
- 			//(the code still works but the display is not optimal !)
- 
- 			// expand to line limits
-@@ -295,11 +295,11 @@
- 			for (end = endPosition >= length ? length - 1 : endPosition ; end+1 < length; end++) {
- 				if ((c = unitSource[end + 1]) == '\r' || c == '\n') break;
- 			}
--			
-+
- 			// trim left and right spaces/tabs
- 			while ((c = unitSource[begin]) == ' ' || c == '\t') begin++;
- 			//while ((c = unitSource[end]) == ' ' || c == '\t') end--; TODO (philippe) should also trim right, but all tests are to be updated
--			
-+
- 			// copy source
- 			errorBuffer.append(unitSource, begin, end-begin+1);
- 			errorBuffer.append(Util.LINE_SEPARATOR).append("\t"); //$NON-NLS-1$
-@@ -424,7 +424,7 @@
- 								String.valueOf(generateTime),
- 								String.valueOf(((int) (generateTime * 1000.0 / time)) / 10.0),
- 							}));
--			}			
-+			}
- 		}
- 		public void logClassFile(boolean generatePackagesStructure, String outputPath, String relativeFileName) {
- 			if ((this.tagBits & Logger.XML) != 0) {
-@@ -916,7 +916,7 @@
- 					this.main.bind("compile.totalTime", //$NON-NLS-1$
- 						new String[] {
- 							String.valueOf(time),
--						})); 
-+						}));
- 			}
- 			if ((this.main.timing & Main.TIMING_DETAILED) != 0) {
- 				this.printlnOut(
-@@ -1119,7 +1119,7 @@
- 				this.endTag(Logger.STATS);
- 			}
- 		}
--		
-+
- 		private void printTag(String name, HashMap params, boolean insertNewLine, boolean closeTag) {
- 			if (this.log != null) {
- 				((GenericXMLWriter) this.log).printTag(name, parameters, true, insertNewLine, closeTag);
-@@ -1245,12 +1245,12 @@
- 
- 	boolean warnJavadocOn;
- 	boolean warnAllJavadocOn;
--	
-+
- 	public Compiler batchCompiler;
- 	/* Bundle containing messages */
- 	public ResourceBundle bundle;
- 	protected FileSystem.Classpath[] checkedClasspaths;
--	
-+
- 	public Locale compilerLocale;
- 	public CompilerOptions compilerOptions; // read-only
- 	public CompilationProgress progress;
-@@ -1299,7 +1299,7 @@
- 	public static final int TIMING_DISABLED = 0;
- 	public static final int TIMING_ENABLED = 1;
- 	public static final int TIMING_DETAILED = 2;
--	
-+
- 	public int timing = TIMING_DISABLED;
- 	public CompilerStats[] compilerStats;
- 	public boolean verbose = false;
-@@ -1312,7 +1312,7 @@
- 	// two uses: recognize 'none' in options; code the singleton none
- 	// for the '-d none' option (wherever it may be found)
- 	public static final int DEFAULT_SIZE_CLASSPATH = 4;
--	
-+
- 	public static final String NONE = "none"; //$NON-NLS-1$
- 
- /**
-@@ -1562,7 +1562,7 @@
- }
- /**
-  * Return true if and only if the running VM supports the given minimal version.
-- * 
-+ *
-  * <p>This only checks the major version, since the minor version is always 0 (at least for the useful cases).</p>
-  * <p>The given minimalSupportedVersion is one of the constants:</p>
-  * <ul>
-@@ -2536,8 +2536,8 @@
- 		mode = DEFAULT;
- 		continue;
- 	}
--	
--	// set DocCommentSupport, with appropriate side effects on defaults if 
-+
-+	// set DocCommentSupport, with appropriate side effects on defaults if
- 	// javadoc is not enabled
- 	if (this.enableJavadocOn) {
- 		this.options.put(
-@@ -2601,7 +2601,7 @@
- 	this.logger.logVersion(printVersionRequired);
- 
- 	validateOptions(didSpecifyCompliance);
--	
-+
- 	// Enable annotation processing by default in batch mode when compliance is at least 1.6
- 	// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=185768
- 	if (!didSpecifyDisabledAnnotationProcessing
 @@ -2609,6 +2609,29 @@
  		this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
  	}
@@ -167,30 +37,3 @@ diff -u -r1.327 Main.java
  	this.logger.logCommandLineArguments(newCommandLineArgs);
  	this.logger.logOptions(this.options);
  
-@@ -2636,7 +2659,7 @@
- 			0,
- 			classCount);
- 	}
--	
-+
- 	setPaths(bootclasspaths,
- 			sourcepathClasspathArg,
- 			sourcepathClasspaths,
-@@ -2644,7 +2667,7 @@
- 			extdirsClasspaths,
- 			endorsedDirClasspaths,
- 			customEncoding);
--	
-+
- 	if (this.pendingErrors != null) {
- 		for (Iterator iterator = this.pendingErrors.iterator(); iterator.hasNext(); ) {
- 			String message = (String) iterator.next();
-@@ -3376,7 +3399,7 @@
- 	} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
- 		this.options.put(
- 				CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
--				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);	
-+				isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
- 	} else {
- 		addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$
- 	}
diff --git a/ecj.spec b/ecj.spec
index d7a67a4..8e6bcc3 100644
--- a/ecj.spec
+++ b/ecj.spec
@@ -1,22 +1,22 @@
 Epoch: 1
 
-%global qualifier 200902111700
+%global qualifier 201209141800
 
 %define with_gcjbootstrap %{!?_with_gcjbootstrap:0}%{?_with_gcjbootstrap:1}
 %define without_gcjbootstrap %{?_with_gcjbootstrap:0}%{!?_with_gcjbootstrap:1}
 
 Summary: Eclipse Compiler for Java
 Name: ecj
-Version: 3.4.2
-Release: 13%{?dist}
+Version: 4.2.1
+Release: 1%{?dist}
 URL: http://www.eclipse.org
 License: EPL
 Group: Development/Languages
-Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-%{qualifier}/%{name}src-%{version}.zip
+Source0: http://download.eclipse.org/eclipse/downloads/drops4/R-%{version}-%{qualifier}/%{name}src-%{version}.jar
 Source1: ecj.sh.in
 # Use ECJ for GCJ
 # cvs -d:pserver:anonymous at sourceware.org:/cvs/rhug \
-# export -r eclipse_r34_1 eclipse-gcj
+# export -D 2009-09-28 eclipse-gcj
 # tar cjf ecj-gcj.tar.bz2 eclipse-gcj
 Source2: %{name}-gcj.tar.bz2
 #Patched from http://repo2.maven.org/maven2/org/eclipse/jdt/core/3.3.0-v_771/core-3.3.0-v_771.pom 
@@ -26,6 +26,10 @@ Source3: core-3.3.0-v_771.pom
 Patch0: %{name}-rpmdebuginfo.patch
 Patch1: %{name}-defaultto1.5.patch
 Patch2: %{name}-generatedebuginfo.patch
+# Patches Source2 for compatibility with newer ecj
+Patch3: eclipse-gcj-compat4.2.1.patch
+# build.xml fails to include a necessary .props file in the built ecj.jar
+Patch4: %{name}-include-props.patch
 
 BuildRequires: gcc-java >= 4.0.0
 BuildRequires: /usr/bin/aot-compile-rpm
@@ -59,12 +63,14 @@ AOT compiled ecj to speed up when running under GCJ.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch4 -p1
 
 cp %{SOURCE3} pom.xml
 # Use ECJ for GCJ's bytecode compiler
 tar jxf %{SOURCE2}
 mv eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java \
   org/eclipse/jdt/internal/compiler/batch/
+%patch3 -p1
 cat eclipse-gcj/gcc.properties >> \
   org/eclipse/jdt/internal/compiler/batch/messages.properties
 rm -rf eclipse-gcj
@@ -72,6 +78,7 @@ rm -rf eclipse-gcj
 # Remove bits of JDT Core we don't want to build
 rm -r org/eclipse/jdt/internal/compiler/tool
 rm -r org/eclipse/jdt/internal/compiler/apt
+rm -f org/eclipse/jdt/core/BuildJarIndex.java
 
 # JDTCompilerAdapter isn't used by the batch compiler
 rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
@@ -134,6 +141,9 @@ fi
 %{_libdir}/gcj/%{name}
 
 %changelog
+* Wed Oct 10 2012 Jon VanAlten <jon.vanalten at redhat.com> 1:4.2.1-1
+- Update to 4.2.1 upstream version.
+
 * Wed Apr 18 2012 Alexander Kurtakov <akurtako at redhat.com> 1:3.4.2-13
 - Add missing epoch to native subpackage requires.
 
diff --git a/eclipse-gcj-compat4.2.1.patch b/eclipse-gcj-compat4.2.1.patch
new file mode 100644
index 0000000..17b5192
--- /dev/null
+++ b/eclipse-gcj-compat4.2.1.patch
@@ -0,0 +1,20 @@
+diff -u -r org/eclipse/jdt/internal/compiler/batch/GCCMain.java org/eclipse/jdt/internal/compiler/batch/GCCMain.java
+--- a/org/eclipse/jdt/internal/compiler/batch/GCCMain.java	2008-08-13 13:46:30.000000000 -0400
++++ b/org/eclipse/jdt/internal/compiler/batch/GCCMain.java	2012-04-26 13:36:21.268642702 -0400
+@@ -29,6 +29,7 @@
+ import org.eclipse.jdt.internal.compiler.env.AccessRule;
+ import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
+ import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
++import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+ import org.eclipse.jdt.internal.compiler.util.Messages;
+ import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
+ 
+@@ -463,7 +464,7 @@
+ 		}
+ 
+ 		if (inhibitAllWarnings)
+-			disableWarnings();
++			disableAll(ProblemSeverities.Warning);
+ 		if (treatWarningsAsErrors)
+ 			turnWarningsToErrors();
+ 
diff --git a/sources b/sources
index b7daccf..f8ed1dc 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-43c2aa722a815c61706549d28786d134  ecj-gcj.tar.bz2
-c50acc9a39d410188ffc729fdf99af2a  ecjsrc-3.4.2.zip
+f603934950639ed6ac2b2527705a69f0  ecjsrc-4.2.1.jar
+0af236868ba699f2e55c654b8aca1258  ecj-gcj.tar.bz2


More information about the scm-commits mailing list