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>

+45 -112
+12 -20
pkgs/development/libraries/glib/default.nix
··· 2 2 , lib 3 3 , stdenv 4 4 , fetchurl 5 - , fetchpatch 5 + , fetchpatch2 6 6 , gettext 7 7 , meson 8 8 , ninja ··· 56 56 57 57 stdenv.mkDerivation (finalAttrs: { 58 58 pname = "glib"; 59 - version = "2.74.5"; 59 + version = "2.75.3"; 60 60 61 61 src = fetchurl { 62 62 url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz"; 63 - sha256 = "zrqDpZmc6zGkxPyZISB8uf//0qsdbsA8Fi0/YIpcFMg="; 63 + sha256 = "fFF9Cv9FbDWgObzoqN96CM6VqChbCdGEn4hl9jP3+HE="; 64 64 }; 65 65 66 66 patches = lib.optionals stdenv.isDarwin [ ··· 68 68 ] ++ lib.optionals stdenv.hostPlatform.isMusl [ 69 69 ./quark_init_on_demand.patch 70 70 ./gobject_init_on_demand.patch 71 - 72 - # Fix error about missing sentinel in glib/tests/cxx.cpp 73 - # These two commits are part of already merged glib MRs 3033 and 3031: 74 - # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3033 75 - (fetchpatch { 76 - url = "https://gitlab.gnome.org/GNOME/glib/-/commit/0ca5254c5d92aec675b76b4bfa72a6885cde6066.patch"; 77 - sha256 = "OfD5zO/7JIgOMLc0FAgHV9smWugFJuVPHCn9jTsMQJg="; 78 - }) 79 - # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3031 80 - (fetchpatch { 81 - url = "https://gitlab.gnome.org/GNOME/glib/-/commit/7dc19632f3115e3f517c6bc80436fe72c1dcdeb4.patch"; 82 - sha256 = "v28Yk+R0kN9ssIcvJudRZ4vi30rzQEE8Lsd1kWp5hbM="; 83 - }) 84 71 ] ++ [ 85 72 ./glib-appinfo-watch.patch 86 73 ./schema-override-variable.patch 87 74 88 - # Add support for the GNOME’s default terminal emulator. 89 - # https://gitlab.gnome.org/GNOME/glib/-/issues/2618 90 - ./gnome-console-support.patch 91 - # Do the same for Pantheon’s terminal emulator. 75 + # Add support for Pantheon’s terminal emulator. 92 76 ./elementary-terminal-support.patch 93 77 94 78 # GLib contains many binaries used for different purposes; ··· 118 102 # Disable flaky test. 119 103 # https://gitlab.gnome.org/GNOME/glib/-/issues/820 120 104 ./skip-timer-test.patch 105 + 106 + # Fix API break breaking C++ apps. 107 + # https://gitlab.gnome.org/GNOME/glib/-/issues/2936 108 + (fetchpatch2 { 109 + url = "https://gitlab.gnome.org/GNOME/glib/-/commit/cc7f2f81cc59751fcc689731dcd60af5da5723ba.patch"; 110 + hash = "sha256-8y+rl17buxazMK9Oj28CasC9AyRwt700knyCL1jDIJ0="; 111 + }) 121 112 ]; 122 113 123 114 outputs = [ "bin" "out" "dev" "devdoc" ]; ··· 195 186 patchShebangs glib/gen-unicode-tables.pl 196 187 patchShebangs glib/tests/gen-casefold-txt.py 197 188 patchShebangs glib/tests/gen-casemap-txt.py 189 + patchShebangs tools/gen-visibility-macros.py 198 190 199 191 # Needs machine-id, comment the test 200 192 sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
+9 -13
pkgs/development/libraries/glib/elementary-terminal-support.patch
··· 1 1 diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c 2 - index a441bfec9..6bcd3e690 100644 2 + index 30fcb2937..a6a7163a7 100644 3 3 --- a/gio/gdesktopappinfo.c 4 4 +++ b/gio/gdesktopappinfo.c 5 - @@ -2678,6 +2678,11 @@ prepend_terminal_to_vector (int *argc, 6 - if (check != NULL) 7 - pass_cmd_as_single_arg = TRUE; 8 - } 9 - + if (check == NULL) { 10 - + check = g_find_program_in_path ("io.elementary.terminal"); 11 - + if (check != NULL) 12 - + pass_cmd_as_single_arg = TRUE; 13 - + } 14 - if (check == NULL) 15 - check = g_find_program_in_path ("tilix"); 16 - if (check == NULL) 5 + @@ -2704,6 +2704,7 @@ prepend_terminal_to_vector (int *argc, 6 + { "gnome-terminal", "--" }, 7 + { "mate-terminal", "-x" }, 8 + { "xfce4-terminal", "-x" }, 9 + + { "io.elementary.terminal", "-x" }, 10 + { "tilix", "-e" }, 11 + { "konsole", "-e" }, 12 + { "nxterm", "-e" },
-55
pkgs/development/libraries/glib/gnome-console-support.patch
··· 1 - diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c 2 - index 60d6debb2..a441bfec9 100644 3 - --- a/gio/gdesktopappinfo.c 4 - +++ b/gio/gdesktopappinfo.c 5 - @@ -2627,6 +2627,7 @@ prepend_terminal_to_vector (int *argc, 6 - int i, j; 7 - char **term_argv = NULL; 8 - int term_argc = 0; 9 - + gboolean pass_cmd_as_single_arg = FALSE; 10 - char *check; 11 - char **the_argv; 12 - 13 - @@ -2672,6 +2673,11 @@ prepend_terminal_to_vector (int *argc, 14 - } 15 - else 16 - { 17 - + if (check == NULL) { 18 - + check = g_find_program_in_path ("kgx"); 19 - + if (check != NULL) 20 - + pass_cmd_as_single_arg = TRUE; 21 - + } 22 - if (check == NULL) 23 - check = g_find_program_in_path ("tilix"); 24 - if (check == NULL) 25 - @@ -2697,14 +2703,27 @@ prepend_terminal_to_vector (int *argc, 26 - } 27 - } 28 - 29 - - real_argc = term_argc + *argc; 30 - + real_argc = term_argc + (pass_cmd_as_single_arg ? 1 : *argc); 31 - real_argv = g_new (char *, real_argc + 1); 32 - 33 - for (i = 0; i < term_argc; i++) 34 - real_argv[i] = term_argv[i]; 35 - 36 - - for (j = 0; j < *argc; j++, i++) 37 - - real_argv[i] = (char *)the_argv[j]; 38 - + if (pass_cmd_as_single_arg) { 39 - + char **quoted_argv = g_new (char *, *argc + 1); 40 - + 41 - + for (j = 0; j < *argc; j++) { 42 - + quoted_argv[j] = g_shell_quote (the_argv[j]); 43 - + g_free (the_argv[j]); 44 - + } 45 - + quoted_argv[j] = NULL; 46 - + 47 - + real_argv[i++] = g_strjoinv (" ", quoted_argv); 48 - + g_strfreev (quoted_argv); 49 - + } else { 50 - + for (j = 0; j < *argc; j++, i++) 51 - + real_argv[i] = (char *)the_argv[j]; 52 - + } 53 - 54 - real_argv[i] = NULL; 55 -
+24 -24
pkgs/development/libraries/glib/split-dev-programs.patch
··· 1 1 diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build 2 - index f0a256898..9c8497cd0 100644 2 + index 65faae9b2..4297513d4 100644 3 3 --- a/gio/gdbus-2.0/codegen/meson.build 4 4 +++ b/gio/gdbus-2.0/codegen/meson.build 5 - @@ -19,7 +19,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir) 5 + @@ -20,7 +20,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir) 6 6 # Install gdbus-codegen executable 7 7 gdbus_codegen = configure_file(input : 'gdbus-codegen.in', 8 8 output : 'gdbus-codegen', ··· 12 12 configuration : gdbus_codegen_conf 13 13 ) 14 14 diff --git a/gio/meson.build b/gio/meson.build 15 - index fdd2528df..cf359c7d7 100644 15 + index 462606f3b..a3047fca1 100644 16 16 --- a/gio/meson.build 17 17 +++ b/gio/meson.build 18 - @@ -859,14 +859,15 @@ pkg.generate(libgio, 18 + @@ -880,14 +880,15 @@ pkg.generate(libgio, 19 19 variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')), 20 20 'schemasdir=' + join_paths('${datadir}', schemas_subdir), 21 21 'bindir=' + join_paths('${prefix}', get_option('bindir')), ··· 36 36 'gsettings=' + join_paths('${bindir}', 'gsettings')], 37 37 version : glib_version, 38 38 install_dir : glib_pkgconfigreldir, 39 - @@ -968,6 +969,7 @@ executable('gio', gio_tool_sources, 39 + @@ -989,6 +990,7 @@ executable('gio', gio_tool_sources, 40 40 41 41 executable('gresource', 'gresource-tool.c', 42 42 install : true, ··· 44 44 install_tag : 'bin', 45 45 # intl.lib is not compatible with SAFESEH 46 46 link_args : noseh_link_args, 47 - @@ -975,7 +977,7 @@ executable('gresource', 'gresource-tool.c', 47 + @@ -996,7 +998,7 @@ executable('gresource', 'gresource-tool.c', 48 48 49 49 gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c', 50 50 install : true, ··· 53 53 install_tag : 'bin', 54 54 c_args : gio_c_args, 55 55 # intl.lib is not compatible with SAFESEH 56 - @@ -985,7 +987,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu 56 + @@ -1006,7 +1008,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu 57 57 glib_compile_schemas = executable('glib-compile-schemas', 58 58 ['glib-compile-schemas.c'], 59 59 install : true, ··· 62 62 install_tag : 'bin', 63 63 # intl.lib is not compatible with SAFESEH 64 64 link_args : noseh_link_args, 65 - @@ -994,6 +996,7 @@ glib_compile_schemas = executable('glib-compile-schemas', 65 + @@ -1015,6 +1017,7 @@ glib_compile_schemas = executable('glib-compile-schemas', 66 66 glib_compile_resources = executable('glib-compile-resources', 67 67 [gconstructor_as_data_h, 'glib-compile-resources.c'], 68 68 install : true, ··· 71 71 c_args : gio_c_args, 72 72 # intl.lib is not compatible with SAFESEH 73 73 diff --git a/glib/meson.build b/glib/meson.build 74 - index 1e6dc36be..6b5de6c86 100644 74 + index da76fc005..8e2ef990c 100644 75 75 --- a/glib/meson.build 76 76 +++ b/glib/meson.build 77 - @@ -396,9 +396,10 @@ pkg.generate(libglib, 77 + @@ -441,9 +441,10 @@ pkg.generate(libglib, 78 78 subdirs : ['glib-2.0'], 79 79 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, 80 80 variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), ··· 88 88 version : glib_version, 89 89 install_dir : glib_pkgconfigreldir, 90 90 filebase : 'glib-2.0', 91 - @@ -435,6 +436,7 @@ if host_system == 'windows' 91 + @@ -480,6 +481,7 @@ if host_system == 'windows' 92 92 else 93 93 gtester = executable('gtester', 'gtester.c', 94 94 install : true, ··· 96 96 install_tag : 'bin-devel', 97 97 c_args : ['-UG_DISABLE_ASSERT'], 98 98 include_directories : configinc, 99 - @@ -447,7 +449,7 @@ report_conf.set('PYTHON', python_name) 99 + @@ -492,7 +494,7 @@ report_conf.set('PYTHON', python_name) 100 100 configure_file( 101 101 input: 'gtester-report.in', 102 102 output: 'gtester-report', ··· 106 106 configuration: report_conf, 107 107 install_mode: 'rwxr-xr-x' 108 108 diff --git a/gobject/meson.build b/gobject/meson.build 109 - index a994eb591..36b36b925 100644 109 + index 2129aaf8a..da8462428 100644 110 110 --- a/gobject/meson.build 111 111 +++ b/gobject/meson.build 112 - @@ -79,7 +79,7 @@ foreach tool: python_tools 112 + @@ -94,7 +94,7 @@ foreach tool: python_tools 113 113 input : tool + '.in', 114 114 output : tool, 115 115 configuration : python_tools_conf, ··· 118 118 install_tag : 'bin-devel', 119 119 ) 120 120 121 - @@ -155,6 +155,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep) 121 + @@ -172,6 +172,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep) 122 122 123 - executable('gobject-query', 'gobject-query.c', 123 + gobject_query = executable('gobject-query', 'gobject-query.c', 124 124 install : true, 125 125 + install_dir : get_option('devbindir'), 126 126 install_tag : 'bin-devel', 127 127 dependencies : [libglib_dep, libgobject_dep]) 128 128 129 129 diff --git a/meson_options.txt b/meson_options.txt 130 - index f13cbfdd5..f218db581 100644 130 + index 517d5757c..198cc1b3c 100644 131 131 --- a/meson_options.txt 132 132 +++ b/meson_options.txt 133 - @@ -3,6 +3,11 @@ option('runtime_libdir', 134 - value : '', 135 - description : 'install runtime libraries relative to libdir') 133 + @@ -4,6 +4,11 @@ option('runtime_libdir', 134 + description : 'install runtime libraries relative to libdir', 135 + deprecated: true) 136 136 137 137 +option('devbindir', 138 138 + type : 'string', 139 139 + value : '', 140 140 + description : 'bindir for development tools') 141 141 + 142 - option('iconv', 143 - type : 'combo', 144 - choices : ['auto', 'libc', 'external'], 142 + option('charsetalias_dir', 143 + type : 'string', 144 + value : '', 145 145 diff --git a/tools/meson.build b/tools/meson.build 146 - index 0542fb89b..bfb10cd80 100644 146 + index 2d4192e46..d7e710d6f 100644 147 147 --- a/tools/meson.build 148 148 +++ b/tools/meson.build 149 149 @@ -8,7 +8,7 @@ if have_sh