macos: support MacPorts

This provides MacPorts support which is now the official way that
the MacOS port is built and packaged.
This commit is contained in:
Lukas Oberhuber 2022-11-20 20:27:26 +00:00 committed by Jehan
parent 1aec2281f5
commit e62f00ad4e
1 changed files with 8 additions and 0 deletions

View File

@ -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);