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,50 +603,77 @@ 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
PKG+=(libarchive-dev libbz2-dev libexpat1-dev libjsoncpp-dev liblzma-dev # CMake
libncurses5-dev procps zlib1g-dev) if _elementIn "CMAKE" "${WHATTOBUILD[@]}"; then
# TG PKG+=(libarchive-dev libbz2-dev libexpat1-dev libjsoncpp-dev liblzma-dev
PKG+=(libcgal-dev libgdal-dev libtiff5-dev) libncurses5-dev procps zlib1g-dev)
# TGGUI/OpenRTI fi
PKG+=(libqt4-dev)
# SG/FG # TerraGear
PKG+=(zlib1g-dev freeglut3-dev libglew-dev libboost-dev) if _elementIn "TERRAGEAR" "${WHATTOBUILD[@]}"; then
_mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \ PKG+=(libcgal-dev libgdal-dev libtiff5-dev)
'libopenscenegraph-[0-9]+\.[0-9]+-dev' fi
# FG
PKG+=(libopenal-dev libudev-dev libdbus-1-dev libplib-dev) # TerraGear GUI and OpenRTI
_mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev if _elementIn "TERRAGEARGUI" "${WHATTOBUILD[@]}" || \
# CppUnit is shipped with the FG sources, but if installed via the distro _elementIn "OPENRTI" "${WHATTOBUILD[@]}"; then
# package manager, 1) the FG build will be quicker and 2) libcppunit-dev PKG+=(libqt4-dev)
# will be updated like other distro packages (e.g., security updates). fi
_optional_pkg_alternative libcppunit-dev
# The following packages are needed for the built-in launcher # SimGear and FlightGear
_optional_pkg_alternative qt5-default if _elementIn "SIMGEAR" "${WHATTOBUILD[@]}" || \
_optional_pkg_alternative qtdeclarative5-dev _elementIn "FGFS" "${WHATTOBUILD[@]}"; then
_optional_pkg_alternative qttools5-dev PKG+=(zlib1g-dev freeglut3-dev libglew-dev libboost-dev)
_optional_pkg_alternative qtbase5-dev-tools # for rcc _mandatory_pkg_alternative libopenscenegraph-3.4-dev libopenscenegraph-dev \
_optional_pkg_alternative qttools5-dev-tools # for lrelease 'libopenscenegraph-[0-9]+\.[0-9]+-dev'
_optional_pkg_alternative qml-module-qtquick2 fi
_optional_pkg_alternative qml-module-qtquick-window2
_optional_pkg_alternative qml-module-qtquick-dialogs # FlightGear
_optional_pkg_alternative libqt5opengl5-dev if _elementIn "FGFS" "${WHATTOBUILD[@]}"; then
_optional_pkg_alternative libqt5svg5-dev PKG+=(libopenal-dev libudev-dev libdbus-1-dev libplib-dev)
_optional_pkg_alternative libqt5websockets5-dev _mandatory_pkg_alternative libpng-dev libpng12-dev libpng16-dev
# The following packages are only needed for the Qt-based remote Canvas # CppUnit is shipped with the FG sources, but if installed via the distro
# (comment written at the time of FG 2018.2). # package manager, 1) the FG build will be quicker and 2) libcppunit-dev
_optional_pkg_alternative qtbase5-private-dev # will be updated like other distro packages (e.g., security updates).
_optional_pkg_alternative qtdeclarative5-private-dev _optional_pkg_alternative libcppunit-dev
# FGPanel # The following packages are needed for the built-in launcher
PKG+=(fluid libbz2-dev libfltk1.3-dev libxi-dev libxmu-dev) _optional_pkg_alternative qt5-default
# FGAdmin _optional_pkg_alternative qtdeclarative5-dev
PKG+=(libxinerama-dev libjpeg-dev libxft-dev) _optional_pkg_alternative qttools5-dev
# ATC-Pie _optional_pkg_alternative qtbase5-dev-tools # for rcc
PKG+=(python3-pyqt5 python3-pyqt5.qtmultimedia libqt5multimedia5-plugins) _optional_pkg_alternative qttools5-dev-tools # for lrelease
# FGo _optional_pkg_alternative qml-module-qtquick2
PKG+=(python-tk) _optional_pkg_alternative qml-module-qtquick-window2
# FGx (FGx is not compatible with Qt5, however we have installed Qt5 by default) _optional_pkg_alternative qml-module-qtquick-dialogs
#PKG+=(libqt5xmlpatterns5-dev libqt5webkit5-dev) _optional_pkg_alternative libqt5opengl5-dev
_optional_pkg_alternative libqt5svg5-dev
_optional_pkg_alternative libqt5websockets5-dev
# The following packages are only needed for the Qt-based remote Canvas
# (comment written at the time of FG 2018.2).
_optional_pkg_alternative qtbase5-private-dev
_optional_pkg_alternative qtdeclarative5-private-dev
# FGPanel
PKG+=(fluid libbz2-dev libfltk1.3-dev libxi-dev libxmu-dev)
# FGAdmin
PKG+=(libxinerama-dev libjpeg-dev libxft-dev)
fi
# ATC-pie
if _elementIn "ATCPIE" "${WHATTOBUILD[@]}"; then
PKG+=(python3-pyqt5 python3-pyqt5.qtmultimedia libqt5multimedia5-plugins)
fi
# FGo!
if _elementIn "FGO" "${WHATTOBUILD[@]}"; then
PKG+=(python-tk)
fi
# 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