SHA256
1
0
forked from pool/ecj

Accepting request 250040 from home:dmacvicar:branches:Java:packages

- restore bootstrap dependencies
- Restored patches and GCJ Main, as they are used
  to bootstrap other packages.
  * eclipse-gcj-compat4.2.1.patch
  * eclipse-gcj-nodummysymbol.patch
- Removed obsolete ecj-native, as old SUSE package did
  not had it and no package provides it

OBS-URL: https://build.opensuse.org/request/show/250040
OBS-URL: https://build.opensuse.org/package/show/Java:packages/ecj?expand=0&rev=21
This commit is contained in:
Duncan Mac-Vicar 2014-09-18 07:44:05 +00:00 committed by Git OBS Bridge
parent 41fb82c76e
commit 86c5f33b9f
5 changed files with 103 additions and 1 deletions

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

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Sep 18 06:01:18 UTC 2014 - dmacvicar@suse.de
- restore bootstrap dependencies
- Restored patches and GCJ Main, as they are used
to bootstrap other packages.
* eclipse-gcj-compat4.2.1.patch
* eclipse-gcj-nodummysymbol.patch
- Removed obsolete ecj-native, as old SUSE package did
not had it and no package provides it
-------------------------------------------------------------------
Wed Sep 17 09:47:20 UTC 2014 - dmacvicar@suse.de

View File

@ -26,6 +26,11 @@ Group: Development/Languages
Url: http://www.eclipse.org
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/%{name}src-4.4.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://central.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom
# No dependencies are needed for ecj, dependencies are for using of jdt.core which makes no sense outside of eclipse
Source3: ecj-4.4.pom
@ -35,13 +40,24 @@ Source5: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.ecli
Patch0: %{name}-rpmdebuginfo.patch
# build.xml fails to include a necessary .props file in the built ecj.jar
Patch1: %{name}-include-props.patch
# Patches Source2 for compatibility with newer ecj
Patch2: eclipse-gcj-compat4.2.1.patch
Patch3: eclipse-gcj-nodummysymbol.patch
BuildRequires: ant
BuildRequires: gzip
BuildRequires: java-devel >= 1.7.0
BuildRequires: unzip
Provides: eclipse-ecj = %{version}-%{release}
Obsoletes: %{name}-native < 4.2.1
Obsoletes: eclipse-ecj < 3.4.2-4
Conflicts: ecj-bootstrap
%if 0%{?suse_version} < 1320
BuildRequires: java-devel >= 1.6.0
%else
#!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel
#!BuildIgnore: java-1_7_0-openjdk java-1_7_0-openjdk-devel
BuildRequires: java-1_7_0-openjdk-bootstrap-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
@ -66,6 +82,21 @@ cp %{SOURCE3} pom.xml
mkdir -p scripts/binary/META-INF/
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
%patch3 -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
cp %{SOURCE4} ecj.1

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