import ecj-4.20-10.el8

This commit is contained in:
CentOS Sources 2023-05-16 06:21:20 +00:00 committed by Stepan Oksanichenko
parent 2fed0081fa
commit a8a708a362
9 changed files with 203 additions and 153 deletions

View File

@ -1,2 +1 @@
8750b8effb40f0fbab79fd529ba82088e7b59931 SOURCES/ecjsrc-4.11RC1.jar
fa5c42a17e84d7d635022d3d346d20f63c09bb15 SOURCES/java10api.jar
93617e44d5b7fd7c301ad128d64367b64db2fa34 SOURCES/ecjsrc-4.20.jar

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/ecjsrc-4.11RC1.jar
SOURCES/java10api.jar
SOURCES/ecjsrc-4.20.jar

View File

@ -1,13 +1,18 @@
### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
retrieving revision 1.327
diff -u -r1.327 Main.java
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000
@@ -2609,6 +2609,29 @@
From e7ff390ef777bd818ccc6e6f8f3a56f36020abfe Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@gmail.com>
Date: Wed, 15 Sep 2021 10:21:53 +0100
Subject: [PATCH 1/2] Always generate bytecode debuginfo
When ecj is used to build RPMs
---
.../jdt/internal/compiler/batch/Main.java | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/org/eclipse/jdt/internal/compiler/batch/Main.java b/org/eclipse/jdt/internal/compiler/batch/Main.java
index f77372d..73a0d24 100644
--- a/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -3109,6 +3109,29 @@ public void configure(String[] argv) {
this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
}
@ -37,3 +42,6 @@ diff -u -r1.327 Main.java
this.logger.logCommandLineArguments(newCommandLineArgs);
this.logger.logOptions(this.options);
--
2.31.1

View File

@ -1,29 +1,27 @@
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
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.17.0.v20190227-1706
Bundle-ClassPath: .
Built-By: genie.releng
Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse.org
Created-By: Apache Maven 3.5.4
Build-Jdk: 1.8.0_192
Created-By: Maven Archiver 3.5.0
Build-Jdk-Spec: 11
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.27.0.v20210823-1758
Bundle-ClassPath: .
Bundle-Vendor: Eclipse.org
Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org.e
clipse.jdt.internal.antadapter;x-internal:=true,org.eclipse.jdt.interna
l.compiler;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.dispa
tch;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.model;x-inte
rnal:=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.compi
ler.classfmt;x-internal:=true,org.eclipse.jdt.internal.compiler.codegen
;x-internal:=true,org.eclipse.jdt.internal.compiler.env;x-internal:=tru
e,org.eclipse.jdt.internal.compiler.flow;x-internal:=true,org.eclipse.j
dt.internal.compiler.impl;x-internal:=true,org.eclipse.jdt.internal.com
piler.lookup;x-internal:=true,org.eclipse.jdt.internal.compiler.parser;
x-internal:=true,org.eclipse.jdt.internal.compiler.parser.diagnose;x-in
ternal:=true,org.eclipse.jdt.internal.compiler.problem;x-internal:=true
,org.eclipse.jdt.internal.compiler.util;x-internal:=true,org.eclipse.jd
t.internal.compiler.tool;x-internal:=true

47
SOURCES/ecj-3.27.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.27.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: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>
<developer>
<url>https://projects.eclipse.org/projects/eclipse.jdt/who</url>
</developer>
</developers>
</project>

View File

@ -1,44 +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.7.1-201709061700/#JDTCORE
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.11</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>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.4</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

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

View File

@ -1,26 +0,0 @@
--- 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="/usr/lib/jvm/java-1.8.0/jre/lib/rt.jar"/>
+ </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"/>

View File

