about summary refs log tree commit diff
path: root/pkgs/development/libraries/glib
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2023-02-25 03:00:41 +0000
committerJan Tojnar <jtojnar@gmail.com>2023-04-06 01:34:44 +0200
commit8e5ee715d12efa8fe3d1071d83c141a6a03d328a (patch)
tree7b892fa22454f72b1da3db1f69cc5ce2c71f425b /pkgs/development/libraries/glib
parent9c8ff8b426a8b07b9e0a131ac3218740dc85ba1e (diff)
glib: 2.74.5 → 2.75.3
https://gitlab.gnome.org/GNOME/glib/-/compare/2.74.5...2.75.3

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>
Diffstat (limited to 'pkgs/development/libraries/glib')
-rw-r--r--pkgs/development/libraries/glib/default.nix32
-rw-r--r--pkgs/development/libraries/glib/elementary-terminal-support.patch22
-rw-r--r--pkgs/development/libraries/glib/gnome-console-support.patch55
-rw-r--r--pkgs/development/libraries/glib/split-dev-programs.patch48
4 files changed, 45 insertions, 112 deletions
diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix
index cf14aa610756c..2b97ddca0dfb7 100644
--- a/pkgs/development/libraries/glib/default.nix
+++ b/pkgs/development/libraries/glib/default.nix
@@ -2,7 +2,7 @@
 , lib
 , stdenv
 , fetchurl
-, fetchpatch
+, fetchpatch2
 , gettext
 , meson
 , ninja
