From 02abffe2a2d31b2726b286fa168bda3ba98f0fac Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Thu, 16 Oct 2025 18:15:07 +0800 Subject: [PATCH] support using webkitgtk 4.1 --- eclipse-use-webkt2gtk4.1.patch | 16 ++++++++++++++++ eclipse.spec | 12 +++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 eclipse-use-webkt2gtk4.1.patch diff --git a/eclipse-use-webkt2gtk4.1.patch b/eclipse-use-webkt2gtk4.1.patch new file mode 100644 index 0000000..49659f7 --- /dev/null +++ b/eclipse-use-webkt2gtk4.1.patch @@ -0,0 +1,16 @@ +diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h +index 6c0388b..34e745c 100644 +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h +@@ -45,9 +45,9 @@ + if (webkit2 != NULL && strcmp(webkit2, "0") == 0) { \ + handle = dlopen("libwebkitgtk-3.0.so.0", LOAD_FLAGS); /* webkitgtk >= 3.x lib */ \ + } else { \ +- handle = dlopen("libwebkit2gtk-4.0.so.37", LOAD_FLAGS); /* webkit2 */ \ ++ handle = dlopen("libwebkit2gtk-4.0.so.37", LOAD_FLAGS); /* webkit2/libsoup2 */ \ + if (!handle) { \ +- handle = dlopen("libwebkitgtk-3.0.so.0", LOAD_FLAGS); /* webkitgtk 3.x as machine doesn't have webkit2gtk */ \ ++ handle = dlopen("libwebkit2gtk-4.1.so.0", LOAD_FLAGS); /* webkit2/libsoup3 */ \ + } \ + } \ + if (handle) { \ diff --git a/eclipse.spec b/eclipse.spec index 5d73995..1a20caa 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -11,7 +11,7 @@ Name: eclipse Epoch: 1 Version: 4.11 -Release: 13 +Release: 14 Summary: An open, extensible IDE License: EPL-2.0 URL: http://www.eclipse.org/ @@ -54,6 +54,8 @@ 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 Patch45: fix-eclipse-startup-failure-on-loongarch64.patch +# cherry-picked from https://github.com/eclipse-platform/eclipse.platform.swt/commit/a00ef227cd24f0b41719c60b2256e555234242cb +Patch46: eclipse-use-webkt2gtk4.1.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 @@ -62,7 +64,7 @@ BuildRequires: sonatype-oss-parent rsync make, gcc zip, unzip desktop-file BuildRequires: pkgconfig(glib-2.0) pkgconfig(gio-2.0) pkgconfig(nspr) pkgconfig(glu) BuildRequires: pkgconfig(gl) pkgconfig(cairo) pkgconfig(xt) pkgconfig(xtst) BuildRequires: pkgconfig(libsecret-1) pkgconfig(gtk+-2.0) pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(webkit2gtk-4.0) icu4j >= 1:63.1 ant >= 1.10.5 +BuildRequires: pkgconfig(webkit2gtk-4.1) icu4j >= 1:63.1 ant >= 1.10.5 BuildRequires: ant-antlr ant-apache-bcel ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging ant-apache-bsf BuildRequires: ant-commons-net ant-javamail ant-jdepend ant-junit ant-swing ant-jsch ant-testutil ant-apache-xalan2 ant-jmf ant-xz ant-junit5 BuildRequires: jsch >= 0:0.1.46 apache-commons-el >= 1.0 apache-commons-logging @@ -98,7 +100,7 @@ everything in between. %package swt Summary: SWT Library for GTK+ -Requires: java-headless >= 1:1.8.0 javapackages-tools gtk3 webkitgtk4 +Requires: java-headless >= 1:1.8.0 javapackages-tools gtk3 libwebkit2gtk-4.1.so.0()%{?_isa} %description swt SWT Library for GTK+. @@ -236,6 +238,7 @@ popd %patch44 -p1 %endif %endif +%patch46 -p1 # 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 \ @@ -766,6 +769,9 @@ echo "%{version}-%{release}" > %{buildroot}%{_eclipsedir}/.pkgs/Distro%{?dist} %{_eclipsedir}/plugins/org.eclipse.osgi.util_* %changelog +* Thu Oct 16 2025 Funda Wang - 1:4.11-14 +- support using webkitgtk 4.1 + * Tue Jul 23 2024 songliyang - 1:4.11-13 - fix startup failure on loongarch64 due to cannot load 32-bit SWT librarys on 64-bit JVM -- Gitee