From d5dc6d05db4f101d84b4b9eb812dd257f4344f9e8d814520ca15632f64b2b0e5 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 20 Jun 2024 11:50:58 +0000 Subject: [PATCH] - Add pygtk2-c99.patch to fix C99 violations that prevent building of the package with GCC 14 [boo#1225916]. OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/python-gtk?expand=0&rev=8 --- pygtk2-c99.patch | 17 +++++++++++++++++ python-gtk.changes | 6 ++++++ python-gtk.spec | 5 ++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 pygtk2-c99.patch diff --git a/pygtk2-c99.patch b/pygtk2-c99.patch new file mode 100644 index 0000000..404447d --- /dev/null +++ b/pygtk2-c99.patch @@ -0,0 +1,17 @@ +diff --git a/pango.override b/pango.override +index afe43aba3a6ebe81..3e33e1b598322096 100644 +--- a/pango.override ++++ b/pango.override +@@ -27,6 +27,12 @@ headers + #include + #include + ++/* These internal functions are still exported, so just declare them ++ here. There does not seem to be a simple way to ween pygtk2 off ++ them. */ ++PangoFontMetrics *pango_font_metrics_new (void); ++const char *pango_font_map_get_shape_engine_type (PangoFontMap *); ++ + typedef struct { + PyObject *func, *data; + } PyGtkCustomNotify; diff --git a/python-gtk.changes b/python-gtk.changes index 9ab5142..39cf793 100644 --- a/python-gtk.changes +++ b/python-gtk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 19 14:26:15 UTC 2024 - Martin Jambor + +- Add pygtk2-c99.patch to fix C99 violations that prevent building of + the package with GCC 14 [boo#1225916]. + ------------------------------------------------------------------- Mon Nov 27 14:34:35 UTC 2023 - Dominique Leuenberger diff --git a/python-gtk.spec b/python-gtk.spec index 0196184..70511e9 100644 --- a/python-gtk.spec +++ b/python-gtk.spec @@ -1,7 +1,7 @@ # # spec file for package python-gtk # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,9 @@ Source: http://ftp.gnome.org/pub/GNOME/sources/pygtk/2.24/pygtk-%{versio Patch0: pygtk-2.22.0-capsule.patch # PATCH-FIX-UPSTREAM pygtk-Drop-the-PangoFont-find_shaper-virtual-method.patch dimstar@opensuse.org -- Drop the PangoFont find_shaper virtual method Patch1: https://raw.githubusercontent.com/flathub/org.glimpse_editor.Glimpse/master/patches/pygtk-Drop-the-PangoFont-find_shaper-virtual-method.patch +# Patch to fix C99 violations [boo#1225916] +# originally from https://bugzilla.redhat.com/show_bug.cgi?id=2190017 +Patch2: pygtk2-c99.patch BuildRequires: fdupes # Only for directory ownership: BuildRequires: gtk-doc