Package: gringotts
Version: 1.2.10-3
Followup-For: Bug #957312
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch
Control: tags -1 patch

Hi,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/fix-build-with-gcc10.patch: Cherrypick/modify upstream Git commit to
    fix FTBFS with GCC 10.

Thanks for considering the patch.

Logan
diff -Nru gringotts-1.2.10/debian/patches/fix-build-with-gcc-10.patch 
gringotts-1.2.10/debian/patches/fix-build-with-gcc-10.patch
--- gringotts-1.2.10/debian/patches/fix-build-with-gcc-10.patch 1969-12-31 
19:00:00.000000000 -0500
+++ gringotts-1.2.10/debian/patches/fix-build-with-gcc-10.patch 2021-01-17 
22:14:40.000000000 -0500
@@ -0,0 +1,225 @@
+From dfeb8b6a4b2fdc9ba61ed64a72a73c44cc5a9faf Mon Sep 17 00:00:00 2001
+From: Shlomi Fish <shlo...@shlomifish.org>
+Date: Tue, 26 May 2020 12:23:14 +0300
+Subject: [PATCH] extern decls fix for recent gcc.
+
+---
+ src/grg_attachs.h    |  2 +-
+ src/grg_entries.h    |  2 +-
+ src/grg_menus.c      | 15 +++++++++++++++
+ src/grg_menus.h      | 14 +++++++-------
+ src/grg_pix.h        | 14 +++++++-------
+ src/grg_prefs.h      | 36 ++++++++++++++++++------------------
+ src/grg_recent_dox.h |  8 ++++----
+ src/grg_widgets.h    |  2 +-
+ src/gringotts.h      |  6 +++---
+ 10 files changed, 58 insertions(+), 42 deletions(-)
+
+diff --git a/src/grg_attachs.h b/src/grg_attachs.h
+index d8df7ac..1442ff9 100644
+--- a/src/grg_attachs.h
++++ b/src/grg_attachs.h
+@@ -24,7 +24,7 @@
+ 
+ #include <gtk/gtk.h>
+ 
+-gint current_attach_ID;
++extern gint current_attach_ID;
+ 
+ gint grg_attach_file (gchar * path, GtkWidget * parent);
+ void grg_remove_attachment (void);
+diff --git a/src/grg_entries.h b/src/grg_entries.h
+index 63102d3..dc3872a 100644
+--- a/src/grg_entries.h
++++ b/src/grg_entries.h
+@@ -24,7 +24,7 @@
+ 
+ /* current element. */
+ /* MUST BE USED ONLY BY grg_attachs.h !!!! */
+-GList *current;
++extern GList *current;
+ 
+ /* Appends a new entry to the list */
+ void grg_entries_append (void);
+diff --git a/src/grg_menus.c b/src/grg_menus.c
+index f952e2a..50163a1 100644
+--- a/src/grg_menus.c
++++ b/src/grg_menus.c
+@@ -31,6 +31,21 @@
+ 
+ #include <gdk/gdkkeysyms.h>
+ 
++/* menu File */
++GtkWidget *bnew, *bopen, *bsave, *bsas, *brev, *bclose, *bquit;
++
++/* menu Edit */
++GtkWidget *badd, *brem, *bcut, *bcop, *bpaste, *bfind, *bfinda, *bpwd, *bpref;
++
++/* menu Navigation */
++GtkWidget *bmfirst, *bmback, *bmfor, *bmlast, *bmind;
++
++/* menu Tools */
++GtkWidget *bwipe;
++
++/* menu Help */
++GtkWidget *babo;
++
+ #define NEW_MENU_ITEM(var, text, cb, data, parent, img, key, mod) \
+       var = gtk_image_menu_item_new_with_mnemonic(text); \
+       gtk_menu_shell_append (GTK_MENU_SHELL (parent), var); \
+diff --git a/src/grg_menus.h b/src/grg_menus.h
+index 47e5088..eb1ca45 100644
+--- a/src/grg_menus.h
++++ b/src/grg_menus.h
+@@ -25,22 +25,22 @@
+ #include <gtk/gtk.h>
+ 
+ /* menu File */
+-GtkWidget *bnew, *bopen, *bsave, *bsas, *brev, *bclose, *bquit;
++extern GtkWidget *bnew, *bopen, *bsave, *bsas, *brev, *bclose, *bquit;
+ 
+ /* menu Edit */
+-GtkWidget *badd, *brem, *bcut, *bcop, *bpaste, *bfind, *bfinda, *bpwd, *bpref;
++extern GtkWidget *badd, *brem, *bcut, *bcop, *bpaste, *bfind, *bfinda, *bpwd, 
*bpref;
+ 
+ /* menu Navigation */
+-GtkWidget *bmfirst, *bmback, *bmfor, *bmlast, *bmind;
++extern GtkWidget *bmfirst, *bmback, *bmfor, *bmlast, *bmind;
+ 
+ /* menu Tools */
+-GtkWidget *bwipe;
++extern GtkWidget *bwipe;
+ 
+ /* menu Help */
+-GtkWidget *babo;
++extern GtkWidget *babo;
+ 
+ /*Makes a menubar, within a handlebox, and returns the GtkWidget */
+-GtkWidget *grg_menu_create (GtkWidget * window);
++extern GtkWidget *grg_menu_create (GtkWidget * window);
+ 
+-void grg_menu_update (void);
++extern void grg_menu_update (void);
+ #endif
+diff --git a/src/grg_pix.h b/src/grg_pix.h
+index bbb92b2..23937b6 100644
+--- a/src/grg_pix.h
++++ b/src/grg_pix.h
+@@ -22,13 +22,13 @@
+ #ifndef GRG_PIX_H
+ #define GRG_PIX_H
+ 
+-const char *red_xpm[58];
+-const char *yellow_xpm[58];
+-const char *green_xpm[58];
+-const char *optimal_xpm[94];
++extern const char *red_xpm[58];
++extern const char *yellow_xpm[58];
++extern const char *green_xpm[58];
++extern const char *optimal_xpm[94];
+ 
+-const char *splash_xpm[180];
++extern const char *splash_xpm[180];
+ 
+-const char *wait_xpm[82];
+-const char *clip_xpm[17];
++extern const char *wait_xpm[82];
++extern const char *clip_xpm[17];
+ #endif
+diff --git a/src/grg_prefs.h b/src/grg_prefs.h
+index 7510633..cf37ced 100644
+--- a/src/grg_prefs.h
++++ b/src/grg_prefs.h
+@@ -24,24 +24,24 @@
+ 
+ #include <gtk/gtk.h>
+ 
+-gboolean grg_prefs_warn4overwrite;
+-gboolean grg_prefs_bak_files;
+-gboolean grg_prefs_splash;
+-gboolean grg_prefs_tray;
+-gboolean grg_prefs_clip_clear_on_close;
+-gboolean grg_prefs_clip_clear_on_quit;
+-gint grg_prefs_xpire;
+-gint grg_prefs_wipe_passes;
+-gint grg_prefs_mainwin_width, grg_prefs_mainwin_height;
++extern gboolean grg_prefs_warn4overwrite;
++extern gboolean grg_prefs_bak_files;
++extern gboolean grg_prefs_splash;
++extern gboolean grg_prefs_tray;
++extern gboolean grg_prefs_clip_clear_on_close;
++extern gboolean grg_prefs_clip_clear_on_quit;
++extern gint grg_prefs_xpire;
++extern gint grg_prefs_wipe_passes;
++extern gint grg_prefs_mainwin_width, grg_prefs_mainwin_height;
+ 
+-gchar *get_pref_file (void);
+-void set_pref_file (const gchar * newval);
+-gchar *get_pref_font_string (void);
+-void set_pref_font_string (const gchar * newval);
+-void set_pref_font_string_from_editor (void);
++extern gchar *get_pref_file (void);
++extern void set_pref_file (const gchar * newval);
++extern gchar *get_pref_font_string (void);
++extern void set_pref_font_string (const gchar * newval);
++extern void set_pref_font_string_from_editor (void);
+ 
+-void grg_pref_dialog (GtkWidget * parent);
+-void grg_prefs_update (void);
+-void grg_prefs_free (void);
+-void grg_prefs_reset_defaults (void);
++extern void grg_pref_dialog (GtkWidget * parent);
++extern void grg_prefs_update (void);
++extern void grg_prefs_free (void);
++extern void grg_prefs_reset_defaults (void);
+ #endif
+diff --git a/src/grg_recent_dox.h b/src/grg_recent_dox.h
+index 8afe08c..e074053 100644
+--- a/src/grg_recent_dox.h
++++ b/src/grg_recent_dox.h
+@@ -24,10 +24,10 @@
+ 
+ #define GRG_RECENT_LIMIT      6
+ 
+-GSList *grg_recent_dox;
++extern GSList *grg_recent_dox;
+ 
+-void grg_recent_dox_init (void);
+-void grg_recent_dox_deinit (void);
+-void grg_recent_dox_push (const gchar * file);
++extern void grg_recent_dox_init (void);
++extern void grg_recent_dox_deinit (void);
++extern void grg_recent_dox_push (const gchar * file);
+ 
+ #endif
+diff --git a/src/grg_widgets.h b/src/grg_widgets.h
+index e833aac..b58ae74 100644
+--- a/src/grg_widgets.h
++++ b/src/grg_widgets.h
+@@ -25,7 +25,7 @@
+ #include "grg_defs.h"
+ #include <gtk/gtk.h>
+ 
+-gboolean mapIsUTF;
++extern gboolean mapIsUTF;
+ 
+ /* Shows and manages a dialog that asks for a string. */
+ gchar *grg_input_dialog (gchar * title, gchar * qtext, gchar * preset,
+diff --git a/src/gringotts.h b/src/gringotts.h
+index ba1497e..7f47712 100644
+--- a/src/gringotts.h
++++ b/src/gringotts.h
+@@ -24,10 +24,10 @@
+ 
+ #include "grg_defs.h"
+ 
+-GList *garbage;
++extern GList *garbage;
+ 
+-GRG_CTX gctx;
+-glong pwdbirth;
++extern GRG_CTX gctx;
++extern glong pwdbirth;
+ 
+       /*callbacks for menu items */
+ 
diff -Nru gringotts-1.2.10/debian/patches/series 
gringotts-1.2.10/debian/patches/series
--- gringotts-1.2.10/debian/patches/series      2017-12-09 11:58:39.000000000 
-0500
+++ gringotts-1.2.10/debian/patches/series      2021-01-17 22:13:21.000000000 
-0500
@@ -3,3 +3,4 @@
 fix-desktop-file.patch
 fix-mkinstalldirs-old-gettext.patch
 fix-compile-with-hardening-flags.patch
+fix-build-with-gcc-10.patch

Reply via email to