Hello community, here is the log from the commit of package ecj for openSUSE:12.3 checked in at 2013-01-31 15:10:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.3/ecj (Old) and /work/SRC/openSUSE:12.3/.ecj.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ecj", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:12.3/ecj/ecj.changes 2013-01-31 01:15:25.000000000 +0100 +++ /work/SRC/openSUSE:12.3/.ecj.new/ecj.changes 2013-01-31 15:10:21.000000000 +0100 @@ -1,0 +2,17 @@ +Mon Jan 21 13:43:25 UTC 2013 - [email protected] + +- Update to ecj 4.2.1 (expected by tomcat 7.0.34+) + (no changelog provided, but it's normal for eclipse) +- sync with fedora 4.2.1-3 + * ecj-defaultto1.5.patch - change the default -source to 1.5 to + match gcc-java capabilities + * ecj-generatedebuginfo.patch - generate debug info for java sources + * ecj-include-props.patch - package .props files too + * ecj-rpmdebuginfo.patch - hack, force debuginfo to be created when + RPM_BUILD_ROOT variable is defined + * eclipse-gcj-compat4.2.1.patch - disable all expected warning + * eclipse-gcj-nodummysymbol.patch - don't generate dummy entry in jars + * eclipse-jpackage-changelog.txt + + +------------------------------------------------------------------- Old: ---- ecj-3.3.tar.gz eclipse-jpackage-changelog.txt New: ---- core-3.3.0-v_771.pom ecj-defaultto1.5.patch ecj-gcj.tar.bz2 ecj-generatedebuginfo.patch ecj-include-props.patch ecj-rpmdebuginfo.patch ecj.sh.in ecjsrc-4.2.1.jar eclipse-gcj-compat4.2.1.patch eclipse-gcj-nodummysymbol.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ecj.spec ++++++ --- /var/tmp/diff_new_pack.UgPVdd/_old 2013-01-31 15:10:21.000000000 +0100 +++ /var/tmp/diff_new_pack.UgPVdd/_new 2013-01-31 15:10:21.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package ecj # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,102 +16,106 @@ # - Name: ecj -%define section free -%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} -Version: 3.3 -Release: 119 +Version: 4.2.1 +Release: 0 Summary: Eclipse Compiler for Java -Group: Development/Languages/Java License: EPL-1.0 -Url: www.eclipse.org -# this tarball is generated by a script that uses the original eclipse sources -# script is included for documentation purposes in the docdir of the package -Source0: %{name}-%{version}.tar.gz -# this is the changelog from the original JPackage eclipse package that is -# included for documentation and recognition purposes only -Source1: eclipse-jpackage-changelog.txt +Group: Development/Languages/Java +Url: http://eclipse.org +Source0: %{name}src-%{version}.jar +Source1: ecj.sh.in +# Use ECJ for GCJ +# cvs -d:pserver:[email protected]:/cvs/rhug \ +# 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 +# No dependencies are needed for ecj, dependencies are for using of jdt.core which makes no sense outside of eclipse +Source3: core-3.3.0-v_771.pom +# Always generate debug info when building RPMs (Andrew Haley) +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 +Patch5: eclipse-gcj-nodummysymbol.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if ! %{gcj_support} + BuildArch: noarch -%endif + BuildRequires: ant +BuildRequires: java-devel >= 1.6.0 BuildRequires: jpackage-utils >= 1.7 -%if %{gcj_support} -BuildRequires: gcc-java >= 4.0.0 -Requires: libgcj >= 4.0.0 -Requires(post): java-gcj-compat -Requires(postun): java-gcj-compat -%else -BuildRequires: java-devel BuildRequires: sed -Requires: java -%endif -%if %defined suse_version BuildRequires: unzip -%endif -%description -Eclipse Compiler for Java +Requires: java >= 1.6.0 +%description +ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as +the JDT Core batch compiler. %prep -%setup -q +%setup -q -c +%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 +%patch5 -p1 +cat eclipse-gcj/gcc.properties >> \ + org/eclipse/jdt/internal/compiler/batch/messages.properties +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 %build -%{__cp} %{SOURCE1} . -unset CLASSPATH -%if %{gcj_support} - for f in `find -name '*.java'`; do - gcj -Wno-deprecated -C $f - done - find . \( -name '*.class' -o -name '*.properties' -o -name '*.rsc' \) \ - | xargs jar cf %{name}-%{version}.jar -%else - # remove -Xlint:none from javac compiler arguments as it causes - # Sun Java 1.4.2 to crap out - %{__sed} -i -e 's,-Xlint:none ,,g' jdtcoresrc/compilejdtcorewithjavac.xml - # first invocation builds with javac, second time around with ecj itself - ant -f jdtcoresrc/compilejdtcorewithjavac.xml - CLASSPATH="`pwd`/jdtcoresrc/%{name}.jar" \ - ant -f jdtcoresrc/compilejdtcore.xml - # just to make sure there is no confusion, delete the bootstrap ecj jar - %{__rm} jdtcoresrc/%{name}.jar -%endif +ant %install -%{__mkdir_p} ${RPM_BUILD_ROOT}%{_javadir} -%{__install} -m 0644 %{name}.jar \ - ${RPM_BUILD_ROOT}%{_javadir}/%{name}-%{version}.jar -pushd ${RPM_BUILD_ROOT}%{_javadir} - %{__ln_s} %{name}-%{version}.jar %{name}.jar +mkdir -p $RPM_BUILD_ROOT%{_javadir} +cp -a *.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar +pushd $RPM_BUILD_ROOT%{_javadir} +ln -s %{name}.jar eclipse-%{name}.jar +ln -s %{name}.jar jdtcore.jar popd -%if %{gcj_support} - aot-compile-rpm -%endif - -%if %{gcj_support} - -%post -if [ -x "%{_bindir}/rebuild-gcj-db" ]; then - %{_bindir}/rebuild-gcj-db -fi - -%postun -if [ -x "%{_bindir}/rebuild-gcj-db" ]; then - %{_bindir}/rebuild-gcj-db -fi -%endif + +# Install the ecj wrapper script +install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ecj +sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj + +# poms +install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} +install -pm 644 pom.xml \ + $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom + +%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core" JPP-%{name}.pom %{name}.jar %files -%defattr(-,root,root,-) -%doc eclipse-jpackage-changelog.txt %{name}-tarballBuild.sh -%{_javadir}/%{name}-%{version}.jar +%defattr(0644,root,root,0755) +%doc about.html +%{_mavenpomdir}/JPP-%{name}.pom +%{_mavendepmapfragdir}/%{name} +%attr(0755,root,root) %{_bindir}/%{name} %{_javadir}/%{name}.jar -%if %{gcj_support} -%{_libdir}/gcj/%{name} -%endif +%{_javadir}/eclipse-%{name}.jar +%{_javadir}/jdtcore.jar %changelog ++++++ ecj-defaultto1.5.patch ++++++ ### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v 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 @@ -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; this.defaultEncoding = null; // will use the platform default encoding ++++++ ecj-generatedebuginfo.patch ++++++ diff -up ./build.xml.sav ./build.xml --- ./build.xml.sav 2009-03-11 13:30:38.000000000 -0400 +++ ./build.xml 2009-03-11 13:30:34.000000000 -0400 @@ -10,7 +10,7 @@ <mkdir dir="${output}" /> <javac srcdir="${basedir}" destdir="${output}" - debuglevel="lines,source" + debug="yes" source="1.3" target="1.2" excludes="org/eclipse/jdt/internal/compiler/tool/*,**/apt/**"> @@ -18,7 +18,7 @@ </javac> <javac destdir="${output}" - debuglevel="lines,source" + debug="yes" source="1.6" target="1.6" includes="org/eclipse/jdt/internal/compiler/tool/*"> ++++++ ecj-include-props.patch ++++++ --- 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> ++++++ ecj-rpmdebuginfo.patch ++++++ ### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v 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 @@ -2609,6 +2609,29 @@ this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED); } + { + // If we're building an RPM, force full debugging info to + // be generated, no matter what options have been passed + // by Ant. This is something of a kludge, but it is far + // better than the alternative, which is having class + // files with debug info mysteriously missing. + + String RpmPackageName = System.getenv("RPM_PACKAGE_NAME"); + String RpmArch = System.getenv("RPM_ARCH"); + String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT"); + if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) { + this.options.put( + CompilerOptions.OPTION_LocalVariableAttribute, + CompilerOptions.GENERATE); + this.options.put( + CompilerOptions.OPTION_LineNumberAttribute, + CompilerOptions.GENERATE); + this.options.put( + CompilerOptions.OPTION_SourceFileAttribute, + CompilerOptions.GENERATE); + } + } + this.logger.logCommandLineArguments(newCommandLineArgs); this.logger.logOptions(this.options); ++++++ ecj.sh.in ++++++ #!/bin/sh CLASSPATH=@JAVADIR@/ecj.jar:${CLASSPATH=.} \ java org.eclipse.jdt.internal.compiler.batch.Main "$@" ++++++ eclipse-gcj-compat4.2.1.patch ++++++ 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(); ++++++ eclipse-gcj-nodummysymbol.patch ++++++ 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 2012-10-29 21:12:37.244254740 -0400 +++ b/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2012-10-29 21:13:55.661107108 -0400 @@ -101,16 +101,6 @@ } zipStream = new ZipOutputStream(new BufferedOutputStream(os)); zipStream.setMethod(ZipOutputStream.STORED); - // Sun/OpenJDK require at least one entry in the zip file. - ZipEntry entry = new ZipEntry(".dummy"); - byte[] contents = new byte[0]; - CRC32 crc = new CRC32(); - crc.update(contents); - entry.setSize(contents.length); - entry.setCrc(crc.getValue()); - zipStream.putNextEntry(entry); - zipStream.write(contents); - zipStream.closeEntry(); } return zipStream; } @@ -120,16 +110,6 @@ OutputStream os = new FileOutputStream(zipDependencyDestination); zipDependencyStream = new ZipOutputStream(new BufferedOutputStream(os)); zipDependencyStream.setMethod(ZipOutputStream.STORED); - // Sun/OpenJDK require at least one entry in the zip file. - ZipEntry entry = new ZipEntry(".dummy"); - byte[] contents = new byte[0]; - CRC32 crc = new CRC32(); - crc.update(contents); - entry.setSize(contents.length); - entry.setCrc(crc.getValue()); - zipDependencyStream.putNextEntry(entry); - zipDependencyStream.write(contents); - zipDependencyStream.closeEntry(); } return zipDependencyStream; } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
