Add support for riscv64 and disable org.eclipse.releng.tools for non-bootstrap

This commit is contained in:
Dingli Zhang 2024-04-08 11:50:28 +08:00
parent 2a467d7a7b
commit 61e34eb12a
8 changed files with 74183 additions and 6 deletions

68951
Remove-32-bit-code.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,189 @@
From cdf280bd9520d91fcd43cc3099c9764296278945 Mon Sep 17 00:00:00 2001
From: Eric Williams
Date: Wed, 27 Mar 2019 09:45:24 -0400
Subject: Bug 545793: [GTK] Remove 32-bit code
Remove 32 bit from build scripts.
Change-Id: Ib9c66468ae30a0a25045c95f7e606b8d404c09fd
Signed-off-by: Eric Williams <ericwill@redhat.com>---
bundles/org.eclipse.swt/buildFragment.xml | 25 ---------------
bundles/org.eclipse.swt/buildSWT.xml | 51 ++-----------------------------
2 files changed, 2 insertions(+), 74 deletions(-)
diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml b/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml
index b4944c59d5..180c92ca32 100644
--- a/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml
+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml
@@ -156,7 +156,6 @@
<fileset dir="${plugindir}/Eclipse SWT Program/common/"/>
</copy>
<antcall target="copy.translationfiles"/>
- <antcall target="replace64"/>
</target>
<target name="copy.gtk.src">
@@ -192,7 +191,6 @@
<fileset dir="${plugindir}/Eclipse SWT WebKit/gtk/"/>
</copy>
<antcall target="copy.translationfiles"/>
- <antcall target="replace64"/>
</target>
<target name="copy.win32.src">
@@ -223,7 +221,6 @@
<fileset dir="${plugindir}/Eclipse SWT Program/win32/"/>
</copy>
<antcall target="copy.translationfiles"/>
- <antcall target="replace64"/>
</target>
<target name="copy.translationfiles" if="includetranslationfiles">
@@ -233,28 +230,6 @@
</copy>
</target>
- <target name="is64">
- <condition property="is64" value="true">
- <or>
- <equals arg1="${swt.arch}" arg2="x86_64"/>
- <equals arg1="${swt.arch}" arg2="ia64"/>
- <equals arg1="${swt.arch}" arg2="ppc64le"/>
- <equals arg1="${swt.arch}" arg2="s390x"/>
- <equals arg1="${swt.arch}" arg2="sparcv9"/>
- <equals arg1="${swt.arch}" arg2="aarch64"/>
- </or>
- </condition>
- <echo>Is64=${is64}</echo>
- </target>
-
- <target name="replace64" depends="is64" unless="is64">
- <echo>Converting java files to 32 bit</echo>
- <replace dir="${copy.src.dir}" includes="**/*.java" value="int /*long*/" token="long /*int*/"/>
- <replace dir="${copy.src.dir}" includes="**/*.java" value="int[] /*long[]*/" token="long[] /*int[]*/"/>
- <replace dir="${copy.src.dir}" includes="**/*.java" value="float /*double*/" token="double /*float*/"/>
- <replace dir="${copy.src.dir}" includes="**/*.java" value="float[] /*double[]*/" token="double[] /*float[]*/"/>
- </target>
-
<target name="build.sources" depends="init">
<available property="src.zip" file="${build.result.folder}/src.zip" />
<antcall target="src.zip" />
diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml b/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml
index bf4faf75b9..9d4bb1b6fe 100644
--- a/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml
+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml
@@ -108,13 +108,6 @@
<target name="check_machines" depends="init_keyfile">
<parallel>
- <sshexec host="${m_linux_x86}"
- username="swtbuild"
- keyfile="${keyfile}"
- failonerror="false"
- trust="true"
- outputproperty="m_linux_x86_output"
- command="hostname"/>
<sshexec host="${m_linux_x86_64}"
username="swtbuild"
keyfile="${keyfile}"
@@ -140,12 +133,6 @@
</parallel>
<property name="success_msg" value="Success"/>
<property name="fail_msg" value="*** Fail ***"/>
- <condition property="m_linux_x86_test" value="${success_msg}" else="${fail_msg}">
- <and>
- <length string="${m_linux_x86_output}" when="greater" length="0"/>
- <matches pattern="x${m_linux_x86_output}*" string="x${m_linux_x86}"/>
- </and>
- </condition>
<condition property="m_linux_x86_64_test" value="${success_msg}" else="${fail_msg}">
<and>
<length string="${m_linux_x86_64_output}" when="greater" length="0"/>
@@ -167,13 +154,12 @@
<echo>-------------------------</echo>
<echo>Status:</echo>
<echo></echo>
- <echo>${m_linux_x86} - ${m_linux_x86_test}</echo>
<echo>${m_linux_x86_64} - ${m_linux_x86_64_test}</echo>
<echo>${m_linux_ppc64le} - ${m_linux_ppc64le_test}</echo>
<echo>${m_mac} - ${m_mac_test}</echo>
<echo>-------------------------</echo>
<condition property="m_fail">
- <matches pattern="Fail" string="${m_linux_x86_test} ${m_linux_x86_64_test} ${m_linux_ppc64le_test} ${m_mac_test}"/>
+ <matches pattern="Fail" string="${m_linux_x86_64_test} ${m_linux_ppc64le_test} ${m_mac_test}"/>
</condition>
<fail if="m_fail" message="Failed"/>
</target>
@@ -237,15 +223,12 @@
<!-- 64 bit -->
<antcall target="build_classes">
<param name="cp" value=".classpath_cocoa"/>
- <param name="is64" value="64 bit"/>
</antcall>
<antcall target="build_classes">
<param name="cp" value=".classpath_gtk"/>
- <param name="is64" value="64 bit"/>
</antcall>
<antcall target="build_classes">
<param name="cp" value=".classpath_win32"/>
- <param name="is64" value="64 bit"/>
</antcall>
<antcall target="check_preprocessing"/>
@@ -263,14 +246,8 @@
<delete dir="${tmpdir}" quiet="true"/>
</target>
- <target name="replace64" unless="is64">
- <antcall target="replace.64.to.32">
- <param name="replace_dir" value="${buildDir}"/>
- </antcall>
- </target>
-
<target name="build_classes">
- <echo>Building ${cp} ${is64}</echo>
+ <echo>Building ${cp}</echo>
<delete file="${tmpdir}/copy.xml"/>
<delete dir="${buildDir}"/>
@@ -280,8 +257,6 @@
</xslt>
<ant antfile="${tmpdir}/copy.xml" target="copy_files"/>
- <antcall target="replace64"></antcall>
-
<javac includeantruntime="false" srcdir="${buildDir}"></javac>
</target>
@@ -947,28 +922,6 @@
</exec>
</target>
- <!-- Convert SWT 32 bit java and C source to 64 bit -->
- <target name="replace.32.to.64" depends="init_build">
- <property name="replace_dir" value="${repo.src}/bundles/org.eclipse.swt"/>
- <echo>Converting java files to 64 bit in ${replace_dir} project</echo>
- <replace dir="${replace_dir}" includes="**/*.java" token="int /*long*/" value="long /*int*/"/>
- <replace dir="${replace_dir}" includes="**/*.java" token="int[] /*long[]*/" value="long[] /*int[]*/"/>
- <replace dir="${replace_dir}" includes="**/*.java" token="float /*double*/" value="double /*float*/"/>
- <replace dir="${replace_dir}" includes="**/*.java" token="float[] /*double[]*/" value="double[] /*float[]*/"/>
- <antcall target="init_build"/>
- </target>
-
- <!-- Convert SWT 64 bit java and C source to 32 bit -->
- <target name="replace.64.to.32" depends="init_build">
- <property name="replace_dir" value="${repo.src}/bundles/org.eclipse.swt"/>
- <echo>Converting java files to 32 bit in ${replace_dir} project</echo>
- <replace dir="${replace_dir}" includes="**/*.java" token="long /*int*/" value="int /*long*/"/>
- <replace dir="${replace_dir}" includes="**/*.java" token="long[] /*int[]*/" value="int[] /*long[]*/"/>
- <replace dir="${replace_dir}" includes="**/*.java" token="double /*float*/" value="float /*double*/"/>
- <replace dir="${replace_dir}" includes="**/*.java" token="double[] /*float[]*/" value="float[] /*double[]*/"/>
- <antcall target="init_build"/>
- </target>
-
<!-- ******************************************************************************** -->
<!-- targets to run the builds on the Eclipse Foundation Hudson in master-slave setup -->
<!-- ******************************************************************************** -->
--
cgit v1.2.3

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -195,7 +195,7 @@ index f3432dba5..c70631e90 100644
- <requirement>
- <type>eclipse-plugin</type>
- <id>javax.el</id>
+ <id>javax.el-api</id>
+ <id>jakarta.el-api</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>

