summaryrefslogtreecommitdiffstats
path: root/packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch
parentInitial commit. (diff)
downloadinkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz
inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch')
-rw-r--r--packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch b/packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch
new file mode 100644
index 0000000..6d05bc4
--- /dev/null
+++ b/packaging/macos/modulesets/patches/gspell-remove_gtkmacintegration.patch
@@ -0,0 +1,59 @@
+# Remove the dependency on gtk-mac-integration and replace it with a
+# simpler solution.
+diff --git a/configure.ac b/configure.ac
+index 15da2b1..8f3d70c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -204,13 +204,6 @@ AM_CONDITIONAL(OS_OSX, test "$os_osx" = "yes")
+
+ if test "$os_osx" = "yes"; then
+ AC_DEFINE([OS_OSX], [1], [Defined if OS is Mac OSX])
+-
+- AX_PKG_CHECK_MODULES([GTK_MAC],
+- [],
+- [gtk-mac-integration-gtk3 >= 2.0.8])
+-
+- AC_SUBST(GTK_MAC_CFLAGS)
+- AC_SUBST(GTK_MAC_LIBS)
+ fi
+
+ # Output files
+diff --git a/gspell/gspell-osx.c b/gspell/gspell-osx.c
+index e3b9615..9d71cbb 100644
+--- a/gspell/gspell-osx.c
++++ b/gspell/gspell-osx.c
+@@ -22,24 +22,24 @@
+ #endif
+
+ #include "gspell-osx.h"
+-#include <gtkosxapplication.h>
++#include <mach-o/dyld.h>
++#include <limits.h>
+ #import <Cocoa/Cocoa.h>
+
+ gchar *
+ _gspell_osx_get_resource_path (void)
+ {
+- gchar *id;
+- gchar *ret = NULL;
+-
+- id = gtkosx_application_get_bundle_id ();
++ uint32_t size = PATH_MAX + 1;
+
+- if (id != NULL)
+- {
+- ret = gtkosx_application_get_resource_path ();
++ gchar* path = (gchar*)g_malloc(size);
++ if (_NSGetExecutablePath(path, &size) == 0) {
++ gchar* contents_dir = g_strstr_len(path, -1, "Contents");
++ g_snprintf(contents_dir, 19, "Contents/Resources");
++ return path;
+ }
+
+- g_free (id);
+- return ret;
++ g_free(path);
++ return NULL;
+ }
+
+ gchar *