Update to 4.4 final.

- Drop gcj patches as gcj is not in Fedora anymore and ecj now requires
1.6.
This commit is contained in:
Alexander Kurtakov 2014-07-03 10:13:41 +03:00
parent f418efa06f
commit 1bbffc7485
8 changed files with 43 additions and 125 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ ecj-gcj.tar.bz2
ecjsrc-4.2.1.jar ecjsrc-4.2.1.jar
/ecj.1 /ecj.1
/ecjsrc-I20140430-2000.jar /ecjsrc-I20140430-2000.jar
/ecjsrc-4.4.jar

View File

@ -1,13 +0,0 @@
<?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>

26
ecj-4.4.pom Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!--
Originally downloaded here:
http://download.eclipse.org/eclipse/downloads/drops4/R-4.4-201406061215/#JDTCORE
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.4</version>
<packaging>jar</packaging>
<name>Eclipse ECJ</name>
<description>Eclipse JDT Core Batch Compiler</description>
<url>http://www.eclipse.org/jdt/</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<licenses>
<license>
<name>Eclipse Public License v1.0</name>
<url>http://www.eclipse.org/org/documents/epl-v10.php</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>

View File

@ -1,21 +0,0 @@
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/*">

View File

@ -1,39 +1,29 @@
Epoch: 1 Epoch: 1
%global qualifier I20140430-2000 %global qualifier R-4.4-201406061215
Summary: Eclipse Compiler for Java Summary: Eclipse Compiler for Java
Name: ecj Name: ecj
Version: 4.4.0 Version: 4.4.0
Release: 0.4.git20140430%{?dist} Release: 1%{?dist}
URL: http://www.eclipse.org URL: http://www.eclipse.org
License: EPL License: EPL
Group: Development/Languages Group: Development/Languages
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/%{name}src-%{qualifier}.jar Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/%{name}src-4.4.jar
Source1: ecj.sh.in Source1: ecj.sh.in
# Use ECJ for GCJ #Patched from http://central.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom
# 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 # 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 Source3: ecj-4.4.pom
Source4: ecj.1 Source4: ecj.1
Source5: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF Source5: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
# Always generate debug info when building RPMs (Andrew Haley) # Always generate debug info when building RPMs (Andrew Haley)
Patch0: %{name}-rpmdebuginfo.patch Patch0: %{name}-rpmdebuginfo.patch
Patch1: %{name}-generatedebuginfo.patch
# Patches Source2 for compatibility with newer ecj
Patch2: eclipse-gcj-compat4.2.1.patch
# build.xml fails to include a necessary .props file in the built ecj.jar # build.xml fails to include a necessary .props file in the built ecj.jar
Patch3: %{name}-include-props.patch Patch1: %{name}-include-props.patch
Patch4: eclipse-gcj-nodummysymbol.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: gzip BuildRequires: gzip
BuildRequires: ant BuildRequires: ant
BuildRequires: java-devel >= 1:1.7.0 BuildRequires: java-devel >= 1:1.7.0
@ -49,30 +39,19 @@ the JDT Core batch compiler.
%prep %prep
%setup -q -c %setup -q -c
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -b .sav
%patch3 -b .sav
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
sed -i -e "s/Xlint:none/Xlint:none -encoding cp1252/g" build.xml
cp %{SOURCE3} pom.xml cp %{SOURCE3} pom.xml
mkdir -p scripts/binary/META-INF/ mkdir -p scripts/binary/META-INF/
cp %{SOURCE5} scripts/binary/META-INF/MANIFEST.MF cp %{SOURCE5} scripts/binary/META-INF/MANIFEST.MF
# 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/
%patch2 -p1
%patch4 -p1
cat eclipse-gcj/gcc.properties >> \
org/eclipse/jdt/internal/compiler/batch/messages.properties
rm -rf eclipse-gcj
# JDTCompilerAdapter isn't used by the batch compiler # JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
cp %{SOURCE4} ecj.1 cp %{SOURCE4} ecj.1
sed -i -e "s/1.3/1.6/g" build.xml
sed -i -e "s/1.2/1.6/g" build.xml
sed -i -e "s/Xlint:none/Xlint:none -encoding cp1252/g" build.xml
%build %build
ant ant
gzip ecj.1 gzip ecj.1
@ -98,7 +77,7 @@ install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
install -pm 644 pom.xml \ install -pm 644 pom.xml \
$RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.jdt.core.compiler:ecj,org.eclipse.jdt:org.eclipse.jdt.core" JPP-%{name}.pom %{name}.jar %add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.jdt:core,org.eclipse.jdt:org.eclipse.jdt.core" JPP-%{name}.pom %{name}.jar
%files -f .mfiles %files -f .mfiles
%doc about.html %doc about.html
@ -110,6 +89,10 @@ install -pm 644 pom.xml \
%{_mandir}/man1/ecj.1.gz %{_mandir}/man1/ecj.1.gz
%changelog %changelog
* Thu Jul 3 2014 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.0-1
- Update to 4.4 final.
- Drop gcj patches as gcj is not in Fedora anymore and ecj now requires 1.6.
* Thu Jun 12 2014 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.0-0.4.git20140430 * Thu Jun 12 2014 Alexander Kurtakov <akurtako@redhat.com> 1:4.4.0-0.4.git20140430
- Add additional depmap for maven. - Add additional depmap for maven.

View File

@ -1,20 +0,0 @@
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

@ -1,37 +0,0 @@
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,3 +1,2 @@
0af236868ba699f2e55c654b8aca1258 ecj-gcj.tar.bz2
96d507a301eeb8454299a325a9aca31d ecj.1 96d507a301eeb8454299a325a9aca31d ecj.1
d0ec30d76e94e0c81b85955ec4c0e853 ecjsrc-I20140430-2000.jar a5f9cc5078dd8f04feb53b6bac0b4e37 ecjsrc-4.4.jar