diff --git a/tools/debian_buildenv.sh b/tools/debian_buildenv.sh index 97c43cf6bb5f..b3cff9bc6dd0 100755 --- a/tools/debian_buildenv.sh +++ b/tools/debian_buildenv.sh @@ -52,16 +52,34 @@ case "$1" in fi # Install a faster linker. Prefer mold, fall back to lld - if apt-cache show mold 2>%1 >/dev/null; + if apt-cache show mold 2>/dev/null >/dev/null; then sudo apt-get install -y --no-install-recommends mold else - if apt-cache show lld 2>%1 >/dev/null; + if apt-cache show lld 2>/dev/null >/dev/null; then sudo apt-get install -y --no-install-recommends lld fi fi + # Check if fonts-ubuntu is available (from non-free repository) + if ! apt-cache show fonts-ubuntu 2>/dev/null | grep -q "Package: fonts-ubuntu"; then + echo "" + echo "WARNING: The package 'fonts-ubuntu' is not available." + echo "This package is required for Mixxx and is located in the Debian non-free repository." + echo "" + echo "See also: https://wiki.debian.org/SourcesList" + echo "" + read -p "Would you like to exit to enable 'non-free' now? (y = Exit / n = Continue without fonts): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Please edit your /etc/apt/sources.list, run 'sudo apt update', and restart this script." + exit 1 + fi + else + FONTS_UBUNTU_AVAILABLE=true + fi + sudo apt-get install -y --no-install-recommends -- \ ccache \ cmake \ @@ -72,7 +90,7 @@ case "$1" in docbook-to-man \ dput \ fonts-open-sans \ - fonts-ubuntu \ + "$([ "$FONTS_UBUNTU_AVAILABLE" = true ] && echo "fonts-ubuntu")" \ g++ \ lcov \ libavformat-dev \