Skip to content

Commit

Permalink
glib: 2.74.5 → 2.75.3
Browse files Browse the repository at this point in the history
https://gitlab.gnome.org/GNOME/glib/-/compare/2.74.5...2.75.3

Changelog-Reviewed-By: Jan Tojnar <jtojnar@gmail.com>
  • Loading branch information
jtojnar committed Apr 5, 2023
1 parent 9c8ff8b commit 8e5ee71
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 112 deletions.
32 changes: 12 additions & 20 deletions pkgs/development/libraries/glib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
, lib
, stdenv
, fetchurl
, fetchpatch
, fetchpatch2
, gettext
, meson
, ninja
Expand Down Expand Up @@ -56,39 +56,23 @@ 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 [
./darwin-compilation.patch
] ++ 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;
Expand Down Expand Up @@ -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" ];
Expand Down Expand Up @@ -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
Expand Down
22 changes: 9 additions & 13 deletions pkgs/development/libraries/glib/elementary-terminal-support.patch
Original file line number Diff line number Diff line change
@@ -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" },
55 changes: 0 additions & 55 deletions pkgs/development/libraries/glib/gnome-console-support.patch

This file was deleted.

48 changes: 24 additions & 24 deletions pkgs/development/libraries/glib/split-dev-programs.patch
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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')),
Expand All @@ -36,15 +36,15 @@ 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,
+ install_dir : get_option('devbindir'),
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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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')),
Expand All @@ -88,15 +88,15 @@ 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,
+ install_dir : get_option('devbindir'),
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',
Expand All @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 8e5ee71

Please sign in to comment.