From fcf617b0ff75cb9a87329313a6412456aa0314d4 Mon Sep 17 00:00:00 2001 From: Johannes Hermann Date: Thu, 9 Apr 2026 08:05:40 +0200 Subject: [PATCH 1/3] remove pango apis if not present --- pygtk/pygtk-pango-fix-removed-apis.patch | 39 ++++++++++++++++++++++++ pygtk/pygtk.json | 7 ++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 pygtk/pygtk-pango-fix-removed-apis.patch diff --git a/pygtk/pygtk-pango-fix-removed-apis.patch b/pygtk/pygtk-pango-fix-removed-apis.patch new file mode 100644 index 00000000..4208fb47 --- /dev/null +++ b/pygtk/pygtk-pango-fix-removed-apis.patch @@ -0,0 +1,39 @@ +--- a/pango.defs ++++ b/pango.defs +@@ -1410,13 +1410,6 @@ + ) + ) + +-(define-virtual get_metrics +- (of-object "PangoFont") +- (return-type "PangoFontMetrics*") +- (parameters +- '("PangoLanguage*" "language") +- ) +-) + + (define-virtual get_font_map + (of-object "PangoFont") +@@ -1467,11 +1460,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") +@@ -1581,10 +1569,6 @@ + ) + ) + +-(define-virtual get_metrics +- (of-object "PangoFontset") +- (return-type "PangoFontMetrics*") +-) + + (define-virtual get_language + (of-object "PangoFontset") \ No newline at end of file diff --git a/pygtk/pygtk.json b/pygtk/pygtk.json index 5319e4b3..8906286c 100644 --- a/pygtk/pygtk.json +++ b/pygtk/pygtk.json @@ -13,10 +13,15 @@ "type": "patch", "path": "pygtk.patch" }, + { + "type": "file", + "path": "pygtk-pango-fix-removed-apis.patch" + }, { "type": "shell", "commands": [ - "cp -p /usr/share/automake-*/config.{sub,guess} ." + "cp -p /usr/share/automake-*/config.{sub,guess} .", + "grep -rq pango_font_metrics_new /usr/include/pango-1.0/pango/ || patch -p1 < pygtk-pango-fix-removed-apis.patch" ] } ], From 4b18318066bf58e176693aca42453048723adf67 Mon Sep 17 00:00:00 2001 From: linuxrider Date: Fri, 10 Apr 2026 07:57:58 +0200 Subject: [PATCH 2/3] turn errors in warnings and remove pango patch --- pygtk/pygtk-pango-fix-removed-apis.patch | 39 ------------------------ pygtk/pygtk.json | 10 ++---- 2 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 pygtk/pygtk-pango-fix-removed-apis.patch diff --git a/pygtk/pygtk-pango-fix-removed-apis.patch b/pygtk/pygtk-pango-fix-removed-apis.patch deleted file mode 100644 index 4208fb47..00000000 --- a/pygtk/pygtk-pango-fix-removed-apis.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/pango.defs -+++ b/pango.defs -@@ -1410,13 +1410,6 @@ - ) - ) - --(define-virtual get_metrics -- (of-object "PangoFont") -- (return-type "PangoFontMetrics*") -- (parameters -- '("PangoLanguage*" "language") -- ) --) - - (define-virtual get_font_map - (of-object "PangoFont") -@@ -1467,11 +1460,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") -@@ -1581,10 +1569,6 @@ - ) - ) - --(define-virtual get_metrics -- (of-object "PangoFontset") -- (return-type "PangoFontMetrics*") --) - - (define-virtual get_language - (of-object "PangoFontset") \ No newline at end of file diff --git a/pygtk/pygtk.json b/pygtk/pygtk.json index 8906286c..baa1d549 100644 --- a/pygtk/pygtk.json +++ b/pygtk/pygtk.json @@ -1,7 +1,8 @@ { "name": "pygtk", "config-opts": [ - "--disable-docs" + "--disable-docs", + "CFLAGS=-Wno-error=implicit-function-declaration -Wno-error=int-conversion" ], "sources": [ { @@ -13,15 +14,10 @@ "type": "patch", "path": "pygtk.patch" }, - { - "type": "file", - "path": "pygtk-pango-fix-removed-apis.patch" - }, { "type": "shell", "commands": [ - "cp -p /usr/share/automake-*/config.{sub,guess} .", - "grep -rq pango_font_metrics_new /usr/include/pango-1.0/pango/ || patch -p1 < pygtk-pango-fix-removed-apis.patch" + "cp -p /usr/share/automake-*/config.{sub,guess} ." ] } ], From 7a049c4a6a1202c87872dd083eac0c6731fe40ea Mon Sep 17 00:00:00 2001 From: Johannes Hermann Date: Fri, 10 Apr 2026 12:19:51 +0200 Subject: [PATCH 3/3] use build-options instead of config-options for cflags --- pygtk/pygtk.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pygtk/pygtk.json b/pygtk/pygtk.json index baa1d549..2f6c50bd 100644 --- a/pygtk/pygtk.json +++ b/pygtk/pygtk.json @@ -1,9 +1,11 @@ { "name": "pygtk", "config-opts": [ - "--disable-docs", - "CFLAGS=-Wno-error=implicit-function-declaration -Wno-error=int-conversion" + "--disable-docs" ], + "build-options": { + "cflags": "-Wno-error=implicit-function-declaration -Wno-error=int-conversion" + }, "sources": [ { "type": "archive",