1
0
Fork 0

download_and_compile.sh: only install dependencies for selected components

For instance, don't attempt to install TerraGear dependencies unless
TERRAGEAR is in WHATTOBUILD. This should significantly reduce the number
of packages downloaded by the first use of download_and_compile.sh that
doesn't have -pn in the options.

We may get reports of missing dependencies for some components as a side
effect of this change; we'll just have to add the missing dependencies
wherever they are required (this can happen if, for instance, some
particular dependency was so far listed in the comments only as a
TERRAGEAR dependency, but was actually required by *another component*
such as FGFS). Incorrect dependency information needs to be fixed,
that's all there is to it.
This commit is contained in:
Florent Rougon 2019-04-09 10:03:22 +02:00
parent 6caf43f9e7
commit 6661d1e10c

View file

@ -603,18 +603,34 @@ if [[ "$DOWNLOAD_PACKAGES" = "y" ]]; then
# Minimum # Minimum
PKG=(build-essential cmake git) PKG=(build-essential cmake git)
_mandatory_pkg_alternative libcurl4-openssl-dev libcurl4-gnutls-dev _mandatory_pkg_alternative libcurl4-openssl-dev libcurl4-gnutls-dev
# cmake
# CMake
if _elementIn "CMAKE" "${WHATTOBUILD[@]}"; then
PKG+=(libarchive-dev libbz2-dev libexpat1-dev libjsoncpp-dev liblzma-dev PKG+=(libarchive-dev libbz2-dev libexpat1-dev libjsoncpp-dev liblzma-dev
libncurses5-dev procps zlib1g-dev) libncurses5-dev procps zlib1g-dev)
# TG fi
# TerraGear
if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}"; then
PKG+=(libcgal-dev libgdal-dev libtiff5-dev) PKG+=(libcgal-dev libgdal-dev libtiff5-dev)
# TGGUI/OpenRTI fi
# TerraGear GUI and OpenRTI
if _elementIn "TERRAGEARGUI" "${WHATTOBUILD[@]}" || \
_elementIn "OPENRTI" "${WHATTOBUILD[@]}"; then
PKG+=(libqt4-dev) PKG+=(libqt4-dev)
# SG/FG fi
# SimGear and FlightGear
if _elementIn "SIMGEAR" "${WHATTOBUILD[@]}" || \
_elementIn "FGFS" "${WHATTOBUILD[@]}"; then
PKG+=(zlib1g-dev freeglut3-dev libglew-dev libboost-dev) PKG+=(zlib1g-dev freeglut3-dev libglew-dev libboost-dev)
_mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \ _mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \
'libopenscenegraph-[0-9]+\.[0-9]+-dev' 'libopenscenegraph-[0-9]+\.[0-9]+-dev'
# FG fi
# FlightGear
if _elementIn "FGFS" "${WHATTOBUILD[@]}"; then
PKG+=(libopenal-dev libudev-dev libdbus-1-dev libplib-dev) PKG+=(libopenal-dev libudev-dev libdbus-1-dev libplib-dev)
_mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev _mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev
# CppUnit is shipped with the FG sources, but if installed via the distro # CppUnit is shipped with the FG sources, but if installed via the distro
@ -641,12 +657,23 @@ if [[ "$DOWNLOAD_PACKAGES" = "y" ]]; then
PKG+=(fluid libbz2-dev libfltk1.3-dev libxi-dev libxmu-dev) PKG+=(fluid libbz2-dev libfltk1.3-dev libxi-dev libxmu-dev)
# FGAdmin # FGAdmin
PKG+=(libxinerama-dev libjpeg-dev libxft-dev) PKG+=(libxinerama-dev libjpeg-dev libxft-dev)
# ATC-Pie fi
# ATC-pie
if _elementIn "ATCPIE" "${WHATTOBUILD[@]}"; then
PKG+=(python3-pyqt5 python3-pyqt5.qtmultimedia libqt5multimedia5-plugins) PKG+=(python3-pyqt5 python3-pyqt5.qtmultimedia libqt5multimedia5-plugins)
# FGo fi
# FGo!
if _elementIn "FGO" "${WHATTOBUILD[@]}"; then
PKG+=(python-tk) PKG+=(python-tk)
# FGx (FGx is not compatible with Qt5, however we have installed Qt5 by default) fi
#PKG+=(libqt5xmlpatterns5-dev libqt5webkit5-dev)
# if _elementIn "FGX" "${WHATTOBUILD[@]}"; then
# FGx (FGx is not compatible with Qt5, however we have installed Qt5 by
# default)
# PKG+=(libqt5xmlpatterns5-dev libqt5webkit5-dev)
# fi
_aptInstall "${PKG[@]}" _aptInstall "${PKG[@]}"
else else