This commit is contained in:
parent
984429bfca
commit
166f81f90a
10
ecj.spec
10
ecj.spec
@ -43,8 +43,7 @@ Patch0: %{name}-rpmdebuginfo.patch
|
||||
# Include java API stubs in build with java < 15
|
||||
Patch1: javaAPI.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: java-devel = 1.8.0
|
||||
BuildRequires: java-devel = 11
|
||||
BuildRequires: java-devel >= 10
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: unzip
|
||||
BuildArch: noarch
|
||||
@ -74,7 +73,7 @@ rm META-INF/ECLIPSE_*
|
||||
%build
|
||||
|
||||
mkdir -p build/classes
|
||||
javac --patch-module java.compiler=java15api-src -XDignore.symbol.file=true -d build/classes -source 11 -target 11 \
|
||||
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 "."
|
||||
@ -82,7 +81,7 @@ rm -rf java15api-src build/classes
|
||||
|
||||
ant \
|
||||
%if %{?pkg_vcmp:%pkg_vcmp java-devel < 15}%{!?pkg_vcmp:1}
|
||||
-Djavaapi=java15api.jar -Drtjar=%{_jvmdir}/jre-1.8.0/lib/rt.jar \
|
||||
-Djavaapi=java15api.jar \
|
||||
%endif
|
||||
build
|
||||
|
||||
@ -96,8 +95,7 @@ install -pm 0644 java15api.jar %{buildroot}%{_javadir}/%{name}/java15api.jar
|
||||
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}/java15api.pom
|
||||
%add_maven_depmap %{name}/java15api.pom %{name}/java15api.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
|
||||
|
@ -1,25 +1,24 @@
|
||||
--- build.xml.orig 2020-09-02 22:05:12.000000000 +0200
|
||||
+++ build.xml 2021-03-16 14:41:19.331235267 +0100
|
||||
@@ -18,6 +18,10 @@
|
||||
@@ -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" />
|
||||
@@ -25,9 +29,11 @@
|
||||
<mkdir dir="${output}" />
|
||||
|
||||
<javac srcdir="${basedir}" destdir="${output}"
|
||||
+ encoding="utf-8"
|
||||
debuglevel="lines,source"
|
||||
+ encoding="utf-8"
|
||||
+ bootclasspathref="build.path"
|
||||
source="1.8"
|
||||
target="1.8">
|
||||
<compilerarg line="-Xlint:none"/>
|
||||
- <compilerarg line="-Xlint:none"/>
|
||||
+ <compilerarg line="-Xlint:none" value="-Xbootclasspath/p:${toString:build.path}"/>
|
||||
</javac>
|
||||
|
||||
<delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/>
|
||||
|
Loading…
Reference in New Issue
Block a user