Related: #2160545 Drop unneeded jar and add dep on javapackages-tools

This commit is contained in:
Hui Wang 2023-02-20 14:14:41 +08:00
parent c72d4577b8
commit b20d576ff7
4 changed files with 9 additions and 32 deletions

View File

@ -1,19 +0,0 @@
diff --git a/build.xml b/build.xml
index 229bec2..2037a6f 100644
--- a/build.xml
+++ b/build.xml
@@ -24,10 +24,10 @@
<mkdir dir="${output}" />
<javac srcdir="${basedir}" destdir="${output}"
- debuglevel="lines,source"
- source="1.8"
- target="1.8">
- <compilerarg line="-Xlint:none"/>
+ debuglevel="lines,vars,source"
+ debug="true"
+ release="11">
+ <compilerarg line="-Xlint:none -encoding cp1252 --patch-module java.compiler=${javaapi}"/>
</javac>
<delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/>

View File

@ -8,7 +8,7 @@ Epoch: 1
Summary: Eclipse Compiler for Java Summary: Eclipse Compiler for Java
Name: ecj Name: ecj
Version: %{eclipse_ver} Version: %{eclipse_ver}
Release: 3%{?dist} Release: 4%{?dist}
URL: https://www.eclipse.org URL: https://www.eclipse.org
License: EPL-2.0 License: EPL-2.0
@ -17,22 +17,19 @@ Source1: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/%{bundle_ver}/ecj-%{
# The ecj build does not generate a proper manifest, so use the one from the binary distribution # 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 # Extracted from: https://download.eclipse.org/eclipse/downloads/drops4/%%{drop}/ecj-%%{jar_ver}.jar
Source2: MANIFEST.MF Source2: MANIFEST.MF
# Provide API stubs for newer JDKs to allow us to build on the system default JDK where those APIs are not present
# Fetched from: https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.compiler.tool/lib/javax16api.jar?h=S4_21_0_RC2a
Source3: javax16api.jar
# Always generate debug info when building RPMs (Andrew Haley) # Always generate debug info when building RPMs (Andrew Haley)
Patch0: 0001-Always-generate-bytecode-debuginfo.patch Patch0: 0001-Always-generate-bytecode-debuginfo.patch
# Include java API stubs in build and fix misc other incorrect build flags
Patch1: 0002-Fix-build-from-source.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: ant BuildRequires: ant
BuildRequires: javapackages-local BuildRequires: javapackages-local
BuildRequires: java-11-openjdk-devel BuildRequires: java-11-openjdk-devel
Requires: java-headless >= 1:1.8.0
Requires: javapackages-tools
%description %description
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
the JDT Core batch compiler. the JDT Core batch compiler.
@ -54,7 +51,7 @@ rm ./META-INF/ECLIPSE_.{SF,RSA}
%build %build
export JAVA_HOME=/usr/lib/jvm/java-11 export JAVA_HOME=/usr/lib/jvm/java-11
ant -Djavaapi=%{SOURCE3} ant
%install %install
%mvn_artifact pom.xml ecj.jar %mvn_artifact pom.xml ecj.jar
@ -73,6 +70,10 @@ install -m 644 -p ecj.1 $RPM_BUILD_ROOT%{_mandir}/man1/ecj.1
%{_mandir}/man1/ecj* %{_mandir}/man1/ecj*
%changelog %changelog
* Mon Feb 20 2023 Hui Wang <huwang@redhat.com> - 1:4.20-4
- Drop unnecessary javax16.api.jar
- Add dependency on javapackages-tools since the ecj binary requires it to run
* Thu Feb 02 2023 Hui Wang <huwang@redhat.com> - 1:4.20-3 * Thu Feb 02 2023 Hui Wang <huwang@redhat.com> - 1:4.20-3
- Add tmt gating plan - Add tmt gating plan

View File

@ -3,10 +3,6 @@ prepare:
- name: packages - name: packages
how: install how: install
package: package:
- java-11-openjdk
- java-11-openjdk-devel
- java-11-openjdk-headless
- javapackages-tools
- ecj - ecj
execute: execute:
how: tmt how: tmt

View File

@ -1,3 +1,2 @@
SHA512 (ecjsrc-4.20.jar) = fb27c0a37ed5cdfdcdbc904d067bfdd0477ddfd873a6cd8477d3b473734fd0e37329f0e9ab85dc5f89994d68d9886a488bd88568bc00e25f54c1a5a468dc1384 SHA512 (ecjsrc-4.20.jar) = fb27c0a37ed5cdfdcdbc904d067bfdd0477ddfd873a6cd8477d3b473734fd0e37329f0e9ab85dc5f89994d68d9886a488bd88568bc00e25f54c1a5a468dc1384
SHA512 (ecj-3.27.0.pom) = 675ab0f5f9a5bb7cc7feb47d98de4623d19a57a89b89d8191e6f7f0e524aae423a7f7fead380b0a58bafab439295ce01eeb442823033d415ac890f6b3ea070a2 SHA512 (ecj-3.27.0.pom) = 675ab0f5f9a5bb7cc7feb47d98de4623d19a57a89b89d8191e6f7f0e524aae423a7f7fead380b0a58bafab439295ce01eeb442823033d415ac890f6b3ea070a2
SHA512 (javax16api.jar) = 20bed38ea93b7cb91783333dce0023ce86e4d82a8b88950e3abced0ff6c3e086f3b13c25d6ae1674c8ddb8099be3925c7636ef262171b65e035088f61f5306b0