summaryrefslogtreecommitdiffstats
path: root/desktop
diff options
context:
space:
mode:
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 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" \