[gnome-initial-setup: 5/20] build: Add parental_controls option
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup: 5/20] build: Add parental_controls option
- Date: Fri, 14 Feb 2020 16:49:08 +0000 (UTC)
commit 9cd679a268e5627fb5d9abdf3e5eca9812d9fce4
Author: Philip Withnall <withnall endlessm com>
Date: Thu Feb 6 13:10:50 2020 +0000
build: Add parental_controls option
This controls whether parental controls support is enabled. It adds an
optional dependency on libmalcontent and libmalcontent-ui.
Signed-off-by: Philip Withnall <withnall endlessm com>
.gitlab-ci.yml | 13 +++++++++++++
meson.build | 9 +++++++++
meson_options.txt | 6 ++++++
3 files changed, 28 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e70cc76..7fc5e36 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,6 +8,9 @@ before_script:
desktop-file-utils
gcc
gettext
+ git
+ gobject-introspection-devel
+ gtk-doc
ibus-devel
intltool
krb5-devel
@@ -18,6 +21,7 @@ before_script:
"pkgconfig(accountsservice)"
"pkgconfig(cheese)"
"pkgconfig(cheese-gtk)"
+ "pkgconfig(flatpak)"
"pkgconfig(fontconfig)"
"pkgconfig(gdm)"
"pkgconfig(geocode-glib-1.0)"
@@ -40,6 +44,15 @@ before_script:
.job_template: &job_definition
stage: build
script:
+ # FIXME: We can’t install malcontent via dnf until it’s packaged in Fedora,
+ # so build it manually.
+ - git clone https://gitlab.freedesktop.org/pwithnall/malcontent.git ./malcontent
+ - pushd ./malcontent
+ - git checkout tags/0.5.0
+ - meson setup ${MESON_COMMON_OPTIONS} --prefix /usr _build
+ - ninja -C _build
+ - sudo ninja -C _build install
+ - popd
# In general, we would like warnings to be fatal. However, code copied from
# gnome-control-center uses many deprecated functions. Until we have a good
# answer to sharing that code (#68), make those warnings non-fatal.
diff --git a/meson.build b/meson.build
index 464e629..ebb9a9d 100644
--- a/meson.build
+++ b/meson.build
@@ -68,6 +68,15 @@ ibus_dep = dependency ('ibus-1.0',
required: get_option('ibus'))
conf.set('HAVE_IBUS', ibus_dep.found())
+# Needed for the parental controls pages
+libmalcontent_dep = dependency ('malcontent-0',
+ version: '>= 0.5.0',
+ required: get_option('parental_controls'))
+libmalcontent_ui_dep = dependency ('malcontent-ui-0',
+ version: '>= 0.5.0',
+ required: get_option('parental_controls'))
+conf.set('HAVE_PARENTAL_CONTROLS', libmalcontent_dep.found() and libmalcontent_ui_dep.found())
+
configure_file(output: 'config.h',
configuration: conf)
config_h_dir = include_directories('.')
diff --git a/meson_options.txt b/meson_options.txt
index 2d475e1..741e844 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -20,3 +20,9 @@ option('systemd',
value: true,
description: 'Enable systemd integration'
)
+
+option('parental_controls',
+ type: 'feature',
+ value: 'auto',
+ description: 'Enable parental controls pages',
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]