Accepting request 1105057 from Java:packages

4.23/3.29.0

OBS-URL: https://build.opensuse.org/request/show/1105057
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ecj?expand=0&rev=32
This commit is contained in:
Ana Guerrero 2023-08-22 06:56:21 +00:00 committed by Git OBS Bridge
commit e6af5d9dcb
10 changed files with 3006 additions and 123 deletions

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.24.0</version>
<version>3.29.0</version>
<description>Eclipse Compiler for Java(TM)</description>
<name>Eclipse Compiler for Java(TM)</name>
<url>http://www.eclipse.org/jdt</url>
@ -36,7 +36,7 @@
<url>https://bugs.eclipse.org/</url>
</issueManagement>
<scm>
<connection>scm:git:git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git</connection>
<connection>scm:git:https://git.eclipse.org/r/jdt/eclipse.jdt.core.git</connection>
<url>https://git.eclipse.org/c/jdt/eclipse.jdt.core.git</url>
</scm>
<developers>

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Aug 21 11:46:03 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to eclipse 4.23 ecj
* No changelog was made available.
- Use the bundled javax17api.jar stubs, but don't distribute
them
- Removed patches:
* encoding.patch
+ handled by a simple sed run
* javaAPI.patch
+ not needed with this version
-------------------------------------------------------------------
Sun Mar 20 13:35:05 UTC 2022 - Fridrich Strba <fstrba@suse.com>
@ -14,6 +27,7 @@ Sun Mar 20 13:35:05 UTC 2022 - Fridrich Strba <fstrba@suse.com>
Mon Oct 18 21:28:05 UTC 2021 - Marcel Witte <wittemar@googlemail.com>
- Upgrade to eclipse 4.18 ecj
* No changelog was made available.
- Switch java14api to java15api to be compatible to JDK 15
-------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
#
# spec file for package ecj
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,36 +16,25 @@
#
%global qualifier R-4.18-202012021800
%global jdk15_revision 1055f2102e6e
%global eclipse_ver 4.23
%global bundle_ver 3.29.0
%global jar_ver %{eclipse_ver}
%global drop R-%{jar_ver}-202203080310
Name: ecj
Version: 4.18
Version: %{eclipse_ver}
Release: 0
Summary: Eclipse Compiler for Java
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
# 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
Patch1: encoding.patch
# Include java API stubs in build with java < 15
Patch2: javaAPI.patch
Source0: https://download.eclipse.org/eclipse/downloads/drops4/%{drop}/ecjsrc-%{jar_ver}.jar
Source1: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/%{bundle_ver}/ecj-%{bundle_ver}.pom
# Extracted from https://download.eclipse.org/eclipse/downloads/drops4/%%{drop}/ecj-%%{jar_ver}.jar
Source2: MANIFEST.MF
Patch0: ecj-rpmdebuginfo.patch
BuildRequires: ant
BuildRequires: java-devel >= 10
BuildRequires: javapackages-local
BuildRequires: java-devel >= 11
BuildRequires: javapackages-local >= 6
BuildRequires: unzip
BuildArch: noarch
@ -54,50 +43,27 @@ ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
the JDT Core batch compiler.
%prep
%setup -q -c -a 1
%setup -q -c
%patch0 -p1
%patch1 -p1
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
%patch2
%endif
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
# Specify encoding
sed -i -e '/compilerarg/s/Xlint:none/Xlint:none -encoding cp1252/' build.xml
mkdir -p scripts/binary/META-INF/
cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
# JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
# Cannot sign jar file with eclipse key
rm META-INF/ECLIPSE_*
cp %{SOURCE2} scripts/binary/META-INF/MANIFEST.MF
%build
mkdir -p 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 java15api-src build/classes
%ant \
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
-Djavaapi=java15api.jar \
%endif
build
%{ant}
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 ecj.jar %{buildroot}%{_javadir}/%{name}/ecj.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
%{mvn_install_pom} %{SOURCE1} %{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"
%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:ed2419d5d449062cfd3e3ed48a471d292cb8993c8157a99ebc57b6cbcd3cc683
size 2248232

BIN
ecjsrc-4.23.jar (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,10 +0,0 @@
--- ecj-4.18.orig/build.xml 2022-03-20 14:23:39.947886348 +0100
+++ ecj-4.18/build.xml 2022-03-20 14:26:28.600913037 +0100
@@ -24,6 +24,7 @@
<mkdir dir="${output}" />
<javac srcdir="${basedir}" destdir="${output}"
+ encoding="utf-8"
debuglevel="lines,source"
source="1.8"
target="1.8">

View File

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

View File

@ -1,7 +0,0 @@
<?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>java15api</artifactId>
<version>15</version>
</project>

View File

@ -1,21 +0,0 @@
--- build.xml.orig 2020-09-02 22:05:12.000000000 +0200
+++ build.xml 2021-03-16 14:41:19.331235267 +0100
@@ -18,6 +18,9 @@
<property name="output" value="bin" />
<property name="jar_file" value="ecj.jar" />
+ <path id="build.path">
+ <pathelement path="${javaapi}"/>
+ </path>
<target name="build">
<delete file="${basedir}/${jar_file}" failonerror="no" />
<delete dir="${output}" failonerror="no" />
@@ -28,7 +31,7 @@
debuglevel="lines,source"
source="1.8"
target="1.8">
- <compilerarg line="-Xlint:none"/>
+ <compilerarg line="-Xlint:none" value="-Xbootclasspath/p:${toString:build.path}"/>
</javac>
<delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/>