From nobody Tue Jun 07 12:38:18 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2139C17595D3; Tue, 7 Jun 2022 12:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LHVJW00xzz3MTc; Tue, 7 Jun 2022 12:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654605499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ZGsiyNEVZ1Xd96bgTsN881E750aTXozhIRCxjCefEA=; b=m6wFX8MI5P02dmk13ztEn0rC4djeKrik+H1Dxm+lEBljrYuyk5U8sBwfx1sUu1PXE2UX8S BdPmxHGSut7aNqBBlemTgohRmXyHPasHPBP/IsT1WkLjy+3EQRL+vw3o0WSqYmeXIWwYV/ JTS2uQtuAEFzGfpJhY/TRrx4DvGyShnrjuYHLEIV8y4NJ1rrmOHdFM3QiSJGRholSrNW8o iIbX8csoZEqUTmkdQQgh5Lxs3lK1to3U8UekTspqVPfUn91eiTWoxb/hD3VZtWXXvz1jP8 5KOD3ELTgYncYAOSAkkWFbeBwuwMhxQwb40f3OhMFUT0bpm7/tJ6WLExWPN5cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D48BC1AE6E; Tue, 7 Jun 2022 12:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 257CcIx4071501; Tue, 7 Jun 2022 12:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 257CcIc2071500; Tue, 7 Jun 2022 12:38:18 GMT (envelope-from git) Date: Tue, 7 Jun 2022 12:38:18 GMT Message-Id: <202206071238.257CcIc2071500@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Max Brazhnikov Subject: git: d551e5b93e20 - main - x11-toolkits/swt: update to 4.21 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: makc X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d551e5b93e20225875d3b682bb6dc93412d03680 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654605499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ZGsiyNEVZ1Xd96bgTsN881E750aTXozhIRCxjCefEA=; b=lLXRPFQsHF/JG37WM9Yet/GVe0vM+3/1iHKr0hTUlADHcebWaG3AvjuY9ims897kkGc5MI GEI/PjJTcqfSvLBwN9zw7Wq9rvM8fsrkpj1Gj6YVHrB9dMAUAwG0b7CjiVzwacvp1q71wO hd/5fv+F1GjLmq+alHX1DNxr8dw70dGswr0B3ugZz79oY/ETFDmIOFRrdmvCiDNTueGSvj bl1l/3fylwh6kssCzIscyoCSgIe6tT24gLZFe0g8BtPKpE7L+oFb/BczrbLUGSCeLbejzl qMYZVl5Why3a4reXJV/E7lDM1x8UwTsEmn2mO4NsSC724LyyZBTNe0SNKT6KEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654605499; a=rsa-sha256; cv=none; b=umhkSk8GgOe/EY4Eq+nUNsuBEHPEUpGrVgmdH54OP9k5hDojHHLvtN8MB5pBtSZDQwb9LS atlwSU3663fVDyQebYso5Od0XMQxwZxmHAEadIRjLWLLaidNp7yvhaU2/pincVPF36E/+A CbSmQ8ckXWXA2n0HBOw2WpZjs5akjTeucNZfuL9S9j18LJZa8kX8sfPywTvet/rmJ8JMeG KCFdMLcExLXPrZfp5vwVQGTLxYhqagMdpT+ZhPei5gRPS7tXUGBjopJxb/3jn5DhLWQF9v N5/n7pameEfFmUUM9VcAY/b5h7viJ53O5pis1p1lHqbv4Zxu8Rb4Qq4U+E5B3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by makc: URL: https://cgit.FreeBSD.org/ports/commit/?id=d551e5b93e20225875d3b682bb6dc93412d03680 commit d551e5b93e20225875d3b682bb6dc93412d03680 Author: Max Brazhnikov AuthorDate: 2022-06-07 12:37:25 +0000 Commit: Max Brazhnikov CommitDate: 2022-06-07 12:38:03 +0000 x11-toolkits/swt: update to 4.21 - Sync patches with eclipse 4.21 - Remove patch-org_eclipse_swt_graphics_Device.java (which breaks icons in Eclipse) and install missing *.css files - Add patch-org_eclipse_swt_widgets_Shell.java to fix layout on HiDPI scaled to 200% PR: 264512 (based on) Submmitted by: huanghwh@gmail.com --- x11-toolkits/swt/Makefile | 7 +++--- x11-toolkits/swt/distinfo | 6 +++--- x11-toolkits/swt/files/build.xml | 3 +-- x11-toolkits/swt/files/patch-OS.java | 22 ------------------- .../patch-org_eclipse_swt_browser_WebKit.java | 11 ++++++++++ .../patch-org_eclipse_swt_graphics_Device.java | 11 ---------- .../patch-org_eclipse_swt_internal_Library.java | 16 ++++++++++++++ .../patch-org_eclipse_swt_internal_gtk_OS.java | 13 +++++++++++ .../files/patch-org_eclipse_swt_widgets_Shell.java | 20 +++++++++++++++++ x11-toolkits/swt/files/patch-os.c | 4 ++-- x11-toolkits/swt/files/swt_functional_gtk_3_20.css | 13 +++++++++++ .../swt/files/swt_theming_fixes_gtk_3_20.css | 25 ++++++++++++++++++++++ .../swt/files/swt_theming_fixes_gtk_3_24_5.css | 3 +++ 13 files changed, 111 insertions(+), 43 deletions(-) diff --git a/x11-toolkits/swt/Makefile b/x11-toolkits/swt/Makefile index 458e4433a6fe..6be4bf028df8 100644 --- a/x11-toolkits/swt/Makefile +++ b/x11-toolkits/swt/Makefile @@ -1,9 +1,9 @@ # Created by: Robert C. Noland III PORTNAME= swt -DISTVERSION= 4.20 +DISTVERSION= 4.21 CATEGORIES= x11-toolkits devel java -MASTER_SITES= http://archive.eclipse.org/eclipse/downloads/drops4/R-${DISTVERSION}-202106111600/ +MASTER_SITES= http://archive.eclipse.org/eclipse/downloads/drops4/R-${DISTVERSION}-202109060500/ DISTNAME= ${PORTNAME}-${DISTVERSION}-gtk-linux-x86_64 MAINTAINER= makc@FreeBSD.org @@ -22,7 +22,7 @@ USE_JAVA= yes USE_XORG= xtst JAVA_OS= native -SWT_VERSION= 4944r26 +SWT_VERSION= 4946r21 MAKEFILE= make_freebsd.mak MAKE_ENV= SWT_VERSION=${SWT_VERSION} @@ -47,6 +47,7 @@ post-extract: @(cd ${WRKSRC} && ${UNZIP_CMD} -qo "*.zip") @${CP} ${FILESDIR}/build.xml ${WRKSRC}/build.xml @${CP} ${WRKSRC}/make_linux.mak ${WRKSRC}/make_freebsd.mak + @${CP} ${FILESDIR}/*.css ${WRKSRC}/org/eclipse/swt/internal/gtk/ post-patch: ${SED} -e 's|freebsd|dragonfly|g' ${WRKSRC}/make_freebsd.mak \ diff --git a/x11-toolkits/swt/distinfo b/x11-toolkits/swt/distinfo index eb9b0137ae53..b3ace138ef81 100644 --- a/x11-toolkits/swt/distinfo +++ b/x11-toolkits/swt/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1627381059 -SHA256 (swt-4.20-gtk-linux-x86_64.zip) = 0d1ab552b95aab6df6c0499c934fd82864100dc638c43b6c1e793e740bb534c2 -SIZE (swt-4.20-gtk-linux-x86_64.zip) = 3808712 +TIMESTAMP = 1654502811 +SHA256 (swt-4.21-gtk-linux-x86_64.zip) = 3e35a4ababf504bcf64df864e4a957aaa2f0dec9696a922d936c7ee224fa4c5f +SIZE (swt-4.21-gtk-linux-x86_64.zip) = 3851041 diff --git a/x11-toolkits/swt/files/build.xml b/x11-toolkits/swt/files/build.xml index b25b8819b9ec..7411f76da48b 100644 --- a/x11-toolkits/swt/files/build.xml +++ b/x11-toolkits/swt/files/build.xml @@ -39,12 +39,11 @@ - - + diff --git a/x11-toolkits/swt/files/patch-OS.java b/x11-toolkits/swt/files/patch-OS.java deleted file mode 100644 index 5a89171d0b5c..000000000000 --- a/x11-toolkits/swt/files/patch-OS.java +++ /dev/null @@ -1,22 +0,0 @@ ---- org/eclipse/swt/internal/gtk/OS.java.orig 2021-06-11 17:24:22 UTC -+++ org/eclipse/swt/internal/gtk/OS.java -@@ -61,15 +61,16 @@ import org.eclipse.swt.internal.*; - */ - public class OS extends C { - /** OS Constants */ -- public static final boolean IsLinux, IsWin32, BIG_ENDIAN; -+ public static final boolean IsLinux, IsWin32, BIG_ENDIAN, IsFreeBSD; - static { - - /* Initialize the OS flags and locale constants */ - String osName = System.getProperty ("os.name"); -- boolean isLinux = false, isWin32 = false; -+ boolean isLinux = false, isWin32 = false, isFreeBSD = false; - if (osName.equals ("Linux")) isLinux = true; - if (osName.startsWith("Windows")) isWin32 = true; -- IsLinux = isLinux; IsWin32 = isWin32; -+ if (osName.equals ("FreeBSD")) isFreeBSD = true; -+ IsLinux = isLinux; IsWin32 = isWin32; IsFreeBSD = isFreeBSD; - - byte[] buffer = new byte[4]; - long ptr = C.malloc(4); diff --git a/x11-toolkits/swt/files/patch-org_eclipse_swt_browser_WebKit.java b/x11-toolkits/swt/files/patch-org_eclipse_swt_browser_WebKit.java new file mode 100644 index 000000000000..463512a1c9b2 --- /dev/null +++ b/x11-toolkits/swt/files/patch-org_eclipse_swt_browser_WebKit.java @@ -0,0 +1,11 @@ +--- org/eclipse/swt/browser/WebKit.java.orig 2022-06-06 23:55:44 UTC ++++ org/eclipse/swt/browser/WebKit.java +@@ -121,7 +121,7 @@ class WebKit extends WebBrowser { + * https://www.nczonline.net/blog/2009/01/05/what-determines-that-a-script-is-long-running/ + * https://stackoverflow.com/questions/3030024/maximum-execution-time-for-javascript + */ +- static final int ASYNC_EXEC_TIMEOUT_MS = 10000; ++ static final int ASYNC_EXEC_TIMEOUT_MS = 100; // Dirty hack for webkit issues on FreeBSD + + /** Workaround for bug 522733 */ + static boolean bug522733FirstInstanceCreated = false; 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 deleted file mode 100644 index 98789df25c16..000000000000 --- a/x11-toolkits/swt/files/patch-org_eclipse_swt_graphics_Device.java +++ /dev/null @@ -1,11 +0,0 @@ ---- org/eclipse/swt/graphics/Device.java.orig 2021-06-11 17:24:22 UTC -+++ org/eclipse/swt/graphics/Device.java -@@ -740,7 +740,7 @@ protected void init () { - } - systemFont = Font.gtk_new (this, defaultFont); - -- overrideThemeValues(); -+ //overrideThemeValues(); - } - - /** diff --git a/x11-toolkits/swt/files/patch-org_eclipse_swt_internal_Library.java b/x11-toolkits/swt/files/patch-org_eclipse_swt_internal_Library.java new file mode 100644 index 000000000000..1442e3986acf --- /dev/null +++ b/x11-toolkits/swt/files/patch-org_eclipse_swt_internal_Library.java @@ -0,0 +1,16 @@ +--- org/eclipse/swt/internal/Library.java.orig 2021-09-06 01:22:24 UTC ++++ org/eclipse/swt/internal/Library.java +@@ -65,12 +65,12 @@ static { + + static String arch() { + String osArch = System.getProperty("os.arch"); //$NON-NLS-1$ +- if (osArch.equals ("amd64")) return "x86_64"; //$NON-NLS-1$ $NON-NLS-2$ + return osArch; + } + + static String os() { + String osName = System.getProperty("os.name"); //$NON-NLS-1$ ++ if (osName.equals ("FreeBSD")) return "freebsd"; //$NON-NLS-1$ $NON-NLS-2$ + if (osName.equals ("Linux")) return "linux"; //$NON-NLS-1$ $NON-NLS-2$ + if (osName.equals ("Mac OS X")) return "macosx"; //$NON-NLS-1$ $NON-NLS-2$ + if (osName.startsWith ("Win")) return "win32"; //$NON-NLS-1$ $NON-NLS-2$ diff --git a/x11-toolkits/swt/files/patch-org_eclipse_swt_internal_gtk_OS.java b/x11-toolkits/swt/files/patch-org_eclipse_swt_internal_gtk_OS.java new file mode 100644 index 000000000000..741ce3a827f9 --- /dev/null +++ b/x11-toolkits/swt/files/patch-org_eclipse_swt_internal_gtk_OS.java @@ -0,0 +1,13 @@ +--- org/eclipse/swt/internal/gtk/OS.java.orig 2021-09-06 01:22:24 UTC ++++ org/eclipse/swt/internal/gtk/OS.java +@@ -65,8 +65,8 @@ public class OS extends C { + + /* Initialize the OS flags and locale constants */ + String osName = System.getProperty ("os.name"); +- boolean isLinux = false, isWin32 = false; +- if (osName.equals ("Linux")) isLinux = true; ++ boolean isLinux = osName.equals ("Linux") || osName.equals ("FreeBSD"); ++ boolean isWin32 = false; + if (osName.startsWith("Windows")) isWin32 = true; + IsLinux = isLinux; IsWin32 = isWin32; + diff --git a/x11-toolkits/swt/files/patch-org_eclipse_swt_widgets_Shell.java b/x11-toolkits/swt/files/patch-org_eclipse_swt_widgets_Shell.java new file mode 100644 index 000000000000..e419013043d9 --- /dev/null +++ b/x11-toolkits/swt/files/patch-org_eclipse_swt_widgets_Shell.java @@ -0,0 +1,20 @@ +--- org/eclipse/swt/widgets/Shell.java.orig 2021-09-06 01:22:24 UTC ++++ org/eclipse/swt/widgets/Shell.java +@@ -1507,6 +1507,8 @@ long gtk_button_press_event (long widget, long event) + long gtk_configure_event (long widget, long event) { + int [] x = new int [1], y = new int [1]; + GTK3.gtk_window_get_position (shellHandle, x, y); ++ int scale = GTK.gtk_widget_get_scale_factor (shellHandle); ++ x[0] /= scale; y[0] /= scale; + + if (!isVisible ()) { + return 0; //We shouldn't handle move/resize events if shell is hidden. +@@ -3351,6 +3353,8 @@ Rectangle getBoundsInPixels () { + // TODO: GTK4 GtkWindow no longer has the ability to get position + } else { + GTK3.gtk_window_get_position (shellHandle, x, y); ++ int scale = GTK.gtk_widget_get_scale_factor (shellHandle); ++ x[0] /= scale; y[0] /= scale; + } + } else { + if (GTK.GTK4) { diff --git a/x11-toolkits/swt/files/patch-os.c b/x11-toolkits/swt/files/patch-os.c index 19b342888fbd..fe393f1299fd 100644 --- a/x11-toolkits/swt/files/patch-os.c +++ b/x11-toolkits/swt/files/patch-os.c @@ -1,6 +1,6 @@ ---- os.c.orig 2021-06-11 17:24:22 UTC +--- os.c.orig 2021-09-06 01:22:24 UTC +++ os.c -@@ -16083,11 +16083,16 @@ JNIEXPORT jlong JNICALL OS_NATIVE(realpath) +@@ -15180,11 +15180,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; diff --git a/x11-toolkits/swt/files/swt_functional_gtk_3_20.css b/x11-toolkits/swt/files/swt_functional_gtk_3_20.css new file mode 100644 index 000000000000..eb6287a71c65 --- /dev/null +++ b/x11-toolkits/swt/files/swt_functional_gtk_3_20.css @@ -0,0 +1,13 @@ +@binding-set SWTTreeViewBinding { + bind "Left" { "expand-collapse-cursor-row" (0,0,0)}; + bind "Right" { "expand-collapse-cursor-row" (0,1,0)}; +} + +treeview { + -gtk-key-bindings: SWTTreeViewBinding; +} + +scrolledwindow undershoot.top, scrolledwindow undershoot.right, + scrolledwindow undershoot.bottom, scrolledwindow undershoot.left { + background-image: none; +} diff --git a/x11-toolkits/swt/files/swt_theming_fixes_gtk_3_20.css b/x11-toolkits/swt/files/swt_theming_fixes_gtk_3_20.css new file mode 100644 index 000000000000..ee046e201c43 --- /dev/null +++ b/x11-toolkits/swt/files/swt_theming_fixes_gtk_3_20.css @@ -0,0 +1,25 @@ +toolbar { + padding-top: 2px; + padding-bottom: 2px; +} + +toolbar button { + padding: 2px; +} + +toolbar button.popup { + padding: 0px; +} + +toolbar toolbutton button { + padding: 0px 0px 0px 0px; +} + +entry { + min-height: 26px; +} + +tab { + padding-left: 6px; + padding-right: 6px; +} diff --git a/x11-toolkits/swt/files/swt_theming_fixes_gtk_3_24_5.css b/x11-toolkits/swt/files/swt_theming_fixes_gtk_3_24_5.css new file mode 100644 index 000000000000..3aab49552e75 --- /dev/null +++ b/x11-toolkits/swt/files/swt_theming_fixes_gtk_3_24_5.css @@ -0,0 +1,3 @@ +button { + padding: 4px 8px; +}