Ticket #61799: 0001-Calculate-top-level-directory-for-plugins-within-a-d.patch

File 0001-Calculate-top-level-directory-for-plugins-within-a-d.patch, 1.1 KB (added by pietvo (Pieter van Oostrum), 3 years ago)

patch to apply to the gimp source code

  • libgimpbase/gimpenv.c

    From bd0bae4216d279d8079d15ae6d126a52f3b5e8f3 Mon Sep 17 00:00:00 2001
    From: Pieter van Oostrum <pieter@vanoostrum.org>
    Date: Wed, 9 Dec 2020 22:53:21 +0100
    Subject: [PATCH] Calculate top-level directory for plugins within a directory
    
    ---
     libgimpbase/gimpenv.c | 14 ++++++++++++++
     1 file changed, 14 insertions(+)
    
    diff --git a/libgimpbase/gimpenv.c b/libgimpbase/gimpenv.c
    index d4040c80a7..26844aa5ac 100644
    a b gimp_installation_directory (void) 
    435435        g_free (tmp);
    436436        g_free (tmp2);
    437437      }
     438    else if (! strcmp (g_path_get_basename (dirname), "plug-ins"))
     439      {
     440        /*  same for plug-ins in subdirectory, go three levels up from prefix/lib/gimp/x.y  */
     441
     442        gchar *tmp  = g_path_get_dirname (dirname);
     443        gchar *tmp2 = g_path_get_dirname (tmp);
     444        gchar *tmp3 = g_path_get_dirname (tmp2);
     445
     446        toplevel = g_path_get_dirname (tmp3);
     447
     448        g_free (tmp);
     449        g_free (tmp2);
     450        g_free (tmp3);
     451      }
    438452    else
    439453      {
    440454        /*  if none of the above match, we assume that we are really in a bundle  */