On 2022/02/17 20:00, Ricardo wrote:
> Hey Antoine,
> 
> I hope you having a good week.
> Sorry to bother you, but I'm having issues trying to use gedit after 
> upgrading to the latest snapshot (amd64) and running pkg_add -u.
> 
> GDB run output, trace and dmesg attached.
> 
> Care to help me figuring out what the issue is and how can be fixed?
> 
> Obrigado.
> ~Ricardo

Diff below fixes it. OK Antoine?

For reference the gdb in base is next to useless with most things in ports;
pkg_add gdb and use 'egdb' instead, also if you see problems related to
shared libraries/missing functions it can be helpful to provide full
output from running the program with 'LD_DEBUG' set in the environment,
e.g.

LD_DEBUG=1 gedit

But in this case the undefined symbol error was enough to find it

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/gnome/gedit/Makefile,v
retrieving revision 1.179
diff -u -p -r1.179 Makefile
--- Makefile    14 Feb 2022 19:06:30 -0000      1.179
+++ Makefile    17 Feb 2022 22:09:13 -0000
@@ -4,6 +4,7 @@ COMMENT=                lightweight GNOME text editor
 
 GNOME_PROJECT=         gedit
 GNOME_VERSION=         41.0
+REVISION=              0
 
 CATEGORIES=            editors
 
Index: patches/patch-gedit_gedit-dirs_c
===================================================================
RCS file: patches/patch-gedit_gedit-dirs_c
diff -N patches/patch-gedit_gedit-dirs_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gedit_gedit-dirs_c    17 Feb 2022 22:09:13 -0000
@@ -0,0 +1,58 @@
+$OpenBSD$
+
+From ba2662ff9ee99ef0d85023b06053792fd3eb9272 Mon Sep 17 00:00:00 2001
+From: Laurent Bigonville <bi...@bigon.be>
+Date: Mon, 22 Nov 2021 13:03:48 +0100
+Subject: [PATCH] Revert "gedit-dirs: remove get_user_cache_dir() (no longer
+ used)"
+
+This also revert the move of the metadata file ("gedit-metadata.xml")
+from user_data_dir to user_cache_dir when not using GVFS to store the
+metadata
+
+This reverts commit f641a246fbaff482e216197d21e2e51397b1cb26.
+
+Fixes: https://gitlab.gnome.org/GNOME/gedit/-/issues/467
+
+Index: gedit/gedit-dirs.c
+--- gedit/gedit-dirs.c.orig
++++ gedit/gedit-dirs.c
+@@ -26,6 +26,7 @@
+ #include <gtkosxapplication.h>
+ #endif
+ 
++static gchar *user_cache_dir         = NULL;
+ static gchar *user_config_dir        = NULL;
+ static gchar *user_data_dir          = NULL;
+ static gchar *user_styles_dir        = NULL;
+@@ -95,6 +96,9 @@ gedit_dirs_init ()
+                                                          NULL);
+       }
+ 
++      user_cache_dir = g_build_filename (g_get_user_cache_dir (),
++                                         "gedit",
++                                         NULL);
+       user_config_dir = g_build_filename (g_get_user_config_dir (),
+                                           "gedit",
+                                           NULL);
+@@ -115,6 +119,7 @@ gedit_dirs_init ()
+ void
+ gedit_dirs_shutdown ()
+ {
++      g_clear_pointer (&user_cache_dir, g_free);
+       g_clear_pointer (&user_config_dir, g_free);
+       g_clear_pointer (&user_data_dir, g_free);
+       g_clear_pointer (&user_styles_dir, g_free);
+@@ -123,6 +128,12 @@ gedit_dirs_shutdown ()
+       g_clear_pointer (&gedit_lib_dir, g_free);
+       g_clear_pointer (&gedit_plugins_dir, g_free);
+       g_clear_pointer (&gedit_plugins_data_dir, g_free);
++}
++
++const gchar *
++gedit_dirs_get_user_cache_dir (void)
++{
++      return user_cache_dir;
+ }
+ 
+ const gchar *
Index: patches/patch-gedit_gedit-dirs_h
===================================================================
RCS file: patches/patch-gedit_gedit-dirs_h
diff -N patches/patch-gedit_gedit-dirs_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gedit_gedit-dirs_h    17 Feb 2022 22:09:13 -0000
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+From ba2662ff9ee99ef0d85023b06053792fd3eb9272 Mon Sep 17 00:00:00 2001
+From: Laurent Bigonville <bi...@bigon.be>
+Date: Mon, 22 Nov 2021 13:03:48 +0100
+Subject: [PATCH] Revert "gedit-dirs: remove get_user_cache_dir() (no longer
+ used)"
+
+This also revert the move of the metadata file ("gedit-metadata.xml")
+from user_data_dir to user_cache_dir when not using GVFS to store the
+metadata
+
+This reverts commit f641a246fbaff482e216197d21e2e51397b1cb26.
+
+Fixes: https://gitlab.gnome.org/GNOME/gedit/-/issues/467
+
+Index: gedit/gedit-dirs.h
+--- gedit/gedit-dirs.h.orig
++++ gedit/gedit-dirs.h
+@@ -32,6 +32,8 @@ void          gedit_dirs_init                        (void);
+ void           gedit_dirs_shutdown                    (void);
+ 
+ 
++const gchar   *gedit_dirs_get_user_cache_dir          (void);
++
+ const gchar   *gedit_dirs_get_user_config_dir         (void);
+ 
+ const gchar   *gedit_dirs_get_user_data_dir           (void);




Reply via email to