Subject: Re: [PATCH gnome-team v2 2/6] gnu: feedbackd: Update to 0.2.1.

From: Maxim Cournoyer <[email-masked]>
Date: Tue, 31 Oct 2023 10:38:43 -0400

Hi,

Vivien Kraus <[email-masked]> writes:

> * gnu/packages/gnome.scm (feedbackd): Update to 0.2.1.
> [#:phases]: Add 'unpack-gmobile.
> (inputs): Add gmobile.
> * gnu/packages/patches/feedbackd-use-system-gmobile.patch: New file.

[...]

> diff --git a/gnu/packages/patches/feedbackd-use-system-gmobile.patch b/gnu/packages/patches/feedbackd-use-system-gmobile.patch
> new file mode 100644
> index 0000000000..4dc3534a07
> --- /dev/null
> +++ b/gnu/packages/patches/feedbackd-use-system-gmobile.patch
> @@ -0,0 +1,39 @@
> +From 9a967f056379b0f024ceeff45fcb8889a3fe093e Mon Sep 17 00:00:00 2001
> +Message-ID: <[email-masked]>
> +From: Vivien Kraus <[email-masked]>
> +Date: Sun, 29 Oct 2023 19:12:27 +0100
> +Subject: [PATCH] Use a system-installed gmodule.
> +
> +* meson.build (gmobile_subp): Remove.
> +(gmobile): Make it a pkg-config dependency.
> +---
> + meson.build                | 8 +-------
> + subprojects/gmobile/.empty | 0
> + 2 files changed, 1 insertion(+), 7 deletions(-)
> + delete mode 100644 subprojects/gmobile/.empty
> +
> +diff --git a/meson.build b/meson.build
> +index 8725e76..347ded1 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -14,13 +14,7 @@ gio_unix       = dependency('gio-unix-2.0', version: '>=2.50.0')
> + glib           = dependency('glib-2.0', version: '>=2.50.0')
> + if get_option('daemon')
> +   gobject        = dependency('gobject-2.0', version: '>=2.50.0')
> +-  gmobile_subp   = subproject('gmobile',
> +-                              default_options: [
> +-                                'examples=false',
> +-                                'gtk_doc=false',
> +-                                'tests=false',
> +-                              ])
> +-  gmobile        = gmobile_subp.get_variable('gmobile_dep')
> ++  gmobile        = dependency('gmobile')

There is a better way to accomplish the above, documented at [0].
Implemented as such, I think upstream would probably be interested in
merging it as-is, which we should do (forward the patch).  The
alternative is maintaining custom patches ad vitam aeternam, which is a
lot of work :-).

[0] https://mesonbuild.com/Subprojects.html#toggling-between-system-libraries-and-embedded-sources

-- 
Thanks,
Maxim