View File

@ -11,7 +11,7 @@
Name: eclipse
Epoch: 1
Version: 4.11
Release: 10
Release: 11
Summary: An open, extensible IDE
License: EPL-2.0
URL: http://www.eclipse.org/
@ -47,6 +47,12 @@ Patch36: fix-objectweb-asm-version-to-increase.patch
# https://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=28aac2514656c669ffa16acb996c77def3d4a8d4
Patch37: CVE-2020-27225.patch
Patch38: add_loongarch-support.patch
Patch39: riscv.patch
Patch40: Remove-traces-of-32-bit-support.patch
Patch41: Remove-32-bit-code.patch
Patch42: Remove-32-bit-from-build-scripts.patch
Patch43: Remove-more-32-bit-code.patch
Patch44: switch-to-the-new-httpclient45-ECF-provider_2.patch
ExcludeArch: s390 %{arm} %{ix86}
BuildRequires: maven-local tycho tycho-extras cbi-plugins maven-antrun-plugin
BuildRequires: maven-assembly-plugin maven-dependency-plugin maven-enforcer-plugin
@ -82,7 +88,7 @@ BuildRequires: glassfish-jsp-api <= 2.3.3 glassfish-jsp <= 2.3.3
BuildRequires: glassfish-servlet-api <= 3.1.0 httpcomponents-core httpcomponents-client jsoup
BuildRequires: xz-java mockito >= 2.23.9 osgi(osgi.annotation)
%if ! %{bootstrap}
BuildRequires: eclipse-pde eclipse-egit eclipse-emf-runtime eclipse-jgit
BuildRequires: eclipse-pde eclipse-emf-runtime jgit
%endif
%description
The Eclipse platform is designed for building integrated development
@ -218,6 +224,16 @@ popd
%ifarch loongarch64
%patch38 -p1
%endif
%ifarch riscv64
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%if ! %{bootstrap}
%patch44 -p1
%endif
%endif
# Disable tests
for pom in eclipse.jdt.core{,.binaries} eclipse.jdt.debug eclipse.jdt.ui eclipse.pde.build eclipse.pde.ui \
eclipse.platform eclipse.platform.debug eclipse.platform.releng eclipse.platform.resources eclipse.platform.runtime \
@ -277,7 +293,7 @@ sed -i -e 's/javax.annotation/javax.annotation-api/' eclipse.jdt.core/org.eclips
rm -rf eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.{aarch64,s390x}
rm -rf rt.equinox.framework/bundles/org.eclipse.equinox.launcher.gtk.linux.{aarch64,s390x}
for dir in rt.equinox.binaries rt.equinox.framework/bundles eclipse.platform.swt.binaries/bundles ; do
utils/ensure_arch.sh "$dir" x86_64 aarch64 s390x loongarch64
utils/ensure_arch.sh "$dir" x86_64 aarch64 s390x loongarch64 riscv64
done
TYCHO_ENV="<environment><os>linux</os><ws>gtk</ws><arch>%{_arch}</arch></environment>"
%pom_xpath_set "pom:configuration/pom:environments" "$TYCHO_ENV" eclipse-platform-parent
@ -328,7 +344,7 @@ for f in eclipse.jdt/org.eclipse.jdt-feature/feature.xml \
%pom_xpath_remove -f "plugin[@os='macosx']" $f
%pom_xpath_remove -f "plugin[@os='win32']" $f
%pom_xpath_remove -f "plugin[@ws='win32']" $f
for arch in x86 x86_64 arm aarch64 ppc64le s390x ; do
for arch in x86 x86_64 arm aarch64 ppc64le s390x riscv64; do
if [ "$arch" != "%{_arch}" ] ; then
%pom_xpath_remove -f "plugin[@arch='$arch']" $f
fi
@ -337,9 +353,9 @@ done
%pom_xpath_remove "pom:dependency-resolution" eclipse.platform.swt/tests/org.eclipse.swt.tests{,.gtk}
%if %{bootstrap}
%pom_disable_module eclipse.platform.ui.tools
%endif
%pom_disable_module features/org.eclipse.releng.tools eclipse.platform.releng
%pom_disable_module bundles/org.eclipse.releng.tools eclipse.platform.releng
%endif
sed -i -e '/<features>/a<feature id="org.eclipse.core.runtime.feature"/>' \
eclipse.platform.releng.tychoeclipsebuilder/platform/platform.product
sed -i -e '/org.eclipse.ui.themes/i<plugin id="org.eclipse.jdt.core.compiler.batch" download-size="0" install-size="0" version="0.0.0" unpack="false"/>' \
@ -748,6 +764,10 @@ echo "%{version}-%{release}" > %{buildroot}%{_eclipsedir}/.pkgs/Distro%{?dist}
%{_eclipsedir}/plugins/org.eclipse.osgi.util_*
%changelog
* Wed Apr 24 2024 Dingli Zhang <dingli@iscas.ac.cn> - 1:4.11-11
- Add support for riscv64
- Disable org.eclipse.releng.tools for non-bootstrap
* Wed Sep 27 2023 wangkai <13474090681@163.com> - 1:4.11-10
- Disable tests for hamcrest-2.2
- Drop tests sub-package

