Accepting request 733204 from Java:packages

Upgrade to 4.12

OBS-URL: https://build.opensuse.org/request/show/733204
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ecj?expand=0&rev=26
This commit is contained in:
Dominique Leuenberger 2019-09-27 12:45:14 +00:00 committed by Git OBS Bridge
commit af42d1ab61
18 changed files with 367 additions and 429 deletions

View File

@ -1,28 +1,30 @@
Manifest-Version: 1.0
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Bundle-ManifestVersion: 2
Bundle-Name: Eclipse Compiler for Java(TM)
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
Bundle-Version: 3.10.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: Eclipse.org
Export-Package: org.eclipse.jdt.core,
org.eclipse.jdt.core.compiler,
org.eclipse.jdt.internal.antadapter;x-internal:=true,
org.eclipse.jdt.internal.compiler;x-internal:=true,
org.eclipse.jdt.internal.compiler.apt.dispatch;x-internal:=true,
org.eclipse.jdt.internal.compiler.apt.model;x-internal:=true,
org.eclipse.jdt.internal.compiler.apt.util;x-internal:=true,
org.eclipse.jdt.internal.compiler.ast;x-internal:=true,
org.eclipse.jdt.internal.compiler.batch;x-internal:=true,
org.eclipse.jdt.internal.compiler.classfmt;x-internal:=true,
org.eclipse.jdt.internal.compiler.codegen;x-internal:=true,
org.eclipse.jdt.internal.compiler.env;x-internal:=true,
org.eclipse.jdt.internal.compiler.flow;x-internal:=true,
org.eclipse.jdt.internal.compiler.impl;x-internal:=true,
org.eclipse.jdt.internal.compiler.lookup;x-internal:=true,
org.eclipse.jdt.internal.compiler.parser;x-internal:=true,
org.eclipse.jdt.internal.compiler.parser.diagnose;x-internal:=true,
org.eclipse.jdt.internal.compiler.problem;x-internal:=true,
org.eclipse.jdt.internal.compiler.util;x-internal:=true,
org.eclipse.jdt.internal.compiler.tool;x-internal:=true
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
Archiver-Version: Plexus Archiver
Built-By: genie.releng
Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse.org
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org
.eclipse.jdt.internal.antadapter;x-internal:=true,org.eclipse.jdt.int
ernal.compiler;x-internal:=true,org.eclipse.jdt.internal.compiler.apt
.dispatch;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.mode
l;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.util;x-inter
nal:=true,org.eclipse.jdt.internal.compiler.ast;x-internal:=true,org.
eclipse.jdt.internal.compiler.batch;x-internal:=true,org.eclipse.jdt.
internal.compiler.classfmt;x-internal:=true,org.eclipse.jdt.internal.
compiler.codegen;x-internal:=true,org.eclipse.jdt.internal.compiler.e
nv;x-internal:=true,org.eclipse.jdt.internal.compiler.flow;x-internal
:=true,org.eclipse.jdt.internal.compiler.impl;x-internal:=true,org.ec
lipse.jdt.internal.compiler.lookup;x-internal:=true,org.eclipse.jdt.i
nternal.compiler.parser;x-internal:=true,org.eclipse.jdt.internal.com
piler.parser.diagnose;x-internal:=true,org.eclipse.jdt.internal.compi
ler.problem;x-internal:=true,org.eclipse.jdt.internal.compiler.util;x
-internal:=true,org.eclipse.jdt.internal.compiler.tool;x-internal:=tr
ue
Bundle-Name: Eclipse Compiler for Java(TM)
Bundle-Version: 3.13.0.v20170516-1929
Bundle-ClassPath: .
Created-By: Apache Maven
Build-Jdk: 1.8.0_121

