Accepting request 926145 from Java:packages

upgrade to newer version

OBS-URL: https://build.opensuse.org/request/show/926145
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ecj?expand=0&rev=27
This commit is contained in:
Dominique Leuenberger 2021-10-19 21:03:52 +00:00 committed by Git OBS Bridge
commit 3067421a30
12 changed files with 66 additions and 223 deletions

View File

@ -1,10 +1,5 @@
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
@ -23,8 +18,10 @@ Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org
-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-Version: 3.24.0.v20201123-0742
Bundle-ClassPath: .
Created-By: Apache Maven
Build-Jdk: 1.8.0_121
Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse.org
Build-Jdk-Spec: 11
Created-By: Maven Archiver 3.5.0
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main

View File

@ -16,7 +16,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.18.0</version>
<version>3.24.0</version>
<description>Eclipse Compiler for Java(TM)</description>
<name>Eclipse Compiler for Java(TM)</name>
<url>http://www.eclipse.org/jdt</url>

View File

@ -1,10 +0,0 @@
--- 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 +1,19 @@
-------------------------------------------------------------------
Mon Oct 18 21:28:05 UTC 2021 - Marcel Witte <wittemar@googlemail.com>
- Upgrade to eclipse 4.18 ecj
- Switch java14api to java15api to be compatible to JDK 15
-------------------------------------------------------------------
Mon Oct 18 12:05:38 UTC 2021 - Marcel Witte <wittemar@googlemail.com>
- Upgrade to eclipse 4.17 ecj
- Removed patches:
* ecj-encoding.patch
* jdk10u-jdk8compat.patch
- Switch to JDK 11 for build a JDK 8 is not supported anymore by ecj
- Switch java10api to java14api to be compatible to JDK 14
-------------------------------------------------------------------
Wed Sep 25 12:22:02 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package ecj
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,37 +16,34 @@
#
%global qualifier R-4.12-201906051800
%global jdk10_revision 45b1d041a4ef
%global qualifier R-4.18-202012021800
%global jdk15_revision 1055f2102e6e
Name: ecj
Version: 4.12
Version: 4.18
Release: 0
Summary: Eclipse Compiler for Java
License: EPL-2.0 AND GPL-2.0 WITH Classpath-exception-2.0
License: EPL-2.0 AND GPL-2.0-only 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
# Jdk15 sources to build Java API stubs for newer JDKs
# wget http://hg.openjdk.java.net/jdk-updates/jdk15u/archive/1055f2102e6e.tar.bz2 -O jdk15u.tar.bz2
# tar xf jdk15u.tar.bz2 && rm jdk15u.tar.bz2
# mv jdk15u-1055f2102e6e/src/java.compiler/share/classes java15api-src && mkdir -p java15api-src/jdk/internal/ && mv jdk15u-1055f2102e6e/src/java.base/share/classes/jdk/internal/PreviewFeature.java java15api-src/jdk/internal/
# rm -rf jdk15u-1055f2102e6e
# tar cJf java15api-src.tar.xz java15api-src && rm -rf java15api-src
Source1: java15api-src.tar.xz
Source2: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.24.0/ecj-3.24.0.pom
# Simple pom file to declare org.eclipse:java15api artifact
Source3: java15api.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
# Include java API stubs in build with java < 9
# Include java API stubs in build with java < 15
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: java-devel >= 1.8
BuildRequires: java-devel >= 10
BuildRequires: javapackages-local
BuildRequires: unzip
BuildArch: noarch
@ -58,12 +55,9 @@ the JDT Core batch compiler.
%prep
%setup -q -c -a 1
%patch0 -p1
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
%patch1
%else
%patch2 -p1
%endif
%patch3
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
@ -73,23 +67,21 @@ cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
# JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
# 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
# Cannot sign jar file with eclipse key
rm META-INF/ECLIPSE_*
%build
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 .
javac --patch-module java.compiler=java15api-src -XDignore.symbol.file=true -d build/classes --release 10 \
$(find java15api-src/javax -name \*.java | xargs)
jar -cf java15api.jar -C build/classes .
# Remove everything except the jar, since ant looks for java files in "."
rm -rf java10api-src build/classes
rm -rf java15api-src build/classes
ant \
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 9}%{!?pkg_vcmp:1}
-Djavaapi=java10api.jar -Drtjar=%{_jvmdir}/jre/lib/rt.jar \
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
-Djavaapi=java15api.jar \
%endif
build
@ -97,14 +89,13 @@ ant \
# 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
install -pm 0644 java15api.jar %{buildroot}%{_javadir}/%{name}/java15api.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"
%add_maven_depmap org.eclipse:java15api:15 %{name}/java15api.jar -a "org.eclipse:java9api,org.eclipse:java10api"
# Install the ecj wrapper script
%jpackage_script org.eclipse.jdt.internal.compiler.batch.Main '' '' ecj ecj true

View File

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

3
ecjsrc-4.18.jar Normal file
View File

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

View File

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

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

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

View File

@ -2,6 +2,6 @@
<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>
<artifactId>java15api</artifactId>
<version>15</version>
</project>

View File

@ -1,26 +1,24 @@
--- 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 @@
--- build.xml.orig 2020-09-02 22:05:12.000000000 +0200
+++ build.xml 2021-03-16 14:41:19.331235267 +0100
@@ -18,16 +18,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"
<javac srcdir="${basedir}" destdir="${output}"
+ encoding="utf-8"
debuglevel="lines,source"
source="1.8"
target="1.8">
- <compilerarg line="-Xlint:none"/>
+ <compilerarg line="-Xlint:none -encoding cp1252"/>
+ <compilerarg line="-Xlint:none" value="-Xbootclasspath/p:${toString:build.path}"/>
</javac>
<delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/>

View File

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