From b95cd84205032402333f390997daa5c0d76dfa6e Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Fri, 8 Mar 2024 18:17:16 -0500 Subject: [PATCH 01/23] Update glib to version 2.80.0 --- gvsbuild/projects/glib.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/glib.py b/gvsbuild/projects/glib.py index f28c036bd..faf642ab6 100644 --- a/gvsbuild/projects/glib.py +++ b/gvsbuild/projects/glib.py @@ -24,11 +24,11 @@ def __init__(self): Project.__init__( self, "glib", - version="2.78.4", + version="2.80.0", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/glib", archive_url="https://download.gnome.org/sources/glib/{major}.{minor}/glib-{version}.tar.xz", - hash="24b8e0672dca120cc32d394bccb85844e732e04fe75d18bb0573b2dbc7548f63", + hash="8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d", dependencies=[ "ninja", "meson", @@ -44,8 +44,10 @@ def __init__(self): ], ) self.add_param("-Dman=false") + self.add_param("-Dman-pages=disabled") self.add_param("-Dtests=false") self.add_param("-Dgtk_doc=false") + self.add_param("-Ddocumentation=false") def build(self): Meson.build(self) From f6a2bb0540d326aeed1a49033732217879dad30b Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Thu, 14 Mar 2024 19:31:00 -0400 Subject: [PATCH 02/23] Update gobject-introspection to version 1.80.0 --- gvsbuild/projects/glib.py | 6 ++++++ gvsbuild/projects/gobject_introspection.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/glib.py b/gvsbuild/projects/glib.py index faf642ab6..a796d1899 100644 --- a/gvsbuild/projects/glib.py +++ b/gvsbuild/projects/glib.py @@ -43,6 +43,12 @@ def __init__(self): "002-python-312-distutils-to-packaging.patch", ], ) + if self.opts.enable_gi: + enable_gi = "enabled" + else: + enable_gi = "disabled" + + self.add_param(f"-Dintrospection={enable_gi}") self.add_param("-Dman=false") self.add_param("-Dman-pages=disabled") self.add_param("-Dtests=false") diff --git a/gvsbuild/projects/gobject_introspection.py b/gvsbuild/projects/gobject_introspection.py index 0baa158fc..aafa04a34 100644 --- a/gvsbuild/projects/gobject_introspection.py +++ b/gvsbuild/projects/gobject_introspection.py @@ -28,11 +28,11 @@ def __init__(self): Project.__init__( self, "gobject-introspection", - version="1.78.1", + version="1.80.0", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/gobject-introspection", archive_url="https://download.gnome.org/sources/gobject-introspection/{major}.{minor}/gobject-introspection-{version}.tar.xz", - hash="bd7babd99af7258e76819e45ba4a6bc399608fe762d83fde3cac033c50841bb4", + hash="54a90b4a3cb82fd6a3e8b8a7775178ebc954af3c2bc726ed5961e6503ce62636", dependencies=[ "ninja", "meson", From 86315277bffea3f71daea246a3b1e13b5b2d53f1 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sun, 17 Mar 2024 13:07:33 -0400 Subject: [PATCH 03/23] Update GLib-networking to 2.80.0 --- gvsbuild/projects/glib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/glib.py b/gvsbuild/projects/glib.py index a796d1899..e9d6ff4f8 100644 --- a/gvsbuild/projects/glib.py +++ b/gvsbuild/projects/glib.py @@ -66,11 +66,11 @@ def __init__(self): Project.__init__( self, "glib-networking", - version="2.78.1", + version="2.80.0", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/glib-networking", archive_url="https://download.gnome.org/sources/glib-networking/{major}.{minor}/glib-networking-{version}.tar.xz", - hash="e48f2ddbb049832cbb09230529c5e45daca9f0df0eda325f832f7379859bf09f", + hash="d8f4f1aab213179ae3351617b59dab5de6bcc9e785021eee178998ebd4bb3acf", dependencies=[ "pkgconf", "ninja", From 01c8b518774e4bbd3ad9bfd2e9bf5115fd9f1a03 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Thu, 14 Mar 2024 19:54:26 -0400 Subject: [PATCH 04/23] Update GTK to version 4.14.1 --- gvsbuild/projects/gtk.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/gtk.py b/gvsbuild/projects/gtk.py index ac7aa12d5..66c922053 100644 --- a/gvsbuild/projects/gtk.py +++ b/gvsbuild/projects/gtk.py @@ -122,12 +122,12 @@ def __init__(self): self, "gtk4", prj_dir="gtk4", - version="4.12.5", + version="4.14.1", lastversion_major=4, lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/gtk", archive_url="https://download.gnome.org/sources/gtk/{major}.{minor}/gtk-{version}.tar.xz", - hash="28b356d590ee68ef626e2ef9820b2dd21441484a9a042a5a3f0c40e9dfc4f4f8", + hash="fcefb3f132f8cc4711a9efa5b353c9ae9bb5eeff0246fa74dbc2f2f839b9e308", dependencies=[ "gdk-pixbuf", "pango", @@ -150,6 +150,7 @@ def __init__(self): self.add_param("-Dbuild-demos=false") self.add_param("-Dbuild-examples=false") self.add_param("-Dmedia-gstreamer=disabled") + self.add_param("-Dvulkan=disabled") def build(self): Meson.build(self) From 7ace145430a5341cac01015ad0f0744908072174 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Thu, 14 Mar 2024 19:58:24 -0400 Subject: [PATCH 05/23] Update PyGObject to version 3.48.1 --- gvsbuild/projects/pygobject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/pygobject.py b/gvsbuild/projects/pygobject.py index 166e4e58d..b7197d95d 100644 --- a/gvsbuild/projects/pygobject.py +++ b/gvsbuild/projects/pygobject.py @@ -26,11 +26,11 @@ def __init__(self): Project.__init__( self, "pygobject", - version="3.48.0", + version="3.48.1", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/pygobject", archive_url="https://download.gnome.org/sources/pygobject/{major}.{minor}/pygobject-{version}.tar.xz", - hash="e6aa8dd78284905ad8cad0f7be8cd59e6ab453b7b48803d0d70ecb8db5faea76", + hash="3a0a2c0c0f25931b5840649c54834b9e58a63148d37fa9f6308887b7027e15c2", dependencies=["pycairo", "gobject-introspection", "libffi"], patches=[ "001-pygobject-py38-load-dll.patch", From 0bae33f527f6865d71b4d81fc1ada6845e6c7aba Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sun, 17 Mar 2024 12:06:01 -0400 Subject: [PATCH 06/23] Update pangomm to version 2.52.0 --- gvsbuild/projects/pangomm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/pangomm.py b/gvsbuild/projects/pangomm.py index a1c768991..61dcd9e0e 100644 --- a/gvsbuild/projects/pangomm.py +++ b/gvsbuild/projects/pangomm.py @@ -25,11 +25,11 @@ def __init__(self): self, "pangomm", prj_dir="pangomm", - version="2.50.2", + version="2.52.0", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/pangomm", archive_url="https://download.gnome.org/sources/pangomm/{major}.{minor}/pangomm-{version}.tar.xz", - hash="1bc5ab4ea3280442580d68318226dab36ceedfc3288f9d83711cf7cfab50a9fb", + hash="34a134126a6484ff12f774358c36ecc44d0e9df094e1b83796d9774bb7d24947", dependencies=[ "meson", "ninja", From 6eb04d82479171fe6da18e3bf3b075ea219c3300 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sun, 17 Mar 2024 12:06:41 -0400 Subject: [PATCH 07/23] Update gtkmm to version 4.14.0 --- gvsbuild/projects/gtkmm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/gtkmm.py b/gvsbuild/projects/gtkmm.py index c90a53dd1..56e4aeb1b 100644 --- a/gvsbuild/projects/gtkmm.py +++ b/gvsbuild/projects/gtkmm.py @@ -25,12 +25,12 @@ def __init__(self): self, "gtkmm", prj_dir="gtkmm", - version="4.12.0", + version="4.14.0", lastversion_major=4, lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/gtkmm", archive_url="https://download.gnome.org/sources/gtkmm/{major}.{minor}/gtkmm-{version}.tar.xz", - hash="fbc3e7618123345c0148ef71abb6548d421f52bb224fbda34875b677dc032c92", + hash="9350a0444b744ca3dc69586ebd1b6707520922b6d9f4f232103ce603a271ecda", dependencies=[ "gdk-pixbuf", "pangomm", From e34e3ce95db743cdd73c9ff5dfeebe2a91a5eee6 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sun, 17 Mar 2024 12:08:15 -0400 Subject: [PATCH 08/23] Update gtksourceview to version 5.12.0 --- gvsbuild/projects/gtksourceview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/gtksourceview.py b/gvsbuild/projects/gtksourceview.py index e11a80047..2442fa141 100644 --- a/gvsbuild/projects/gtksourceview.py +++ b/gvsbuild/projects/gtksourceview.py @@ -49,12 +49,12 @@ def __init__(self): Project.__init__( self, "gtksourceview5", - version="5.10.0", + version="5.12.0", lastversion_major=5, lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/gtksourceview", archive_url="https://download.gnome.org/sources/gtksourceview/{major}.{minor}/gtksourceview-{version}.tar.xz", - hash="b38a3010c34f59e13b05175e9d20ca02a3110443fec2b1e5747413801bc9c23f", + hash="daf32ff5d3150d6385917d3503a85b9e047ba158b2b03079314c9c00813fa01f", dependencies=["meson", "ninja", "gtk4", "pkgconf", "libxml2"], ) if Project.opts.enable_gi: From 2cdd36954b706fd7d94277f9ad683388ba052568 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sun, 17 Mar 2024 13:08:22 -0400 Subject: [PATCH 09/23] Update gsettings-desktop-schemas to version 46.0 --- gvsbuild/projects/gsettings_desktop_schemas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/gsettings_desktop_schemas.py b/gvsbuild/projects/gsettings_desktop_schemas.py index 2b12a7bc9..789b7bb66 100644 --- a/gvsbuild/projects/gsettings_desktop_schemas.py +++ b/gvsbuild/projects/gsettings_desktop_schemas.py @@ -24,10 +24,10 @@ def __init__(self): Project.__init__( self, "gsettings-desktop-schemas", - version="45.0", + version="46.0", repository="https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas", archive_url="https://download.gnome.org/sources/gsettings-desktop-schemas/{major}/gsettings-desktop-schemas-{version}.tar.xz", - hash="365c8d04daf79b38c8b3dc9626349a024f9e4befdd31fede74b42f7a9fbe0ae2", + hash="493a46a1161b6388d57aa72f632a79ce96c42d5ffbd1d0b00f496ec5876f8575", dependencies=["meson", "ninja", "pkgconf", "glib"], ) if self.opts.enable_gi: From 5e57ac1746169d5c9db89bbd951ac23d28fee5dd Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 23 Mar 2024 08:22:49 -0400 Subject: [PATCH 10/23] Update adwaita-icon-theme to version 46.0 --- .../001-fix-relative-cursor-path.patch | 25 ------------------- gvsbuild/projects/adwaita_icon_theme.py | 5 ++-- 2 files changed, 2 insertions(+), 28 deletions(-) delete mode 100644 gvsbuild/patches/adwaita-icon-theme/001-fix-relative-cursor-path.patch diff --git a/gvsbuild/patches/adwaita-icon-theme/001-fix-relative-cursor-path.patch b/gvsbuild/patches/adwaita-icon-theme/001-fix-relative-cursor-path.patch deleted file mode 100644 index 084d24e57..000000000 --- a/gvsbuild/patches/adwaita-icon-theme/001-fix-relative-cursor-path.patch +++ /dev/null @@ -1,25 +0,0 @@ -Subject: [PATCH] Wrong cursor directory ---- -Index: meson.build -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/meson.build b/meson.build ---- a/meson.build (revision 0d44a3fec0171cb8689e79df0186082907533383) -+++ b/meson.build (date 1708871122562) -@@ -27,12 +27,13 @@ - win32_cursors = command_output.stdout().strip().split('\n') - if host_machine.system() == 'windows' - cursors_with_rel_path = [] -+ icons_dir = get_option('datadir') / 'icons' - foreach cursor : win32_cursors - cursors_with_rel_path += f'Adwaita/cursors/@cursor@' - endforeach - install_data( - cursors_with_rel_path, -- install_dir: adwaita_dir, -+ install_dir: icons_dir, - preserve_path: true, - install_tag : 'runtime', - ) diff --git a/gvsbuild/projects/adwaita_icon_theme.py b/gvsbuild/projects/adwaita_icon_theme.py index 9bceaf180..9f740e1d5 100644 --- a/gvsbuild/projects/adwaita_icon_theme.py +++ b/gvsbuild/projects/adwaita_icon_theme.py @@ -26,15 +26,14 @@ def __init__(self): Meson.__init__( self, "adwaita-icon-theme", - version="45.0", + version="46.0", repository="https://gitlab.gnome.org/GNOME/adwaita-icon-theme", archive_url="https://download.gnome.org/sources/adwaita-icon-theme/{major}/adwaita-icon-theme-{version}.tar.xz", - hash="2442bfb06f4e6cc95bf6e2682fdff98fa5eddc688751b9d6215c623cb4e42ff1", + hash="4bcb539bd75d64da385d6fa08cbaa9ddeaceb6ac8e82b85ba6c41117bf5ba64e", dependencies=[ "hicolor-icon-theme", "librsvg", ], - patches=["001-fix-relative-cursor-path.patch"], ) def build(self): From ad2e162feb34f7fd8db83048625c404519c25c55 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 23 Mar 2024 08:24:37 -0400 Subject: [PATCH 11/23] Update glibmm to version 2.80.0 --- gvsbuild/projects/glibmm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/glibmm.py b/gvsbuild/projects/glibmm.py index 3cfa3ae28..ad35acfad 100644 --- a/gvsbuild/projects/glibmm.py +++ b/gvsbuild/projects/glibmm.py @@ -25,11 +25,11 @@ def __init__(self): self, "glibmm", prj_dir="glibmm", - version="2.78.1", + version="2.80.0", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/glibmm", archive_url="https://download.gnome.org/sources/glibmm/{major}.{minor}/glibmm-{version}.tar.xz", - hash="f473f2975d26c3409e112ed11ed36406fb3843fa975df575c22d4cb843085f61", + hash="539b0a29e15a96676c4f0594541250566c5ca44da5d4d87a3732fa2d07909e4a", dependencies=[ "meson", "ninja", From af555a84790652684877c71125594eb8ea51198a Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 23 Mar 2024 11:03:36 -0400 Subject: [PATCH 12/23] Fix wrong usage of GWeakRef in Pango --- .../pango/002-fix-wrong-usage-gweakref.patch | 314 ++++++++++++++++++ gvsbuild/projects/pango.py | 1 + 2 files changed, 315 insertions(+) create mode 100644 gvsbuild/patches/pango/002-fix-wrong-usage-gweakref.patch diff --git a/gvsbuild/patches/pango/002-fix-wrong-usage-gweakref.patch b/gvsbuild/patches/pango/002-fix-wrong-usage-gweakref.patch new file mode 100644 index 000000000..23b162910 --- /dev/null +++ b/gvsbuild/patches/pango/002-fix-wrong-usage-gweakref.patch @@ -0,0 +1,314 @@ +From 20afbb0daaabc13652299ecce87d85583fe6f036 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Tue, 12 Mar 2024 10:10:00 +0100 +Subject: [PATCH 1/3] pangofc-font: rework wrong usage of GWeakRef in + PangoFcFont + +PangoFcFont has a field `PangoFcFontMap *fontmap`, but at various +places, this field is cast to a `GWeakRef` and used with g_weak_ref_*() +API. + +Correctly, all places that set the field, would do so via +g_weak_ref_set(). And "accidentally", sizeof(GWeakRef) is the same as +`sizeof(gpointer)`. The wrong usage happens at the places that access +the fontmap field directly, and assume this is just a plain pointer. + +This mostly works. Note that [1] reworked the representation, so while +another thread accesses the GWeakRef (e.g. by destroying the fontmap), +the pointer gets mangled. If the code would then just access the fontmap +field, it would be mangled. Probably that does not happen, and pango +objects are not unreffed or released on other threads. So it somewhat +worked. + +But it also relies on internals of glib and (since [1]) it relies that +the object is not destroyed on another thread. + +Rework that. Instead of wrongly using a GWeakRef, use +g_object_add_weak_pointer(). That is also not thread-safe, but that +doesn't seem to be a requirement here anyway. + +Note that PangoWin32Font has a similar problem. But it's even more +because it directly assigns pointers instead of using g_weak_ref_set() +(see _pango_cairo_win32_font_new()). That leads to crashes since [1]. + +[1] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3834 + +Fixes: aca468cdc2ea ('Port pangofc-font.c to GWeakRef') +--- + pango/pangofc-font.c | 40 +++++++++++++++------------------------- + pango/pangofc-font.h | 3 ++- + 2 files changed, 17 insertions(+), 26 deletions(-) + +diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c +index d0077b34a..781774d97 100644 +--- a/pango/pangofc-font.c ++++ b/pango/pangofc-font.c +@@ -162,17 +162,16 @@ pango_fc_font_finalize (GObject *object) + { + PangoFcFont *fcfont = PANGO_FC_FONT (object); + PangoFcFontPrivate *priv = fcfont->priv; +- PangoFcFontMap *fontmap; ++ PangoFontMap *fontmap; + + g_slist_foreach (fcfont->metrics_by_lang, (GFunc)free_metrics_info, NULL); + g_slist_free (fcfont->metrics_by_lang); + +- fontmap = g_weak_ref_get ((GWeakRef *) &fcfont->fontmap); ++ fontmap = fcfont->fontmap; + if (fontmap) + { +- _pango_fc_font_map_remove (PANGO_FC_FONT_MAP (fcfont->fontmap), fcfont); +- g_weak_ref_clear ((GWeakRef *) &fcfont->fontmap); +- g_object_unref (fontmap); ++ g_object_remove_weak_pointer (G_OBJECT (fontmap), (gpointer *) &fcfont->fontmap); ++ _pango_fc_font_map_remove (PANGO_FC_FONT_MAP (fontmap), fcfont); + } + + pango_font_description_free (fcfont->description); +@@ -240,7 +239,10 @@ pango_fc_font_set_property (GObject *object, + PangoFcFontMap *fcfontmap = PANGO_FC_FONT_MAP (g_value_get_object (value)); + + g_return_if_fail (fcfont->fontmap == NULL); +- g_weak_ref_set ((GWeakRef *) &fcfont->fontmap, fcfontmap); ++ ++ fcfont->fontmap = (PangoFontMap *) fcfontmap; ++ if (fcfontmap) ++ g_object_add_weak_pointer (G_OBJECT (fcfontmap), (gpointer *) &fcfont->fontmap); + } + goto set_decoder; + +@@ -274,8 +276,8 @@ pango_fc_font_get_property (GObject *object, + case PROP_FONTMAP: + { + PangoFcFont *fcfont = PANGO_FC_FONT (object); +- PangoFontMap *fontmap = g_weak_ref_get ((GWeakRef *) &fcfont->fontmap); +- g_value_take_object (value, fontmap); ++ ++ g_value_set_object (value, fcfont->fontmap); + } + break; + default: +@@ -331,8 +333,6 @@ pango_fc_font_get_coverage (PangoFont *font, + PangoFcFont *fcfont = (PangoFcFont *)font; + PangoFcFontPrivate *priv = fcfont->priv; + FcCharSet *charset; +- PangoFcFontMap *fontmap; +- PangoCoverage *coverage; + + if (priv->decoder) + { +@@ -340,13 +340,10 @@ pango_fc_font_get_coverage (PangoFont *font, + return _pango_fc_font_map_fc_to_coverage (charset); + } + +- fontmap = g_weak_ref_get ((GWeakRef *) &fcfont->fontmap); +- if (!fontmap) ++ if (!fcfont->fontmap) + return pango_coverage_new (); + +- coverage = _pango_fc_font_map_get_coverage (fontmap, fcfont); +- g_object_unref (fontmap); +- return coverage; ++ return _pango_fc_font_map_get_coverage (PANGO_FC_FONT_MAP (fcfont->fontmap), fcfont); + } + + /* For Xft, it would be slightly more efficient to simply to +@@ -477,7 +474,7 @@ pango_fc_font_get_metrics (PangoFont *font, + PangoFontMap *fontmap; + PangoContext *context; + +- fontmap = g_weak_ref_get ((GWeakRef *) &fcfont->fontmap); ++ fontmap = fcfont->fontmap; + if (!fontmap) + return pango_font_metrics_new (); + +@@ -526,7 +523,6 @@ pango_fc_font_get_metrics (PangoFont *font, + } + + g_object_unref (context); +- g_object_unref (fontmap); + } + + return pango_font_metrics_ref (info->metrics); +@@ -1107,17 +1103,11 @@ static PangoLanguage ** + _pango_fc_font_get_languages (PangoFont *font) + { + PangoFcFont * fcfont = PANGO_FC_FONT (font); +- PangoFcFontMap *fontmap; +- PangoLanguage **languages; + +- fontmap = g_weak_ref_get ((GWeakRef *) &fcfont->fontmap); +- if (!fontmap) ++ if (!fcfont->fontmap) + return NULL; + +- languages = _pango_fc_font_map_get_languages (fontmap, fcfont); +- g_object_unref (fontmap); +- +- return languages; ++ return _pango_fc_font_map_get_languages (PANGO_FC_FONT_MAP (fcfont->fontmap), fcfont); + } + + /** +diff --git a/pango/pangofc-font.h b/pango/pangofc-font.h +index 64e577462..5fb20f27b 100644 +--- a/pango/pangofc-font.h ++++ b/pango/pangofc-font.h +@@ -73,7 +73,8 @@ struct _PangoFcFont + PangoFont parent_instance; + + FcPattern *font_pattern; /* fully resolved pattern */ +- PangoFontMap *fontmap; /* associated map */ ++ PangoFontMap *fontmap; /* associated map (not strong reference is held, ++ * but a g_object_add_weak_pointer() guards it) */ + gpointer priv; /* used internally */ + PangoMatrix matrix; /* unused */ + PangoFontDescription *description; +-- +GitLab + + +From 45cf0914d4ee6a3494bdf5c28c60045b5d931acb Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Tue, 12 Mar 2024 10:10:00 +0100 +Subject: [PATCH 2/3] pangocoretext: rework wrong usage of GWeakRef in + PangoFcFont + +Casting a `PangoFontMap *fontmap` field to a `GWeakRef` is not correct. + +Either use GWeakRef API throughout, or don't. + +Don't use `GWeakRef` API. g_object_add_weak_pointer() is sufficient. +It's not thread safe, but neither was the previous code. + +Fixes: a2b560ab7d7c ('Port PangoCoreTextFont to use GWeakRef') +--- + pango/pangocoretext.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/pango/pangocoretext.c b/pango/pangocoretext.c +index 2fc176e41..b39a99f78 100644 +--- a/pango/pangocoretext.c ++++ b/pango/pangocoretext.c +@@ -45,12 +45,9 @@ pango_core_text_font_finalize (GObject *object) + { + PangoCoreTextFont *ctfont = (PangoCoreTextFont *)object; + PangoCoreTextFontPrivate *priv = ctfont->priv; +- PangoCoreTextFontMap* fontmap = g_weak_ref_get ((GWeakRef *)&priv->fontmap); +- if (fontmap) +- { +- g_weak_ref_clear ((GWeakRef *)&priv->fontmap); +- g_object_unref (fontmap); +- } ++ ++ if (priv->fontmap) ++ g_object_remove_weak_pointer (G_OBJECT (priv->fontmap), (gpointer *) &priv->fontmap); + + if (priv->coverage) + g_object_unref (priv->coverage); +@@ -215,7 +212,10 @@ _pango_core_text_font_set_font_map (PangoCoreTextFont *font, + PangoCoreTextFontPrivate *priv = font->priv; + + g_return_if_fail (priv->fontmap == NULL); +- g_weak_ref_set((GWeakRef *) &priv->fontmap, fontmap); ++ ++ priv->fontmap = fontmap; ++ if (fontmap) ++ g_object_add_weak_pointer (G_OBJECT (fontmap), (gpointer *) &priv->fontmap); + } + + PangoCoreTextFace * +-- +GitLab + + +From eb9bc81b19896f94d566af0251af1e3e0f9499e7 Mon Sep 17 00:00:00 2001 +From: Thomas Haller +Date: Tue, 12 Mar 2024 10:10:00 +0100 +Subject: [PATCH 3/3] pangowin32-fontmap: fix wrong usage of GWeakRef in + PangoWin32Font + +Casting a `PangoFontMap *fontmap` field to a `GWeakRef` is not correct. + +Either use GWeakRef API throughout, or don't. + +In particular, assigning a plain pointer to the field (as done in +_pango_cairo_win32_font_new()) and later treat it as GWeakRef leads to a +crash. + +Don't use `GWeakRef` API. g_object_add_weak_pointer() is sufficient. +It's not thread safe, but neither was the previous code. + +Fixes: 16e4dd37e5fd ('Port PangoWin32 to use GWeakRef') +--- + pango/pangocairo-win32font.c | 8 ++++++-- + pango/pangowin32-fontmap.c | 7 ++++++- + pango/pangowin32.c | 9 ++------- + 3 files changed, 14 insertions(+), 10 deletions(-) + +diff --git a/pango/pangocairo-win32font.c b/pango/pangocairo-win32font.c +index 74dfeab1e..8d00e4bff 100644 +--- a/pango/pangocairo-win32font.c ++++ b/pango/pangocairo-win32font.c +@@ -287,8 +287,12 @@ _pango_cairo_win32_font_new (PangoCairoWin32FontMap *cwfontmap, + win32font = PANGO_WIN32_FONT (cwfont); + + g_assert (win32font->fontmap == NULL); +- win32font->fontmap = (PangoFontMap *) cwfontmap; +- g_object_add_weak_pointer (G_OBJECT (win32font->fontmap), (gpointer *) (gpointer) &win32font->fontmap); ++ ++ if (cwfontmap) ++ { ++ win32font->fontmap = (PangoFontMap *) cwfontmap; ++ g_object_add_weak_pointer (G_OBJECT (win32font->fontmap), (gpointer *) &win32font->fontmap); ++ } + + win32font->win32face = face; + +diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c +index 624ed76da..53c60e4af 100644 +--- a/pango/pangowin32-fontmap.c ++++ b/pango/pangowin32-fontmap.c +@@ -1170,7 +1170,12 @@ pango_win32_font_neww (PangoFontMap *fontmap, + + if (G_UNLIKELY(result->fontmap)) + return result; +- g_weak_ref_set ((GWeakRef *)&result->fontmap, fontmap); ++ ++ if (fontmap) ++ { ++ result->fontmap = fontmap; ++ g_object_add_weak_pointer (G_OBJECT (fontmap), (gpointer *) &result->fontmap); ++ } + + result->size = size; + _pango_win32_make_matching_logfontw (fontmap, lfp, size, &result->logfontw); +diff --git a/pango/pangowin32.c b/pango/pangowin32.c +index 00b797baf..e24a1c337 100644 +--- a/pango/pangowin32.c ++++ b/pango/pangowin32.c +@@ -863,7 +863,6 @@ pango_win32_font_finalize (GObject *object) + { + PangoWin32Font *win32font = (PangoWin32Font *)object; + PangoWin32FontCache *cache = pango_win32_font_map_get_font_cache (win32font->fontmap); +- PangoWin32Font *fontmap; + + if (cache != NULL && win32font->hfont != NULL) + pango_win32_font_cache_unload (cache, win32font->hfont); +@@ -876,12 +875,8 @@ pango_win32_font_finalize (GObject *object) + + g_hash_table_destroy (win32font->glyph_info); + +- fontmap = g_weak_ref_get ((GWeakRef *) &win32font->fontmap); +- if (fontmap) +- { +- g_object_remove_weak_pointer (G_OBJECT (win32font->fontmap), (gpointer *) (gpointer) &win32font->fontmap); +- g_object_unref (fontmap); +- } ++ if (win32font->fontmap) ++ g_object_remove_weak_pointer (G_OBJECT (win32font->fontmap), (gpointer *) &win32font->fontmap); + + G_OBJECT_CLASS (_pango_win32_font_parent_class)->finalize (object); + } +-- +GitLab diff --git a/gvsbuild/projects/pango.py b/gvsbuild/projects/pango.py index 3bb03f5e0..54b854c2d 100644 --- a/gvsbuild/projects/pango.py +++ b/gvsbuild/projects/pango.py @@ -37,6 +37,7 @@ def __init__(self): ], patches=[ "001-fix-double-free-crash.patch", + "002-fix-wrong-usage-gweakref.patch", ], ) if self.opts.enable_gi: From b23e0fb3c16c339ac5570ec3c5caec51066a3197 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 23 Mar 2024 11:34:37 -0400 Subject: [PATCH 13/23] Fix FileNotFoundError with from-scratch option --- gvsbuild/utils/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gvsbuild/utils/utils.py b/gvsbuild/utils/utils.py index c3b480209..247bccec4 100644 --- a/gvsbuild/utils/utils.py +++ b/gvsbuild/utils/utils.py @@ -41,6 +41,8 @@ def _rmtree_error_handler(func, path, exc_info): def rmtree_full(dest_dir, retry=False): + if not os.path.isdir(dest_dir): + return if retry: for delay in [0.1, 0.2, 0.4, 0.8]: try: From 4465f241ffb25e026b4be901fc465067b4afa602 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 23 Mar 2024 11:02:51 -0400 Subject: [PATCH 14/23] Fix circular references with GLib and gobject-introspection --- .../glib-package-installation-directory.patch | 59 +++++++++++++++++++ gvsbuild/projects/__init__.py | 2 +- gvsbuild/projects/glib.py | 43 ++++++++++---- gvsbuild/projects/gobject_introspection.py | 1 - 4 files changed, 92 insertions(+), 13 deletions(-) create mode 100644 gvsbuild/patches/glib-base/glib-package-installation-directory.patch diff --git a/gvsbuild/patches/glib-base/glib-package-installation-directory.patch b/gvsbuild/patches/glib-base/glib-package-installation-directory.patch new file mode 100644 index 000000000..787982c51 --- /dev/null +++ b/gvsbuild/patches/glib-base/glib-package-installation-directory.patch @@ -0,0 +1,59 @@ +From 03ad717497c4669970a8f335961272af449d277c Mon Sep 17 00:00:00 2001 +From: TingPing +Date: Sun, 9 Nov 2014 00:11:13 -0500 +Subject: [PATCH] Fix g_win32_get_package_installation_directory_of_module() + handling some paths containing bin/lib + +--- + glib/gwin32.c | 30 +++++++++--------------------- + 1 file changed, 9 insertions(+), 21 deletions(-) + +diff --git a/glib/gwin32.c b/glib/gwin32.c +index ffc5fe2..f495bee 100644 +--- a/glib/gwin32.c ++++ b/glib/gwin32.c +@@ -249,32 +249,20 @@ g_win32_get_package_installation_directory_of_module (gpointer hmodule) + + filename = g_utf16_to_utf8 (wc_fn, -1, NULL, NULL, NULL); + ++ /* Strip off trailing module/executable */ + if ((p = strrchr (filename, G_DIR_SEPARATOR)) != NULL) + *p = '\0'; + +- retval = g_strdup (filename); +- +- do +- { +- p = strrchr (retval, G_DIR_SEPARATOR); +- if (p == NULL) +- break; +- ++ /* Strip off trailing bin/lib */ ++ if ((p = strrchr (filename, G_DIR_SEPARATOR)) != NULL) ++ { ++ if (g_ascii_strcasecmp (p + 1, "bin") == 0 || ++ g_ascii_strcasecmp (p + 1, "lib") == 0) + *p = '\0'; ++ } + +- if (g_ascii_strcasecmp (p + 1, "bin") == 0 || +- g_ascii_strcasecmp (p + 1, "lib") == 0) +- break; +- } +- while (p != NULL); +- +- if (p == NULL) +- { +- g_free (retval); +- retval = filename; +- } +- else +- g_free (filename); ++ retval = g_strdup (filename); ++ g_free (filename); + + #ifdef G_WITH_CYGWIN + /* In Cygwin we need to have POSIX paths */ +-- +2.1.0 + diff --git a/gvsbuild/projects/__init__.py b/gvsbuild/projects/__init__.py index 499671b6c..03d4a1a11 100644 --- a/gvsbuild/projects/__init__.py +++ b/gvsbuild/projects/__init__.py @@ -20,7 +20,7 @@ from gvsbuild.projects.fribidi import Fribidi from gvsbuild.projects.gdk_pixbuf import GdkPixbuf from gvsbuild.projects.gettext import Gettext -from gvsbuild.projects.glib import GLib, GLibNetworking, GLibPyWrapper +from gvsbuild.projects.glib import GLib, GLibBase, GLibNetworking, GLibPyWrapper from gvsbuild.projects.glibmm import Glibmm from gvsbuild.projects.gobject_introspection import GObjectIntrospection from gvsbuild.projects.gperf import Gperf diff --git a/gvsbuild/projects/glib.py b/gvsbuild/projects/glib.py index e9d6ff4f8..9d40fae17 100644 --- a/gvsbuild/projects/glib.py +++ b/gvsbuild/projects/glib.py @@ -19,11 +19,11 @@ @project_add -class GLib(Tarball, Meson): +class GLibBase(Tarball, Meson): def __init__(self): - Project.__init__( + Meson.__init__( self, - "glib", + "glib-base", version="2.80.0", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/glib", @@ -43,23 +43,44 @@ def __init__(self): "002-python-312-distutils-to-packaging.patch", ], ) - if self.opts.enable_gi: - enable_gi = "enabled" - else: - enable_gi = "disabled" - - self.add_param(f"-Dintrospection={enable_gi}") - self.add_param("-Dman=false") self.add_param("-Dman-pages=disabled") self.add_param("-Dtests=false") - self.add_param("-Dgtk_doc=false") self.add_param("-Ddocumentation=false") + self.add_param("-Dintrospection=disabled") def build(self): Meson.build(self) self.install(r".\LICENSES\* share\doc\glib") +@project_add +class GLib(Tarball, Meson): + def __init__(self): + Meson.__init__( + self, + "glib", + version="2.80.0", + lastversion_even=True, + repository="https://gitlab.gnome.org/GNOME/glib", + archive_url="https://download.gnome.org/sources/glib/{major}.{minor}/glib-{version}.tar.xz", + hash="8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d", + dependencies=["glib-base"], + patches=[ + "glib-package-installation-directory.patch", + ], + ) + self.add_param("-Dman-pages=disabled") + self.add_param("-Dtests=false") + self.add_param("-Ddocumentation=false") + if self.opts.enable_gi: + self.add_dependency("gobject-introspection") + self.add_param("-Dintrospection=enabled") + + def build(self): + if self.opts.enable_gi: + Meson.build(self) + + @project_add class GLibNetworking(Tarball, Meson): def __init__(self): diff --git a/gvsbuild/projects/gobject_introspection.py b/gvsbuild/projects/gobject_introspection.py index aafa04a34..6d00d2eb7 100644 --- a/gvsbuild/projects/gobject_introspection.py +++ b/gvsbuild/projects/gobject_introspection.py @@ -38,7 +38,6 @@ def __init__(self): "meson", "msys2", "pkgconf", - "glib", ], # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/427 patches=["incorrect-giscanner-path.patch"], From c2f79d3c87fcfe140d35362f10fc66ab191085ba Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sun, 24 Mar 2024 14:43:27 -0400 Subject: [PATCH 15/23] Add glib-base as a gobject-introspection dependency --- gvsbuild/projects/gobject_introspection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gvsbuild/projects/gobject_introspection.py b/gvsbuild/projects/gobject_introspection.py index 6d00d2eb7..f48583af8 100644 --- a/gvsbuild/projects/gobject_introspection.py +++ b/gvsbuild/projects/gobject_introspection.py @@ -38,6 +38,7 @@ def __init__(self): "meson", "msys2", "pkgconf", + "glib-base", ], # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/427 patches=["incorrect-giscanner-path.patch"], From 4b8e4e62b9881042b3a839434b325c24ce394b78 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Wed, 27 Mar 2024 16:52:15 -0400 Subject: [PATCH 16/23] Fix DLL load failed when importing _giscanner --- ...glib-package-installation-directory.patch} | 0 .../002-gir-scanner-dll-not-found.patch | 80 +++++++++++++++++++ .../glib/002-gir-scanner-dll-not-found.patch | 80 +++++++++++++++++++ ...02-python-312-distutils-to-packaging.patch | 25 ------ ...tch => 001-incorrect-giscanner-path.patch} | 0 gvsbuild/projects/glib.py | 7 +- gvsbuild/projects/gobject_introspection.py | 6 +- 7 files changed, 169 insertions(+), 29 deletions(-) rename gvsbuild/patches/glib-base/{glib-package-installation-directory.patch => 001-glib-package-installation-directory.patch} (100%) create mode 100644 gvsbuild/patches/glib-base/002-gir-scanner-dll-not-found.patch create mode 100644 gvsbuild/patches/glib/002-gir-scanner-dll-not-found.patch delete mode 100644 gvsbuild/patches/glib/002-python-312-distutils-to-packaging.patch rename gvsbuild/patches/gobject-introspection/{incorrect-giscanner-path.patch => 001-incorrect-giscanner-path.patch} (100%) diff --git a/gvsbuild/patches/glib-base/glib-package-installation-directory.patch b/gvsbuild/patches/glib-base/001-glib-package-installation-directory.patch similarity index 100% rename from gvsbuild/patches/glib-base/glib-package-installation-directory.patch rename to gvsbuild/patches/glib-base/001-glib-package-installation-directory.patch diff --git a/gvsbuild/patches/glib-base/002-gir-scanner-dll-not-found.patch b/gvsbuild/patches/glib-base/002-gir-scanner-dll-not-found.patch new file mode 100644 index 000000000..25dc7ce4e --- /dev/null +++ b/gvsbuild/patches/glib-base/002-gir-scanner-dll-not-found.patch @@ -0,0 +1,80 @@ +From 8954e300e6d6433454d05bf5cf925d2141a516c9 Mon Sep 17 00:00:00 2001 +From: Chun-wei Fan +Date: Thu, 28 Mar 2024 18:36:41 +0800 +Subject: [PATCH] Introspection: Fix running g-ir-scanner 1.80.x+ on Windows + +Since we are now building GLib, so we want to make sure that we indeed +load the freshly-built DLLs when running g-ir-scanner, so we add the +various needed subdirs (and if needed, subprojects), to set the +GI_EXTRA_BASE_DLL_DIRS envvar so that g-ir-scanner will look for the +newly-built GLib DLLs. + +This will also fix the g-ir-scanner not running when there is no +pre-existing GLib on the system, so that the needed DLLs are found. + +Related issue: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/499 +--- + girepository/introspection/meson.build | 35 ++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/girepository/introspection/meson.build b/girepository/introspection/meson.build +index 9405686c18..cc70ddf50a 100644 +--- a/girepository/introspection/meson.build ++++ b/girepository/introspection/meson.build +@@ -14,6 +14,34 @@ if get_option('b_sanitize') != '' + 'ASAN_OPTIONS', 'verify_asan_link_order=0', separator: ',') + endif + ++if host_system == 'windows' ++ build_root = meson.project_build_root() ++ gi_scanner_dll_paths = [ ++ build_root / 'glib', ++ build_root / 'gobject', ++ build_root / 'gio', ++ build_root / 'gmodule' ++ ] ++ ++ # Check whether ZLib, libffi and proxy-intl and PCRE are indeed built as subprojects, else os.add_dll_directory() ++ # will complain ++ # Keep in sync with GLib's subprojects settings ++ sub_build_root = build_root / 'subprojects' ++ foreach dep: ['proxy-intl', 'libffi', 'zlib-1.2.11', 'pcre2-10.42'] ++ dep_dir = sub_build_root / dep ++ if fs.exists(dep_dir) and fs.is_dir(dep_dir) ++ gi_scanner_dll_paths += [dep_dir] ++ endif ++ endforeach ++ ++ # Also assume the installation bindir to be considered for DLLs ++ message('Ensure that all of GLib\'s dependent non-system DLLs that are not built') ++ message('alongside with GLib can be found in \'@0@\''.format(get_option('prefix') / get_option('bindir'))) ++ message('Check this if building .gir files fail due to \'ImportError: DLL load failed while importing _giscanner\'') ++ gi_scanner_dll_paths += get_option('prefix') / get_option('bindir') ++ gi_gen_env_variables.set('GI_EXTRA_BASE_DLL_DIRS', gi_scanner_dll_paths) ++endif ++ + # GLib + glib_gir_sources = [ + gi_gen_shared_sources, +@@ -304,6 +332,12 @@ libgirepository_gir_args = [ + '--identifier-prefix=GI', + ] + ++gi_libgirepository_gen_env_variables = environment() ++ ++if host_system == 'windows' ++ gi_libgirepository_gen_env_variables.set('GI_EXTRA_BASE_DLL_DIRS', gi_scanner_dll_paths) ++endif ++ + girepository_gir = gnome.generate_gir(libgirepository, + sources: libgirepository_gir_sources, + namespace: 'GIRepository', +@@ -316,5 +350,6 @@ girepository_gir = gnome.generate_gir(libgirepository, + install: true, + dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep ], + extra_args: gir_args + libgirepository_gir_args, ++ env: gi_libgirepository_gen_env_variables, + ) + +-- +GitLab diff --git a/gvsbuild/patches/glib/002-gir-scanner-dll-not-found.patch b/gvsbuild/patches/glib/002-gir-scanner-dll-not-found.patch new file mode 100644 index 000000000..25dc7ce4e --- /dev/null +++ b/gvsbuild/patches/glib/002-gir-scanner-dll-not-found.patch @@ -0,0 +1,80 @@ +From 8954e300e6d6433454d05bf5cf925d2141a516c9 Mon Sep 17 00:00:00 2001 +From: Chun-wei Fan +Date: Thu, 28 Mar 2024 18:36:41 +0800 +Subject: [PATCH] Introspection: Fix running g-ir-scanner 1.80.x+ on Windows + +Since we are now building GLib, so we want to make sure that we indeed +load the freshly-built DLLs when running g-ir-scanner, so we add the +various needed subdirs (and if needed, subprojects), to set the +GI_EXTRA_BASE_DLL_DIRS envvar so that g-ir-scanner will look for the +newly-built GLib DLLs. + +This will also fix the g-ir-scanner not running when there is no +pre-existing GLib on the system, so that the needed DLLs are found. + +Related issue: https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/499 +--- + girepository/introspection/meson.build | 35 ++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +diff --git a/girepository/introspection/meson.build b/girepository/introspection/meson.build +index 9405686c18..cc70ddf50a 100644 +--- a/girepository/introspection/meson.build ++++ b/girepository/introspection/meson.build +@@ -14,6 +14,34 @@ if get_option('b_sanitize') != '' + 'ASAN_OPTIONS', 'verify_asan_link_order=0', separator: ',') + endif + ++if host_system == 'windows' ++ build_root = meson.project_build_root() ++ gi_scanner_dll_paths = [ ++ build_root / 'glib', ++ build_root / 'gobject', ++ build_root / 'gio', ++ build_root / 'gmodule' ++ ] ++ ++ # Check whether ZLib, libffi and proxy-intl and PCRE are indeed built as subprojects, else os.add_dll_directory() ++ # will complain ++ # Keep in sync with GLib's subprojects settings ++ sub_build_root = build_root / 'subprojects' ++ foreach dep: ['proxy-intl', 'libffi', 'zlib-1.2.11', 'pcre2-10.42'] ++ dep_dir = sub_build_root / dep ++ if fs.exists(dep_dir) and fs.is_dir(dep_dir) ++ gi_scanner_dll_paths += [dep_dir] ++ endif ++ endforeach ++ ++ # Also assume the installation bindir to be considered for DLLs ++ message('Ensure that all of GLib\'s dependent non-system DLLs that are not built') ++ message('alongside with GLib can be found in \'@0@\''.format(get_option('prefix') / get_option('bindir'))) ++ message('Check this if building .gir files fail due to \'ImportError: DLL load failed while importing _giscanner\'') ++ gi_scanner_dll_paths += get_option('prefix') / get_option('bindir') ++ gi_gen_env_variables.set('GI_EXTRA_BASE_DLL_DIRS', gi_scanner_dll_paths) ++endif ++ + # GLib + glib_gir_sources = [ + gi_gen_shared_sources, +@@ -304,6 +332,12 @@ libgirepository_gir_args = [ + '--identifier-prefix=GI', + ] + ++gi_libgirepository_gen_env_variables = environment() ++ ++if host_system == 'windows' ++ gi_libgirepository_gen_env_variables.set('GI_EXTRA_BASE_DLL_DIRS', gi_scanner_dll_paths) ++endif ++ + girepository_gir = gnome.generate_gir(libgirepository, + sources: libgirepository_gir_sources, + namespace: 'GIRepository', +@@ -316,5 +350,6 @@ girepository_gir = gnome.generate_gir(libgirepository, + install: true, + dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep ], + extra_args: gir_args + libgirepository_gir_args, ++ env: gi_libgirepository_gen_env_variables, + ) + +-- +GitLab diff --git a/gvsbuild/patches/glib/002-python-312-distutils-to-packaging.patch b/gvsbuild/patches/glib/002-python-312-distutils-to-packaging.patch deleted file mode 100644 index 4f7eea6fb..000000000 --- a/gvsbuild/patches/glib/002-python-312-distutils-to-packaging.patch +++ /dev/null @@ -1,25 +0,0 @@ -Subject: [PATCH] Replace distutils with packaging ---- -Index: gio/gdbus-2.0/codegen/utils.py -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py ---- a/gio/gdbus-2.0/codegen/utils.py (revision e93fd4cfc39167cf0ceb9c531238d9800d3d9edb) -+++ b/gio/gdbus-2.0/codegen/utils.py (date 1705782834785) -@@ -19,7 +19,7 @@ - # - # Author: David Zeuthen - --import distutils.version -+import packaging.version - import os - import sys - -@@ -166,4 +166,4 @@ - v = str(key[0]) - else: - v = "0" -- return (distutils.version.LooseVersion(v), key[1]) -+ return (packaging.version.Version(v), key[1]) diff --git a/gvsbuild/patches/gobject-introspection/incorrect-giscanner-path.patch b/gvsbuild/patches/gobject-introspection/001-incorrect-giscanner-path.patch similarity index 100% rename from gvsbuild/patches/gobject-introspection/incorrect-giscanner-path.patch rename to gvsbuild/patches/gobject-introspection/001-incorrect-giscanner-path.patch diff --git a/gvsbuild/projects/glib.py b/gvsbuild/projects/glib.py index 9d40fae17..5023b2134 100644 --- a/gvsbuild/projects/glib.py +++ b/gvsbuild/projects/glib.py @@ -40,7 +40,8 @@ def __init__(self): ], patches=[ "001-glib-package-installation-directory.patch", - "002-python-312-distutils-to-packaging.patch", + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/499 + "002-gir-scanner-dll-not-found.patch", ], ) self.add_param("-Dman-pages=disabled") @@ -66,7 +67,9 @@ def __init__(self): hash="8228a92f92a412160b139ae68b6345bd28f24434a7b5af150ebe21ff587a561d", dependencies=["glib-base"], patches=[ - "glib-package-installation-directory.patch", + "001-glib-package-installation-directory.patch", + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/499 + "002-gir-scanner-dll-not-found.patch", ], ) self.add_param("-Dman-pages=disabled") diff --git a/gvsbuild/projects/gobject_introspection.py b/gvsbuild/projects/gobject_introspection.py index f48583af8..3388fb4bd 100644 --- a/gvsbuild/projects/gobject_introspection.py +++ b/gvsbuild/projects/gobject_introspection.py @@ -40,8 +40,10 @@ def __init__(self): "pkgconf", "glib-base", ], - # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/427 - patches=["incorrect-giscanner-path.patch"], + patches=[ + # https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/427 + "001-incorrect-giscanner-path.patch", + ], ) def build(self): From 3672aeec385facfcff01c68a9d97443d04daac3e Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 30 Mar 2024 16:33:35 -0500 Subject: [PATCH 17/23] Explicitly enable Freetype with Pango --- gvsbuild/projects/pango.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gvsbuild/projects/pango.py b/gvsbuild/projects/pango.py index 54b854c2d..f6393e791 100644 --- a/gvsbuild/projects/pango.py +++ b/gvsbuild/projects/pango.py @@ -47,6 +47,7 @@ def __init__(self): enable_gi = "disabled" self.add_param(f"-Dintrospection={enable_gi}") + self.add_param("-Dfreetype=enabled") def build(self): Meson.build(self) From 56a76a652335cc93476d27c1a32ca7d394ab6c1d Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sat, 30 Mar 2024 15:52:05 -0500 Subject: [PATCH 18/23] Fix pango/pangoft2.h file not found --- .../001-fix-pangoft2-file-not-found.patch | 44 +++++++++++++++++++ gvsbuild/projects/gtk.py | 3 ++ 2 files changed, 47 insertions(+) create mode 100644 gvsbuild/patches/gtk4/001-fix-pangoft2-file-not-found.patch diff --git a/gvsbuild/patches/gtk4/001-fix-pangoft2-file-not-found.patch b/gvsbuild/patches/gtk4/001-fix-pangoft2-file-not-found.patch new file mode 100644 index 000000000..44f673067 --- /dev/null +++ b/gvsbuild/patches/gtk4/001-fix-pangoft2-file-not-found.patch @@ -0,0 +1,44 @@ +From f0f3ea1b3e4743d8e468a92ebd2c2f8c8610e711 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sun, 31 Mar 2024 09:52:36 +0200 +Subject: [PATCH] Fix build without fontconfig + +We were missing some ifdefs for Windows builds. + +Fixes: #6591 +--- + gsk/gskprivate.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/gsk/gskprivate.c b/gsk/gskprivate.c +index 2d89f66daf0..0353830e12e 100644 +--- a/gsk/gskprivate.c ++++ b/gsk/gskprivate.c +@@ -1,9 +1,13 @@ ++#include "config.h" ++ + #include "gskresources.h" + #include "gskprivate.h" + + #include + #include ++#ifdef HAVE_PANGOFT + #include ++#endif + #include + + static gpointer +@@ -119,9 +123,11 @@ gsk_reload_font (PangoFont *font, + last_result = pango_font_map_reload_font (pango_font_get_font_map (font), font, scale, context, NULL); + #else + ++#ifdef HAVE_PANGOFT + pattern = pango_fc_font_get_pattern (PANGO_FC_FONT (font)); + if (FcPatternGetDouble (pattern, FC_DPI, 0, &dpi) == FcResultMatch) + pango_cairo_context_set_resolution (context, dpi); ++#endif + + desc = pango_font_describe_with_absolute_size (font); + size = pango_font_description_get_size (desc); +-- +GitLab diff --git a/gvsbuild/projects/gtk.py b/gvsbuild/projects/gtk.py index 66c922053..4e89cec52 100644 --- a/gvsbuild/projects/gtk.py +++ b/gvsbuild/projects/gtk.py @@ -138,6 +138,9 @@ def __init__(self): "glib", "fribidi", ], + patches=[ + "001-fix-pangoft2-file-not-found.patch", + ], ) if self.opts.enable_gi: self.add_dependency("gobject-introspection") From 6fd5b990e0b72fbcc8254bf6cf86fca85352a040 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Sun, 31 Mar 2024 10:18:17 -0500 Subject: [PATCH 19/23] Fix gtksourceview pangoft2 build error --- ...01-fix-fontconfig-availability-check.patch | 38 +++++++++++++++++++ gvsbuild/projects/__init__.py | 1 - gvsbuild/projects/cairo.py | 3 +- gvsbuild/projects/fontconfig.py | 38 ------------------- gvsbuild/projects/gtksourceview.py | 3 ++ gvsbuild/projects/pango.py | 1 + 6 files changed, 44 insertions(+), 40 deletions(-) create mode 100644 gvsbuild/patches/gtksourceview5/001-fix-fontconfig-availability-check.patch delete mode 100644 gvsbuild/projects/fontconfig.py diff --git a/gvsbuild/patches/gtksourceview5/001-fix-fontconfig-availability-check.patch b/gvsbuild/patches/gtksourceview5/001-fix-fontconfig-availability-check.patch new file mode 100644 index 000000000..847125759 --- /dev/null +++ b/gvsbuild/patches/gtksourceview5/001-fix-fontconfig-availability-check.patch @@ -0,0 +1,38 @@ +From e114e12aae3aeb06b8ed96c0317d4f85bdff5f57 Mon Sep 17 00:00:00 2001 +From: gwillems +Date: Tue, 2 Apr 2024 19:44:08 +0000 +Subject: [PATCH] utils: fix fontconfig availability check + +Macro `ENABLE_FONT_CONFIG` is always defined, either 0 or 1, by meson's `config_h.set10()`, +so `#ifdef` will always be true. +Use `#if` instead. + +Fixes #360 +--- + gtksourceview/gtksourceutils.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gtksourceview/gtksourceutils.c b/gtksourceview/gtksourceutils.c +index dd68f46a3..122b305c2 100644 +--- a/gtksourceview/gtksourceutils.c ++++ b/gtksourceview/gtksourceutils.c +@@ -73,7 +73,7 @@ + # endif + #endif + +-#ifdef ENABLE_FONT_CONFIG ++#if ENABLE_FONT_CONFIG + # include + # include + # include +@@ -967,7 +967,7 @@ _gtk_source_utils_aligned_free (gpointer data) + aligned_free (data); + } + +-#ifdef ENABLE_FONT_CONFIG ++#if ENABLE_FONT_CONFIG + static PangoFontMap * + load_override_font_fc (void) + { +-- +GitLab diff --git a/gvsbuild/projects/__init__.py b/gvsbuild/projects/__init__.py index 03d4a1a11..f01147919 100644 --- a/gvsbuild/projects/__init__.py +++ b/gvsbuild/projects/__init__.py @@ -14,7 +14,6 @@ from gvsbuild.projects.enchant import Enchant from gvsbuild.projects.expat import Expat from gvsbuild.projects.ffmpeg import Ffmpeg, NvCodecHeaders -from gvsbuild.projects.fontconfig import Fontconfig from gvsbuild.projects.freerdp import FreeRDP from gvsbuild.projects.freetype import Freetype from gvsbuild.projects.fribidi import Fribidi diff --git a/gvsbuild/projects/cairo.py b/gvsbuild/projects/cairo.py index 2ee752264..341ae34da 100644 --- a/gvsbuild/projects/cairo.py +++ b/gvsbuild/projects/cairo.py @@ -28,10 +28,11 @@ def __init__(self): lastversion_even=True, archive_url="https://gitlab.freedesktop.org/cairo/cairo/-/archive/{version}/cairo-{version}.tar.gz", hash="39a78afdc33a435c0f2ab53a5ec2a693c3c9b6d2ec9783ceecb2b94d54d942b0", - dependencies=["fontconfig", "freetype", "glib", "pixman", "libpng"], + dependencies=["freetype", "glib", "pixman", "libpng"], patches=["0001-fix-alloca-unresolved.patch"], ) self.add_param("-Dfreetype=enabled") + self.add_param("-Dfontconfig=disabled") def build(self): Meson.build(self) diff --git a/gvsbuild/projects/fontconfig.py b/gvsbuild/projects/fontconfig.py deleted file mode 100644 index 361b8d1e5..000000000 --- a/gvsbuild/projects/fontconfig.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2016 The Gvsbuild Authors -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . - -from gvsbuild.utils.base_builders import Meson -from gvsbuild.utils.base_expanders import Tarball -from gvsbuild.utils.base_project import Project, project_add - - -@project_add -class Fontconfig(Tarball, Meson): - def __init__(self): - Project.__init__( - self, - "fontconfig", - version="2.14.2", - lastversion_even=True, - repository="https://gitlab.freedesktop.org/fontconfig/fontconfig", - archive_url="https://www.freedesktop.org/software/fontconfig/release/fontconfig-{version}.tar.gz", - hash="3ba2dd92158718acec5caaf1a716043b5aa055c27b081d914af3ccb40dce8a55", - dependencies=["freetype", "gperf", "expat"], - ) - self.add_param("-Dtests=disabled") - - def build(self): - Meson.build(self) - self.install(r".\COPYING share\doc\fontconfig") diff --git a/gvsbuild/projects/gtksourceview.py b/gvsbuild/projects/gtksourceview.py index 2442fa141..04bc350b5 100644 --- a/gvsbuild/projects/gtksourceview.py +++ b/gvsbuild/projects/gtksourceview.py @@ -56,6 +56,9 @@ def __init__(self): archive_url="https://download.gnome.org/sources/gtksourceview/{major}.{minor}/gtksourceview-{version}.tar.xz", hash="daf32ff5d3150d6385917d3503a85b9e047ba158b2b03079314c9c00813fa01f", dependencies=["meson", "ninja", "gtk4", "pkgconf", "libxml2"], + patches=[ + "001-fix-fontconfig-availability-check.patch", + ], ) if Project.opts.enable_gi: self.add_dependency("gobject-introspection") diff --git a/gvsbuild/projects/pango.py b/gvsbuild/projects/pango.py index f6393e791..042ad29ae 100644 --- a/gvsbuild/projects/pango.py +++ b/gvsbuild/projects/pango.py @@ -31,6 +31,7 @@ def __init__(self): dependencies=[ "ninja", "meson", + "freetype", "cairo", "harfbuzz", "fribidi", From c26fd441337319137ce058d9e583bcdd054ebd33 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Tue, 2 Apr 2024 20:15:01 -0400 Subject: [PATCH 20/23] Bump version --- poetry.lock | 11 ----------- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index e0ad318ef..4c608821d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -675,7 +675,6 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -683,16 +682,8 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -709,7 +700,6 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -717,7 +707,6 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, diff --git a/pyproject.toml b/pyproject.toml index eee597dc3..4207d2349 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gvsbuild" -version = "2024.3.1" +version = "2024.4.0" description = "GTK stack for Windows" authors = ["Ignacio Casal Quinteiro ", "Dan Yeaw "] license = "GPL-2.0-only" From d7378b7ac85deec33fa1b8be23a1dfc92a899947 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Tue, 2 Apr 2024 20:28:23 -0400 Subject: [PATCH 21/23] Update gobject-introspection to 1.80.1 --- gvsbuild/projects/gobject_introspection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gvsbuild/projects/gobject_introspection.py b/gvsbuild/projects/gobject_introspection.py index 3388fb4bd..249032e24 100644 --- a/gvsbuild/projects/gobject_introspection.py +++ b/gvsbuild/projects/gobject_introspection.py @@ -28,11 +28,11 @@ def __init__(self): Project.__init__( self, "gobject-introspection", - version="1.80.0", + version="1.80.1", lastversion_even=True, repository="https://gitlab.gnome.org/GNOME/gobject-introspection", archive_url="https://download.gnome.org/sources/gobject-introspection/{major}.{minor}/gobject-introspection-{version}.tar.xz", - hash="54a90b4a3cb82fd6a3e8b8a7775178ebc954af3c2bc726ed5961e6503ce62636", + hash="a1df7c424e15bda1ab639c00e9051b9adf5cea1a9e512f8a603b53cd199bc6d8", dependencies=[ "ninja", "meson", From be724cb45983c0cbeaccaab14632907a0c137798 Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Tue, 2 Apr 2024 20:29:19 -0400 Subject: [PATCH 22/23] Update Pango to version 1.52.2 --- .../pango/001-fix-double-free-crash.patch | 38 ------------------- gvsbuild/projects/pango.py | 5 +-- 2 files changed, 2 insertions(+), 41 deletions(-) delete mode 100644 gvsbuild/patches/pango/001-fix-double-free-crash.patch diff --git a/gvsbuild/patches/pango/001-fix-double-free-crash.patch b/gvsbuild/patches/pango/001-fix-double-free-crash.patch deleted file mode 100644 index 9939dc77a..000000000 --- a/gvsbuild/patches/pango/001-fix-double-free-crash.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 1f158f7fe8b1535c4be3d8a2f0eff54f40e588b7 Mon Sep 17 00:00:00 2001 -From: Chun-wei Fan -Date: Thu, 21 Mar 2024 12:42:09 +0800 -Subject: [PATCH] pangowin32-fontmap.c: Avoid double free in - fontmap->finalize() - -During the implementation of loading custom fonts, I missed the fact -that hash tables were free'ed in pango_win32_font_map_fini(), that was -used to reload fontmaps when a custom font is loaded. - -This cause problems when we needed to create and destroy fontmaps -continually, as demonstrated in test-pangocairo-threads. ---- - pango/pangowin32-fontmap.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c -index 624ed76da..88745a9e0 100644 ---- a/pango/pangowin32-fontmap.c -+++ b/pango/pangowin32-fontmap.c -@@ -888,15 +888,9 @@ pango_win32_font_map_finalize (GObject *object) - - pango_win32_dwrite_release_font_set_builders (win32fontmap); - -- pango_win32_font_cache_free (win32fontmap->font_cache); -- - if (win32fontmap->font_set_builder != NULL) - g_free (win32fontmap->font_set_builder); - -- g_hash_table_destroy (win32fontmap->dwrite_fonts); -- g_hash_table_destroy (win32fontmap->fonts); -- g_hash_table_destroy (win32fontmap->families); -- - G_OBJECT_CLASS (pango_win32_font_map_parent_class)->finalize (object); - } - --- -GitLab diff --git a/gvsbuild/projects/pango.py b/gvsbuild/projects/pango.py index 042ad29ae..393d99be3 100644 --- a/gvsbuild/projects/pango.py +++ b/gvsbuild/projects/pango.py @@ -24,10 +24,10 @@ def __init__(self): Project.__init__( self, "pango", - version="1.52.1", + version="1.52.2", repository="https://gitlab.gnome.org/GNOME/pango", archive_url="https://download.gnome.org/sources/pango/{major}.{minor}/pango-{version}.tar.xz", - hash="58728a0a2d86f60761208df9493033d18ecb2497abac80ee1a274ad0c6e55f0f", + hash="d0076afe01082814b853deec99f9349ece5f2ce83908b8e58ff736b41f78a96b", dependencies=[ "ninja", "meson", @@ -37,7 +37,6 @@ def __init__(self): "fribidi", ], patches=[ - "001-fix-double-free-crash.patch", "002-fix-wrong-usage-gweakref.patch", ], ) From b48a5cb51d905aa87f1b50599cf9bea1d939ccec Mon Sep 17 00:00:00 2001 From: Dan Yeaw Date: Wed, 3 Apr 2024 09:14:59 -0400 Subject: [PATCH 23/23] Fix pango_font_map_reload_font crash --- .../pango/003-remove-extra-hb-face-font.patch | 34 +++++++++++++++++++ gvsbuild/projects/pango.py | 1 + 2 files changed, 35 insertions(+) create mode 100644 gvsbuild/patches/pango/003-remove-extra-hb-face-font.patch diff --git a/gvsbuild/patches/pango/003-remove-extra-hb-face-font.patch b/gvsbuild/patches/pango/003-remove-extra-hb-face-font.patch new file mode 100644 index 000000000..a64b09a21 --- /dev/null +++ b/gvsbuild/patches/pango/003-remove-extra-hb-face-font.patch @@ -0,0 +1,34 @@ +From f41bb0b29304fb5c86d896097321d82fcc6f2168 Mon Sep 17 00:00:00 2001 +From: Luca Bacci +Date: Tue, 2 Apr 2024 19:14:41 +0200 +Subject: [PATCH] Win32: Remove extra hb_face_set_user_data() call + +Appears to be a leftover from 527e220a + +Fixes https://gitlab.gnome.org/GNOME/pango/-/issues/789 +--- + pango/pangowin32.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/pango/pangowin32.c b/pango/pangowin32.c +index 00b797baf..6781e1794 100644 +--- a/pango/pangowin32.c ++++ b/pango/pangowin32.c +@@ -1319,14 +1319,12 @@ pango_win32_font_create_hb_font (PangoFont *font) + #else + hfont = _pango_win32_font_get_hfont (font); + +- /* We are *not* allowed to destroy the HFONT here ! */ + #ifdef USE_HB_GDI + face = hb_gdi_face_create (hfont); +- +- hb_face_set_user_data (face, &key, hfont, g_free, TRUE); + #else + face = hb_face_create_for_tables (hfont_reference_table, (void *)hfont, NULL); + #endif ++ + #endif + + hb_font = hb_font_create (face); +-- +GitLab diff --git a/gvsbuild/projects/pango.py b/gvsbuild/projects/pango.py index 393d99be3..0d15fae5b 100644 --- a/gvsbuild/projects/pango.py +++ b/gvsbuild/projects/pango.py @@ -38,6 +38,7 @@ def __init__(self): ], patches=[ "002-fix-wrong-usage-gweakref.patch", + "003-remove-extra-hb-face-font.patch", ], ) if self.opts.enable_gi: