Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] glib: update to 2.76.0.
@ 2023-03-22  2:40 oreo639
  2023-03-22  2:45 ` [PR PATCH] [Updated] " oreo639
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  2:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]

There is a new pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for gnome 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 10021 bytes --]

From 62748d86d68d36c6c57d397d2598ea41d2d7beac Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH] glib: update to 2.76.0.

---
 .../glib/patches/disable-broken-tests.patch   | 23 ++++---
 .../fix-segfault-g_param_value_is_valid.patch | 35 -----------
 .../glib/patches/gnome-console-support.patch  | 62 -------------------
 srcpkgs/glib/patches/test-error-musl.patch    | 50 ---------------
 srcpkgs/glib/template                         |  6 +-
 5 files changed, 14 insertions(+), 162 deletions(-)
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..5974943c00d0 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -17,7 +17,7 @@ homepage="https://wiki.gnome.org/Projects/GLib"
 #changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
@ 2023-03-22  2:45 ` oreo639
  2023-03-22  2:57 ` oreo639
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  2:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 11712 bytes --]

From 72c09bdbf8df0f1fd15ad1afae265e0ba5497e12 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 .../glib/patches/disable-broken-tests.patch   | 23 ++++---
 .../fix-segfault-g_param_value_is_valid.patch | 35 -----------
 .../glib/patches/gnome-console-support.patch  | 62 -------------------
 srcpkgs/glib/patches/test-error-musl.patch    | 50 ---------------
 srcpkgs/glib/template                         |  8 +--
 5 files changed, 15 insertions(+), 163 deletions(-)
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..561891836471 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"

From bbf4e059a0b72414c5b96514218a5b9825d99d70 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
  2023-03-22  2:45 ` [PR PATCH] [Updated] " oreo639
@ 2023-03-22  2:57 ` oreo639
  2023-03-22  3:03 ` oreo639
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  2:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 12382 bytes --]

From c7903598f5b0195d752ba8a7e1d525cdabcc1ce1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 .../glib/patches/disable-broken-tests.patch   | 23 ++++---
 .../fix-segfault-g_param_value_is_valid.patch | 35 -----------
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    | 11 ++++
 .../glib/patches/gnome-console-support.patch  | 62 -------------------
 srcpkgs/glib/patches/test-error-musl.patch    | 50 ---------------
 srcpkgs/glib/template                         |  8 +--
 6 files changed, 26 insertions(+), 163 deletions(-)
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..8bda2d91fbd6
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,11 @@
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+-#if G_CXX_STD_CHECK_VERSION (11)
++#if !G_CXX_STD_CHECK_VERSION (11)
+   g_test_init (&argc, &argv, NULL);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..561891836471 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"

From f922946aff5a963a6a2962644efcaf47febe2ca5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
  2023-03-22  2:45 ` [PR PATCH] [Updated] " oreo639
  2023-03-22  2:57 ` oreo639
@ 2023-03-22  3:03 ` oreo639
  2023-03-22  3:07 ` oreo639
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  3:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 12387 bytes --]

From 155922b45e4a0d8bf6703741a7ff1685e2d0fd70 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 .../glib/patches/disable-broken-tests.patch   | 23 ++++---
 .../fix-segfault-g_param_value_is_valid.patch | 35 -----------
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    | 11 ++++
 .../glib/patches/gnome-console-support.patch  | 62 -------------------
 srcpkgs/glib/patches/test-error-musl.patch    | 50 ---------------
 srcpkgs/glib/template                         |  8 +--
 6 files changed, 26 insertions(+), 163 deletions(-)
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..75f305130577
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,11 @@
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..561891836471 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"

From f8791190c3029e6b08ebb83b500d1868022eb9f6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (2 preceding siblings ...)
  2023-03-22  3:03 ` oreo639
@ 2023-03-22  3:07 ` oreo639
  2023-03-22  3:11 ` oreo639
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  3:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 12540 bytes --]

From 827152aa50a147a4ca58af7c4b21859c9a101b4e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 .../glib/patches/disable-broken-tests.patch   | 23 ++++---
 .../fix-segfault-g_param_value_is_valid.patch | 35 -----------
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    | 15 +++++
 .../glib/patches/gnome-console-support.patch  | 62 -------------------
 srcpkgs/glib/patches/test-error-musl.patch    | 50 ---------------
 srcpkgs/glib/template                         |  8 +--
 6 files changed, 30 insertions(+), 163 deletions(-)
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..52357ddcb040
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,15 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..561891836471 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"

From 6361b456e398b584acf5cc6157592bde7854e86f Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (3 preceding siblings ...)
  2023-03-22  3:07 ` oreo639
@ 2023-03-22  3:11 ` oreo639
  2023-03-22  8:32 ` oreo639
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  3:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 12841 bytes --]

From 882056566f34ad05fceb8e1d21730863678a1b7d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 .../glib/patches/disable-broken-tests.patch   | 23 ++++---
 .../fix-segfault-g_param_value_is_valid.patch | 35 -----------
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    | 26 ++++++++
 .../glib/patches/gnome-console-support.patch  | 62 -------------------
 srcpkgs/glib/patches/test-error-musl.patch    | 50 ---------------
 srcpkgs/glib/template                         |  8 +--
 6 files changed, 41 insertions(+), 163 deletions(-)
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..2b1ad5b4e6ad
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,26 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+--- a/gio/tests/cxx.cpp
++++ a/gio/tests/cxx.cpp
+@@ -59,7 +59,7 @@ int
+ main (int argc, char **argv)
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+ #endif
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..561891836471 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"

