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 , lib 3 , stdenv 4 , fetchurl 5 - , fetchpatch 6 , gettext 7 , meson 8 , ninja ··· 56 57 stdenv.mkDerivation (finalAttrs: { 58 pname = "glib"; 59 - version = "2.74.5"; 60 61 src = fetchurl { 62 url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz"; 63 - sha256 = "zrqDpZmc6zGkxPyZISB8uf//0qsdbsA8Fi0/YIpcFMg="; 64 }; 65 66 patches = lib.optionals stdenv.isDarwin [ ··· 68 ] ++ lib.optionals stdenv.hostPlatform.isMusl [ 69 ./quark_init_on_demand.patch 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 ] ++ [ 85 ./glib-appinfo-watch.patch 86 ./schema-override-variable.patch 87 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. 92 ./elementary-terminal-support.patch 93 94 # GLib contains many binaries used for different purposes; ··· 118 # Disable flaky test. 119 # https://gitlab.gnome.org/GNOME/glib/-/issues/820 120 ./skip-timer-test.patch 121 ]; 122 123 outputs = [ "bin" "out" "dev" "devdoc" ]; ··· 195 patchShebangs glib/gen-unicode-tables.pl 196 patchShebangs glib/tests/gen-casefold-txt.py 197 patchShebangs glib/tests/gen-casemap-txt.py 198 199 # Needs machine-id, comment the test 200 sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
··· 2 , lib 3 , stdenv 4 , fetchurl 5 + , fetchpatch2 6 , gettext 7 , meson 8 , ninja ··· 56 57 stdenv.mkDerivation (finalAttrs: { 58 pname = "glib"; 59 + version = "2.75.3"; 60 61 src = fetchurl { 62 url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz"; 63 + sha256 = "fFF9Cv9FbDWgObzoqN96CM6VqChbCdGEn4hl9jP3+HE="; 64 }; 65 66 patches = lib.optionals stdenv.isDarwin [ ··· 68 ] ++ lib.optionals stdenv.hostPlatform.isMusl [ 69 ./quark_init_on_demand.patch 70 ./gobject_init_on_demand.patch 71 ] ++ [ 72 ./glib-appinfo-watch.patch 73 ./schema-override-variable.patch 74 75 + # Add support for Pantheon’s terminal emulator. 76 ./elementary-terminal-support.patch 77 78 # GLib contains many binaries used for different purposes; ··· 102 # Disable flaky test. 103 # https://gitlab.gnome.org/GNOME/glib/-/issues/820 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 + }) 112 ]; 113 114 outputs = [ "bin" "out" "dev" "devdoc" ]; ··· 186 patchShebangs glib/gen-unicode-tables.pl 187 patchShebangs glib/tests/gen-casefold-txt.py 188 patchShebangs glib/tests/gen-casemap-txt.py 189 + patchShebangs tools/gen-visibility-macros.py 190 191 # Needs machine-id, comment the test 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 diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c 2 - index a441bfec9..6bcd3e690 100644 3 --- a/gio/gdesktopappinfo.c 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)
··· 1 diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c 2 + index 30fcb2937..a6a7163a7 100644 3 --- a/gio/gdesktopappinfo.c 4 +++ b/gio/gdesktopappinfo.c 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 diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build 2 - index f0a256898..9c8497cd0 100644 3 --- a/gio/gdbus-2.0/codegen/meson.build 4 +++ b/gio/gdbus-2.0/codegen/meson.build 5 - @@ -19,7 +19,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir) 6 # Install gdbus-codegen executable 7 gdbus_codegen = configure_file(input : 'gdbus-codegen.in', 8 output : 'gdbus-codegen', ··· 12 configuration : gdbus_codegen_conf 13 ) 14 diff --git a/gio/meson.build b/gio/meson.build 15 - index fdd2528df..cf359c7d7 100644 16 --- a/gio/meson.build 17 +++ b/gio/meson.build 18 - @@ -859,14 +859,15 @@ pkg.generate(libgio, 19 variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')), 20 'schemasdir=' + join_paths('${datadir}', schemas_subdir), 21 'bindir=' + join_paths('${prefix}', get_option('bindir')), ··· 36 'gsettings=' + join_paths('${bindir}', 'gsettings')], 37 version : glib_version, 38 install_dir : glib_pkgconfigreldir, 39 - @@ -968,6 +969,7 @@ executable('gio', gio_tool_sources, 40 41 executable('gresource', 'gresource-tool.c', 42 install : true, ··· 44 install_tag : 'bin', 45 # intl.lib is not compatible with SAFESEH 46 link_args : noseh_link_args, 47 - @@ -975,7 +977,7 @@ executable('gresource', 'gresource-tool.c', 48 49 gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c', 50 install : true, ··· 53 install_tag : 'bin', 54 c_args : gio_c_args, 55 # intl.lib is not compatible with SAFESEH 56 - @@ -985,7 +987,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu 57 glib_compile_schemas = executable('glib-compile-schemas', 58 ['glib-compile-schemas.c'], 59 install : true, ··· 62 install_tag : 'bin', 63 # intl.lib is not compatible with SAFESEH 64 link_args : noseh_link_args, 65 - @@ -994,6 +996,7 @@ glib_compile_schemas = executable('glib-compile-schemas', 66 glib_compile_resources = executable('glib-compile-resources', 67 [gconstructor_as_data_h, 'glib-compile-resources.c'], 68 install : true, ··· 71 c_args : gio_c_args, 72 # intl.lib is not compatible with SAFESEH 73 diff --git a/glib/meson.build b/glib/meson.build 74 - index 1e6dc36be..6b5de6c86 100644 75 --- a/glib/meson.build 76 +++ b/glib/meson.build 77 - @@ -396,9 +396,10 @@ pkg.generate(libglib, 78 subdirs : ['glib-2.0'], 79 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, 80 variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), ··· 88 version : glib_version, 89 install_dir : glib_pkgconfigreldir, 90 filebase : 'glib-2.0', 91 - @@ -435,6 +436,7 @@ if host_system == 'windows' 92 else 93 gtester = executable('gtester', 'gtester.c', 94 install : true, ··· 96 install_tag : 'bin-devel', 97 c_args : ['-UG_DISABLE_ASSERT'], 98 include_directories : configinc, 99 - @@ -447,7 +449,7 @@ report_conf.set('PYTHON', python_name) 100 configure_file( 101 input: 'gtester-report.in', 102 output: 'gtester-report', ··· 106 configuration: report_conf, 107 install_mode: 'rwxr-xr-x' 108 diff --git a/gobject/meson.build b/gobject/meson.build 109 - index a994eb591..36b36b925 100644 110 --- a/gobject/meson.build 111 +++ b/gobject/meson.build 112 - @@ -79,7 +79,7 @@ foreach tool: python_tools 113 input : tool + '.in', 114 output : tool, 115 configuration : python_tools_conf, ··· 118 install_tag : 'bin-devel', 119 ) 120 121 - @@ -155,6 +155,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep) 122 123 - executable('gobject-query', 'gobject-query.c', 124 install : true, 125 + install_dir : get_option('devbindir'), 126 install_tag : 'bin-devel', 127 dependencies : [libglib_dep, libgobject_dep]) 128 129 diff --git a/meson_options.txt b/meson_options.txt 130 - index f13cbfdd5..f218db581 100644 131 --- a/meson_options.txt 132 +++ b/meson_options.txt 133 - @@ -3,6 +3,11 @@ option('runtime_libdir', 134 - value : '', 135 - description : 'install runtime libraries relative to libdir') 136 137 +option('devbindir', 138 + type : 'string', 139 + value : '', 140 + description : 'bindir for development tools') 141 + 142 - option('iconv', 143 - type : 'combo', 144 - choices : ['auto', 'libc', 'external'], 145 diff --git a/tools/meson.build b/tools/meson.build 146 - index 0542fb89b..bfb10cd80 100644 147 --- a/tools/meson.build 148 +++ b/tools/meson.build 149 @@ -8,7 +8,7 @@ if have_sh
··· 1 diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build 2 + index 65faae9b2..4297513d4 100644 3 --- a/gio/gdbus-2.0/codegen/meson.build 4 +++ b/gio/gdbus-2.0/codegen/meson.build 5 + @@ -20,7 +20,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir) 6 # Install gdbus-codegen executable 7 gdbus_codegen = configure_file(input : 'gdbus-codegen.in', 8 output : 'gdbus-codegen', ··· 12 configuration : gdbus_codegen_conf 13 ) 14 diff --git a/gio/meson.build b/gio/meson.build 15 + index 462606f3b..a3047fca1 100644 16 --- a/gio/meson.build 17 +++ b/gio/meson.build 18 + @@ -880,14 +880,15 @@ pkg.generate(libgio, 19 variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')), 20 'schemasdir=' + join_paths('${datadir}', schemas_subdir), 21 'bindir=' + join_paths('${prefix}', get_option('bindir')), ··· 36 'gsettings=' + join_paths('${bindir}', 'gsettings')], 37 version : glib_version, 38 install_dir : glib_pkgconfigreldir, 39 + @@ -989,6 +990,7 @@ executable('gio', gio_tool_sources, 40 41 executable('gresource', 'gresource-tool.c', 42 install : true, ··· 44 install_tag : 'bin', 45 # intl.lib is not compatible with SAFESEH 46 link_args : noseh_link_args, 47 + @@ -996,7 +998,7 @@ executable('gresource', 'gresource-tool.c', 48 49 gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c', 50 install : true, ··· 53 install_tag : 'bin', 54 c_args : gio_c_args, 55 # intl.lib is not compatible with SAFESEH 56 + @@ -1006,7 +1008,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu 57 glib_compile_schemas = executable('glib-compile-schemas', 58 ['glib-compile-schemas.c'], 59 install : true, ··· 62 install_tag : 'bin', 63 # intl.lib is not compatible with SAFESEH 64 link_args : noseh_link_args, 65 + @@ -1015,6 +1017,7 @@ glib_compile_schemas = executable('glib-compile-schemas', 66 glib_compile_resources = executable('glib-compile-resources', 67 [gconstructor_as_data_h, 'glib-compile-resources.c'], 68 install : true, ··· 71 c_args : gio_c_args, 72 # intl.lib is not compatible with SAFESEH 73 diff --git a/glib/meson.build b/glib/meson.build 74 + index da76fc005..8e2ef990c 100644 75 --- a/glib/meson.build 76 +++ b/glib/meson.build 77 + @@ -441,9 +441,10 @@ pkg.generate(libglib, 78 subdirs : ['glib-2.0'], 79 extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags, 80 variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')), ··· 88 version : glib_version, 89 install_dir : glib_pkgconfigreldir, 90 filebase : 'glib-2.0', 91 + @@ -480,6 +481,7 @@ if host_system == 'windows' 92 else 93 gtester = executable('gtester', 'gtester.c', 94 install : true, ··· 96 install_tag : 'bin-devel', 97 c_args : ['-UG_DISABLE_ASSERT'], 98 include_directories : configinc, 99 + @@ -492,7 +494,7 @@ report_conf.set('PYTHON', python_name) 100 configure_file( 101 input: 'gtester-report.in', 102 output: 'gtester-report', ··· 106 configuration: report_conf, 107 install_mode: 'rwxr-xr-x' 108 diff --git a/gobject/meson.build b/gobject/meson.build 109 + index 2129aaf8a..da8462428 100644 110 --- a/gobject/meson.build 111 +++ b/gobject/meson.build 112 + @@ -94,7 +94,7 @@ foreach tool: python_tools 113 input : tool + '.in', 114 output : tool, 115 configuration : python_tools_conf, ··· 118 install_tag : 'bin-devel', 119 ) 120 121 + @@ -172,6 +172,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep) 122 123 + gobject_query = executable('gobject-query', 'gobject-query.c', 124 install : true, 125 + install_dir : get_option('devbindir'), 126 install_tag : 'bin-devel', 127 dependencies : [libglib_dep, libgobject_dep]) 128 129 diff --git a/meson_options.txt b/meson_options.txt 130 + index 517d5757c..198cc1b3c 100644 131 --- a/meson_options.txt 132 +++ b/meson_options.txt 133 + @@ -4,6 +4,11 @@ option('runtime_libdir', 134 + description : 'install runtime libraries relative to libdir', 135 + deprecated: true) 136 137 +option('devbindir', 138 + type : 'string', 139 + value : '', 140 + description : 'bindir for development tools') 141 + 142 + option('charsetalias_dir', 143 + type : 'string', 144 + value : '', 145 diff --git a/tools/meson.build b/tools/meson.build 146 + index 2d4192e46..d7e710d6f 100644 147 --- a/tools/meson.build 148 +++ b/tools/meson.build 149 @@ -8,7 +8,7 @@ if have_sh