@@ -56,11 +56,11 @@ in
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "glib";
-  version = "2.74.5";
+  version = "2.75.3";
 
   src = fetchurl {
     url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz";
-    sha256 = "zrqDpZmc6zGkxPyZISB8uf//0qsdbsA8Fi0/YIpcFMg=";
+    sha256 = "fFF9Cv9FbDWgObzoqN96CM6VqChbCdGEn4hl9jP3+HE=";
   };
 
   patches = lib.optionals stdenv.isDarwin [
@@ -68,27 +68,11 @@ stdenv.mkDerivation (finalAttrs: {
   ] ++ lib.optionals stdenv.hostPlatform.isMusl [
     ./quark_init_on_demand.patch
     ./gobject_init_on_demand.patch
-
-    # Fix error about missing sentinel in glib/tests/cxx.cpp
-    # These two commits are part of already merged glib MRs 3033 and 3031:
-    # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3033
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/GNOME/glib/-/commit/0ca5254c5d92aec675b76b4bfa72a6885cde6066.patch";
-      sha256 = "OfD5zO/7JIgOMLc0FAgHV9smWugFJuVPHCn9jTsMQJg=";
-    })
-    # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3031
-    (fetchpatch {
-      url = "https://gitlab.gnome.org/GNOME/glib/-/commit/7dc19632f3115e3f517c6bc80436fe72c1dcdeb4.patch";
-      sha256 = "v28Yk+R0kN9ssIcvJudRZ4vi30rzQEE8Lsd1kWp5hbM=";
-    })
   ] ++ [
     ./glib-appinfo-watch.patch
     ./schema-override-variable.patch
 
-    # Add support for the GNOME’s default terminal emulator.
-    # https://gitlab.gnome.org/GNOME/glib/-/issues/2618
-    ./gnome-console-support.patch
-    # Do the same for Pantheon’s terminal emulator.
+    # Add support for Pantheon’s terminal emulator.
     ./elementary-terminal-support.patch
 
     # GLib contains many binaries used for different purposes;
@@ -118,6 +102,13 @@ stdenv.mkDerivation (finalAttrs: {
     # Disable flaky test.
     # https://gitlab.gnome.org/GNOME/glib/-/issues/820
     ./skip-timer-test.patch
+
+    # Fix API break breaking C++ apps.
+    # https://gitlab.gnome.org/GNOME/glib/-/issues/2936
+    (fetchpatch2 {
+      url = "https://gitlab.gnome.org/GNOME/glib/-/commit/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch";
+      hash = "sha256-8y+rl17buxazMK9Oj28CasC9AyRwt700knyCL1jDIJ0=";
+    })
   ];
 
   outputs = [ "bin" "out" "dev" "devdoc" ];
@@ -195,6 +186,7 @@ stdenv.mkDerivation (finalAttrs: {
     patchShebangs glib/gen-unicode-tables.pl
     patchShebangs glib/tests/gen-casefold-txt.py
     patchShebangs glib/tests/gen-casemap-txt.py
+    patchShebangs tools/gen-visibility-macros.py
 
     # Needs machine-id, comment the test
     sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
diff --git a/pkgs/development/libraries/glib/elementary-terminal-support.patch b/pkgs/development/libraries/glib/elementary-terminal-support.patch
index 0b8c8a70871cf..34a56c8487aee 100644
--- a/pkgs/development/libraries/glib/elementary-terminal-support.patch
+++ b/pkgs/development/libraries/glib/elementary-terminal-support.patch
@@ -1,16 +1,12 @@
 diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
-index a441bfec9..6bcd3e690 100644
+index 30fcb2937..a6a7163a7 100644
 --- a/gio/gdesktopappinfo.c
 +++ b/gio/gdesktopappinfo.c
-@@ -2678,6 +2678,11 @@ prepend_terminal_to_vector (int    *argc,
-             if (check != NULL)
-               pass_cmd_as_single_arg = TRUE;
-           }
-+          if (check == NULL) {
-+            check = g_find_program_in_path ("io.elementary.terminal");
-+            if (check != NULL)
-+              pass_cmd_as_single_arg = TRUE;
-+          }
-           if (check == NULL)
-             check = g_find_program_in_path ("tilix");
-           if (check == NULL)
+@@ -2704,6 +2704,7 @@ prepend_terminal_to_vector (int          *argc,
+     { "gnome-terminal", "--" },
+     { "mate-terminal", "-x" },
+     { "xfce4-terminal", "-x" },
++    { "io.elementary.terminal", "-x" },
+     { "tilix", "-e" },
+     { "konsole", "-e" },
+     { "nxterm", "-e" },
diff --git a/pkgs/development/libraries/glib/gnome-console-support.patch b/pkgs/development/libraries/glib/gnome-console-support.patch
deleted file mode 100644
index 7f6894a5cec9f..0000000000000
--- a/pkgs/development/libraries/glib/gnome-console-support.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-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/pkgs/development/libraries/glib/split-dev-programs.patch b/pkgs/development/libraries/glib/split-dev-programs.patch
index 247db2150ede1..f0a217f65702e 100644
--- a/pkgs/development/libraries/glib/split-dev-programs.patch
+++ b/pkgs/development/libraries/glib/split-dev-programs.patch
@@ -1,8 +1,8 @@
 diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
-index f0a256898..9c8497cd0 100644
+index 65faae9b2..4297513d4 100644
 --- a/gio/gdbus-2.0/codegen/meson.build
 +++ b/gio/gdbus-2.0/codegen/meson.build
-@@ -19,7 +19,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir)
+@@ -20,7 +20,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir)
  # Install gdbus-codegen executable
  gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
    output : 'gdbus-codegen',
@@ -12,10 +12,10 @@ index f0a256898..9c8497cd0 100644
    configuration : gdbus_codegen_conf
  )
 diff --git a/gio/meson.build b/gio/meson.build
-index fdd2528df..cf359c7d7 100644
+index 462606f3b..a3047fca1 100644
 --- a/gio/meson.build
 +++ b/gio/meson.build
-@@ -859,14 +859,15 @@ pkg.generate(libgio,
+@@ -880,14 +880,15 @@ pkg.generate(libgio,
    variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')),
                 'schemasdir=' + join_paths('${datadir}', schemas_subdir),
                 'bindir=' + join_paths('${prefix}', get_option('bindir')),
@@ -36,7 +36,7 @@ index fdd2528df..cf359c7d7 100644
                 'gsettings=' + join_paths('${bindir}', 'gsettings')],
    version : glib_version,
    install_dir : glib_pkgconfigreldir,
-@@ -968,6 +969,7 @@ executable('gio', gio_tool_sources,
+@@ -989,6 +990,7 @@ executable('gio', gio_tool_sources,
  
  executable('gresource', 'gresource-tool.c',
    install : true,
@@ -44,7 +44,7 @@ index fdd2528df..cf359c7d7 100644
    install_tag : 'bin',
    # intl.lib is not compatible with SAFESEH
    link_args : noseh_link_args,
-@@ -975,7 +977,7 @@ executable('gresource', 'gresource-tool.c',
+@@ -996,7 +998,7 @@ executable('gresource', 'gresource-tool.c',
  
  gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
    install : true,
@@ -53,7 +53,7 @@ index fdd2528df..cf359c7d7 100644
    install_tag : 'bin',
    c_args : gio_c_args,
    # intl.lib is not compatible with SAFESEH
-@@ -985,7 +987,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
+@@ -1006,7 +1008,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
  glib_compile_schemas = executable('glib-compile-schemas',
    ['glib-compile-schemas.c'],
    install : true,
@@ -62,7 +62,7 @@ index fdd2528df..cf359c7d7 100644
    install_tag : 'bin',
    # intl.lib is not compatible with SAFESEH
    link_args : noseh_link_args,
-@@ -994,6 +996,7 @@ glib_compile_schemas = executable('glib-compile-schemas',
+@@ -1015,6 +1017,7 @@ glib_compile_schemas = executable('glib-compile-schemas',
  glib_compile_resources = executable('glib-compile-resources',
    [gconstructor_as_data_h, 'glib-compile-resources.c'],
    install : true,
@@ -71,10 +71,10 @@ index fdd2528df..cf359c7d7 100644
    c_args : gio_c_args,
    # intl.lib is not compatible with SAFESEH
 diff --git a/glib/meson.build b/glib/meson.build
-index 1e6dc36be..6b5de6c86 100644
+index da76fc005..8e2ef990c 100644
 --- a/glib/meson.build
 +++ b/glib/meson.build
-@@ -396,9 +396,10 @@ pkg.generate(libglib,
+@@ -441,9 +441,10 @@ pkg.generate(libglib,
    subdirs : ['glib-2.0'],
    extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
    variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
@@ -88,7 +88,7 @@ index 1e6dc36be..6b5de6c86 100644
    version : glib_version,
    install_dir : glib_pkgconfigreldir,
    filebase : 'glib-2.0',
-@@ -435,6 +436,7 @@ if host_system == 'windows'
+@@ -480,6 +481,7 @@ if host_system == 'windows'
  else
    gtester = executable('gtester', 'gtester.c',
      install : true,
@@ -96,7 +96,7 @@ index 1e6dc36be..6b5de6c86 100644
      install_tag : 'bin-devel',
      c_args : ['-UG_DISABLE_ASSERT'],
      include_directories : configinc,
-@@ -447,7 +449,7 @@ report_conf.set('PYTHON', python_name)
+@@ -492,7 +494,7 @@ report_conf.set('PYTHON', python_name)
  configure_file(
    input: 'gtester-report.in',
    output: 'gtester-report',
@@ -106,10 +106,10 @@ index 1e6dc36be..6b5de6c86 100644
    configuration: report_conf,
    install_mode: 'rwxr-xr-x'
 diff --git a/gobject/meson.build b/gobject/meson.build
-index a994eb591..36b36b925 100644
+index 2129aaf8a..da8462428 100644
 --- a/gobject/meson.build
 +++ b/gobject/meson.build
-@@ -79,7 +79,7 @@ foreach tool: python_tools
+@@ -94,7 +94,7 @@ foreach tool: python_tools
      input : tool + '.in',
      output : tool,
      configuration : python_tools_conf,
@@ -118,32 +118,32 @@ index a994eb591..36b36b925 100644
      install_tag : 'bin-devel',
    )
  
-@@ -155,6 +155,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep)
+@@ -172,6 +172,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep)
  
- executable('gobject-query', 'gobject-query.c',
+ gobject_query = executable('gobject-query', 'gobject-query.c',
    install : true,
 +  install_dir : get_option('devbindir'),
    install_tag : 'bin-devel',
    dependencies : [libglib_dep, libgobject_dep])
  
 diff --git a/meson_options.txt b/meson_options.txt
-index f13cbfdd5..f218db581 100644
+index 517d5757c..198cc1b3c 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -3,6 +3,11 @@ option('runtime_libdir',
-        value : '',
-        description : 'install runtime libraries relative to libdir')
+@@ -4,6 +4,11 @@ option('runtime_libdir',
+        description : 'install runtime libraries relative to libdir',
+        deprecated: true)
  
 +option('devbindir',
 +       type : 'string',
 +       value : '',
 +       description : 'bindir for development tools')
 +
- option('iconv',
-        type : 'combo',
-        choices : ['auto', 'libc', 'external'],
+ option('charsetalias_dir',
+        type : 'string',
+        value : '',
 diff --git a/tools/meson.build b/tools/meson.build
-index 0542fb89b..bfb10cd80 100644
+index 2d4192e46..d7e710d6f 100644
 --- a/tools/meson.build
 +++ b/tools/meson.build
 @@ -8,7 +8,7 @@ if have_sh