From 954032759fb906c6f09b9e007b415d81f648def8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (4 preceding siblings ...)
  2023-03-22  3:11 ` oreo639
@ 2023-03-22  8:32 ` oreo639
  2023-03-22  8:34 ` oreo639
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  8:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 18501 bytes --]

From 448dc1503d1c73d9e9765109e7bc5b2e85ad73f3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 ...2f81cc59751fcc689731dcd60af5da5723ba.patch | 138 ++++++++++++++++++
 .../glib/patches/disable-broken-tests.patch   |  23 ++-
 .../fix-segfault-g_param_value_is_valid.patch |  35 -----
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    |  26 ++++
 .../glib/patches/gnome-console-support.patch  |  62 --------
 srcpkgs/glib/patches/test-error-musl.patch    |  50 -------
 srcpkgs/glib/template                         |   8 +-
 7 files changed, 179 insertions(+), 163 deletions(-)
 create mode 100644 srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
new file mode 100644
index 000000000000..8a7c6e60c5b6
--- /dev/null
+++ b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
@@ -0,0 +1,138 @@
+From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Mon, 13 Mar 2023 16:23:37 +0800
+Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid
+ breaking C++ code
+
+Wrap the logic into a G_ALWAYS_INLINE function, instead of using a
+complex statement-expression which is not allowed in braced initializer
+lists and expanded into some bad thing when it's used as
+`::g_strdup(...)`.
+
+We cannot use `__builtin_constant_p (str)` because GCC documentation
+clearly states that it always produces 0 when str is a const char *
+argument of an inline function.  But `__builtin_constant_p (!str)`,
+`__builtin_constant_p (!!str)`, and
+`__builtin_constant_p (strlen (str))` functions properly with `-O1` or
+above enabled.
+
+Fixes #2936.
+---
+ glib/gstrfuncs.h   | 43 ++++++++++++++++++++++++++-----------------
+ glib/tests/cxx.cpp | 32 ++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 17 deletions(-)
+
+diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
+index 8a6830294f..cb021b658d 100644
+--- a/glib/gstrfuncs.h
++++ b/glib/gstrfuncs.h
+@@ -204,23 +204,6 @@ gboolean             (g_str_has_prefix) (const gchar *str,
+     (g_str_has_suffix) (STR, SUFFIX)                                          \
+   )
+ 
+-#define g_strdup(STR)                                                         \
+-  (__builtin_constant_p ((STR)) ?                                             \
+-    (G_LIKELY ((STR) != NULL) ?                                               \
+-      G_GNUC_EXTENSION ({                                                     \
+-        const char *const ___str = ((STR));                                   \
+-        const char *const __str = _G_STR_NONNULL (___str);                    \
+-        const size_t __str_len = strlen (__str) + 1;                          \
+-        char *__dup_str = (char *) g_malloc (__str_len);                      \
+-        (char *) memcpy (__dup_str, __str, __str_len);                        \
+-      })                                                                      \
+-      :                                                                       \
+-      (char *) (NULL)                                                         \
+-    )                                                                         \
+-    :                                                                         \
+-    (g_strdup) ((STR))                                                        \
+-  )
+-
+ #endif /* !defined (__GI_SCANNER__) */
+ #endif /* !defined (__GTK_DOC_IGNORE__) */
+ #endif /* G_GNUC_CHECK_VERSION (2, 0) */
+@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL
+ gchar*                g_strjoin	       (const gchar  *separator,
+ 					...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+ 
++#if G_GNUC_CHECK_VERSION(2, 0)
++#ifndef __GTK_DOC_IGNORE__
++#ifndef __GI_SCANNER__
++
++G_ALWAYS_INLINE static inline char *
++g_strdup_inline (const char *str)
++{
++  if (__builtin_constant_p (!str) && !str)
++    return NULL;
++
++  if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str)))
++    {
++      const size_t len = strlen (str) + 1;
++      char *dup_str = (char *) g_malloc (len);
++      return (char *) memcpy (dup_str, str, len);
++    }
++
++  return g_strdup (str);
++}
++
++#define g_strdup(x) g_strdup_inline (x)
++
++#endif /* !defined (__GI_SCANNER__) */
++#endif /* !defined (__GTK_DOC_IGNORE__) */
++#endif /* G_GNUC_CHECK_VERSION (2, 0) */
++
+ /* Make a copy of a string interpreting C string -style escape
+  * sequences. Inverse of g_strescape. The recognized sequences are \b
+  * \f \n \r \t \\ \" and the octal format.
+diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
+index 2431340092..bc7967ccee 100644
+--- a/glib/tests/cxx.cpp
++++ b/glib/tests/cxx.cpp
+@@ -349,6 +349,36 @@ test_strdup_macro (void)
+   g_free (str);
+ }
+ 
++static void
++test_strdup_macro_qualified (void)
++{
++  gchar *str;
++
++  g_assert_null (::g_strdup (NULL));
++
++  str = ::g_strdup ("C++ is cool too!");
++  g_assert_nonnull (str);
++  g_assert_cmpstr (str, ==, "C++ is cool too!");
++  g_free (str);
++}
++
++static void
++test_strdup_macro_nested_initializer (void)
++{
++  struct
++  {
++    char *p, *q;
++  } strings = {
++    g_strdup (NULL),
++    g_strdup ("C++ is cool too!"),
++  };
++
++  g_assert_null (strings.p);
++  g_assert_nonnull (strings.q);
++  g_assert_cmpstr (strings.q, ==, "C++ is cool too!");
++  g_free (strings.q);
++}
++
+ static void
+ test_str_has_prefix (void)
+ {
+@@ -527,6 +557,8 @@ main (int argc, char *argv[])
+   g_test_add_func ("/C++/str-equal", test_str_equal);
+   g_test_add_func ("/C++/strdup", test_strdup);
+   g_test_add_func ("/C++/strdup/macro", test_strdup_macro);
++  g_test_add_func ("/C++/strdup/macro/qualified", test_strdup_macro_qualified);
++  g_test_add_func ("/C++/strdup/macro/nested-initializer", test_strdup_macro_nested_initializer);
+   g_test_add_func ("/C++/str-has-prefix", test_str_has_prefix);
+   g_test_add_func ("/C++/str-has-prefix/macro", test_str_has_prefix_macro);
+   g_test_add_func ("/C++/str-has-suffix", test_str_has_suffix);
+-- 
+GitLab
+
diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..2b1ad5b4e6ad
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,26 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+--- a/gio/tests/cxx.cpp
++++ a/gio/tests/cxx.cpp
+@@ -59,7 +59,7 @@ int
+ main (int argc, char **argv)
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+ #endif
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..561891836471 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"

From 78c4dd02522bddf58320a029b89c8cdd21ba371c Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (5 preceding siblings ...)
  2023-03-22  8:32 ` oreo639
@ 2023-03-22  8:34 ` oreo639
  2023-03-22  8:38 ` oreo639
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  8:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 18842 bytes --]

From 29449d3a076014476431565e8cf13ba81ffde263 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 ...2f81cc59751fcc689731dcd60af5da5723ba.patch | 138 ++++++++++++++++++
 .../glib/patches/disable-broken-tests.patch   |  23 ++-
 .../fix-segfault-g_param_value_is_valid.patch |  35 -----
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    |  26 ++++
 .../glib/patches/gnome-console-support.patch  |  62 --------
 srcpkgs/glib/patches/test-error-musl.patch    |  50 -------
 srcpkgs/glib/template                         |  14 +-
 7 files changed, 185 insertions(+), 163 deletions(-)
 create mode 100644 srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
