<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/a3dd1d6a948cb9b900116738e57da8b6337e4cef">https://github.com/macports/macports-ports/commit/a3dd1d6a948cb9b900116738e57da8b6337e4cef</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new a3dd1d6a948 webkit2-gtk-devel: add enhancements to make WebKitGTK+ usable for development
</span>a3dd1d6a948 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit a3dd1d6a948cb9b900116738e57da8b6337e4cef
</span>Author: John Mercouris <john@mercouris.email>
AuthorDate: Fri Jun 18 15:08:31 2021 +0200
<span style='display:block; white-space:pre;color:#404040;'> webkit2-gtk-devel: add enhancements to make WebKitGTK+ usable for development
</span>---
www/webkit2-gtk-devel/Portfile | 15 +++++++++++
.../files/NSApplicationActivationPolicy.h | 4 +++
.../files/NSApplicationActivationPolicy.mm | 10 ++++++++
www/webkit2-gtk-devel/files/patch-sources-gtk.diff | 13 ++++++++++
.../files/patch-web-process-main.diff | 18 +++++++++++++
.../files/process-executable-path.diff | 30 ++++++++++++++++++++++
6 files changed, 90 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/webkit2-gtk-devel/Portfile b/www/webkit2-gtk-devel/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 29026113146..ee8608ed1d4 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/www/webkit2-gtk-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/webkit2-gtk-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -91,6 +91,16 @@ patchfiles-append patch-enable-plugin-architecture-unix.diff
</span> # runs without this patch.
patchfiles-append patch-bundle-link-webcore.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# allow the webkit executables typically located in libexec to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# dynamically located, this is useful for app bundling
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append process-executable-path.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# add new sources for NSApplicationActivationPolicy.mm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-sources-gtk.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# patch web process to add call to SetActivationPolicyProhibited
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-web-process-main.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # it is preferred to use the WebKit built in bmalloc if it builds on a given os.
# it has improved security features, but not all systems can build it at present.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -107,6 +117,11 @@ pre-configure {
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file copy ${filespath}/NSApplicationActivationPolicy.h ${worksrcpath}/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file copy ${filespath}/NSApplicationActivationPolicy.mm ${worksrcpath}/Source/WebKit/WebProcess/gtk/NSApplicationActivationPolicy.mm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if {![variant_isset quartz]} {
default_variants-append +x11
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/webkit2-gtk-devel/files/NSApplicationActivationPolicy.h b/www/webkit2-gtk-devel/files/NSApplicationActivationPolicy.h
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..728594282ca
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/webkit2-gtk-devel/files/NSApplicationActivationPolicy.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,4 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+// This is the C "trampoline" function that will be used
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+// to invoke a specific Objective-C method FROM C++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void SetActivationPolicyProhibited ();
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/webkit2-gtk-devel/files/NSApplicationActivationPolicy.mm b/www/webkit2-gtk-devel/files/NSApplicationActivationPolicy.mm
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..ce1d75c141b
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/webkit2-gtk-devel/files/NSApplicationActivationPolicy.mm
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "config.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#import "NSApplicationActivationPolicy.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#import <AppKit/AppKit.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+// C "trampoline" function to invoke Objective-C method
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void SetActivationPolicyProhibited ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [NSApp setActivationPolicy: NSApplicationActivationPolicyProhibited];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/webkit2-gtk-devel/files/patch-sources-gtk.diff b/www/webkit2-gtk-devel/files/patch-sources-gtk.diff
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..450ffe33e34
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/webkit2-gtk-devel/files/patch-sources-gtk.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Source/WebKit/PlatformGTK.cmake.orig 2019-11-08 10:28:00.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Source/WebKit/PlatformGTK.cmake 2020-07-21 15:22:28.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -32,6 +32,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "SourcesGTK.txt"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++find_library(APPKIT_FRAMEWORK NAMES AppKit)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++target_link_libraries(WebKit PRIVATE ${APPKIT_FRAMEWORK})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++list(APPEND WebKit_SOURCES WebProcess/gtk/NSApplicationActivationPolicy.mm)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ list(APPEND WebKit_MESSAGES_IN_FILES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UIProcess/ViewGestureController.messages.in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/webkit2-gtk-devel/files/patch-web-process-main.diff b/www/webkit2-gtk-devel/files/patch-web-process-main.diff
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..c004732578e
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/webkit2-gtk-devel/files/patch-web-process-main.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp.orig 2020-07-21 13:09:21.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp 2020-07-21 15:27:56.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -33,6 +33,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <gtk/gtk.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <libintl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <libsoup/soup.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "NSApplicationActivationPolicy.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if PLATFORM(X11)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <X11/Xlib.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -57,6 +58,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ SetActivationPolicyProhibited ();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return true;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/webkit2-gtk-devel/files/process-executable-path.diff b/www/webkit2-gtk-devel/files/process-executable-path.diff
</span>new file mode 100755
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..972b33910ec
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/webkit2-gtk-devel/files/process-executable-path.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,30 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp.orig 2019-02-18 10:10:26.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Source/WebKit/Shared/glib/ProcessExecutablePathGLib.cpp 2020-05-22 14:17:01.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -33,7 +33,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ namespace WebKit {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if ENABLE(DEVELOPER_MODE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static String getExecutablePath()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CString executablePath = getCurrentExecutablePath();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,11 +40,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return FileSystem::directoryName(FileSystem::stringFromFileSystemRepresentation(executablePath.data()));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return { };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static String findWebKitProcess(const char* processName)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if ENABLE(DEVELOPER_MODE)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static const char* execDirectory = g_getenv("WEBKIT_EXEC_PATH");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (execDirectory) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ String processPath = FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(execDirectory), processName);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -59,7 +56,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (FileSystem::fileExists(processPath))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return processPath;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return FileSystem::pathByAppendingComponent(FileSystem::stringFromFileSystemRepresentation(PKGLIBEXECDIR), processName);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span></pre><pre style='margin:0'>
</pre>