Gimp/build/macos/patches/0001-app-libgimpwidgets-meson-plug-ins-Patch-macOS-bundle.patch
Bruno Lopes 85044d78d1 app, build/macos: Move PYTHONHOME logic from .patch to core code
This was tested with both in-house MacPorts, in-house HomeBrew and
legacy CircleCI builds and I confirmed it works (it is needed only
by the in-house MacPorts builds).
2026-03-21 17:34:30 -03:00

49 lines
1.6 KiB
Diff

From f4a107250cc0d7d29fb1f55c8652dff219e663dc Mon Sep 17 00:00:00 2001
From: Bruno Lopes <brunvonlope@outlook.com>
Date: Sat, 21 Mar 2026 14:51:17 -0300
Subject: [PATCH] app, libgimpwidgets, meson, plug-ins: Patch macOS bundle
---
libgimpbase/gimpenv.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/libgimpbase/gimpenv.c b/libgimpbase/gimpenv.c
index 8961ad68ba..ba10796164 100644
--- a/libgimpbase/gimpenv.c
+++ b/libgimpbase/gimpenv.c
@@ -434,17 +434,18 @@ gimp_installation_directory (void)
{
NSAutoreleasePool *pool;
- NSString *resource_path;
+ NSString *app_path;
+ gchar *app_gpath;
gchar *basename;
gchar *basepath;
gchar *dirname;
pool = [[NSAutoreleasePool alloc] init];
- resource_path = [[NSBundle mainBundle] resourcePath];
+ app_path = [[NSBundle mainBundle] bundlePath];
- basename = g_path_get_basename ([resource_path UTF8String]);
- basepath = g_path_get_dirname ([resource_path UTF8String]);
+ basename = g_path_get_basename ([app_path UTF8String]);
+ basepath = g_path_get_dirname ([app_path UTF8String]);
dirname = g_path_get_basename (basepath);
if (! strcmp (basename, ".libs"))
@@ -507,7 +508,8 @@ gimp_installation_directory (void)
{
/* if none of the above match, we assume that we are really in a bundle */
- toplevel = g_strdup ([resource_path UTF8String]);
+ app_gpath = g_strdup ([app_path UTF8String]);
+ toplevel = g_strconcat (app_gpath, "/Contents", NULL);
}
g_free (basename);
--
2.50.1 (Apple Git-155)