Date: Fri, 18 Mar 2022 03:19:11 GMT From: Neel Chauhan <nc@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: b35438a24b0a - main - editors/gedit: Fix segfault on launch Message-ID: <202203180319.22I3JBYc083209@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by nc: URL: https://cgit.FreeBSD.org/ports/commit/?id=b35438a24b0ab26e9d2251296bb3a079d6433319 commit b35438a24b0ab26e9d2251296bb3a079d6433319 Author: Neel Chauhan <nc@FreeBSD.org> AuthorDate: 2022-03-18 03:19:07 +0000 Commit: Neel Chauhan <nc@FreeBSD.org> CommitDate: 2022-03-18 03:19:07 +0000 editors/gedit: Fix segfault on launch --- editors/gedit/Makefile | 1 + editors/gedit/files/patch-gedit_gedit-app.c | 16 -------- editors/gedit/files/patch-gedit_gedit-dirs_c | 58 ++++++++++++++++++++++++++++ editors/gedit/files/patch-gedit_gedit-dirs_h | 28 ++++++++++++++ 4 files changed, 87 insertions(+), 16 deletions(-) diff --git a/editors/gedit/Makefile b/editors/gedit/Makefile index 3df8edb67ff0..66101b59501e 100644 --- a/editors/gedit/Makefile +++ b/editors/gedit/Makefile @@ -2,6 +2,7 @@ PORTNAME= gedit PORTVERSION= 41.0 +PORTREVISION= 1 CATEGORIES= editors gnome MASTER_SITES= GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+)\..*/\1/} DIST_SUBDIR= gnome diff --git a/editors/gedit/files/patch-gedit_gedit-app.c b/editors/gedit/files/patch-gedit_gedit-app.c deleted file mode 100644 index cd43b7717138..000000000000 --- a/editors/gedit/files/patch-gedit_gedit-app.c +++ /dev/null @@ -1,16 +0,0 @@ ---- gedit/gedit-app.c.orig 2022-03-03 06:07:06 UTC -+++ gedit/gedit-app.c -@@ -671,13 +671,6 @@ gedit_app_startup (GApplication *application) - - setup_theme_extensions (GEDIT_APP (application)); - --#ifndef ENABLE_GVFS_METADATA -- cache_dir = gedit_dirs_get_user_cache_dir (); -- metadata_filename = g_build_filename (cache_dir, "gedit-metadata.xml", NULL); -- priv->metadata_manager = gedit_metadata_manager_new (metadata_filename); -- g_free (metadata_filename); --#endif -- - /* Load/init settings */ - _gedit_settings_get_singleton (); - priv->ui_settings = g_settings_new ("org.gnome.gedit.preferences.ui"); diff --git a/editors/gedit/files/patch-gedit_gedit-dirs_c b/editors/gedit/files/patch-gedit_gedit-dirs_c new file mode 100644 index 000000000000..d2f8c93f29df --- /dev/null +++ b/editors/gedit/files/patch-gedit_gedit-dirs_c @@ -0,0 +1,58 @@ +$OpenBSD: patch-gedit_gedit-dirs_c,v 1.1 2022/02/18 08:33:43 sthen Exp $ + +From ba2662ff9ee99ef0d85023b06053792fd3eb9272 Mon Sep 17 00:00:00 2001 +From: Laurent Bigonville <bigon@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 * diff --git a/editors/gedit/files/patch-gedit_gedit-dirs_h b/editors/gedit/files/patch-gedit_gedit-dirs_h new file mode 100644 index 000000000000..44128d418f46 --- /dev/null +++ b/editors/gedit/files/patch-gedit_gedit-dirs_h @@ -0,0 +1,28 @@ +$OpenBSD: patch-gedit_gedit-dirs_h,v 1.1 2022/02/18 08:33:43 sthen Exp $ + +From ba2662ff9ee99ef0d85023b06053792fd3eb9272 Mon Sep 17 00:00:00 2001 +From: Laurent Bigonville <bigon@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202203180319.22I3JBYc083209>