Allow installing extra packages in before_install.sh

This is useful now that it uses different commands for installing
packages under different systems, as it means that we don't have to
write these commands manually in the CI configuration files.
This commit is contained in:
Vadim Zeitlin 2022-08-03 22:18:47 +02:00
parent b430a6104c
commit a527b2714d
3 changed files with 12 additions and 11 deletions

View file

@ -9,15 +9,14 @@ jobs:
- checkout
- run:
name: Checkout required submodules
# We need to get Git first as it's not part of the base image.
name: Install dependencies
command: |
dnf -y install git
git submodule update --init 3rdparty/catch 3rdparty/nanosvg
WX_EXTRA_PACKAGES=git ./build/tools/before_install.sh
- run:
name: Install dependencies
command: ./build/tools/before_install.sh
name: Checkout required submodules
command: |
git submodule update --init 3rdparty/catch 3rdparty/nanosvg
- run:
name: Configure

View file

@ -19,9 +19,8 @@ task:
wxPROC_COUNT=`./build/tools/proc_count.sh`
echo wxBUILD_ARGS=-j$wxPROC_COUNT >> $CIRRUS_ENV
./build/tools/before_install.sh
WX_EXTRA_PACKAGES='ccache git' ./build/tools/before_install.sh
pkg install -q -y ccache git
echo "PATH=/usr/local/libexec/ccache:$PATH" >> $CIRRUS_ENV
# Rather than getting all submodules, get just the ones we need, as we can

View file

@ -3,6 +3,9 @@
# This script is used by CI jobs to install the dependencies
# before building wxWidgets but can also be run by hand if necessary (but
# currently it only works for the OS versions used by the CI builds).
#
# WX_EXTRA_PACKAGES environment variable may be predefined to contain extra
# packages to install (in an OS-specific way) in addition to the required ones.
set -e
@ -82,7 +85,7 @@ case $(uname -s) in
libglu1-mesa-dev"
esac
pkg_install="$pkg_install $libtoolkit_dev gdb"
pkg_install="$pkg_install $libtoolkit_dev gdb ${WX_EXTRA_PACKAGES}"
extra_deps="$extra_deps libcurl4-openssl-dev libsecret-1-dev libnotify-dev"
for pkg in $extra_deps; do
@ -110,12 +113,12 @@ case $(uname -s) in
fi
if [ -f /etc/redhat-release ]; then
dnf install -y expat-devel findutils g++ git-core gstreamer1-plugins-base-devel gtk3-devel make libGLU-devel libjpeg-devel libpng-devel libSM-devel libtiff-devel SDL-devel webkit2gtk3-devel zlib-devel
dnf install -y ${WX_EXTRA_PACKAGES} expat-devel findutils g++ git-core gstreamer1-plugins-base-devel gtk3-devel make libGLU-devel libjpeg-devel libpng-devel libSM-devel libtiff-devel SDL-devel webkit2gtk3-devel zlib-devel
fi
;;
FreeBSD)
pkg install -q -y gspell gstreamer1 gtk3 jpeg-turbo libnotify libsecret mesa-libs pkgconf png tiff webkit2-gtk3
pkg install -q -y ${WX_EXTRA_PACKAGES} gspell gstreamer1 gtk3 jpeg-turbo libnotify libsecret mesa-libs pkgconf png tiff webkit2-gtk3
;;
Darwin)