From: stuff overlay maintainer
Subject: Drop bindings for Pango APIs removed upstream

x11-libs/pango stopped exporting two private/legacy symbols that
pygtk's pango.defs still tries to bind:

  - pango_font_metrics_new (a constructor for what was always
    meant to be reffed/unreffed; gone since the move away from
    PANGO_ENABLE_BACKEND-style internals)
  - pango_font_map_get_shape_engine_type (the shape-engine
    plumbing was removed alongside find_shaper, dropped in
    pygtk-2.24.0-pango-1.44.patch)

These bindings have no callers outside pygtk's generated code,
and Pango >= 1.50 fails to compile pango.c against pygtk because
the implicit-function-declaration call sites become hard errors
on modern gcc.

Also drop the two `define-virtual get_metrics` blocks (PangoFont
and PangoFontset). Their reverse-wrappers pull in calls to
pango_font_metrics_new() as the boxed-return error path -- that
emission is hardcoded in pygobject's reversewrapper.py for any
virtual returning PangoFontMetrics*. Without the virtuals, the
codegen never reaches that path. The lost capability is "Python
subclasses overriding the PangoFont/PangoFontset get_metrics
virtual," which has no real-world consumers and is the cheapest
surface to give up.

Drop the obsolete define-* blocks (and the now-empty
PANGO_ENABLE_BACKEND ifdef wrapper around font_metrics_new) so
the codegen no longer emits calls to removed symbols.

--- a/pango.defs
+++ b/pango.defs
@@ -1217,15 +1217,6 @@
   (return-type "int")
 )

-(ifdef PANGO_ENABLE_BACKEND
-
-(define-function font_metrics_new
-  (c-name "pango_font_metrics_new")
-  (is-constructor-of "PangoFontMetrics")
-  (return-type "PangoFontMetrics*")
-)
-) ;; PANGO_ENABLE_BACKEND
-
 (define-function pango_font_family_get_type
   (c-name "pango_font_family_get_type")
   (return-type "GType")
@@ -1410,14 +1401,6 @@
   )
 )

-(define-virtual get_metrics
-  (of-object "PangoFont")
-  (return-type "PangoFontMetrics*")
-  (parameters
-    '("PangoLanguage*" "language")
-  )
-)
-
 (define-virtual get_font_map
   (of-object "PangoFont")
   (return-type "PangoFontMap*")
@@ -1467,12 +1450,6 @@
   )
 )

-(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
   (of-object "PangoFontMap")
   (c-name "pango_font_map_create_context")
@@ -1581,11 +1558,6 @@
   )
 )

-(define-virtual get_metrics
-  (of-object "PangoFontset")
-  (return-type "PangoFontMetrics*")
-)
-
 (define-virtual get_language
   (of-object "PangoFontset")
   (return-type "PangoLanguage*")
