[gnome-software: 1/2] build: Switch from gnome-desktop dependency to gsettings-desktop-schemas
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 1/2] build: Switch from gnome-desktop dependency to gsettings-desktop-schemas
- Date: Wed, 16 Dec 2020 16:26:56 +0000 (UTC)
commit ece6e749b843cbb50bfd91934e1a8d1f94a23bc9
Author: Milan Crha <mcrha redhat com>
Date: Wed Dec 16 16:26:55 2020 +0000
build: Switch from gnome-desktop dependency to gsettings-desktop-schemas
There is not used anything form the gnome-desktop, it only brings in
a file from gsettings-desktop-schemas, thus rather depend on it directly.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/945
.gitlab-ci/debian-stable.Dockerfile | 1 -
.gitlab-ci/fedora.Dockerfile | 1 -
contrib/gnome-software.spec.in | 3 ---
meson.build | 6 +++---
meson_options.txt | 2 +-
src/gs-updates-page.c | 6 +++---
src/meson.build | 4 ++--
7 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/.gitlab-ci/debian-stable.Dockerfile b/.gitlab-ci/debian-stable.Dockerfile
index 38739db6..a5901343 100644
--- a/.gitlab-ci/debian-stable.Dockerfile
+++ b/.gitlab-ci/debian-stable.Dockerfile
@@ -24,7 +24,6 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
libfwupd-dev \
libgirepository1.0-dev \
libglib2.0-dev \
- libgnome-desktop-3-dev \
libgoa-1.0-dev \
libgspell-1-dev \
libgtk-3-dev \
diff --git a/.gitlab-ci/fedora.Dockerfile b/.gitlab-ci/fedora.Dockerfile
index 57ba8e7e..e387faab 100644
--- a/.gitlab-ci/fedora.Dockerfile
+++ b/.gitlab-ci/fedora.Dockerfile
@@ -14,7 +14,6 @@ RUN dnf -y install \
gettext \
git \
glib2-devel \
- gnome-desktop3-devel \
gnome-online-accounts-devel \
gobject-introspection \
gobject-introspection-devel \
diff --git a/contrib/gnome-software.spec.in b/contrib/gnome-software.spec.in
index 73ff7669..62a01fdb 100644
--- a/contrib/gnome-software.spec.in
+++ b/contrib/gnome-software.spec.in
@@ -5,7 +5,6 @@
%global appstream_glib_version 0.7.15
%global libsoup_version 2.52.0
%global gsettings_desktop_schemas_version 3.12.0
-%global gnome_desktop_version 3.18.0
%global fwupd_version 1.2.10
%global flatpak_version 1.1.3
%global libxmlb_version 0.1.7
@@ -28,7 +27,6 @@ BuildRequires: docbook-style-xsl
BuildRequires: desktop-file-utils
BuildRequires: fwupd-devel >= %{fwupd_version}
BuildRequires: glib2-devel >= %{glib2_version}
-BuildRequires: gnome-desktop3-devel
BuildRequires: gnome-online-accounts-devel
BuildRequires: gsettings-desktop-schemas-devel >= %{gsettings_desktop_schemas_version}
BuildRequires: gspell-devel
@@ -54,7 +52,6 @@ Requires: flatpak%{?_isa} >= %{flatpak_version}
Requires: flatpak-libs%{?_isa} >= %{flatpak_version}
Requires: fwupd%{?_isa} >= %{fwupd_version}
Requires: glib2%{?_isa} >= %{glib2_version}
-Requires: gnome-desktop3%{?_isa} >= %{gnome_desktop_version}
# gnome-menus is needed for app folder .directory entries
Requires: gnome-menus%{?_isa}
Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version}
diff --git a/meson.build b/meson.build
index 209e9705..ccbd09bc 100644
--- a/meson.build
+++ b/meson.build
@@ -138,9 +138,9 @@ else
valgrind = []
endif
-if get_option('gnome_desktop')
- gnome_desktop = dependency('gnome-desktop-3.0', version : '>= 3.18.0')
- conf.set('HAVE_GNOME_DESKTOP', 1)
+gsettings_desktop_schemas = dependency('gsettings-desktop-schemas', version : '>= 3.18.0', required:
get_option('gsettings_desktop_schemas'))
+if gsettings_desktop_schemas.found()
+ conf.set('HAVE_GSETTINGS_DESKTOP_SCHEMAS', 1)
endif
if get_option('gspell')
diff --git a/meson_options.txt b/meson_options.txt
index 8d4ad0d1..83ebcc00 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,6 @@
option('tests', type : 'boolean', value : true, description : 'enable tests')
option('gspell', type : 'boolean', value : true, description : 'enable gspell')
-option('gnome_desktop', type : 'boolean', value : true, description : 'enable gnome-desktop')
+option('gsettings_desktop_schemas', type : 'feature', value : 'enabled', description : 'enable integration
with GNOME desktop preferences')
option('man', type : 'boolean', value : true, description : 'enable man pages')
option('packagekit', type : 'boolean', value : true, description : 'enable PackageKit support')
option('packagekit_autoremove', type : 'boolean', value : false, description : 'autoremove packages in
PackageKit')
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index ee254489..96529296 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -23,7 +23,7 @@
#include "gs-upgrade-banner.h"
#include "gs-application.h"
-#ifdef HAVE_GNOME_DESKTOP
+#ifdef HAVE_GSETTINGS_DESKTOP_SCHEMAS
#include <gdesktop-enums.h>
#endif
@@ -196,7 +196,7 @@ time_next_midnight (void)
static gchar *
gs_updates_page_last_checked_time_string (GsUpdatesPage *self)
{
-#ifdef HAVE_GNOME_DESKTOP
+#ifdef HAVE_GSETTINGS_DESKTOP_SCHEMAS
GDesktopClockFormat clock_format;
#endif
const gchar *format_string;
@@ -215,7 +215,7 @@ gs_updates_page_last_checked_time_string (GsUpdatesPage *self)
midnight = time_next_midnight ();
days_ago = (gint) (g_date_time_difference (midnight, last_checked) / G_TIME_SPAN_DAY);
-#ifdef HAVE_GNOME_DESKTOP
+#ifdef HAVE_GSETTINGS_DESKTOP_SCHEMAS
clock_format = g_settings_get_enum (self->desktop_settings, "clock-format");
use_24h_time = (clock_format == G_DESKTOP_CLOCK_FORMAT_24H || self->ampm_available == FALSE);
#endif
diff --git a/src/meson.build b/src/meson.build
index 6581e77c..2f9ff234 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -102,8 +102,8 @@ if get_option('packagekit')
gnome_software_dependencies += [packagekit]
endif
-if get_option('gnome_desktop')
- gnome_software_dependencies += [gnome_desktop]
+if gsettings_desktop_schemas.found()
+ gnome_software_dependencies += [gsettings_desktop_schemas]
endif
if get_option('gspell')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]