Accepting request 150571 from Java:packages

- 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

OBS-URL: https://build.opensuse.org/request/show/150571
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ecj?expand=0&rev=14
This commit is contained in:
Stephan Kulow 2013-01-31 14:10:16 +00:00 committed by Git OBS Bridge
commit 64b10acf8d
14 changed files with 266 additions and 187 deletions

13
core-3.3.0-v_771.pom Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
<name>Java Development Tools Core</name>
<version>3.3.0-v_771</version>
<licenses>
<license>
<name>Eclipse Public License - v 1.0</name>
<url>http://www.eclipse.org/org/documents/epl-v10.html</url>
</license>
</licenses>
</project>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b240909999d8a5685500f6c5a2ad9e0718f370c3dc14dfd5a0941cb76d8e9f06
size 877335

22
ecj-defaultto1.5.patch Normal file
View File

@ -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

3
ecj-gcj.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:253996e9541763a1042984a103a531142e803260bdff79f730237bc49a716b26
size 6329

View File

@ -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 @@
<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/*">

10
ecj-include-props.patch Normal file
View File

@ -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>

39
ecj-rpmdebuginfo.patch Normal file
View File

@ -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);

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
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
* 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
-------------------------------------------------------------------
Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de

4
ecj.sh.in Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
CLASSPATH=@JAVADIR@/ecj.jar:${CLASSPATH=.} \
java org.eclipse.jdt.internal.compiler.batch.Main "$@"

150
ecj.spec
View File

@ -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: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

3
ecjsrc-4.2.1.jar Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d261b2158f598640f1923805d2e9bf47eb21d8333f4e1b37f59f847ad00d48f4
size 1417043

View File

@ -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();

View File

@ -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;
}

View File

@ -1,111 +0,0 @@
* Mon Jun 19 2006 Jason Corley <jason.corley@gmail.com> - 1:3.1.2-6jpp
- massive spec cleanups (too many to list or enumerate)
- mozilla to seamonkey
- it would be nice if the fedora cabal could actually manage to write a spec
that came close to approximating the standards they force on everyone else
- TODO: far too many RH/Fedora-isms, we should work to remove that
* Mon Apr 03 2006 Fernando Nasser <fnasser@redhat.com> - 0:3.1.2-1jpp
- Require lucene 1.9.1
From Thu Mar 16 2006 Andrew Overholt <overholt@redhat.com>:
- 3.1.2.
- Adjust for lucene 1.9.1
- Bring in changes from FC-4 and FC-5 (see those changelogs for details).
- Export JAVA_HOME for build.
- Look for libjawt in multiple locations for the various proprietary JVMs.
- Set include path for jni.h.
- Decrement gtk requirement for RHEL-4.
* Fri Nov 11 2005 Fernando Nasser <fnasser@redhat.com> 0:3.0.2-5jpp
- Add header
- Rebuild for JPP 1.7
- Import spec file and pacthes with Red Hat changes as ours won't build
(WARNING: local changes may have been lost)
Fri Aug 11 2005 Jeff Pound <jpound@redhat.com> 3.0.2-8
- Use mozilla version 1.7.10.
Fri Aug 05 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-7
- Build libswt-mozilla-gtk.so.
- Add patch for API change between mozilla 1.6 and 1.7.7.
Mon Jul 18 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-6
- Add XTEST_LIB_PATH on x86_64 to stop unsatisfied link errors.
- Add xorg-x11-devel build requirement.
- BuildRequire java-devel (not java).
- Minor tweaks courtesy JPackage.org.
- Remove junit requirement (since we're using all Eclipse.org jars).
Tue Jun 21 2005 Aaron Luchko <aluchko@redhat.com> 3.0.2-5
- Fixed permissions on %{_libdir}/%{name}/eclipse and %{_bindir}/eclipse
Tue Jun 21 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-4
- Add x86_64.
Fri Jun 03 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-3
- Update to new (as in Fedora Core 4) sub-RPM layout.
Tue May 24 2005 Ben Konrath <bkonrath@redhat.com> 3.0.2-2
- Don't use %{eclipse_micro} for plugin names.
Thu Apr 21 2005 Ben Konrath <bkonrath@redhat.com> 3.0.2-1
- Update sources to 3.0.2.
- Update SWT patches.
Tue Mar 29 2005 Andrew Overholt <overholt@redhat.com> 3.0.1-12
- Bump release.
- Add 64-bit awareness to SWT jar locations.
- Remove old changelog entries (< 3.0.1).
* Fri Aug 11 2005 Jeff Pound <jpound@redhat.com> 3.0.2-8
- Use mozilla version 1.7.10.
* Fri Aug 05 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-7
- Build libswt-mozilla-gtk.so.
- Add patch for API change between mozilla 1.6 and 1.7.7.
* Mon Jul 18 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-6
- Add XTEST_LIB_PATH on x86_64 to stop unsatisfied link errors.
- Add xorg-x11-devel build requirement.
- BuildRequire java-devel (not java).
- Minor tweaks courtesy JPackage.org.
- Remove junit requirement (since we're using all Eclipse.org jars).
* Tue Jun 21 2005 Aaron Luchko <aluchko@redhat.com> 3.0.2-5
- Fixed permissions on %{_libdir}/%{name}/eclipse and %{_bindir}/eclipse
* Tue Jun 21 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-4
- Add x86_64.
* Fri Jun 03 2005 Andrew Overholt <overholt@redhat.com> 3.0.2-3
- Update to new (as in Fedora Core 4) sub-RPM layout.
* Tue May 24 2005 Ben Konrath <bkonrath@redhat.com> 3.0.2-2
- Don't use %{eclipse_micro} for plugin names.
* Thu Apr 21 2005 Ben Konrath <bkonrath@redhat.com> 3.0.2-1
- Update sources to 3.0.2.
- Update SWT patches.
* Tue Mar 29 2005 Andrew Overholt <overholt@redhat.com> 3.0.1-12
- Bump release.
- Remove old changelog entries (< 3.0.1).
- Add 64-bit awareness to SWT jar locations.
* Fri Mar 18 2005 Jeff Pound <jpound@redhat.com> 3.0.1-6
- Remove ia64 from xml workaround loop.
* Wed Jan 5 2005 Aaron Luchko <aluchko@redhat.com> 3.0.1-5
- fixed problem in search.patch
- added search.patch a backported bugfix from 3.1.0
- added charsets.patch to accommodate improper encodings and ibm jvm
* Mon Dec 06 2004 Aaron Luchko <aluchko@redhat.com> 3.0.1-4
- changed eclipse.script to use /usr/bin/java when no jvm is supplied
* Mon Nov 22 2004 Ben Konrath <bkonrath@redhat.com> 3.0.1-3
- split cvs-permission-bits.patch in two
- bug fix for cvs-permission-bits.patch
* Fri Oct 29 2004 Ben Konrath <bkonrath@redhat.com> 3.0.1-2
- add symlink for releng plugins that rely on o.e.pde.build_3.0.0
* Fri Oct 29 2004 Ben Konrath <bkonrath@redhat.com> 3.0.1-1
- updated to Eclipse 3.0.1
- updated jnigen patch
- removed some debugging print statements
- updated Red Hat documentaion sources
- added Red Hat documentation pdf
- remove commented ftp-webdav stuff as it will be in it's own spec file