summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Bob Funk2022-07-30 01:18:25 +0200
committer Willy Sudiarto Raharjo2022-07-30 06:26:22 +0200
commit91da42d63d2411a7c65354b15c83cd42f884e168 (patch)
tree8ee4479badec7d3bbbdd6f344d6b2e92f68fe721
parentb758453e975868178150e17927409955edca0182 (diff)
downloadslackbuilds-91da42d63d2411a7c65354b15c83cd42f884e168.tar.gz
desktop/gnome-control-center: Autodetect CHEESE.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--desktop/gnome-control-center/README7
-rw-r--r--desktop/gnome-control-center/gnome-control-center.SlackBuild12
2 files changed, 11 insertions, 8 deletions
diff --git a/desktop/gnome-control-center/README b/desktop/gnome-control-center/README
index c74d32aa7f..a741aadc89 100644
--- a/desktop/gnome-control-center/README
+++ b/desktop/gnome-control-center/README
@@ -5,8 +5,5 @@ Optional Dependencies:
- gnome-color-manager
- cheese
-The SlackBuild script has 'cheese' disabled by default to keep this
-dependency optional. If you have 'cheese' installed, you can enable
-building gnome-control-center with 'cheese' by setting:
-
-CHEESE=true
+Note: The SlackBuild will automatically detect if cheese is installed
+and enable building in cheese support, otherwise it will be disabled.
diff --git a/desktop/gnome-control-center/gnome-control-center.SlackBuild b/desktop/gnome-control-center/gnome-control-center.SlackBuild
index b65a20498c..4b03ff0442 100644
--- a/desktop/gnome-control-center/gnome-control-center.SlackBuild
+++ b/desktop/gnome-control-center/gnome-control-center.SlackBuild
@@ -30,9 +30,6 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# Enable building with optional dep 'cheese' with a variable:
-CHEESE=${CHEESE:-false}
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@@ -82,6 +79,15 @@ find -L . -prune -name 'subprojects/gvc/.gitlab-ci' \
# Fix a duplicate entry in a .desktop file that sbopkglint complains about:
sed -i '0,/StartupNotify=true/{/StartupNotify=true/d;}' panels/wwan/gnome-wwan-panel.desktop.in.in
+# Detect if cheese is installed and disable cheese support if not present:
+if ( pkg-config --exists cheese); then
+ CHEESE=true
+ echo "cheese found, enabling cheese."
+else
+ CHEESE=false
+ echo "cheese not found, disabling cheese."
+fi
+
mkdir build
cd build
CFLAGS="$SLKCFLAGS" \