From f8b3dbd142a94a0dec10485942dc09525c1c2cb4 Mon Sep 17 00:00:00 2001 From: Max Brazhnikov Date: Sat, 6 Mar 2021 10:24:12 +0000 Subject: [PATCH] MFH: r561902 x11-toolkits/swt: - Remove excessive patching, which also broke loading of swt libraries. - Add temporary patch to fix crash, when swt tries to load *.css files which are not shipped with the tarball. Reported by: Robin Dapp via email --- x11-toolkits/swt/Makefile | 4 +-- x11-toolkits/swt/files/patch-build.sh | 2 +- x11-toolkits/swt/files/patch-make_freebsd.mak | 25 +++---------------- ...patch-org_eclipse_swt_graphics_Device.java | 11 ++++++++ 4 files changed, 18 insertions(+), 24 deletions(-) create mode 100644 x11-toolkits/swt/files/patch-org_eclipse_swt_graphics_Device.java diff --git a/x11-toolkits/swt/Makefile b/x11-toolkits/swt/Makefile index 7a5569807451..4766cf58dc23 100644 --- a/x11-toolkits/swt/Makefile +++ b/x11-toolkits/swt/Makefile @@ -3,6 +3,7 @@ PORTNAME= swt DISTVERSION= 4.11 +PORTREVISION= 1 CATEGORIES= x11-toolkits devel java MASTER_SITES= http://archive.eclipse.org/eclipse/downloads/drops4/R-${DISTVERSION}-201903070500/ DISTNAME= ${PORTNAME}-${DISTVERSION}-gtk-linux-x86_64 @@ -23,7 +24,7 @@ USE_JAVA= yes USE_XORG= xtst JAVA_OS= native -SWT_VERSION= 411 +SWT_VERSION= 4924r25 MAKEFILE= make_freebsd.mak MAKE_ENV= SWT_VERSION=${SWT_VERSION} @@ -45,7 +46,6 @@ WEBKIT_MAKE_ENV_OFF= BUILD_WEBKIT2EXTENSION=no post-extract: @(cd ${WRKSRC} && ${UNZIP_CMD} -qo "*.zip") - @${RM} ${WRKSRC}/*.o ${WRKSRC}/*.so ${WRKSRC}/*.jar @${CP} ${FILESDIR}/build.xml ${WRKSRC}/build.xml @${CP} ${WRKSRC}/make_linux.mak ${WRKSRC}/make_freebsd.mak diff --git a/x11-toolkits/swt/files/patch-build.sh b/x11-toolkits/swt/files/patch-build.sh index c3903c2515ff..9536139667d3 100644 --- a/x11-toolkits/swt/files/patch-build.sh +++ b/x11-toolkits/swt/files/patch-build.sh @@ -67,7 +67,7 @@ # For 64-bit CPUs, we have a switch -if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' ]; then -+if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ia64' -o ${MODEL} = 's390x' -o ${MODEL} = 'powerpc64' -o ${MODEL} = 'powerpc64le' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' ]; then ++if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'amd64' -o ${MODEL} = 's390x' -o ${MODEL} = 'powerpc64' -o ${MODEL} = 'powerpc64le' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' ]; then SWT_PTR_CFLAGS=-DJNI64 if [ -d /lib64 ]; then - XLIB64=-L/usr/X11R6/lib64 diff --git a/x11-toolkits/swt/files/patch-make_freebsd.mak b/x11-toolkits/swt/files/patch-make_freebsd.mak index 5cdc3dff0886..57ee7e838780 100644 --- a/x11-toolkits/swt/files/patch-make_freebsd.mak +++ b/x11-toolkits/swt/files/patch-make_freebsd.mak @@ -1,4 +1,4 @@ ---- make_freebsd.mak.orig 2019-06-16 12:13:00 UTC +--- make_freebsd.mak.orig 2021-01-11 14:12:37 UTC +++ make_freebsd.mak @@ -12,7 +12,7 @@ # IBM Corporation - initial API and implementation @@ -9,24 +9,7 @@ # SWT debug flags for various SWT components. #SWT_WEBKIT_DEBUG = -DWEBKIT_DEBUG -@@ -26,7 +26,6 @@ - - include make_common.mak - --SWT_VERSION=$(maj_ver)$(min_ver)r$(rev) - GTK_VERSION?=3.0 - - # Define the various shared libraries to be build. -@@ -56,7 +55,7 @@ - # Webkit extension lib has to be put into a separate folder and is treated differently from the other libraries. - WEBKIT_EXTENSION_LIB = lib$(WEBKIT_EXTENSION_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).so - WEBEXTENSION_BASE_DIR = webkitextensions --WEBEXTENSION_DIR = $(WEBEXTENSION_BASE_DIR)$(maj_ver)$(min_ver)r$(rev) -+WEBEXTENSION_DIR = $(WEBEXTENSION_BASE_DIR)$(SWT_VERSION) - - CAIROCFLAGS = `pkg-config --cflags cairo` - CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo -@@ -64,9 +63,9 @@ +@@ -64,9 +64,9 @@ CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo # Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0) GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)` ifeq ($(GTK_VERSION), 4.0) @@ -38,7 +21,7 @@ endif AWT_LFLAGS = -shared ${SWT_LFLAGS} -@@ -75,12 +74,13 @@ +@@ -75,12 +75,13 @@ AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)` ATKLIBS = `pkg-config --libs-only-L atk` -latk-1.0 @@ -54,7 +37,7 @@ WEBKITCFLAGS = `pkg-config --cflags gio-2.0` WEBKIT_EXTENSION_CFLAGS=`pkg-config --cflags gtk+-3.0 webkit2gtk-web-extension-4.0` -@@ -108,17 +108,18 @@ +@@ -108,17 +109,18 @@ CFLAGS := $(CFLAGS) \ $(SWT_WEBKIT_DEBUG) \ -DLINUX -DGTK \ -I$(JAVA_HOME)/include \ diff --git a/x11-toolkits/swt/files/patch-org_eclipse_swt_graphics_Device.java b/x11-toolkits/swt/files/patch-org_eclipse_swt_graphics_Device.java new file mode 100644 index 000000000000..c676135e549d --- /dev/null +++ b/x11-toolkits/swt/files/patch-org_eclipse_swt_graphics_Device.java @@ -0,0 +1,11 @@ +--- org/eclipse/swt/graphics/Device.java.orig 2019-03-07 02:31:06 UTC ++++ org/eclipse/swt/graphics/Device.java +@@ -701,7 +701,7 @@ protected void init () { + } + systemFont = Font.gtk_new (this, defaultFont); + +- overrideThemeValues(); ++ //overrideThemeValues(); + } + + /**