@ -1,73 +1,64 @@
Epoch: 1
%global qualifier S-4.11RC1-201903010040
%global eclipse_ver 4.20
%global bundle_ver 3.27.0
%global jar_ver %{eclipse_ver}
%global drop R-%{jar_ver}-202106111600
Summary: Eclipse Compiler for Java
Name: ecj
Version: 4.11
Release: 0.1%{?dist}
URL: http://www.eclipse.org
Version: %{eclipse_ver}
Release: 10%{?dist}
URL: https://www.eclipse.org
License: EPL-2.0
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/ecjsrc-%{version}RC1.jar
Source1: ecj.sh.in
Source3: https://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/%{version}/ecj-%{version}.pom
# Extracted from https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/%%{qualifier}/ecj-%%{version}.jar
Source4: MANIFEST.MF
# Java API stubs for newer JDKs
Source5: java10api.jar
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
# The ecj build does not generate a proper manifest, so use the one from the binary distribution
# Extracted from: https://download.eclipse.org/eclipse/downloads/drops4/%%{drop}/ecj-%%{jar_ver}.jar
Source2: MANIFEST.MF
# Always generate debug info when building RPMs (Andrew Haley)
Patch0: %{name}-rpmdebuginfo.patch
# Include java API stubs in build
Patch1: javaAPI.patch
Patch0: 0001-Always-generate-bytecode-debuginfo.patch
BuildArch: noarch
BuildRequires: ant
BuildRequires: javapackages-local
BuildRequires: java-17-openjdk-devel
Requires: java-headless >= 1:1.8.0
Requires: javapackages-tools
%description
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
the JDT Core batch compiler.
%prep
%setup -q -c
%patch0 -p1
%patch1
%autosetup -p1 -c -n %{name}-%{eclipse_ver}
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
cp %{SOURCE3} pom.xml
cp %{SOURCE1} pom.xml
mkdir -p scripts/binary/META-INF/
cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
cp %{SOURCE2} scripts/binary/META-INF/MANIFEST.MF
rm ./META-INF/ECLIPSE_.{SF,RSA}
# JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
# No dep on ant needed
%pom_remove_dep org.apache.ant:ant
# Symlinks and aliases
%mvn_file :ecj ecj jdtcore
%mvn_alias org.eclipse.jdt.core.compiler:ecj \
org.eclipse.tycho:org.eclipse.jdt.core org.eclipse.tycho:org.eclipse.jdt.compiler.apt \
org.eclipse.jdt:core org.eclipse.jdt:ecj
# Make Java API stubs available for other packages
%mvn_artifact "org.eclipse:java10api:jar:10" %{SOURCE5}
%mvn_alias "org.eclipse:java10api:jar:10" "org.eclipse:java9api:jar:9"
# Aliases
%mvn_alias org.eclipse.jdt:ecj 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
%build
ant -Djavaapi=%{SOURCE5}
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
ant
%install
%mvn_artifact pom.xml ecj.jar
%mvn_install
# Install the ecj wrapper script
install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ecj
%jpackage_script org.eclipse.jdt.internal.compiler.batch.Main '' '' ecj ecj true
# Install manpage
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
@ -79,6 +70,88 @@ install -m 644 -p ecj.1 $RPM_BUILD_ROOT%{_mandir}/man1/ecj.1
%{_mandir}/man1/ecj*
%changelog
* Wed Feb 15 2023 Coty Sutherland <csutherl@redhat.com> - 1:4.20-10
- Drop unnecessary javax16.api.jar (again)
- Add dependency on javapackages-tools since the ecj binary requires it to run
* Wed Feb 15 2023 Coty Sutherland <csutherl@redhat.com> - 1:4.20-9
- Trigger CI tests again
* Wed Feb 15 2023 Coty Sutherland <csutherl@redhat.com> - 1:4.20-8
- Update BuildRequires to use java-17
* Tue Feb 14 2023 Hui Wang <huwang@redhat.com> - 1:4.20-7
- Fix JAVA_HOME
* Tue Feb 14 2023 Hui Wang <huwang@redhat.com> - 1:4.20-6
- Add requires java-11-openjdk and java-11-openjdk-headless
* Tue Feb 07 2023 Hui Wang <huwang@redhat.com> - 1:4.20-5
- Add javax16api.jar back
* Sat Feb 04 2023 Hui Wang <huwang@redhat.com> - 1:4.20-4
- Remove javax16api.jar which is not necessary in RHEL-8
* Thu Feb 02 2023 Hui Wang <huwang@redhat.com> - 1:4.20-3
- Add tmt gating plan
* Wed Feb 01 2023 Hui Wang <huwang@redhat.com> - 1:4.20-2
- Add gating.yaml
* Thu Jan 19 2023 Hui Wang <huwang@redhat.com> - 1:4.20-1
- Update to 4.20
* Wed Aug 25 2021 Stefan Bluhm <stefan.bluhm@clacee.eu> - 1:4.19-3
- Added RHEL8 build.
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Mar 10 2021 Mat Booth <mat.booth@redhat.com> - 1:4.19-1
- Update to latest upstream release
* Mon Mar 01 2021 Mat Booth <mat.booth@redhat.com> - 1:4.18-3
- Allow building against Java 11
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 12 2021 Alexander Kurtakov <akurtako@redhat.com> 1:4.18-1
- Update to latest upstream release.
* Thu Oct 29 2020 Mat Booth <mat.booth@redhat.com> - 1:4.17-1
- Update to latest upstream release
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1:4.16-3
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Fri Jun 19 2020 Mat Booth <mat.booth@redhat.com> - 1:4.16-2
- Restore compiler adaptor
* Thu Jun 18 2020 Mat Booth <mat.booth@redhat.com> - 1:4.16-1
- Update to latest upstream release
* Fri Mar 20 2020 Mat Booth <mat.booth@redhat.com> - 1:4.15-1
- Update to latest upstream release
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Dec 16 2019 Mat Booth <mat.booth@redhat.com> - 1:4.14-2
- Remove upstream code-signatures
* Fri Dec 13 2019 Mat Booth <mat.booth@redhat.com> - 1:4.14-1
- Update to latest upstream version
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Jun 29 2019 Mat Booth <mat.booth@redhat.com> - 1:4.12-1
- Update to latest upstream release
* Thu Mar 07 2019 Mat Booth <mat.booth@redhat.com> - 1:4.11-0.1
- Update to latest release candidate of 4.11