From e1c5f1b1c39a08acb06412c13aea066fd2de86d8 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Apr 29 2016 14:01:40 +0000 Subject: Use webkit 2 by default, webkit 1 can still be used by setting SWT_WEBKIT2=0 in the environment, rhbz#1303912 - Ignore SWT.MOZILLA style when creating a browser widget and always use webkit because we cannot ship xulrunner support, rhbz#1210898 - Drop unneeded requires from tests package - Add missing R on eclipse-filesystem to low-level sub-packages --- diff --git a/eclipse-webkit2-by-default.patch b/eclipse-webkit2-by-default.patch new file mode 100644 index 0000000..96ad1b2 --- /dev/null +++ b/eclipse-webkit2-by-default.patch @@ -0,0 +1,41 @@ +--- "eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java.orig" 2016-04-29 11:07:16.540479847 +0100 ++++ "eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java" 2016-04-29 11:10:18.983883107 +0100 +@@ -110,7 +110,9 @@ + + if (LibraryLoaded) { + String webkit2 = System.getenv("SWT_WEBKIT2"); // $NON-NLS-1$ +- WEBKIT2 = webkit2 != null && webkit2.equals("1") && OS.GTK3; // $NON-NLS-1$ ++ if (OS.GTK3) { ++ WEBKIT2 = webkit2 == null || webkit2.equals("1"); // $NON-NLS-1$ ++ } + + WebViewType = WebKitGTK.webkit_web_view_get_type (); + +--- "eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h.orig" 2016-04-29 11:05:57.597603451 +0100 ++++ "eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/library/webkitgtk.h" 2016-04-29 11:07:04.101656890 +0100 +@@ -29,10 +29,10 @@ + char *gtk3 = getenv("SWT_GTK3"); \ + if (gtk3 == NULL || strcmp(gtk3, "1") == 0) { \ + char *webkit2 = getenv("SWT_WEBKIT2"); \ +- if (webkit2 != NULL && strcmp(webkit2, "1") == 0) { \ +- handle = dlopen("libwebkit2gtk-4.0.so.37", LOAD_FLAGS); /* webkit2 */ \ +- } else { \ ++ 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 */ \ + } \ + } else { \ + handle = dlopen("libwebkit-1.0.so.2", LOAD_FLAGS); /* webkitgtk 1.2.x lib */ \ +--- "./eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT Browser/gtk/org/eclipse/swt/browser/BrowserFactory.java.orig" 2016-04-29 12:15:18.524027606 +0100 ++++ "./eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT Browser/gtk/org/eclipse/swt/browser/BrowserFactory.java" 2016-04-29 12:20:19.696980780 +0100 +@@ -16,9 +16,6 @@ + + WebBrowser createWebBrowser (int style) { + boolean webkitInstalled = WebKit.IsInstalled (); +- if ((style & SWT.MOZILLA) != 0 || (!webkitInstalled && (style & SWT.WEBKIT) == 0)) { +- return new Mozilla (); +- } + if (!webkitInstalled) return null; + + return new WebKit (); diff --git a/eclipse.spec b/eclipse.spec index 4e4dee7..05368bc 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -44,7 +44,7 @@ Epoch: 1 Summary: An open, extensible IDE Name: eclipse Version: %{eclipse_version} -Release: 0.4.git201604261105%{?dist} +Release: 0.5.git201604261105%{?dist} License: EPL URL: http://www.eclipse.org/ @@ -114,33 +114,31 @@ Patch20: eclipse-fix-tests.patch Patch21: eclipse-adjust-droplets.patch Patch22: eclipse-pde-tp-support-droplets.patch +# Use webkit2 by default and prevent usage of xulrunner +Patch23: eclipse-webkit2-by-default.patch + BuildRequires: tycho >= 0.25.0 BuildRequires: tycho-extras >= 0.25.0 BuildRequires: cbi-plugins BuildRequires: rsync BuildRequires: make, gcc +BuildRequires: zip, unzip +BuildRequires: desktop-file-utils +BuildRequires: java-1.8.0-openjdk-devel BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gconf-2.0) BuildRequires: pkgconfig(nspr) BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(cairo) -BuildRequires: zip, unzip -BuildRequires: desktop-file-utils -BuildRequires: java-1.8.0-openjdk-devel BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xtst) BuildRequires: pkgconfig(gtk+-2.0) -%if 0%{?fedora} -BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(webkit-1.0) -BuildRequires: pkgconfig(webkit2gtk-4.0) -%else -%if 0%{?rhel} >= 7 BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(webkitgtk-3.0) -%else -BuildRequires: pkgconfig(webkit-1.0) -%endif +%if ! 0%{?rhel} +# RHEL does not have webkit2 +BuildRequires: pkgconfig(webkit2gtk-4.0) %endif BuildRequires: icu4j >= 1:54.1.1-2 BuildRequires: ant-antlr ant-apache-bcel ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging ant-apache-bsf ant-commons-net @@ -151,8 +149,8 @@ BuildRequires: apache-commons-logging BuildRequires: apache-commons-codec BuildRequires: apache-commons-jxpath >= 1.3-23 BuildRequires: apache-commons-fileupload -BuildRequires: felix-gogo-command >= 0.14.0-2 -BuildRequires: felix-gogo-shell >= 0.10.0-3 +BuildRequires: felix-gogo-command +BuildRequires: felix-gogo-shell BuildRequires: osgi(org.eclipse.jetty.util) >= %{_jetty_version} BuildRequires: osgi(org.eclipse.jetty.server) >= %{_jetty_version} BuildRequires: osgi(org.eclipse.jetty.http) >= %{_jetty_version} @@ -171,8 +169,9 @@ BuildRequires: objectweb-asm >= 5.0.3-1 BuildRequires: sac >= 1.3-12 BuildRequires: batik-css >= 1.8-0.17 BuildRequires: xml-commons-apis >= 1.4.01-12 -BuildRequires: atinject >= 1-18 -BuildRequires: atinject-tck >= 1-18 +BuildRequires: atinject +BuildRequires: atinject-tck +BuildRequires: eclipse-filesystem BuildRequires: eclipse-ecf-core >= 3.13.1-1 BuildRequires: eclipse-emf-core >= 1:2.11.2-1 BuildRequires: eclipse-license @@ -201,15 +200,16 @@ everything in between. %package swt Summary: SWT Library for GTK+ + +Requires: java-headless >= 1:1.7.0 +Requires: javapackages-tools +Requires: eclipse-filesystem %if 0%{?rhel} -Requires: jpackage-utils -%if 0%{?rhel} >= 7 +# RHEL does not have webkit2 Requires: gtk3 Requires: webkitgtk3 %else -Requires: gtk2 -Requires: webkitgtk -%endif +Requires: webkitgtk4 %endif %description swt @@ -219,6 +219,7 @@ SWT Library for GTK+. Summary: Eclipse OSGi - Equinox Requires: java-headless >= 1:1.7.0 Requires: javapackages-tools +Requires: eclipse-filesystem Provides: osgi(system.bundle) = %{epoch}:%{eclipse_version} %description equinox-osgi @@ -233,8 +234,8 @@ Requires: apache-commons-el >= 1.0-23 Requires: apache-commons-logging Requires: apache-commons-codec Requires: apache-commons-jxpath >= 1.3-23 -Requires: felix-gogo-command >= 0.14.0-2 -Requires: felix-gogo-shell >= 0.10.0-3 +Requires: felix-gogo-command +Requires: felix-gogo-shell Requires: osgi(org.eclipse.jetty.util) >= %{_jetty_version} Requires: osgi(org.eclipse.jetty.server) >= %{_jetty_version} Requires: osgi(org.eclipse.jetty.http) >= %{_jetty_version} @@ -252,7 +253,7 @@ Requires: sat4j >= 2.3.5-1 Requires: sac >= 1.3-12 Requires: batik-css >= 1.8-0.17 Requires: xml-commons-apis >= 1.4.01-12 -Requires: atinject >= 1-18 +Requires: atinject Requires: eclipse-ecf-core >= 3.13.1-1 Requires: eclipse-emf-core >= 1:2.11.2-1 Requires: glassfish-jsp-api >= 2.2.1-4 @@ -323,11 +324,6 @@ SWT tools, E4 tools, Rel-Eng tools and Eclipse Test frameworks. %package tests Summary: Eclipse Tests -Requires: %{name}-pde = %{epoch}:%{eclipse_version}-%{release} -Requires: easymock3 -Requires: mockito -Requires: atinject-tck >= 1-18 - %description tests Eclipse Tests. @@ -357,6 +353,10 @@ tar --strip-components=1 -xf %{SOURCE1} %patch20 %patch21 %patch22 +%if ! 0%{?rhel} +# RHEL does not have webkit2 +%patch23 +%endif # Resolving the target platform requires too many changes, so don't use it %pom_xpath_remove "pom:configuration/pom:target" eclipse-platform-parent @@ -488,6 +488,8 @@ sed -i -e '169i' \ # Ensure batch compiler gets installed correctly sed -i -e '/org.eclipse.ui.themes/i' \ eclipse.platform.releng/features/org.eclipse.platform-feature/feature.xml +sed -i -e '/<\/excludes>/i' \ + eclipse.platform.releng/features/org.eclipse.platform-feature/pom.xml # Don't duplicate the test framework bundles %pom_remove_plugin org.eclipse.tycho.extras:tycho-p2-extras-plugin \ @@ -607,7 +609,7 @@ export JAVA_HOME=%{java_home} %endif -Declipse.javadoc=/usr/bin/javadoc -Dnative=gtk.linux.%{eclipse_arch} \ -Dtycho.local.keepTarget \ - -Dfedora.p2.repos=`pwd`/.m2/p2/repo-sdk/plugins -DbuildType=Z + -Dfedora.p2.repos=$(pwd)/.m2/p2/repo-sdk/plugins -DbuildType=Z # Location that the product is materialised product="eclipse.platform.releng.tychoeclipsebuilder/platform/target/products/org.eclipse.platform.ide/linux/gtk/%{eclipse_arch}" @@ -1076,6 +1078,14 @@ fi %{_libdir}/eclipse/plugins/org.eclipse.osgi.compatibility.state_* %changelog +* Fri Apr 29 2016 Mat Booth - 1:4.6.0-0.5.git201604261105 +- Use webkit 2 by default, webkit 1 can still be used by setting SWT_WEBKIT2=0 + in the environment, rhbz#1303912 +- Ignore SWT.MOZILLA style when creating a browser widget and always use webkit + because we cannot ship xulrunner support, rhbz#1210898 +- Drop unneeded requires from tests package +- Add missing R on eclipse-filesystem to low-level sub-packages + * Tue Apr 26 2016 Mat Booth - 1:4.6.0-0.4.git201604261105 - Drop support for PDE building plug-ins in RPMs - Update to latest Neon I-build