From fa9550e5e74e647c305269f13ad7255e829db93e Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Mon, 16 Nov 2020 21:24:07 +0100 Subject: [PATCH] download_and_compile.sh: don't install OSG or plib packages if these are built If the OSG component has been specified, don't attempt to install a libopenscenegraph...-dev package from the distro. Ditto for the libplib-dev package when the PLIB component has been specified. --- download_and_compile.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/download_and_compile.sh b/download_and_compile.sh index 5197bf2..b3aa83b 100755 --- a/download_and_compile.sh +++ b/download_and_compile.sh @@ -585,13 +585,19 @@ function _installOrUpdateDistroPackages(){ if _elementIn "SIMGEAR" "${WHATTOBUILD[@]}" || \ _elementIn "FGFS" "${WHATTOBUILD[@]}"; then PKG+=(zlib1g-dev freeglut3-dev libglew-dev libopenal-dev libboost-dev) - _mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \ - 'libopenscenegraph-[0-9]+\.[0-9]+-dev' + + if ! _elementIn "OSG" "${WHATTOBUILD[@]}"; then + _mandatory_pkg_alternative libopenscenegraph-3.4-dev \ + libopenscenegraph-dev 'libopenscenegraph-[0-9]+\.[0-9]+-dev' + fi fi # FlightGear if _elementIn "FGFS" "${WHATTOBUILD[@]}"; then - PKG+=(libudev-dev libdbus-1-dev libplib-dev) + PKG+=(libudev-dev libdbus-1-dev) + if ! _elementIn "PLIB" "${WHATTOBUILD[@]}"; then + PKG+=(libplib-dev) + fi _mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev # The following packages are needed for the built-in launcher _optional_pkg_alternative qt5-default