Fix clang 15 build: cope with pango functions formerly exported

Drop the binding for pango_font_map_get_shape_engine_type().
pango_font_metrics_new() is trickier since it's used in several places,
so provide a local declaration instead.  ok ajacoutot@ (maintainer)
This commit is contained in:
jca 2023-01-25 13:15:35 +00:00
parent 7c95aa460f
commit acadd755bc
3 changed files with 31 additions and 1 deletions

View File

@ -5,7 +5,7 @@ COMMENT= GTK+2 Python bindings
GNOME_PROJECT= pygtk
GNOME_VERSION= 2.24.0
PKGNAME= py-gtk2-${VERSION}
REVISION= 12
REVISION= 13
CATEGORIES= x11

View File

@ -3,6 +3,8 @@ From: Jordan Petridis <jpetridis@gnome.org>
Date: Thu, 24 Oct 2019 22:58:36 +0200
Subject: [PATCH] Drop the PangoFont find_shaper virtual method
Hunk #2: drop get_shape_engine_type, not exported any more.
Index: pango.defs
--- pango.defs.orig
+++ pango.defs
@ -22,3 +24,16 @@ Index: pango.defs
(define-virtual get_glyph_extents
(of-object "PangoFont")
(return-type "none")
@@ -1465,12 +1456,6 @@
'("PangoFontFamily***" "families")
'("int*" "n_families")
)
-)
-
-(define-method get_shape_engine_type
- (of-object "PangoFontMap")
- (c-name "pango_font_map_get_shape_engine_type")
- (return-type "const-char*")
)
(define-method create_context

View File

@ -0,0 +1,15 @@
Provide decl for pango_font_metrics_new(), not declared in a public header
any more.
Index: pango.override
--- pango.override.orig
+++ pango.override
@@ -27,6 +27,8 @@ headers
#include <pygobject.h>
#include <pango/pango.h>
+PangoFontMetrics *pango_font_metrics_new(void);
+
typedef struct {
PyObject *func, *data;
} PyGtkCustomNotify;