diff --git a/core-3.3.0-v_771.pom b/core-3.3.0-v_771.pom new file mode 100644 index 0000000..aefc888 --- /dev/null +++ b/core-3.3.0-v_771.pom @@ -0,0 +1,13 @@ + + 4.0.0 + org.eclipse.jdt + core + Java Development Tools Core + 3.3.0-v_771 + + + Eclipse Public License - v 1.0 + http://www.eclipse.org/org/documents/epl-v10.html + + + \ No newline at end of file diff --git a/ecj-3.3.tar.gz b/ecj-3.3.tar.gz deleted file mode 100644 index f67bfa6..0000000 --- a/ecj-3.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b240909999d8a5685500f6c5a2ad9e0718f370c3dc14dfd5a0941cb76d8e9f06 -size 877335 diff --git a/ecj-defaultto1.5.patch b/ecj-defaultto1.5.patch new file mode 100644 index 0000000..d903571 --- /dev/null +++ b/ecj-defaultto1.5.patch @@ -0,0 +1,22 @@ +### 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 + diff --git a/ecj-gcj.tar.bz2 b/ecj-gcj.tar.bz2 new file mode 100644 index 0000000..c4ab961 --- /dev/null +++ b/ecj-gcj.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:253996e9541763a1042984a103a531142e803260bdff79f730237bc49a716b26 +size 6329 diff --git a/ecj-generatedebuginfo.patch b/ecj-generatedebuginfo.patch new file mode 100644 index 0000000..e64a044 --- /dev/null +++ b/ecj-generatedebuginfo.patch @@ -0,0 +1,21 @@ +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 @@ + + + +@@ -18,7 +18,7 @@ + + + diff --git a/ecj-include-props.patch b/ecj-include-props.patch new file mode 100644 index 0000000..b9c502d --- /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 @@ + + + ++ + + + diff --git a/ecj-rpmdebuginfo.patch b/ecj-rpmdebuginfo.patch new file mode 100644 index 0000000..931f884 --- /dev/null +++ b/ecj-rpmdebuginfo.patch @@ -0,0 +1,39 @@ +### 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); + diff --git a/ecj.changes b/ecj.changes index 6073cc3..59ba3bc 100644 --- a/ecj.changes +++ b/ecj.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jan 21 13:43:25 UTC 2013 - mvyskocil@suse.com + +- 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 + ------------------------------------------------------------------- Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de diff --git a/ecj.sh.in b/ecj.sh.in new file mode 100644 index 0000000..7ed2790 --- /dev/null +++ b/ecj.sh.in @@ -0,0 +1,4 @@ +#!/bin/sh + +CLASSPATH=@JAVADIR@/ecj.jar:${CLASSPATH=.} \ +java org.eclipse.jdt.internal.compiler.batch.Main "$@" diff --git a/ecj.spec b/ecj.spec index 838035a..44984ce 100644 --- a/ecj.spec +++ b/ecj.spec @@ -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: 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@sourceware.org:/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 + +Requires: java >= 1.6.0 %description -Eclipse Compiler for Java - +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} +# 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 -%post -if [ -x "%{_bindir}/rebuild-gcj-db" ]; then - %{_bindir}/rebuild-gcj-db -fi +# poms +install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} +install -pm 644 pom.xml \ + $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom -%postun -if [ -x "%{_bindir}/rebuild-gcj-db" ]; then - %{_bindir}/rebuild-gcj-db -fi -%endif +%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 diff --git a/ecjsrc-4.2.1.jar b/ecjsrc-4.2.1.jar new file mode 100644 index 0000000..c38e14c --- /dev/null +++ b/ecjsrc-4.2.1.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d261b2158f598640f1923805d2e9bf47eb21d8333f4e1b37f59f847ad00d48f4 +size 1417043 diff --git a/eclipse-gcj-compat4.2.1.patch b/eclipse-gcj-compat4.2.1.patch new file mode 100644 index 0000000..59f017b --- /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/eclipse-gcj-nodummysymbol.patch b/eclipse-gcj-nodummysymbol.patch new file mode 100644 index 0000000..5b4f934 --- /dev/null +++ b/eclipse-gcj-nodummysymbol.patch @@ -0,0 +1,37 @@ +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; + } diff --git a/sources b/sources new file mode 100644 index 0000000..50b49fc --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +f603934950639ed6ac2b2527705a69f0 ecjsrc-4.2.1.jar +0af236868ba699f2e55c654b8aca1258 ecj-gcj.tar.bz2