From e62f00ad4e48e0e9e1f3256138a69c23c893ab40 Mon Sep 17 00:00:00 2001 From: Lukas Oberhuber Date: Sun, 20 Nov 2022 20:27:26 +0000 Subject: [PATCH] macos: support MacPorts This provides MacPorts support which is now the official way that the MacOS port is built and packaged. --- app/main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/main.c b/app/main.c index e25edd14af..c5a5416414 100644 --- a/app/main.c +++ b/app/main.c @@ -380,6 +380,14 @@ gimp_macos_setenv (const char * progname) need_pythonhome = FALSE; } g_free (tmp); + /* Detect we were built in MacPorts for MacOS */ + tmp = g_strdup_printf ("%s/Library/Frameworks/Python.framework", res_dir); + if (tmp && !stat (tmp, &sb) && S_ISDIR (sb.st_mode)) + { + g_print ("GIMP was built with MacPorts\n"); + need_pythonhome = FALSE; + } + g_free (tmp); path_len = strlen (g_getenv ("PATH") ? g_getenv ("PATH") : "") + strlen (app_dir) + 2; path = g_try_malloc (path_len);