From 91da42d63d2411a7c65354b15c83cd42f884e168 Mon Sep 17 00:00:00 2001 From: Bob Funk Date: Sat, 30 Jul 2022 00:18:25 +0100 Subject: desktop/gnome-control-center: Autodetect CHEESE. Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- desktop/gnome-control-center/README | 7 ++----- desktop/gnome-control-center/gnome-control-center.SlackBuild | 12 +++++++++--- 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" \ -- cgit v1.2.3