new file mode 100644
index 000000000000..8a7c6e60c5b6
--- /dev/null
+++ b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
@@ -0,0 +1,138 @@
+From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Mon, 13 Mar 2023 16:23:37 +0800
+Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid
+ breaking C++ code
+
+Wrap the logic into a G_ALWAYS_INLINE function, instead of using a
+complex statement-expression which is not allowed in braced initializer
+lists and expanded into some bad thing when it's used as
+`::g_strdup(...)`.
+
+We cannot use `__builtin_constant_p (str)` because GCC documentation
+clearly states that it always produces 0 when str is a const char *
+argument of an inline function.  But `__builtin_constant_p (!str)`,
+`__builtin_constant_p (!!str)`, and
+`__builtin_constant_p (strlen (str))` functions properly with `-O1` or
+above enabled.
+
+Fixes #2936.
+---
+ glib/gstrfuncs.h   | 43 ++++++++++++++++++++++++++-----------------
+ glib/tests/cxx.cpp | 32 ++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 17 deletions(-)
+
+diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
+index 8a6830294f..cb021b658d 100644
+--- a/glib/gstrfuncs.h
++++ b/glib/gstrfuncs.h
+@@ -204,23 +204,6 @@ gboolean             (g_str_has_prefix) (const gchar *str,
+     (g_str_has_suffix) (STR, SUFFIX)                                          \
+   )
+ 
+-#define g_strdup(STR)                                                         \
+-  (__builtin_constant_p ((STR)) ?                                             \
+-    (G_LIKELY ((STR) != NULL) ?                                               \
+-      G_GNUC_EXTENSION ({                                                     \
+-        const char *const ___str = ((STR));                                   \
+-        const char *const __str = _G_STR_NONNULL (___str);                    \
+-        const size_t __str_len = strlen (__str) + 1;                          \
+-        char *__dup_str = (char *) g_malloc (__str_len);                      \
+-        (char *) memcpy (__dup_str, __str, __str_len);                        \
+-      })                                                                      \
+-      :                                                                       \
+-      (char *) (NULL)                                                         \
+-    )                                                                         \
+-    :                                                                         \
+-    (g_strdup) ((STR))                                                        \
+-  )
+-
+ #endif /* !defined (__GI_SCANNER__) */
+ #endif /* !defined (__GTK_DOC_IGNORE__) */
+ #endif /* G_GNUC_CHECK_VERSION (2, 0) */
+@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL
+ gchar*                g_strjoin	       (const gchar  *separator,
+ 					...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+ 
++#if G_GNUC_CHECK_VERSION(2, 0)
++#ifndef __GTK_DOC_IGNORE__
++#ifndef __GI_SCANNER__
++
++G_ALWAYS_INLINE static inline char *
++g_strdup_inline (const char *str)
++{
++  if (__builtin_constant_p (!str) && !str)
++    return NULL;
++
++  if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str)))
++    {
++      const size_t len = strlen (str) + 1;
++      char *dup_str = (char *) g_malloc (len);
++      return (char *) memcpy (dup_str, str, len);
++    }
++
++  return g_strdup (str);
++}
++
++#define g_strdup(x) g_strdup_inline (x)
++
++#endif /* !defined (__GI_SCANNER__) */
++#endif /* !defined (__GTK_DOC_IGNORE__) */
++#endif /* G_GNUC_CHECK_VERSION (2, 0) */
++
+ /* Make a copy of a string interpreting C string -style escape
+  * sequences. Inverse of g_strescape. The recognized sequences are \b
+  * \f \n \r \t \\ \" and the octal format.
+diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
+index 2431340092..bc7967ccee 100644
+--- a/glib/tests/cxx.cpp
++++ b/glib/tests/cxx.cpp
+@@ -349,6 +349,36 @@ test_strdup_macro (void)
+   g_free (str);
+ }
+ 
++static void
++test_strdup_macro_qualified (void)
++{
++  gchar *str;
++
++  g_assert_null (::g_strdup (NULL));
++
++  str = ::g_strdup ("C++ is cool too!");
++  g_assert_nonnull (str);
++  g_assert_cmpstr (str, ==, "C++ is cool too!");
++  g_free (str);
++}
++
++static void
++test_strdup_macro_nested_initializer (void)
++{
++  struct
++  {
++    char *p, *q;
++  } strings = {
++    g_strdup (NULL),
++    g_strdup ("C++ is cool too!"),
++  };
++
++  g_assert_null (strings.p);
++  g_assert_nonnull (strings.q);
++  g_assert_cmpstr (strings.q, ==, "C++ is cool too!");
++  g_free (strings.q);
++}
++
+ static void
+ test_str_has_prefix (void)
+ {
+@@ -527,6 +557,8 @@ main (int argc, char *argv[])
+   g_test_add_func ("/C++/str-equal", test_str_equal);
+   g_test_add_func ("/C++/strdup", test_strdup);
+   g_test_add_func ("/C++/strdup/macro", test_strdup_macro);
++  g_test_add_func ("/C++/strdup/macro/qualified", test_strdup_macro_qualified);
++  g_test_add_func ("/C++/strdup/macro/nested-initializer", test_strdup_macro_nested_initializer);
+   g_test_add_func ("/C++/str-has-prefix", test_str_has_prefix);
+   g_test_add_func ("/C++/str-has-prefix/macro", test_str_has_prefix_macro);
+   g_test_add_func ("/C++/str-has-suffix", test_str_has_suffix);
+-- 
+GitLab
+
diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..2b1ad5b4e6ad
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,26 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+--- a/gio/tests/cxx.cpp
++++ a/gio/tests/cxx.cpp
+@@ -59,7 +59,7 @@ int
+ main (int argc, char **argv)
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+ #endif
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..5c2ec2d0f86b 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"
@@ -27,6 +27,12 @@ if [ -z "$CROSS_BUILD" ]; then
 	build_options_default+=" gtk_doc"
 fi
 
+post_patch() {
+	if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
+		vsed -e "s/'timer' : {},//" -i glib/tests/meson.build
+	fi
+}
+
 pre_check() {
 	# machine-id is a random, non-zero value
 	echo 'dcb30309cd6c8b7cc20383d85a5c7012' > /etc/machine-id

From 0383e33aa2ff716ab50841ee7165dec84f9b9b4e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (6 preceding siblings ...)
  2023-03-22  8:34 ` oreo639
@ 2023-03-22  8:38 ` oreo639
  2023-03-22 19:57 ` oreo639
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22  8:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 18901 bytes --]

From 679efdbb2182ccd9d04e2927616dcbbf8c9bf1a1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 ...2f81cc59751fcc689731dcd60af5da5723ba.patch | 138 ++++++++++++++++++
 .../glib/patches/disable-broken-tests.patch   |  23 ++-
 .../fix-segfault-g_param_value_is_valid.patch |  35 -----
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    |  26 ++++
 .../glib/patches/gnome-console-support.patch  |  62 --------
 srcpkgs/glib/patches/test-error-musl.patch    |  50 -------
 srcpkgs/glib/template                         |  15 +-
 7 files changed, 186 insertions(+), 163 deletions(-)
 create mode 100644 srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
new file mode 100644
index 000000000000..8a7c6e60c5b6
--- /dev/null
+++ b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
@@ -0,0 +1,138 @@
+From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Mon, 13 Mar 2023 16:23:37 +0800
+Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid
+ breaking C++ code
+
+Wrap the logic into a G_ALWAYS_INLINE function, instead of using a
+complex statement-expression which is not allowed in braced initializer
+lists and expanded into some bad thing when it's used as
+`::g_strdup(...)`.
+
+We cannot use `__builtin_constant_p (str)` because GCC documentation
+clearly states that it always produces 0 when str is a const char *
+argument of an inline function.  But `__builtin_constant_p (!str)`,
+`__builtin_constant_p (!!str)`, and
+`__builtin_constant_p (strlen (str))` functions properly with `-O1` or
+above enabled.
+
+Fixes #2936.
+---
+ glib/gstrfuncs.h   | 43 ++++++++++++++++++++++++++-----------------
+ glib/tests/cxx.cpp | 32 ++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 17 deletions(-)
+
+diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
+index 8a6830294f..cb021b658d 100644
+--- a/glib/gstrfuncs.h
++++ b/glib/gstrfuncs.h
+@@ -204,23 +204,6 @@ gboolean             (g_str_has_prefix) (const gchar *str,
+     (g_str_has_suffix) (STR, SUFFIX)                                          \
+   )
+ 
+-#define g_strdup(STR)                                                         \
+-  (__builtin_constant_p ((STR)) ?                                             \
+-    (G_LIKELY ((STR) != NULL) ?                                               \
+-      G_GNUC_EXTENSION ({                                                     \
+-        const char *const ___str = ((STR));                                   \
+-        const char *const __str = _G_STR_NONNULL (___str);                    \
+-        const size_t __str_len = strlen (__str) + 1;                          \
+-        char *__dup_str = (char *) g_malloc (__str_len);                      \
+-        (char *) memcpy (__dup_str, __str, __str_len);                        \
+-      })                                                                      \
+-      :                                                                       \
+-      (char *) (NULL)                                                         \
+-    )                                                                         \
+-    :                                                                         \
+-    (g_strdup) ((STR))                                                        \
+-  )
+-
+ #endif /* !defined (__GI_SCANNER__) */
+ #endif /* !defined (__GTK_DOC_IGNORE__) */
+ #endif /* G_GNUC_CHECK_VERSION (2, 0) */
+@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL
+ gchar*                g_strjoin	       (const gchar  *separator,
+ 					...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+ 
++#if G_GNUC_CHECK_VERSION(2, 0)
++#ifndef __GTK_DOC_IGNORE__
++#ifndef __GI_SCANNER__
++
++G_ALWAYS_INLINE static inline char *
++g_strdup_inline (const char *str)
++{
++  if (__builtin_constant_p (!str) && !str)
++    return NULL;
++
++  if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str)))
++    {
++      const size_t len = strlen (str) + 1;
++      char *dup_str = (char *) g_malloc (len);
++      return (char *) memcpy (dup_str, str, len);
++    }
++
++  return g_strdup (str);
++}
++
++#define g_strdup(x) g_strdup_inline (x)
++
++#endif /* !defined (__GI_SCANNER__) */
++#endif /* !defined (__GTK_DOC_IGNORE__) */
++#endif /* G_GNUC_CHECK_VERSION (2, 0) */
++
+ /* Make a copy of a string interpreting C string -style escape
+  * sequences. Inverse of g_strescape. The recognized sequences are \b
+  * \f \n \r \t \\ \" and the octal format.
+diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
+index 2431340092..bc7967ccee 100644
+--- a/glib/tests/cxx.cpp
++++ b/glib/tests/cxx.cpp
+@@ -349,6 +349,36 @@ test_strdup_macro (void)
+   g_free (str);
+ }
+ 
++static void
++test_strdup_macro_qualified (void)
++{
++  gchar *str;
++
++  g_assert_null (::g_strdup (NULL));
++
++  str = ::g_strdup ("C++ is cool too!");
++  g_assert_nonnull (str);
++  g_assert_cmpstr (str, ==, "C++ is cool too!");
++  g_free (str);
++}
++
++static void
++test_strdup_macro_nested_initializer (void)
++{
++  struct
++  {
++    char *p, *q;
++  } strings = {
++    g_strdup (NULL),
++    g_strdup ("C++ is cool too!"),
++  };
++
++  g_assert_null (strings.p);
++  g_assert_nonnull (strings.q);
++  g_assert_cmpstr (strings.q, ==, "C++ is cool too!");
++  g_free (strings.q);
++}
++
+ static void
+ test_str_has_prefix (void)
+ {
+@@ -527,6 +557,8 @@ main (int argc, char *argv[])
+   g_test_add_func ("/C++/str-equal", test_str_equal);
+   g_test_add_func ("/C++/strdup", test_strdup);
+   g_test_add_func ("/C++/strdup/macro", test_strdup_macro);
++  g_test_add_func ("/C++/strdup/macro/qualified", test_strdup_macro_qualified);
++  g_test_add_func ("/C++/strdup/macro/nested-initializer", test_strdup_macro_nested_initializer);
+   g_test_add_func ("/C++/str-has-prefix", test_str_has_prefix);
+   g_test_add_func ("/C++/str-has-prefix/macro", test_str_has_prefix_macro);
+   g_test_add_func ("/C++/str-has-suffix", test_str_has_suffix);
+-- 
+GitLab
+
diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..2b1ad5b4e6ad
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,26 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+--- a/gio/tests/cxx.cpp
++++ a/gio/tests/cxx.cpp
+@@ -59,7 +59,7 @@ int
+ main (int argc, char **argv)
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+ #endif
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..027d0cbea53d 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"
@@ -27,6 +27,13 @@ if [ -z "$CROSS_BUILD" ]; then
 	build_options_default+=" gtk_doc"
 fi
 
+post_patch() {
+	# Timer test is flaky on 32 bit (does float comparisons)
+	if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
+		vsed -e "s/'timer' : {},//" -i glib/tests/meson.build
+	fi
+}
+
 pre_check() {
 	# machine-id is a random, non-zero value
 	echo 'dcb30309cd6c8b7cc20383d85a5c7012' > /etc/machine-id

From 54d30703d74864fdbaed0bf7f726bfd572c12d46 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (7 preceding siblings ...)
  2023-03-22  8:38 ` oreo639
@ 2023-03-22 19:57 ` oreo639
  2023-03-23 17:33 ` paper42
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-22 19:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1365 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 18901 bytes --]

From 679efdbb2182ccd9d04e2927616dcbbf8c9bf1a1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 ...2f81cc59751fcc689731dcd60af5da5723ba.patch | 138 ++++++++++++++++++
 .../glib/patches/disable-broken-tests.patch   |  23 ++-
 .../fix-segfault-g_param_value_is_valid.patch |  35 -----
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    |  26 ++++
 .../glib/patches/gnome-console-support.patch  |  62 --------
 srcpkgs/glib/patches/test-error-musl.patch    |  50 -------
 srcpkgs/glib/template                         |  15 +-
 7 files changed, 186 insertions(+), 163 deletions(-)
 create mode 100644 srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
new file mode 100644
index 000000000000..8a7c6e60c5b6
--- /dev/null
+++ b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
@@ -0,0 +1,138 @@
+From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Mon, 13 Mar 2023 16:23:37 +0800
+Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid
+ breaking C++ code
+
+Wrap the logic into a G_ALWAYS_INLINE function, instead of using a
+complex statement-expression which is not allowed in braced initializer
+lists and expanded into some bad thing when it's used as
+`::g_strdup(...)`.
+
+We cannot use `__builtin_constant_p (str)` because GCC documentation
+clearly states that it always produces 0 when str is a const char *
+argument of an inline function.  But `__builtin_constant_p (!str)`,
+`__builtin_constant_p (!!str)`, and
+`__builtin_constant_p (strlen (str))` functions properly with `-O1` or
+above enabled.
+
+Fixes #2936.
+---
+ glib/gstrfuncs.h   | 43 ++++++++++++++++++++++++++-----------------
+ glib/tests/cxx.cpp | 32 ++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 17 deletions(-)
+
+diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
+index 8a6830294f..cb021b658d 100644
+--- a/glib/gstrfuncs.h
++++ b/glib/gstrfuncs.h
+@@ -204,23 +204,6 @@ gboolean             (g_str_has_prefix) (const gchar *str,
+     (g_str_has_suffix) (STR, SUFFIX)                                          \
+   )
+ 
+-#define g_strdup(STR)                                                         \
+-  (__builtin_constant_p ((STR)) ?                                             \
+-    (G_LIKELY ((STR) != NULL) ?                                               \
+-      G_GNUC_EXTENSION ({                                                     \
+-        const char *const ___str = ((STR));                                   \
+-        const char *const __str = _G_STR_NONNULL (___str);                    \
+-        const size_t __str_len = strlen (__str) + 1;                          \
+-        char *__dup_str = (char *) g_malloc (__str_len);                      \
+-        (char *) memcpy (__dup_str, __str, __str_len);                        \
+-      })                                                                      \
+-      :                                                                       \
+-      (char *) (NULL)                                                         \
+-    )                                                                         \
+-    :                                                                         \
+-    (g_strdup) ((STR))                                                        \
+-  )
+-
+ #endif /* !defined (__GI_SCANNER__) */
+ #endif /* !defined (__GTK_DOC_IGNORE__) */
+ #endif /* G_GNUC_CHECK_VERSION (2, 0) */
+@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL
+ gchar*                g_strjoin	       (const gchar  *separator,
+ 					...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+ 
++#if G_GNUC_CHECK_VERSION(2, 0)
++#ifndef __GTK_DOC_IGNORE__
++#ifndef __GI_SCANNER__
++
++G_ALWAYS_INLINE static inline char *
++g_strdup_inline (const char *str)
++{
++  if (__builtin_constant_p (!str) && !str)
++    return NULL;
++
++  if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str)))
++    {
++      const size_t len = strlen (str) + 1;
++      char *dup_str = (char *) g_malloc (len);
++      return (char *) memcpy (dup_str, str, len);
++    }
++
++  return g_strdup (str);
++}
++
++#define g_strdup(x) g_strdup_inline (x)
++
++#endif /* !defined (__GI_SCANNER__) */
++#endif /* !defined (__GTK_DOC_IGNORE__) */
++#endif /* G_GNUC_CHECK_VERSION (2, 0) */
++
+ /* Make a copy of a string interpreting C string -style escape
+  * sequences. Inverse of g_strescape. The recognized sequences are \b
+  * \f \n \r \t \\ \" and the octal format.
+diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
+index 2431340092..bc7967ccee 100644
+--- a/glib/tests/cxx.cpp
++++ b/glib/tests/cxx.cpp
+@@ -349,6 +349,36 @@ test_strdup_macro (void)
+   g_free (str);
+ }
+ 
++static void
++test_strdup_macro_qualified (void)
++{
++  gchar *str;
++
++  g_assert_null (::g_strdup (NULL));
++
++  str = ::g_strdup ("C++ is cool too!");
++  g_assert_nonnull (str);
++  g_assert_cmpstr (str, ==, "C++ is cool too!");
++  g_free (str);
++}
++
++static void
++test_strdup_macro_nested_initializer (void)
++{
++  struct
++  {
++    char *p, *q;
++  } strings = {
++    g_strdup (NULL),
++    g_strdup ("C++ is cool too!"),
++  };
++
++  g_assert_null (strings.p);
++  g_assert_nonnull (strings.q);
++  g_assert_cmpstr (strings.q, ==, "C++ is cool too!");
++  g_free (strings.q);
++}
++
+ static void
+ test_str_has_prefix (void)
+ {
+@@ -527,6 +557,8 @@ main (int argc, char *argv[])
+   g_test_add_func ("/C++/str-equal", test_str_equal);
+   g_test_add_func ("/C++/strdup", test_strdup);
+   g_test_add_func ("/C++/strdup/macro", test_strdup_macro);
++  g_test_add_func ("/C++/strdup/macro/qualified", test_strdup_macro_qualified);
++  g_test_add_func ("/C++/strdup/macro/nested-initializer", test_strdup_macro_nested_initializer);
+   g_test_add_func ("/C++/str-has-prefix", test_str_has_prefix);
+   g_test_add_func ("/C++/str-has-prefix/macro", test_str_has_prefix_macro);
+   g_test_add_func ("/C++/str-has-suffix", test_str_has_suffix);
+-- 
+GitLab
+
diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..2b1ad5b4e6ad
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,26 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+--- a/gio/tests/cxx.cpp
++++ a/gio/tests/cxx.cpp
+@@ -59,7 +59,7 @@ int
+ main (int argc, char **argv)
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+ #endif
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..027d0cbea53d 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"
@@ -27,6 +27,13 @@ if [ -z "$CROSS_BUILD" ]; then
 	build_options_default+=" gtk_doc"
 fi
 
+post_patch() {
+	# Timer test is flaky on 32 bit (does float comparisons)
+	if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
+		vsed -e "s/'timer' : {},//" -i glib/tests/meson.build
+	fi
+}
+
 pre_check() {
 	# machine-id is a random, non-zero value
 	echo 'dcb30309cd6c8b7cc20383d85a5c7012' > /etc/machine-id

From e035462446c3ef6f5569c57d153be8e66fe4ae1e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (8 preceding siblings ...)
  2023-03-22 19:57 ` oreo639
@ 2023-03-23 17:33 ` paper42
  2023-03-23 19:01 ` [PR PATCH] [Updated] " oreo639
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: paper42 @ 2023-03-23 17:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

New comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/42916#issuecomment-1481605712

Comment:
increase the versions in common/shlibs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (9 preceding siblings ...)
  2023-03-23 17:33 ` paper42
@ 2023-03-23 19:01 ` oreo639
  2023-03-23 20:53 ` [PR REVIEW] " paper42
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-23 19:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

The nullptr patch can be removed after https://github.com/void-linux/void-packages/pull/42931

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 19683 bytes --]

From 58d2c118fadc6bdea4a78f5f6235237156b81072 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.0.

---
 common/shlibs                                 |  10 +-
 ...2f81cc59751fcc689731dcd60af5da5723ba.patch | 138 ++++++++++++++++++
 .../glib/patches/disable-broken-tests.patch   |  23 ++-
 .../fix-segfault-g_param_value_is_valid.patch |  35 -----
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    |  26 ++++
 .../glib/patches/gnome-console-support.patch  |  62 --------
 srcpkgs/glib/patches/test-error-musl.patch    |  50 -------
 srcpkgs/glib/template                         |  15 +-
 8 files changed, 191 insertions(+), 168 deletions(-)
 create mode 100644 srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/common/shlibs b/common/shlibs
index 9b12ff7dbe51..b1677f45f841 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -91,11 +91,11 @@ libmagic.so.1 libmagic-5.12_1
 libbluetooth.so.3 libbluetooth-4.58_1
 libwmf-0.2.so.7 libwmf-0.2.8.4_1
 libwmflite-0.2.so.7 libwmf-0.2.8.4_1
-libgthread-2.0.so.0 glib-2.74.0_1
-libglib-2.0.so.0 glib-2.74.0_1
-libgmodule-2.0.so.0 glib-2.74.0_1
-libgio-2.0.so.0 glib-2.74.0_1
-libgobject-2.0.so.0 glib-2.74.0_1
+libgthread-2.0.so.0 glib-2.76.0_1
+libglib-2.0.so.0 glib-2.76.0_1
+libgmodule-2.0.so.0 glib-2.76.0_1
+libgio-2.0.so.0 glib-2.76.0_1
+libgobject-2.0.so.0 glib-2.76.0_1
 libatk-1.0.so.0 atk-1.26.0_1
 libpangocairo-1.0.so.0 pango-1.24.0_1
 libpangoft2-1.0.so.0 pango-1.24.0_1
diff --git a/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
new file mode 100644
index 000000000000..8a7c6e60c5b6
--- /dev/null
+++ b/srcpkgs/glib/patches/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch
@@ -0,0 +1,138 @@
+From cc7f2f81cc59751fcc689731dcd60af5da5723ba Mon Sep 17 00:00:00 2001
+From: Xi Ruoyao <xry111@xry111.site>
+Date: Mon, 13 Mar 2023 16:23:37 +0800
+Subject: [PATCH] gstrfuncs: Improve inline version of g_strdup() to avoid
+ breaking C++ code
+
+Wrap the logic into a G_ALWAYS_INLINE function, instead of using a
+complex statement-expression which is not allowed in braced initializer
+lists and expanded into some bad thing when it's used as
+`::g_strdup(...)`.
+
+We cannot use `__builtin_constant_p (str)` because GCC documentation
+clearly states that it always produces 0 when str is a const char *
+argument of an inline function.  But `__builtin_constant_p (!str)`,
+`__builtin_constant_p (!!str)`, and
+`__builtin_constant_p (strlen (str))` functions properly with `-O1` or
+above enabled.
+
+Fixes #2936.
+---
+ glib/gstrfuncs.h   | 43 ++++++++++++++++++++++++++-----------------
+ glib/tests/cxx.cpp | 32 ++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 17 deletions(-)
+
+diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
+index 8a6830294f..cb021b658d 100644
+--- a/glib/gstrfuncs.h
++++ b/glib/gstrfuncs.h
+@@ -204,23 +204,6 @@ gboolean             (g_str_has_prefix) (const gchar *str,
+     (g_str_has_suffix) (STR, SUFFIX)                                          \
+   )
+ 
+-#define g_strdup(STR)                                                         \
+-  (__builtin_constant_p ((STR)) ?                                             \
+-    (G_LIKELY ((STR) != NULL) ?                                               \
+-      G_GNUC_EXTENSION ({                                                     \
+-        const char *const ___str = ((STR));                                   \
+-        const char *const __str = _G_STR_NONNULL (___str);                    \
+-        const size_t __str_len = strlen (__str) + 1;                          \
+-        char *__dup_str = (char *) g_malloc (__str_len);                      \
+-        (char *) memcpy (__dup_str, __str, __str_len);                        \
+-      })                                                                      \
+-      :                                                                       \
+-      (char *) (NULL)                                                         \
+-    )                                                                         \
+-    :                                                                         \
+-    (g_strdup) ((STR))                                                        \
+-  )
+-
+ #endif /* !defined (__GI_SCANNER__) */
+ #endif /* !defined (__GTK_DOC_IGNORE__) */
+ #endif /* G_GNUC_CHECK_VERSION (2, 0) */
+@@ -318,6 +301,32 @@ GLIB_AVAILABLE_IN_ALL
+ gchar*                g_strjoin	       (const gchar  *separator,
+ 					...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
+ 
++#if G_GNUC_CHECK_VERSION(2, 0)
++#ifndef __GTK_DOC_IGNORE__
++#ifndef __GI_SCANNER__
++
++G_ALWAYS_INLINE static inline char *
++g_strdup_inline (const char *str)
++{
++  if (__builtin_constant_p (!str) && !str)
++    return NULL;
++
++  if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str)))
++    {
++      const size_t len = strlen (str) + 1;
++      char *dup_str = (char *) g_malloc (len);
++      return (char *) memcpy (dup_str, str, len);
++    }
++
++  return g_strdup (str);
++}
++
++#define g_strdup(x) g_strdup_inline (x)
++
++#endif /* !defined (__GI_SCANNER__) */
++#endif /* !defined (__GTK_DOC_IGNORE__) */
++#endif /* G_GNUC_CHECK_VERSION (2, 0) */
++
+ /* Make a copy of a string interpreting C string -style escape
+  * sequences. Inverse of g_strescape. The recognized sequences are \b
+  * \f \n \r \t \\ \" and the octal format.
+diff --git a/glib/tests/cxx.cpp b/glib/tests/cxx.cpp
+index 2431340092..bc7967ccee 100644
+--- a/glib/tests/cxx.cpp
++++ b/glib/tests/cxx.cpp
+@@ -349,6 +349,36 @@ test_strdup_macro (void)
+   g_free (str);
+ }
+ 
++static void
++test_strdup_macro_qualified (void)
++{
++  gchar *str;
++
++  g_assert_null (::g_strdup (NULL));
++
++  str = ::g_strdup ("C++ is cool too!");
++  g_assert_nonnull (str);
++  g_assert_cmpstr (str, ==, "C++ is cool too!");
++  g_free (str);
++}
++
++static void
++test_strdup_macro_nested_initializer (void)
++{
++  struct
++  {
++    char *p, *q;
++  } strings = {
++    g_strdup (NULL),
++    g_strdup ("C++ is cool too!"),
++  };
++
++  g_assert_null (strings.p);
++  g_assert_nonnull (strings.q);
++  g_assert_cmpstr (strings.q, ==, "C++ is cool too!");
++  g_free (strings.q);
++}
++
+ static void
+ test_str_has_prefix (void)
+ {
+@@ -527,6 +557,8 @@ main (int argc, char *argv[])
+   g_test_add_func ("/C++/str-equal", test_str_equal);
+   g_test_add_func ("/C++/strdup", test_strdup);
+   g_test_add_func ("/C++/strdup/macro", test_strdup_macro);
++  g_test_add_func ("/C++/strdup/macro/qualified", test_strdup_macro_qualified);
++  g_test_add_func ("/C++/strdup/macro/nested-initializer", test_strdup_macro_nested_initializer);
+   g_test_add_func ("/C++/str-has-prefix", test_str_has_prefix);
+   g_test_add_func ("/C++/str-has-prefix/macro", test_str_has_prefix_macro);
+   g_test_add_func ("/C++/str-has-suffix", test_str_has_suffix);
+-- 
+GitLab
+
diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..2b1ad5b4e6ad
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,26 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+--- a/gio/tests/cxx.cpp
++++ a/gio/tests/cxx.cpp
+@@ -59,7 +59,7 @@ int
+ main (int argc, char **argv)
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+ #endif
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..027d0cbea53d 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.0
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=525bb703b807142e1aee5ccf222c344e8064b21c0c45677ef594e587874c6797
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"
@@ -27,6 +27,13 @@ if [ -z "$CROSS_BUILD" ]; then
 	build_options_default+=" gtk_doc"
 fi
 
+post_patch() {
+	# Timer test is flaky on 32 bit (does float comparisons)
+	if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
+		vsed -e "s/'timer' : {},//" -i glib/tests/meson.build
+	fi
+}
+
 pre_check() {
 	# machine-id is a random, non-zero value
 	echo 'dcb30309cd6c8b7cc20383d85a5c7012' > /etc/machine-id

From 9c2bdd92de9a4f0e21e8e865764b4615a9cba6c8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR REVIEW] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (10 preceding siblings ...)
  2023-03-23 19:01 ` [PR PATCH] [Updated] " oreo639
@ 2023-03-23 20:53 ` paper42
  2023-03-23 21:36 ` [PR PATCH] [Updated] " oreo639
  2023-03-30 20:51 ` [PR PATCH] [Merged]: " paper42
  13 siblings, 0 replies; 15+ messages in thread
From: paper42 @ 2023-03-23 20:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 157 bytes --]

New review comment by paper42 on void-packages repository

https://github.com/void-linux/void-packages/pull/42916#discussion_r1146830688

Comment:
.1 is out

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Updated] glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (11 preceding siblings ...)
  2023-03-23 20:53 ` [PR REVIEW] " paper42
@ 2023-03-23 21:36 ` oreo639
  2023-03-30 20:51 ` [PR PATCH] [Merged]: " paper42
  13 siblings, 0 replies; 15+ messages in thread
From: oreo639 @ 2023-03-23 21:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1462 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages glib
https://github.com/void-linux/void-packages/pull/42916

glib: update to 2.76.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream.
Necessary for GNOME 44 and webkit2gtk update.

The nullptr patch can be removed after https://github.com/void-linux/void-packages/pull/42931

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42916.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-glib-42916.patch --]
[-- Type: text/x-diff, Size: 14025 bytes --]

From 119b8f56bfb0b5cfbd1952a95fea093996c395e8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:30:06 -0700
Subject: [PATCH 1/2] glib: update to 2.76.1.

---
 common/shlibs                                 | 10 +--
 .../glib/patches/disable-broken-tests.patch   | 23 ++++---
 .../fix-segfault-g_param_value_is_valid.patch | 35 -----------
 srcpkgs/glib/patches/fix-test-cxxcpp.patch    | 26 ++++++++
 .../glib/patches/gnome-console-support.patch  | 62 -------------------
 srcpkgs/glib/patches/test-error-musl.patch    | 50 ---------------
 srcpkgs/glib/template                         | 15 +++--
 7 files changed, 53 insertions(+), 168 deletions(-)
 delete mode 100644 srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
 create mode 100644 srcpkgs/glib/patches/fix-test-cxxcpp.patch
 delete mode 100644 srcpkgs/glib/patches/gnome-console-support.patch
 delete mode 100644 srcpkgs/glib/patches/test-error-musl.patch

diff --git a/common/shlibs b/common/shlibs
index 9b12ff7dbe51..b1677f45f841 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -91,11 +91,11 @@ libmagic.so.1 libmagic-5.12_1
 libbluetooth.so.3 libbluetooth-4.58_1
 libwmf-0.2.so.7 libwmf-0.2.8.4_1
 libwmflite-0.2.so.7 libwmf-0.2.8.4_1
-libgthread-2.0.so.0 glib-2.74.0_1
-libglib-2.0.so.0 glib-2.74.0_1
-libgmodule-2.0.so.0 glib-2.74.0_1
-libgio-2.0.so.0 glib-2.74.0_1
-libgobject-2.0.so.0 glib-2.74.0_1
+libgthread-2.0.so.0 glib-2.76.0_1
+libglib-2.0.so.0 glib-2.76.0_1
+libgmodule-2.0.so.0 glib-2.76.0_1
+libgio-2.0.so.0 glib-2.76.0_1
+libgobject-2.0.so.0 glib-2.76.0_1
 libatk-1.0.so.0 atk-1.26.0_1
 libpangocairo-1.0.so.0 pango-1.24.0_1
 libpangoft2-1.0.so.0 pango-1.24.0_1
diff --git a/srcpkgs/glib/patches/disable-broken-tests.patch b/srcpkgs/glib/patches/disable-broken-tests.patch
index 91345d2b1d26..f6e0328b214e 100644
--- a/srcpkgs/glib/patches/disable-broken-tests.patch
+++ b/srcpkgs/glib/patches/disable-broken-tests.patch
@@ -1,14 +1,14 @@
 --- a/gio/tests/meson.build
 +++ b/gio/tests/meson.build
-@@ -56,7 +56,6 @@ gio_tests = {
+@@ -63,7 +63,6 @@ gio_tests = {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'converter-stream' : {},
    'credentials' : {},
    'data-input-stream' : {},
    'data-output-stream' : {},
-@@ -198,7 +197,6 @@ endif
+@@ -227,7 +226,6 @@ endif
  #  Test programs buildable on UNIX only
  if host_machine.system() != 'windows'
    gio_tests += {
@@ -16,7 +16,7 @@
      'gdbus-peer-object-manager' : {},
      'gdbus-sasl' : {},
      'live-g-file' : {},
-@@ -814,14 +812,6 @@ if meson.can_run_host_binaries()
+@@ -951,13 +949,6 @@ if not meson.is_cross_build()
        test_resources_binary2,
      ]
    endif
@@ -24,18 +24,17 @@
 -  gio_tests += {
 -    'resources' : {
 -      'extra_sources' : resources_extra_sources,
--      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--      'should_fail' : host_system == 'darwin',
+-      'depends' : resource_plugin,
 -    },
 -  }
  endif
  
- foreach test_name, extra_args : gio_tests
+ test_extra_programs_targets = {}
 diff --git a/glib/tests/meson.build b/glib/tests/meson.build
 index d74617823..1de81a825 100644
 --- a/glib/tests/meson.build
 +++ b/glib/tests/meson.build
-@@ -11,22 +11,14 @@ glib_tests = {
+@@ -12,22 +12,14 @@ glib_tests = {
    'cache' : {},
    'charset' : {},
    'checksum' : {},
@@ -46,19 +45,19 @@ index d74617823..1de81a825 100644
    'dataset' : {},
 -  'date' : {
 -    # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
--    'should_fail' : host_system == 'darwin',
+-    'can_fail' : host_system == 'darwin',
 -  },
    'dir' : {},
    'environment' : {
      # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392
-     'should_fail' : host_system == 'darwin',
+     'can_fail' : host_system == 'darwin',
    },
 -  'error' : {},
 -  'fileutils' : {},
    'gdatetime' : {
      'suite' : ['slow'],
-   },
-@@ -65,7 +57,6 @@ glib_tests = {
+     'can_fail' : host_system == 'windows',
+@@ -70,7 +62,6 @@ glib_tests = {
    'node' : {},
    'once' : {},
    'onceinit' : {},
diff --git a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch b/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
deleted file mode 100644
index cacaecb695d0..000000000000
--- a/srcpkgs/glib/patches/fix-segfault-g_param_value_is_valid.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This fixes segfault when editing color of text in gimp.
-
-From ea3f17d598d550345e94e4571130e429443e91cb Mon Sep 17 00:00:00 2001
-From: Emmanuele Bassi <ebassi@gnome.org>
-Date: Sun, 25 Sep 2022 14:20:24 +0100
-Subject: [PATCH] Empty values are not valid GParamSpec
-
-The validate() vfunc for GParamSpecParam returns FALSE for empty GValue,
-which means the is_valid() vfunc should do the same.
-
-This avoids a segfault when calling g_param_value_is_valid() on a
-GParamSpecParam.
-
-Fixes: #2770
----
- gobject/gparamspecs.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
-index f17b3488b9..17b8606572 100644
---- a/gobject/gparamspecs.c
-+++ b/gobject/gparamspecs.c
-@@ -894,6 +894,9 @@ param_param_is_valid (GParamSpec   *pspec,
- {
-   GParamSpec *param = value->data[0].v_pointer;
- 
-+  if (param == NULL)
-+    return FALSE;
-+
-   return g_value_type_compatible (G_PARAM_SPEC_TYPE (param), G_PARAM_SPEC_VALUE_TYPE (pspec));
- }
- 
--- 
-GitLab
-
diff --git a/srcpkgs/glib/patches/fix-test-cxxcpp.patch b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
new file mode 100644
index 000000000000..2b1ad5b4e6ad
--- /dev/null
+++ b/srcpkgs/glib/patches/fix-test-cxxcpp.patch
@@ -0,0 +1,26 @@
+Fails to build on musl.
+../glib/tests/cxx.cpp:509:15: error: missing sentinel in function call [-Werror=format=]
+g_test_init (&argc, &argv, NULL);
+
+--- a/glib/tests/cxx.cpp
++++ a/glib/tests/cxx.cpp
+@@ -505,7 +505,7 @@ test_string_free (void)
+ int
+ main (int argc, char *argv[])
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+--- a/gio/tests/cxx.cpp
++++ a/gio/tests/cxx.cpp
+@@ -59,7 +59,7 @@ int
+ main (int argc, char **argv)
+ {
+ #if G_CXX_STD_CHECK_VERSION (11)
+-  g_test_init (&argc, &argv, NULL);
++  g_test_init (&argc, &argv, nullptr);
+ #else
+   g_test_init (&argc, &argv, static_cast<void *>(NULL));
+ #endif
diff --git a/srcpkgs/glib/patches/gnome-console-support.patch b/srcpkgs/glib/patches/gnome-console-support.patch
deleted file mode 100644
index b142aa0b7514..000000000000
--- a/srcpkgs/glib/patches/gnome-console-support.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-Currently glib hardcodes a list of terminals and that list will not be expanding.
-The hope being that it will eventually be replaced with some kind of api.
-Until then, we might as well add gnome-console/kgx to the list
-
-See: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1404#note_1331262
-Source: https://github.com/NixOS/nixpkgs/commit/c987121acf5c87436a0b05ca75cd70bf38c452ca
-
-diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index 60d6debb2..a441bfec9 100644
---- a/gio/gdesktopappinfo.c
-+++ b/gio/gdesktopappinfo.c
-@@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int    *argc,
-   int i, j;
-   char **term_argv = NULL;
-   int term_argc = 0;
-+  gboolean pass_cmd_as_single_arg = FALSE;
-   char *check;
-   char **the_argv;
- 
-@@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int    *argc,
-         }
-       else
-         {
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("kgx");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
-@@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int    *argc,
-         }
-     }
- 
--  real_argc = term_argc + *argc;
-+  real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc);
-   real_argv = g_new (char *, real_argc + 1);
- 
-   for (i = 0; i < term_argc; i++)
-     real_argv[i] = term_argv[i];
- 
--  for (j = 0; j < *argc; j++, i++)
--    real_argv[i] = (char *)the_argv[j];
-+  if (pass_cmd_as_single_arg) {
-+    char **quoted_argv = g_new (char *, *argc + 1);
-+
-+    for (j = 0; j < *argc; j++) {
-+      quoted_argv[j] = g_shell_quote (the_argv[j]);
-+      g_free (the_argv[j]);
-+    }
-+    quoted_argv[j] = NULL;
-+
-+    real_argv[i++] = g_strjoinv (" ", quoted_argv);
-+    g_strfreev (quoted_argv);
-+  } else {
-+    for (j = 0; j < *argc; j++, i++)
-+      real_argv[i] = (char *)the_argv[j];
-+  }
- 
-   real_argv[i] = NULL;
- 
diff --git a/srcpkgs/glib/patches/test-error-musl.patch b/srcpkgs/glib/patches/test-error-musl.patch
deleted file mode 100644
index 427df3de13c7..000000000000
--- a/srcpkgs/glib/patches/test-error-musl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 902ba0bc0db50ede3473af576bddd2b6a2f9e326 Mon Sep 17 00:00:00 2001
-From: Michal Vasilek <michal@vasilek.cz>
-Date: Sun, 18 Sep 2022 17:30:41 +0200
-Subject: [PATCH] tests: Only run g_error_new_valist() programmer error test on
- glibc
-
-The musl implementation of vasprintf segfaults with NULL
----
- glib/tests/error.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/glib/tests/error.c b/glib/tests/error.c
-index 7ea04ea3ce..fa3a25969d 100644
---- a/glib/tests/error.c
-+++ b/glib/tests/error.c
-@@ -123,12 +123,12 @@ static void
- test_new_valist_invalid_va (gpointer dummy,
-                          ...)
- {
--#ifdef __linux__
--  /* Only worth testing this on Linux; if other platforms regress on this legacy
--   * behaviour, we don’t care. In particular, calling g_error_new_valist() with
--   * a %NULL format will crash on FreeBSD as its implementation of vasprintf()
--   * is less forgiving than Linux’s. That’s fine: it’s a programmer error in
--   * either case. */
-+#if defined(__linux__) && defined(__GLIBC__)
-+  /* Only worth testing this on Linux with glibc; if other platforms regress on
-+   * this legacy behaviour, we don’t care. In particular, calling
-+   * g_error_new_valist() with a %NULL format will crash on FreeBSD as its
-+   * implementation of vasprintf() is less forgiving than Linux’s. That’s
-+   * fine: it’s a programmer error in either case. */
-   const struct
-     {
-       GQuark domain;
-@@ -182,9 +182,9 @@ test_new_valist_invalid_va (gpointer dummy,
- 
-       va_end (ap);
-     }
--#else  /* if !__linux__ */
--  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux");
--#endif  /* !__linux__ */
-+#else  /* if !__linux__ || !__GLIBC__ */
-+  g_test_skip ("g_error_new_valist() programmer error handling is only relevant on Linux with glibc");
-+#endif /* !__linux__ || ! __GLIBC__ */
- }
- 
- static void
--- 
-GitLab
-
diff --git a/srcpkgs/glib/template b/srcpkgs/glib/template
index e250af446b0b..7362edaaceb0 100644
--- a/srcpkgs/glib/template
+++ b/srcpkgs/glib/template
@@ -1,7 +1,7 @@
 # Template file for 'glib'
 pkgname=glib