47
ecj-3.18.0.pom Normal file
View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016, 2018 GK Software SE and others.
This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Contributors:
Stephan Herrmann - initial implementation
-->
<project 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" xsi:noNamespaceSchemaLocation="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.18.0</version>
<description>Eclipse Compiler for Java(TM)</description>
<name>Eclipse Compiler for Java(TM)</name>
<url>http://www.eclipse.org/jdt</url>
<licenses>
<license>
<name>Eclipse Public License - v 2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>Eclipse Foundation</name>
<url>http://www.eclipse.org/</url>
</organization>
<issueManagement>
<system>Bugzilla</system>
<url>https://bugs.eclipse.org/</url>
</issueManagement>
<scm>
<connection>scm:git:git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git</connection>
<url>https://git.eclipse.org/c/jdt/eclipse.jdt.core.git</url>
</scm>
<developers>
<developer>
<url>https://projects.eclipse.org/projects/eclipse.jdt/who</url>
</developer>
</developers>
</project>

View File

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

10
ecj-encoding.patch Normal file
View File

@ -0,0 +1,10 @@
--- ecj-4.12/build.xml 2019-09-25 08:54:14.517407464 +0200
+++ ecj-4.12/build.xml 2019-09-25 08:55:02.281660671 +0200
@@ -25,6 +25,7 @@
<javac srcdir="${basedir}" destdir="${output}"
debuglevel="lines,source"
+ encoding="utf-8"
source="1.8"
target="1.8">
<compilerarg line="-Xlint:none"/>

View File

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

View File

@ -1,10 +0,0 @@
--- build.xml 2014-05-01 09:36:51.417339328 +0300
+++ build.xml 2014-05-01 09:38:36.330493400 +0300
@@ -49,6 +49,7 @@
<include name="**/readableNames.props"/>
<include name="META-INF/**"/>
<include name="**/*.properties"/>
+ <include name="**/*.props"/>
<exclude name="META-INF/eclipse.inf"/>
</fileset>
</zip>

216
ecj.1
View File

@ -1,216 +0,0 @@
.TH ECJ "1" "May 2013"
.SH NAME
ecj \- manual page for eclipse JDT Compiler
.SH SYNOPSIS
.B ecj <options> <source files>\fR
.SH DESCRIPTION
The JDT Compiler (jdtc) is a command version of Java compiler for eclipse. ecj
has basic java compiler options like SUN's javac.
.SH OPTIONS
.TP 20
\fB\-help\fR
display a help message
.TP
\fB\-version\fR
compiler version number
.SS Classpath options:
.br
.TP 20
\fB\-cp \-classpath\fR <directories and ZIP archives separated by :>
specify location for application classes and sources. Each directory or file can specify access rules for types between '[' and ']' (e.g. [-X] to forbid access to type X, [~X] to discourage access to type X, [+p/X:-p/*] to forbid access to all types in package p but allow access to p/X)
.TP
\fB\-bootclasspath\fR <directories and ZIP archives separated by :>
specify location for system classes. Each directory or file can specify access rules for types between '[' and ']'
.TP
\fB\-sourcepath\fR <directories and ZIP archives separated by :>
specify location for application sources. Each directory or file can specify access rules for types between '[' and ']'. Each directory can further specify a specific destination directory using a '-d' option between '[' and ']'; this overrides the general '-d' option.
.br
\[char46]class files created from source files contained in a jar file are put in the user.dir folder in case no general '-d' option is specified. ZIP archives cannot override the general '-d' option
.TP
\fB\-extdirs\fR <directories separated by :>
specify location for extension ZIP archives
.TP
\fB\-endoreseddirs\fR <directories separated by :>
specify location for endorsed ZIP archives
.TP
\fB\-d\fR <dir>
destination directory (if omitted no package directory structure is created); this option can be overridden per source directory
.TP
\fB\-d\fR none
generate no .class files
.TP
\fB\-encoding <enc>\fR
specify default encoding for all source files. Each file/directory can override it when suffixed with '['<enc>']' (e.g. X.java[utf8]).
.br
If multiple default encodings are specified, the last one will be used.
.SS Compliance options:
.TP 20
\fB\-1.3\fR
use 1.3 compliance (-source 1.3 -target 1.1)
.TP
\fB\-1.4\fR
use 1.4 compliance (-source 1.3 -target 1.2) (default)
.TP
\fB\-1.5 \-5 \-5.0\fR
use 1.5 compliance (-source 1.5 -target 1.5)
.TP
\fB\-1.6 \-6 \-6.0\fR
use 1.6 compliance (-source 1.6 -target 1.6)
.TP
\fB\-1.7 \-7 \-7.0\fR
use 1.7 compliance (-source 1.7 -target 1.7)
.TP
\fB\-source\fR <version>
set source level: 1.3 to 1.7 (or 5, 5.0, etc)
.TP
\fB\-target\fR <version>
set classfile target: 1.1 to 1.7 (or 5, 5.0, etc)
.br
cldc1.1 can also be used to generate the StackMap attribute
.SS Warning options:
.TP 20
\fB\-deprecation
deprecation outside deprecated code (equivalent to '-warn:+deprecation', default)
.TP
\fB\-nowarn -warn:none\fR
disable all warnings
.TP
\fB-nowarn:[<directories separated by :>]\fR
specify directories from which optional problems should be ignored
.TP
\fB\-?:warn -help:warn\fR
display advanced warning options
.SS Error options:
.TP
\fB\-err:<warnings separated by ,>
convert exactly the listed warnings to be reported as errors
.TP
\fB\-err:+<warnings separated by ,>
enable additional warnings to be reported as errors
.TP
\fB\-err:-<warnings separated by ,>
disable specific warnings to be reported as errors
.SS Setting warning or error options using properties file:
.TP 20
\fB\-properties <file>
set warnings/errors option based on the properties file contents. This option can be used with -nowarn, -err:.. or -warn:.. options, but the last one on the command line sets the options to be used.
.SS Debug options:
.TP 20
\fB\-g[:lines,vars,source]\fR
custom debug info
.TP
\fB\-g:lines,source\fR
both lines table and source debug info (default)
.TP
\fB\-g\fR
all debug info
.TP
\fB\-g:none\fR
no debug info
.TP
\fB\-preserveAllLocals\fR
preserve unused local vars for debug purpose
.SS Annotation processing options:
.PP
These options are meaningful only in a 1.6 environment.
.TP 20
\fB\-Akey[=value]\fN
options that are passed to annotation processors
.TP
\fB\-processorpath\fR <directories and ZIP archives separated by :>
specify locations where to find annotation processors. If this option is not used, the classpath will be searched for processors
.TP
\fB\-processor\fR <class1[,class2,...]>
qualified names of the annotation processors to run. This bypasses the default annotation discovery process
.TP
\fB\-proc:only
run annotation processors, but do not compile
.TP
\fB\-proc:none
perform compilation but do not run annotation processors
.TP
\fB\-s <dir>\fR
destination directory for generated source files
.TP
\fB\-XprintProcessorInfo\fR
print information about which annotations and elements a processor is asked to process
.TP
\fB\-XprintRounds\fR
print information about annotation processing rounds
.TP
\fB\-classNames <className1[,className2,...]>\fR
qualified names of binary classes to process
.SS Advanced options:
.TP 20
\fB\@<file>\fR
read command line arguments from file
.TP
\fB\-maxProblems <n>\fR
max number of problems per compilation unit (100 by default)
.TP
\fB\-log <file>\fR
log to a file. If the file extension is '.xml', then the log will be a xml file.
.TP
\fB\-proceedOnError[:Fatal]\fR
do not stop at first error, dumping class files with problem methods
.br
With ":Fatal", all optional errors are treated as fatal
.TP
\fB\-verbose\fR
enable verbose output
.TP
\fB\-referenceInfo\fR
compute reference info
.TP
\fB\-progress\fR
show progress (only in -log mode)
.TP
\fB\-time\fR
display speed information
.TP
\fB\-noExit\fR
do not call System.exit(n) at end of compilation (n==0 if no error)
.TP
\fB\-repeat <n>\fR
repeat compilation process <n> times for perf analysis
.TP
\fB\-inlineJSR\fR
inline JSR bytecode (implicit if target >= 1.5)
.TP
\fB\-enableJavadoc\fR
consider references in javadoc
.TP
\fB\-Xemacs\fR
used to enable emacs-style output in the console.
.br
It does not affect the xml log output
.TP
\fB\-missingNullDefault\fR
report missing default nullness annotation
.TP
\fB\-? \-help\fR
print help message
.TP
\fB\-v \-version\fR
print compiler version
.TP
\fB\-showversion\fR
print compiler version and continue
.SS Ignored options:
.TP 20
\fB\-J<option>\fR
pass option to virtual machine (ignored)
.TP
\fB\-X<option>\fR
specify non-standard option (ignored except for listed -X options)
.TP
\fB\-X\fR
print non-standard options and exit (ignored)
.TP
\fB\-O\fR
optimize for execution time (ignored)
.PP
.SH AUTHOR
This manual page was written by Takshi Okamoto and Jan Schulz
<debian@katzien.de>, and updated by Jon VanAlten <jon.vanalten@redhat.com>.

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Wed Sep 25 12:22:02 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Upgrade to eclipse 4.12 ecj
- Removed patches:
* ecj-include-props.patch,
* eclipse-gcj-compat4.2.1.patch
* eclipse-gcj-nodummysymbol.patch
+ Unneeded for this version
- Added patches:
* ecj-encoding.patch
+ Fix build with java >= 9
* javaAPI.patch
+ When building with java < 9, add the java10api.jar and the
JRE's rt.jar to bootclasspath
* jdk10u-jdk8compat.patch
+ Patch out deprecation annotation not understood by the JDK
when building with java < 9
- Build the java.compiler module's javax.* packages as non-modular
java10api.jar, so that ecj can be compiled even with java < 9
- Distribute the java10api artifact for packages that might need
it
-------------------------------------------------------------------
Thu Nov 22 21:49:42 UTC 2018 - Fridrich Strba <fstrba@suse.com>

View File

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

151
ecj.spec
View File

@ -1,7 +1,7 @@
#
# spec file for package ecj
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX 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,43 +16,39 @@
#
%global qualifier R-4.4-201406061215
%global qualifier R-4.12-201906051800
%global jdk10_revision 45b1d041a4ef
Name: ecj
Version: 4.4.0
Version: 4.12
Release: 0
Summary: Eclipse Compiler for Java
License: EPL-1.0
Group: Development/Languages/Java
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
Source4: ecj.1
# http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
Source5: META-INF/MANIFEST.MF
# Always generate debug info when building RPMs (Andrew Haley)
License: EPL-2.0 AND GPL-2.0 WITH Classpath-exception-2.0
Group: Development/Libraries/Java
URL: https://www.eclipse.org
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/ecjsrc-%{version}.jar
# Jdk10 sources to build Java API stubs for newer JDKs
# wget http://hg.openjdk.java.net/jdk-updates/jdk10u/archive/45b1d041a4ef.tar.bz2 -O jdk10u.tar.bz2
# tar xf jdk10u.tar.bz2 && rm jdk10u.tar.bz2
# mv jdk10u-45b1d041a4ef/src/java.compiler/share/classes java10api-src && rm -rf jdk10u-45b1d041a4ef
# tar cJf java10api-src.tar.xz java10api-src && rm -rf java10api-src
Source1: java10api-src.tar.xz
Source2: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.18.0/ecj-3.18.0.pom
# Simple pom file to declare org.eclipse:java10api artifact
Source3: java10api.pom
# Extracted from https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/%%{qualifier}/ecj-%%{version}.jar
Source4: MANIFEST.MF
# Always generate debug info when building RPMs
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
# Include java API stubs in build with java < 9
Patch1: javaAPI.patch
# Fix build with java >= 9
Patch2: ecj-encoding.patch
# Patch out deprecation annotation not understood by java 8
Patch3: jdk10u-jdk8compat.patch
BuildRequires: ant
BuildRequires: gzip
BuildRequires: java-devel >= 1.6.0
BuildRequires: java-devel >= 1.8
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: unzip
Conflicts: ecj-bootstrap
Provides: eclipse-ecj = %{version}-%{release}
Obsoletes: eclipse-ecj < 3.4.2-4
BuildArch: noarch
%description
@ -60,75 +56,66 @@ ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
the JDT Core batch compiler.
%prep
%setup -q -c
%setup -q -c -a 1
%patch0 -p1
%patch1 -b .sav
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
%patch1
%else
%patch2 -p1
%endif
%patch3
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
%if 0%{?suse_version} < 1200
sed -i -e 's|source=\"1.6\"|source=\"1.5\"|g' build.xml
sed -i -e 's|target=\"1.6\"|target=\"1.5\"|g' build.xml
%endif
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
cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
# JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
cp %{SOURCE4} ecj.1
# Not compatible with non-modular Java
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
rm -f java10api-src/javax/tools/ToolProvider.java
%endif
%build
ant
gzip ecj.1
mkdir -p build/classes
javac -d build/classes -source 8 -target 8 \
$(find java10api-src/javax -name \*.java | xargs)
jar -cf java10api.jar -C build/classes .
# Remove everything except the jar, since ant looks for java files in "."
rm -rf java10api-src build/classes
ant \
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
-Djavaapi=java10api.jar -Drtjar=%{_jvmdir}/jre/lib/rt.jar \
%endif
build
%install
mkdir -p %{buildroot}%{_javadir}
install -m0644 ecj.jar %{buildroot}%{_javadir}/%{name}.jar
pushd %{buildroot}%{_javadir}
ln -s %{name}.jar eclipse-%{name}.jar
ln -s %{name}.jar jdtcore.jar
popd
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 ecj.jar %{buildroot}%{_javadir}/%{name}/ecj.jar
install -pm 0644 java10api.jar %{buildroot}%{_javadir}/%{name}/java10api.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
install -pm 0644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}/ecj.pom
%add_maven_depmap %{name}/ecj.pom %{name}/ecj.jar -a "org.eclipse.jdt:core,org.eclipse.jdt.core.compiler:ecj,org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.tycho:org.eclipse.jdt.compiler.apt"
install -pm 0644 %{SOURCE3} %{buildroot}%{_mavenpomdir}/%{name}/java10api.pom
%add_maven_depmap %{name}/java10api.pom %{name}/java10api.jar -a "org.eclipse:java9api"
# Install the ecj wrapper script
install -p -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/ecj
sed --in-place "s:@JAVADIR@:%{_javadir}:" %{buildroot}%{_bindir}/ecj
%jpackage_script org.eclipse.jdt.internal.compiler.batch.Main '' '' ecj ecj true
# Install manpage
mkdir -p %{buildroot}%{_mandir}/man1
install -m 644 -p ecj.1.gz %{buildroot}%{_mandir}/man1/ecj.1.gz
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.tycho:org.eclipse.jdt.compiler.apt,org.eclipse.jdt:core,org.eclipse.jdt:org.eclipse.jdt.core,org.eclipse.jdt.core.compiler:ecj,org.eclipse.jdt:ecj" JPP-%{name}.pom %{name}.jar
install -m 644 -p ecj.1 %{buildroot}%{_mandir}/man1/ecj.1
%files -f .mfiles
%doc about.html
%{_mavenpomdir}/JPP-%{name}.pom
%{_bindir}/%{name}
%{_javadir}/%{name}.jar
%{_javadir}/eclipse-%{name}.jar
%{_javadir}/jdtcore.jar
%{_mandir}/man1/ecj.1%{ext_man}
%license about.html
%{_bindir}/ecj
%{_mandir}/man1/ecj*
%changelog

3
ecjsrc-4.12.jar Normal file
View File

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

View File

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

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

3
java10api-src.tar.xz Normal file
View File

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

7
java10api.pom Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project 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" xsi:noNamespaceSchemaLocation="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse</groupId>
<artifactId>java10api</artifactId>
<version>10</version>
</project>

26
javaAPI.patch Normal file
View File

@ -0,0 +1,26 @@
--- build.xml.orig 2018-03-20 15:15:57.063810672 +0000
+++ build.xml 2018-03-20 15:16:26.018700633 +0000
@@ -15,16 +15,20 @@
<property name="output" value="bin" />
<property name="jar_file" value="ecj.jar" />
+ <path id="build.path">
+ <pathelement path="${javaapi}"/>
+ <pathelement path="${rtjar}"/>
+ </path>
<target name="build">
<delete file="${basedir}/${jar_file}" failonerror="no" />
<delete dir="${output}" failonerror="no" />
<mkdir dir="${output}" />
- <javac srcdir="${basedir}" destdir="${output}"
- debuglevel="lines,source"
+ <javac srcdir="${basedir}" destdir="${output}" bootclasspathref="build.path"
+ debug="yes"
source="1.8"
target="1.8">
- <compilerarg line="-Xlint:none"/>
+ <compilerarg line="-Xlint:none -encoding cp1252"/>
</javac>
<delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/>

149
jdk10u-jdk8compat.patch Normal file
View File

@ -0,0 +1,149 @@
--- java10api-src/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/AbstractAnnotationValueVisitor6.java 2019-09-25 10:43:47.764821845 +0200
@@ -75,7 +75,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected AbstractAnnotationValueVisitor6() {}
/**
--- java10api-src/javax/lang/model/util/AbstractElementVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/AbstractElementVisitor6.java 2019-09-25 10:44:11.829001049 +0200
@@ -75,7 +75,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected AbstractElementVisitor6(){}
/**
--- java10api-src/javax/lang/model/util/AbstractTypeVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/AbstractTypeVisitor6.java 2019-09-25 10:43:54.596872718 +0200
@@ -74,7 +74,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected AbstractTypeVisitor6() {}
/**
--- java10api-src/javax/lang/model/util/ElementKindVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/ElementKindVisitor6.java 2019-09-25 10:45:46.301704594 +0200
@@ -91,7 +91,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected ElementKindVisitor6() {
super(null);
}
@@ -104,7 +103,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected ElementKindVisitor6(R defaultValue) {
super(defaultValue);
}
--- java10api-src/javax/lang/model/util/ElementScanner6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/ElementScanner6.java 2019-09-25 10:45:07.805417912 +0200
@@ -106,7 +106,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected ElementScanner6(){
DEFAULT_VALUE = null;
}
@@ -119,7 +118,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected ElementScanner6(R defaultValue){
DEFAULT_VALUE = defaultValue;
}
--- java10api-src/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/SimpleAnnotationValueVisitor6.java 2019-09-25 10:44:58.053345287 +0200
@@ -92,7 +92,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected SimpleAnnotationValueVisitor6() {
super();
DEFAULT_VALUE = null;
@@ -106,7 +105,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected SimpleAnnotationValueVisitor6(R defaultValue) {
super();
DEFAULT_VALUE = defaultValue;
--- java10api-src/javax/lang/model/util/SimpleElementVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/SimpleElementVisitor6.java 2019-09-25 10:45:31.181591992 +0200
@@ -94,7 +94,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected SimpleElementVisitor6(){
DEFAULT_VALUE = null;
}
@@ -107,7 +106,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected SimpleElementVisitor6(R defaultValue){
DEFAULT_VALUE = defaultValue;
}
--- java10api-src/javax/lang/model/util/SimpleTypeVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/SimpleTypeVisitor6.java 2019-09-25 10:45:17.877492913 +0200
@@ -94,7 +94,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected SimpleTypeVisitor6(){
DEFAULT_VALUE = null;
}
@@ -107,7 +106,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected SimpleTypeVisitor6(R defaultValue){
DEFAULT_VALUE = defaultValue;
}
--- java10api-src/javax/lang/model/util/TypeKindVisitor6.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/lang/model/util/TypeKindVisitor6.java 2019-09-25 10:44:26.801112546 +0200
@@ -85,7 +85,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected TypeKindVisitor6() {
super(null);
}
@@ -99,7 +98,6 @@
* @deprecated Release 6 is obsolete; update to a visitor for a newer
* release level.
*/
- @Deprecated(since="9")
protected TypeKindVisitor6(R defaultValue) {
super(defaultValue);
}
--- java10api-src/javax/tools/ToolProvider.java 2018-06-24 16:07:06.000000000 +0200
+++ java10api-src/javax/tools/ToolProvider.java 2019-09-25 10:58:25.566820650 +0200
@@ -94,7 +94,6 @@
* locate system tools as well as user-installed tools.
* @return a class loader, or {@code null}
*/
- @Deprecated(since="9")
public static ClassLoader getSystemToolClassLoader() {
return null;
}
Only in java10api-src/javax/tools: ToolProvider.java.bak