aboutsummaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorBob Funk <bobfunk11@gmail.com>2022-07-30 00:18:25 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-07-30 11:26:22 +0700
commit91da42d63d2411a7c65354b15c83cd42f884e168 (patch)
tree8ee4479badec7d3bbbdd6f344d6b2e92f68fe721 /desktop
parentb758453e975868178150e17927409955edca0182 (diff)
desktop/gnome-control-center: Autodetect CHEESE.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-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 c74d32aa7ff8..a741aadc899d 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 b65a20498cfa..4b03ff04427c 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" \