127
riscv.patch Normal file
View File

@ -0,0 +1,127 @@
--- eclipse-platform-sources-I20190307-0500/eclipse.platform.swt.binaries/pom.xml 2022-06-13 09:02:04.367331800 +0800
+++ eclipse-platform-sources-I20190307-0500/eclipse.platform.swt.binaries/pom.xml 2022-06-13 09:03:20.532068500 +0800
@@ -56,6 +56,7 @@
<module>bundles/org.eclipse.swt.cocoa.macosx.x86_64</module>
<module>bundles/org.eclipse.swt.gtk.linux.arm</module>
<module>bundles/org.eclipse.swt.gtk.linux.aarch64</module>
+ <module>bundles/org.eclipse.swt.gtk.linux.riscv64</module>
<module>bundles/org.eclipse.swt.gtk.linux.ppc64le</module>
<module>bundles/org.eclipse.swt.gtk.linux.s390x</module>
<module>bundles/org.eclipse.swt.gtk.linux.x86</module>
--- eclipse-platform-sources-I20190307-0500/eclipse.platform.swt/bundles/org.eclipse.swt/META-INF/p2.inf 2022-06-13 09:10:02.313013100 +0800
+++ eclipse-platform-sources-I20190307-0500/eclipse.platform.swt/bundles/org.eclipse.swt/META-INF/p2.inf 2022-06-13 09:10:58.177096200 +0800
@@ -43,4 +43,9 @@
requires.9.namespace = org.eclipse.equinox.p2.iu
requires.9.name = org.eclipse.swt.gtk.linux.x86
requires.9.range = [$version$,$version$]
-requires.9.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=x86)(!(org.eclipse.swt.buildtime=true)))
+requires.9.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=x86)(!(org.eclipse.swt.buildtime=true)))
+
+requires.10.namespace = org.eclipse.equinox.p2.iu
+requires.10.name = org.eclipse.swt.gtk.linux.riscv64
+requires.10.range = [$version$,$version$]
+requires.10.filter = (&(osgi.os=linux)(osgi.ws=gtk)(osgi.arch=riscv64)(!(org.eclipse.swt.buildtime=true)))
--- eclipse-platform-sources-I20190307-0500/eclipse.platform.ui/features/org.eclipse.e4.rcp/feature.xml 2019-03-07 11:00:05.000000000 +0800
+++ eclipse-platform-sources-I20190307-0500/eclipse.platform.ui/features/org.eclipse.e4.rcp/feature.xml 2022-06-10 14:56:59.849231400 +0800
@@ -423,6 +423,16 @@
fragment="true"/>
<plugin
+ id="org.eclipse.equinox.launcher.gtk.linux.riscv64"
+ os="linux"
+ ws="gtk"
+ arch="riscv64"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ fragment="true"/>
+
+ <plugin
id="org.eclipse.equinox.launcher.win32.win32.x86_64"
os="win32"
ws="win32"
@@ -469,6 +479,17 @@
download-size="0"
install-size="0"
version="0.0.0"
+ fragment="true"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swt.gtk.linux.riscv64"
+ os="linux"
+ ws="gtk"
+ arch="riscv64"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
fragment="true"
unpack="false"/>
--- eclipse-platform-sources-I20190307-0500/eclipse.platform.ui/features/org.eclipse.e4.rcp/pom.xml 2019-03-07 11:00:05.000000000 +0800
+++ eclipse-platform-sources-I20190307-0500/eclipse.platform.ui/features/org.eclipse.e4.rcp/pom.xml 2022-06-10 14:59:51.086049000 +0800
@@ -44,6 +44,7 @@
<plugin id="org.eclipse.equinox.launcher.win32.win32.x86_64"/>
<plugin id="org.eclipse.equinox.launcher.gtk.linux.arm" />
<plugin id="org.eclipse.equinox.launcher.gtk.linux.aarch64" />
+ <plugin id="org.eclipse.equinox.launcher.gtk.linux.riscv64" />
<plugin id="org.eclipse.equinox.launcher.gtk.linux.s390x" />
<plugin id="org.eclipse.equinox.launcher.gtk.linux.x86" />
<plugin id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa" />
--- eclipse-platform-sources-I20190307-0500/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/build.properties 2018-09-14 18:27:05.000000000 +0800
+++ eclipse-platform-sources-I20190307-0500/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/build.properties 2022-06-10 15:02:06.582577100 +0800
@@ -39,6 +39,9 @@
root.linux.gtk.aarch64=bin/gtk/linux/aarch64,gtk_root
root.linux.gtk.aarch64.permissions.755=launcher
+root.linux.gtk.riscv64=bin/gtk/linux/riscv64,gtk_root
+root.linux.gtk.riscv64.permissions.755=launcher
+
root.linux.gtk.s390x=bin/gtk/linux/s390x,gtk_root
root.linux.gtk.s390x.permissions.755=launcher
--- eclipse-platform-sources-I20190307-0500/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh 2018-08-23 08:04:10.000000000 +0800
+++ eclipse-platform-sources-I20190307-0500/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/library/gtk/build.sh 2022-06-10 15:04:52.156916700 +0800
@@ -121,6 +121,11 @@
defaultJava=DEFAULT_JAVA_EXEC
OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
;;
+ "riscv64")
+ defaultOSArch="riscv64"
+ defaultJava=DEFAULT_JAVA_EXEC
+ OUTPUT_DIR="$EXEC_DIR/bin/$defaultWS/$defaultOS/$defaultOSArch"
+ ;;
*)
echo "*** Unknown MODEL <${MODEL}>"
;;
--- eclipse-platform-sources-I20190307-0500/rt.equinox.framework/pom.xml 2022-06-10 17:08:02.791754200 +0800
+++ eclipse-platform-sources-I20190307-0500/rt.equinox.framework/pom.xml 2022-06-10 17:09:14.079668300 +0800
@@ -74,6 +74,18 @@
</modules>
</profile>
<profile>
+ <id>build-native-launchers-gtk.linux.riscv64</id>
+ <activation>
+ <property>
+ <name>native</name>
+ <value>gtk.linux.riscv64</value>
+ </property>
+ </activation>
+ <modules>
+ <module>bundles/org.eclipse.equinox.launcher.gtk.linux.riscv64</module>
+ </modules>
+ </profile>
+ <profile>
<id>build-native-launchers-gtk.linux.s390x</id>
<activation>
<property>
--- eclipse-platform-sources-I20190307-0500/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/pom.xml 2022-06-10 17:54:33.365416200 +0800
+++ eclipse-platform-sources-I20190307-0500/rt.equinox.framework/features/org.eclipse.equinox.executable.feature/pom.xml 2022-06-10 17:55:46.766618600 +0800
@@ -134,6 +134,7 @@
<include name="gtk/linux/x86/**/*"/>
<include name="gtk/linux/x86_64/**/*"/>
<include name="win32/win32/x86_64/**/*"/>
+ <include name="gtk/linux/riscv64/**/*"/>
</fileset>
</copy>
<!-- rename eclipse launchers to "launcher" -->

