diff --git a/0001-build-Use-gcr4-by-default-but-have-an-option-to-use-.patch b/0001-build-Use-gcr4-by-default-but-have-an-option-to-use-.patch new file mode 100644 index 0000000..11fffce --- /dev/null +++ b/0001-build-Use-gcr4-by-default-but-have-an-option-to-use-.patch @@ -0,0 +1,89 @@ +From 30ff4e9f57f7a8f736ffd39cf595fc7893c8d52b Mon Sep 17 00:00:00 2001 +From: Milan Crha +Date: Tue, 19 Jul 2022 17:48:36 +0200 +Subject: [PATCH] build: Use gcr4 by default, but have an option to use gcr3 + too + +The gcr4 replaces gcr3, thus make it possible to use either of the two, +while defaulting to gcr4, as it'll live for a longer time. +--- + .gitlab-ci.yml | 2 +- + meson.build | 7 ++++++- + meson_options.txt | 1 + + plugins/wwan/gsd-wwan-manager.c | 4 ++++ + plugins/wwan/meson.build | 2 +- + 5 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml +index dd67d8f4..ae37234d 100644 +--- a/.gitlab-ci.yml ++++ b/.gitlab-ci.yml +@@ -87,7 +87,7 @@ stages: + .Build procedure: &build_procedure + echo "== Building ==" && + rm -rf _build/ && +- meson . _build ${BUILD_OPTS} && ++ meson . _build ${BUILD_OPTS} -Dgcr3=true && + ninja -C _build 2>&1 | tee compilation.log + + .Run Tests: &run_tests +diff --git a/meson.build b/meson.build +index 3e7cb50d..7f880d75 100644 +--- a/meson.build ++++ b/meson.build +@@ -214,7 +214,12 @@ endif + # wwan + enable_wwan = get_option('wwan') + if enable_wwan +- gcr_base_dep = dependency('gcr-base-3', version: '>= 3.7.5') ++ if get_option('gcr3') ++ gcr_dep = dependency('gcr-base-3', version: '>= 3.7.5') ++ config_h.set10('HAVE_GCR3', 1) ++ else ++ gcr_dep = dependency('gcr-4', version: '>= 3.90.0') ++ endif + mm_glib_dep = dependency('mm-glib', version: '>= 1.0') + endif + +diff --git a/meson_options.txt b/meson_options.txt +index 3e04cf64..a5eb354f 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -11,4 +11,5 @@ option('smartcard', type: 'boolean', value: true, description: 'build with smart + option('usb-protection', type: 'boolean', value: true, description: 'build with usb-protection support') + option('wayland', type: 'boolean', value: true, description: 'build with Wayland support') + option('wwan', type: 'boolean', value: true, description: 'build with WWAN support') ++option('gcr3', type: 'boolean', value: false, description: 'build with gcr3, otherwise gcr4 is used') + option('colord', type: 'boolean', value: true, description: 'build with colord support') +diff --git a/plugins/wwan/gsd-wwan-manager.c b/plugins/wwan/gsd-wwan-manager.c +index 42109ef8..c2288375 100644 +--- a/plugins/wwan/gsd-wwan-manager.c ++++ b/plugins/wwan/gsd-wwan-manager.c +@@ -31,7 +31,11 @@ + #include + + #define GCR_API_SUBJECT_TO_CHANGE ++#ifdef HAVE_GCR3 + #include ++#else ++#include ++#endif + + #include "gnome-settings-profile.h" + #include "cc-wwan-device.h" +diff --git a/plugins/wwan/meson.build b/plugins/wwan/meson.build +index 3f117fb3..238288c6 100644 +--- a/plugins/wwan/meson.build ++++ b/plugins/wwan/meson.build +@@ -4,7 +4,7 @@ sources = files( + 'main.c' + ) + +-deps = plugins_deps + [gio_dep, gcr_base_dep, mm_glib_dep, polkit_gobject_dep] ++deps = plugins_deps + [gio_dep, gcr_dep, mm_glib_dep, polkit_gobject_dep] + + cflags += ['-DGNOMECC_DATA_DIR="@0@"'.format(gsd_pkgdatadir)] + +-- +2.35.1 + diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index e526313..b82d8e4 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -18,7 +18,7 @@ Name: gnome-settings-daemon Version: 43~alpha -Release: 2%{?dist} +Release: 3%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications License: GPLv2+ @@ -26,6 +26,8 @@ URL: https://gitlab.gnome.org/GNOME/gnome-settings-daemon Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{tarball_version}.tar.xz Source1: org.gnome.settings-daemon.plugins.power.gschema.override +Patch01: 0001-build-Use-gcr4-by-default-but-have-an-option-to-use-.patch + BuildRequires: gcc BuildRequires: gettext BuildRequires: meson >= 0.49.0 @@ -35,7 +37,7 @@ BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(colord) >= %{colord_version} BuildRequires: pkgconfig(cups) BuildRequires: pkgconfig(fontconfig) -BuildRequires: pkgconfig(gcr-base-3) +BuildRequires: pkgconfig(gcr-4) BuildRequires: pkgconfig(geoclue-2.0) >= %{geoclue_version} BuildRequires: pkgconfig(geocode-glib-2.0) >= %{geocode_glib_version} BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -201,6 +203,9 @@ install -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Tue Jul 19 2022 Milan Crha - 43~alpha-3 +- Build against gcr-4 due to other depencencies use it + * Mon Jul 18 2022 Kalev Lember - 43~alpha-2 - Build against geocode-glib2 for libsoup3 support