-version=2.74.0
-revision=3
+version=2.76.1
+revision=1
 build_style=meson
 # static version is necessary for qemu-user-static;
 # also disable LTO, otherwise there are multiple failures when linking qemu
@@ -14,10 +14,10 @@ short_desc="GNU library of C routines"
 maintainer="Michal Vasilek <michal@vasilek.cz>"
 license="LGPL-2.1-or-later"
 homepage="https://wiki.gnome.org/Projects/GLib"
-#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-74/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib/raw/glib-2-76/NEWS"
 changelog="https://gitlab.gnome.org/GNOME/glib/raw/main/NEWS"
 distfiles="${GNOME_SITE}/glib/${version%.*}/glib-${version}.tar.xz"
-checksum=3652c7f072d7b031a6b5edd623f77ebc5dcd2ae698598abcc89ff39ca75add30
+checksum=43dc0f6a126958f5b454136c4398eab420249c16171a769784486e25f2fda19f
 make_check_pre="dbus-run-session"
 
 build_options="gtk_doc"
@@ -27,6 +27,13 @@ if [ -z "$CROSS_BUILD" ]; then
 	build_options_default+=" gtk_doc"
 fi
 
+post_patch() {
+	# Timer test is flaky on 32 bit (does float comparisons)
+	if [ "${XBPS_TARGET_WORDSIZE}" = "32" ]; then
+		vsed -e "s/'timer' : {},//" -i glib/tests/meson.build
+	fi
+}
+
 pre_check() {
 	# machine-id is a random, non-zero value
 	echo 'dcb30309cd6c8b7cc20383d85a5c7012' > /etc/machine-id

From 3f549aeb7f0f899a1125f2728b35d9cd00c4daa7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 21 Mar 2023 19:45:08 -0700
Subject: [PATCH 2/2] glib-networking: update to 2.76.0.

---
 srcpkgs/glib-networking/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/glib-networking/template b/srcpkgs/glib-networking/template
index 50328d0e9ac4..680a064ffec5 100644
--- a/srcpkgs/glib-networking/template
+++ b/srcpkgs/glib-networking/template
@@ -1,6 +1,6 @@
 # Template file for 'glib-networking'
 pkgname=glib-networking
-version=2.74.0
+version=2.76.0
 revision=1
 build_style=meson
 configure_args="-Dinstalled_tests=false -Dgnutls=enabled -Dlibproxy=enabled
@@ -13,8 +13,8 @@ short_desc="Network-related giomodules for glib"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://gitlab.gnome.org/GNOME/glib-networking/"
-#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
-changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-74/NEWS"
+changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/master/NEWS"
+#changelog="https://gitlab.gnome.org/GNOME/glib-networking/-/raw/glib-2-76/NEWS"
 distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
-checksum=1f185aaef094123f8e25d8fa55661b3fd71020163a0174adb35a37685cda613b
+checksum=149a05a179e629a538be25662aa324b499d7c4549c5151db5373e780a1bf1b9a
 lib32disabled=yes

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PR PATCH] [Merged]: glib: update to 2.76.0.
  2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
                   ` (12 preceding siblings ...)
  2023-03-23 21:36 ` [PR PATCH] [Updated] " oreo639