View File

@ -0,0 +1,36 @@
From 412a5c1bbdae63f03212f9ad25ac71e54e222f4f Mon Sep 17 00:00:00 2001
From: Mat Booth
Date: Thu, 16 May 2019 16:49:38 +0100
Subject: Bug 545718 - Update prereqs for 4.12 release: ECF
Switch to the new httpclient45 ECF provider.
Change-Id: I8b3b79d33fce0a7f4b688718c10d5e76b9169396
Signed-off-by: Mat Booth <mat.booth@redhat.com>
---
bundles/org.eclipse.platform.doc.isv/pom.xml | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
(limited to 'bundles/org.eclipse.platform.doc.isv/pom.xml')
diff --git a/bundles/org.eclipse.platform.doc.isv/pom.xml b/bundles/org.eclipse.platform.doc.isv/pom.xml
index 63638a05d..3d7d4761e 100644
--- a/eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/pom.xml
+++ b/eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/pom.xml
@@ -163,12 +163,7 @@
</requirement>
<requirement>
<type>eclipse-plugin</type>
- <id>org.eclipse.ecf.provider.filetransfer.httpclient4</id>
- <versionRange>0.0.0</versionRange>
- </requirement>
- <requirement>
- <type>eclipse-plugin</type>
- <id>org.eclipse.ecf.provider.filetransfer.httpclient4.ssl</id>
+ <id>org.eclipse.ecf.provider.filetransfer.httpclient45</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
--
cgit v1.2.3