From 92f566f1d39276ef78b228d8d4842069e3dcb9b8 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Fri, 26 Apr 2019 09:25:59 +0200 Subject: [PATCH] download_and_compile.sh: fix "TERRAGEAR depends on SIMGEAR" implementation The previous commit enforced this dependency only under the [[ "$DOWNLOAD_PACKAGES" = "y" ]] condition, which was too restrictive. --- download_and_compile.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/download_and_compile.sh b/download_and_compile.sh index a2c944a..83f7438 100755 --- a/download_and_compile.sh +++ b/download_and_compile.sh @@ -590,6 +590,20 @@ _logSep ####################################################### ####################################################### +# **************************************************************************** +# * Inter-component Dependencies * +# **************************************************************************** + +# TerraGear requires SimGear +if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}" && \ + ! _elementIn "SIMGEAR" "${WHATTOBUILD[@]}"; then + WHATTOBUILD+=(SIMGEAR) +fi + +# **************************************************************************** +# * Component dependencies on distribution packages * +# **************************************************************************** + if [[ "$DOWNLOAD_PACKAGES" = "y" ]]; then if [[ "$APT_GET_UPDATE" = "y" ]]; then _aptUpdate @@ -615,10 +629,6 @@ if [[ "$DOWNLOAD_PACKAGES" = "y" ]]; then # TerraGear if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}"; then - # Require SimGear - if ! _elementIn "SIMGEAR" "${WHATTOBUILD[@]}"; then - WHATTOBUILD+=(SIMGEAR) - fi PKG+=(libboost-dev libcgal-dev libgdal-dev libtiff5-dev zlib1g-dev) fi