@ 2023-03-30 20:51 ` paper42
  13 siblings, 0 replies; 15+ messages in thread
From: paper42 @ 2023-03-30 20:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

There's a merged pull request on the void-packages repository

glib: update to 2.76.0.
https://github.com/void-linux/void-packages/pull/42916

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **briefly**

Removed gnome-console patch as gnome-console is now the default upstream. https://github.com/GNOME/glib/blob/7fec23ed5e47992ae99c317b07733350280a3b84/gio/gdesktopappinfo.c#L2701-L2714
Necessary for GNOME 44 and webkit2gtk update.

The nullptr patch can be removed after https://github.com/void-linux/void-packages/pull/42931

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-03-30 20:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22  2:40 [PR PATCH] glib: update to 2.76.0 oreo639
2023-03-22  2:45 ` [PR PATCH] [Updated] " oreo639
2023-03-22  2:57 ` oreo639
2023-03-22  3:03 ` oreo639
2023-03-22  3:07 ` oreo639
2023-03-22  3:11 ` oreo639
2023-03-22  8:32 ` oreo639
2023-03-22  8:34 ` oreo639
2023-03-22  8:38 ` oreo639
2023-03-22 19:57 ` oreo639
2023-03-23 17:33 ` paper42
2023-03-23 19:01 ` [PR PATCH] [Updated] " oreo639
2023-03-23 20:53 ` [PR REVIEW] " paper42
2023-03-23 21:36 ` [PR PATCH] [Updated] " oreo639
2023-03-30 20:51 ` [PR PATCH] [Merged]: " paper42

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).