git: 99297d62eb0d - main - x11-toolkits/swt: Update to 4.20
Max Brazhnikov
makc at FreeBSD.org
Tue Jul 27 12:22:44 UTC 2021
The branch main has been updated by makc:
URL: https://cgit.FreeBSD.org/ports/commit/?id=99297d62eb0dd749d01a36523cfe87ffed1e59b8
commit 99297d62eb0dd749d01a36523cfe87ffed1e59b8
Author: Max Brazhnikov <makc at FreeBSD.org>
AuthorDate: 2021-07-27 11:45:29 +0000
Commit: Max Brazhnikov <makc at FreeBSD.org>
CommitDate: 2021-07-27 12:20:20 +0000
x11-toolkits/swt: Update to 4.20
- WEBKIT implies CAIRO, since it needs libcairo anyway.
---
x11-toolkits/swt/Makefile | 10 ++++----
x11-toolkits/swt/distinfo | 6 ++---
x11-toolkits/swt/files/patch-OS.java | 6 ++---
x11-toolkits/swt/files/patch-build.sh | 29 ++++++----------------
x11-toolkits/swt/files/patch-make_freebsd.mak | 23 ++++++++++-------
.../patch-org_eclipse_swt_graphics_Device.java | 4 +--
x11-toolkits/swt/files/patch-os.c | 8 +++---
x11-toolkits/swt/files/patch-os__custom.h | 11 --------
8 files changed, 39 insertions(+), 58 deletions(-)
diff --git a/x11-toolkits/swt/Makefile b/x11-toolkits/swt/Makefile
index 8cee5d4569ef..980b09500857 100644
--- a/x11-toolkits/swt/Makefile
+++ b/x11-toolkits/swt/Makefile
@@ -1,10 +1,9 @@
# Created by: Robert C. Noland III <rnoland at FreeBSD.org>
PORTNAME= swt
-DISTVERSION= 4.11
-PORTREVISION= 2
+DISTVERSION= 4.20
CATEGORIES= x11-toolkits devel java
-MASTER_SITES= http://archive.eclipse.org/eclipse/downloads/drops4/R-${DISTVERSION}-201903070500/
+MASTER_SITES= http://archive.eclipse.org/eclipse/downloads/drops4/R-${DISTVERSION}-202106111600/
DISTNAME= ${PORTNAME}-${DISTVERSION}-gtk-linux-x86_64
MAINTAINER= makc at FreeBSD.org
@@ -23,7 +22,7 @@ USE_JAVA= yes
USE_XORG= xtst
JAVA_OS= native
-SWT_VERSION= 4924r25
+SWT_VERSION= 4944r26
MAKEFILE= make_freebsd.mak
MAKE_ENV= SWT_VERSION=${SWT_VERSION}
@@ -35,9 +34,10 @@ OPTIONS_DEFINE= CAIRO WEBKIT
OPTIONS_DEFAULT= CAIRO
OPTIONS_SUB= yes
-CAIRO_LIB_DEPENDS= libcairo.so:graphics/cairo
+CAIRO_USE= GNOME=cairo
CAIRO_MAKE_ENV= MAKE_CAIRO=make_cairo
+WEBKIT_IMPLIES= CAIRO
WEBKIT_LIB_DEPENDS= libsoup-2.4.so:devel/libsoup \
libwebkit2gtk-4.0.so:www/webkit2-gtk3
WEBKIT_MAKE_ENV= BUILD_WEBKIT2EXTENSION=yes
diff --git a/x11-toolkits/swt/distinfo b/x11-toolkits/swt/distinfo
index 37178b7cdd73..eb9b0137ae53 100644
--- a/x11-toolkits/swt/distinfo
+++ b/x11-toolkits/swt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1560677318
-SHA256 (swt-4.11-gtk-linux-x86_64.zip) = 2ca4029a2154e8ded50a61f330d916dfc66cb749d4cfcc3e245730553268e663
-SIZE (swt-4.11-gtk-linux-x86_64.zip) = 3889518
+TIMESTAMP = 1627381059
+SHA256 (swt-4.20-gtk-linux-x86_64.zip) = 0d1ab552b95aab6df6c0499c934fd82864100dc638c43b6c1e793e740bb534c2
+SIZE (swt-4.20-gtk-linux-x86_64.zip) = 3808712
diff --git a/x11-toolkits/swt/files/patch-OS.java b/x11-toolkits/swt/files/patch-OS.java
index ed49c51056e3..5a89171d0b5c 100644
--- a/x11-toolkits/swt/files/patch-OS.java
+++ b/x11-toolkits/swt/files/patch-OS.java
@@ -1,6 +1,6 @@
---- org/eclipse/swt/internal/gtk/OS.java.orig 2019-03-07 04:31:06 UTC
+--- org/eclipse/swt/internal/gtk/OS.java.orig 2021-06-11 17:24:22 UTC
+++ org/eclipse/swt/internal/gtk/OS.java
-@@ -53,15 +53,16 @@
+@@ -61,15 +61,16 @@ import org.eclipse.swt.internal.*;
*/
public class OS extends C {
/** OS Constants */
@@ -19,4 +19,4 @@
+ IsLinux = isLinux; IsWin32 = isWin32; IsFreeBSD = isFreeBSD;
byte[] buffer = new byte[4];
- long /*int*/ ptr = C.malloc(4);
+ long ptr = C.malloc(4);
diff --git a/x11-toolkits/swt/files/patch-build.sh b/x11-toolkits/swt/files/patch-build.sh
index 9536139667d3..19afc49f5095 100644
--- a/x11-toolkits/swt/files/patch-build.sh
+++ b/x11-toolkits/swt/files/patch-build.sh
@@ -1,4 +1,4 @@
---- build.sh.orig 2019-03-07 04:31:04 UTC
+--- build.sh.orig 2021-06-11 17:24:22 UTC
+++ build.sh
@@ -72,7 +72,7 @@ echo -e "${RED}*** ${@}${NC}"
@@ -29,7 +29,7 @@
if [ ${MODEL} = 'unknown' ]; then
MODEL=`uname -m`
fi
-@@ -103,7 +103,7 @@ if [ "${MODEL}" = "" ]; then
+@@ -103,10 +103,18 @@ if [ "${MODEL}" = "" ]; then
fi
fi
case $MODEL in
@@ -38,10 +38,6 @@
SWT_ARCH=x86_64
AWT_ARCH=amd64
;;
-@@ -111,6 +111,14 @@ case $MODEL in
- SWT_ARCH=x86
- AWT_ARCH=i386
- ;;
+ powerpc64)
+ SWT_ARCH=ppc64
+ AWT_ARCH=ppc64
@@ -53,21 +49,12 @@
*)
SWT_ARCH=$MODEL
AWT_ARCH=$MODEL
-@@ -156,7 +164,7 @@ case $SWT_OS.$SWT_ARCH in
- # Cross-platform method of finding JAVA_HOME.
- # Tested on Fedora 24 and Ubuntu 16
- DYNAMIC_JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/::" | sed "s:bin/java::"`
-- if [ -a "${DYNAMIC_JAVA_HOME}include/jni.h" ]; then
-+ if [ -a "${DYNAMIC_JAVA_HOME}include/freebsd/jni.h" ]; then
- func_echo_plus "JAVA_HOME not set, but jni.h found, dynamically configured to $DYNAMIC_JAVA_HOME"
- export JAVA_HOME="$DYNAMIC_JAVA_HOME"
- else
-@@ -194,10 +202,10 @@ esac
+@@ -148,10 +156,10 @@ esac
# 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} = 'amd64' -o ${MODEL} = 's390x' -o ${MODEL} = 'powerpc64' -o ${MODEL} = 'powerpc64le' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' ]; then
+-if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64le' -o ${MODEL} = 'aarch64' ]; then
++if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'amd64' -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
@@ -75,8 +62,8 @@
export XLIB64
fi
if [ ${MODEL} = 'ppc64le' ]; then
-@@ -214,11 +222,13 @@ if [ ${MODEL} = 'x86' -a ${SWT_OS} = 'linux' ]; then
- export SWT_LFLAGS SWT_PTR_CFLAGS
+@@ -163,11 +171,13 @@ if [ ${MODEL} = 'x86_64' -o ${MODEL} = 'ppc64le' -o ${
+ export SWT_PTR_CFLAGS
fi
+if [ x${MAKE_CAIRO} = "xmake_cairo" ]; then
@@ -89,7 +76,7 @@
fi
# Find AWT if available
-@@ -364,4 +374,4 @@ elif [ "${GTK_VERSION}" = "4.0" ]; then
+@@ -332,4 +342,4 @@ elif [ "${GTK_VERSION}" = "4.0" ]; then
elif [ "${GTK_VERSION}" = "3.0" -o "${GTK_VERSION}" = "" ]; then
export GTK_VERSION="3.0"
func_build_gtk3 "$@"
diff --git a/x11-toolkits/swt/files/patch-make_freebsd.mak b/x11-toolkits/swt/files/patch-make_freebsd.mak
index 57ee7e838780..bc82f853ab8b 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 2021-01-11 14:12:37 UTC
+--- make_freebsd.mak.orig 2021-07-27 10:18:21 UTC
+++ make_freebsd.mak
@@ -12,7 +12,7 @@
# IBM Corporation - initial API and implementation
@@ -9,20 +9,22 @@
# SWT debug flags for various SWT components.
#SWT_WEBKIT_DEBUG = -DWEBKIT_DEBUG
-@@ -64,9 +64,9 @@ CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo
+@@ -66,11 +66,11 @@ 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)
--GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-4 -lcairo -lgthread-2.0
-+GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L$(LOCALBASE)/lib -lgtk-4 -lcairo -lgthread-2.0
+ GTKCFLAGS = `pkg-config --cflags gtk4 gtk4-x11 gtk4-unix-print`
+-GTKLIBS = `pkg-config --libs-only-L gtk4 gtk4-x11 gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-4 -lcairo -lgthread-2.0
++GTKLIBS = `pkg-config --libs-only-L gtk4 gtk4-x11 gthread-2.0` $(XLIB64) -L$(LOCALBASE)/lib -lgtk-4 -lcairo -lgthread-2.0
+ ATKCFLAGS = `pkg-config --cflags atk gtk4 gtk4-unix-print`
else
+ GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
-GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0
+GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L$(LOCALBASE)/lib -lgtk-3 -lgdk-3 -lcairo -lgthread-2.0
+ ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
endif
- AWT_LFLAGS = -shared ${SWT_LFLAGS}
-@@ -75,12 +75,13 @@ AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
- ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION) gtk+-unix-print-$(GTK_VERSION)`
+@@ -79,12 +79,13 @@ AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt
+
ATKLIBS = `pkg-config --libs-only-L atk` -latk-1.0
-GLXLIBS = -lGL -lGLU -lm
@@ -37,7 +39,7 @@
WEBKITCFLAGS = `pkg-config --cflags gio-2.0`
WEBKIT_EXTENSION_CFLAGS=`pkg-config --cflags gtk+-3.0 webkit2gtk-web-extension-4.0`
-@@ -108,17 +109,18 @@ CFLAGS := $(CFLAGS) \
+@@ -120,7 +121,8 @@ CFLAGS := $(CFLAGS) \
$(SWT_WEBKIT_DEBUG) \
-DLINUX -DGTK \
-I$(JAVA_HOME)/include \
@@ -47,6 +49,9 @@
${SWT_PTR_CFLAGS}
LFLAGS = -shared -fPIC ${SWT_LFLAGS}
+@@ -129,12 +131,12 @@ LFLAGS = -shared -fPIC ${SWT_LFLAGS}
+ CFLAGS += -Werror
+
ifndef NO_STRIP
- # -s = Remove all symbol table and relocation information from the executable.
- # i.e, more efficent code, but removes debug information. Should not be used if you want to debug.
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
index c676135e549d..98789df25c16 100644
--- a/x11-toolkits/swt/files/patch-org_eclipse_swt_graphics_Device.java
+++ b/x11-toolkits/swt/files/patch-org_eclipse_swt_graphics_Device.java
@@ -1,6 +1,6 @@
---- org/eclipse/swt/graphics/Device.java.orig 2019-03-07 02:31:06 UTC
+--- org/eclipse/swt/graphics/Device.java.orig 2021-06-11 17:24:22 UTC
+++ org/eclipse/swt/graphics/Device.java
-@@ -701,7 +701,7 @@ protected void init () {
+@@ -740,7 +740,7 @@ protected void init () {
}
systemFont = Font.gtk_new (this, defaultFont);
diff --git a/x11-toolkits/swt/files/patch-os.c b/x11-toolkits/swt/files/patch-os.c
index e44dbf2a4fcb..19b342888fbd 100644
--- a/x11-toolkits/swt/files/patch-os.c
+++ b/x11-toolkits/swt/files/patch-os.c
@@ -1,7 +1,7 @@
---- os.c.orig 2008-12-31 21:16:39 UTC
+--- os.c.orig 2021-06-11 17:24:22 UTC
+++ os.c
-@@ -18036,11 +18036,16 @@
- jintLong rc = 0;
+@@ -16083,11 +16083,16 @@ JNIEXPORT jlong JNICALL OS_NATIVE(realpath)
+ jlong rc = 0;
OS_NATIVE_ENTER(env, that, realpath_FUNC);
if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
- if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
@@ -9,7 +9,7 @@
+ if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
+ } else
+ lparg1 = malloc(PATH_MAX);
- rc = (jintLong)realpath((const char *)lparg0, (char *)lparg1);
+ rc = (jlong)realpath((const char *)lparg0, (char *)lparg1);
fail:
if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
diff --git a/x11-toolkits/swt/files/patch-os__custom.h b/x11-toolkits/swt/files/patch-os__custom.h
deleted file mode 100644
index 803689e3524f..000000000000
--- a/x11-toolkits/swt/files/patch-os__custom.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- os_custom.h.orig 2019-03-07 02:31:04 UTC
-+++ os_custom.h
-@@ -105,7 +105,7 @@ glong g_utf16_offset_to_utf8_offset(const gchar*, glon
- glong g_utf8_offset_to_utf16_offset(const gchar*, glong);
-
- // Cached JVM pointer: see bug 521487.
--JavaVM *cached_jvm;
-+extern JavaVM *cached_jvm;
-
- #define SWT_TYPE_FIXED (swt_fixed_get_type ())
- #define SWT_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWT_TYPE_FIXED, SwtFixed))
More information about the dev-commits-ports-all
mailing list