build/windows: Add Dependencies list compatible with all jobs

Now, we have only ONE list applicable for build-deps-crossroad.sh,
build-gimp-msys2.sh and package-gimp-msys2.sh, instead of hardcoding
3 times. This unified list greatly facilitates maintenance.
This commit is contained in:
Bruno Lopes 2023-12-10 11:55:01 -03:00 committed by Jehan
parent 271ba85770
commit 637c49b30f
4 changed files with 68 additions and 161 deletions

View File

@ -17,40 +17,11 @@ crossroad meson setup _build/ -Dintrospection=false -Dsdl2=disabled -Dlibdir=lib
ninja -C _build install || exit 1 ninja -C _build install || exit 1
cd .. cd ..
# preparing GIMP # Install the required (pre-built) packages for GIMP
export DEPS_PATH="../build/windows/gitlab-ci/all-deps-uni.txt"
LIBMNG= sed -i "s/DEPS_ARCH_//g" $DEPS_PATH
if [ "x$CROSSROAD_PLATFORM" = "xw64" ]; then export GIMP_DEPS=`cat $DEPS_PATH`
# For some reason, file-mng plug-in fails to link in its i686 build. crossroad install libmng $GIMP_DEPS
# Just disable it for now on i686 only.
LIBMNG="libmng"
fi
crossroad install appstream-glib \
aalib \
atk \
cfitsio \
drmingw \
gexiv2 \
glib2 \
glib-networking \
json-c \
ghostscript \
gobject-introspection \
gobject-introspection-runtime \
iso-codes \
libheif \
libiff \
libilbm \
libjxl \
$LIBMNG \
libmypaint mypaint-brushes \
libwebp \
libwmf \
openexr \
poppler poppler-data \
qoi \
xpm-nox
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Installation of pre-built dependencies failed."; echo "Installation of pre-built dependencies failed.";

View File

@ -1,91 +1,33 @@
#!/bin/bash #!/bin/bash
# $MINGW_PACKAGE_PREFIX is defined by MSYS2.
# https://github.com/msys2/MSYS2-packages/blob/master/filesystem/msystem
set -e set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then if [[ "$MSYSTEM" == "MINGW32" ]]; then
export ARTIFACTS_SUFFIX="-w32" export ARTIFACTS_SUFFIX="-w32"
export MSYS2_ARCH="i686"
export MSYS2_ARCH_FOLDER="mingw32" export MSYS2_ARCH_FOLDER="mingw32"
export MSYS2_PREFIX="/c/msys64/mingw32" export MSYS2_PREFIX="/c/msys64/mingw32"
elif [[ "$MSYSTEM" == "MINGW64" ]]; then elif [[ "$MSYSTEM" == "MINGW64" ]]; then
export ARTIFACTS_SUFFIX="-w64" export ARTIFACTS_SUFFIX="-w64"
export MSYS2_ARCH="x86_64"
export MSYS2_ARCH_FOLDER="mingw64" export MSYS2_ARCH_FOLDER="mingw64"
export MSYS2_PREFIX="/c/msys64/mingw64/" export MSYS2_PREFIX="/c/msys64/mingw64/"
else # [[ "$MSYSTEM" == "CLANGARM64" ]]; else # [[ "$MSYSTEM" == "CLANGARM64" ]];
export ARTIFACTS_SUFFIX="-arm64" export ARTIFACTS_SUFFIX="-arm64"
export MSYS2_ARCH="clang-aarch64"
export MSYS2_ARCH_FOLDER="clangarm64" export MSYS2_ARCH_FOLDER="clangarm64"
export MSYS2_PREFIX="/c/msys64/clangarm64/" export MSYS2_PREFIX="/c/msys64/clangarm64/"
fi fi
export OPTIONAL_PACKAGES=""
if [[ "$MSYSTEM" == "CLANGARM64" ]]; then
# No luajit package on clangarm64 for the time being.
export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-lua51"
else
export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-luajit"
fi
export PATH="${MSYS2_PREFIX}/bin:$PATH" export PATH="${MSYS2_PREFIX}/bin:$PATH"
# Update everything # Update everything
pacman --noconfirm -Suy pacman --noconfirm -Suy
# Install the required packages # Install the required (pre-built) packages for GIMP
pacman --noconfirm -S --needed \ export DEPS_PATH="build/windows/gitlab-ci/all-deps-uni.txt"
base-devel \ sed -i "s/DEPS_ARCH_/${MINGW_PACKAGE_PREFIX}-/g" $DEPS_PATH
mingw-w64-$MSYS2_ARCH-toolchain \ export GIMP_DEPS=`cat $DEPS_PATH`
mingw-w64-$MSYS2_ARCH-autotools \ pacman --noconfirm -S --needed base-devel $GIMP_DEPS
mingw-w64-$MSYS2_ARCH-ccache \
mingw-w64-$MSYS2_ARCH-meson \
\
$OPTIONAL_PACKAGES \
mingw-w64-$MSYS2_ARCH-lua51-lgi \
\
mingw-w64-$MSYS2_ARCH-aalib \
mingw-w64-$MSYS2_ARCH-appstream-glib \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-brotli \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-cfitsio \
mingw-w64-$MSYS2_ARCH-drmingw \
mingw-w64-$MSYS2_ARCH-gexiv2 \
mingw-w64-$MSYS2_ARCH-ghostscript \
mingw-w64-$MSYS2_ARCH-gi-docgen \
mingw-w64-$MSYS2_ARCH-glib-networking \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-gobject-introspection-runtime \
mingw-w64-$MSYS2_ARCH-graphviz \
mingw-w64-$MSYS2_ARCH-gtk3 \
mingw-w64-$MSYS2_ARCH-headers-git \
mingw-w64-$MSYS2_ARCH-iso-codes \
mingw-w64-$MSYS2_ARCH-json-c \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-lcms2 \
mingw-w64-$MSYS2_ARCH-lensfun \
mingw-w64-$MSYS2_ARCH-libarchive \
mingw-w64-$MSYS2_ARCH-libheif \
mingw-w64-$MSYS2_ARCH-libiff \
mingw-w64-$MSYS2_ARCH-libilbm \
mingw-w64-$MSYS2_ARCH-libjxl \
mingw-w64-$MSYS2_ARCH-libmypaint \
mingw-w64-$MSYS2_ARCH-libspiro \
mingw-w64-$MSYS2_ARCH-libwebp \
mingw-w64-$MSYS2_ARCH-libwmf \
mingw-w64-$MSYS2_ARCH-maxflow \
mingw-w64-$MSYS2_ARCH-mypaint-brushes \
mingw-w64-$MSYS2_ARCH-openexr \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-poppler \
mingw-w64-$MSYS2_ARCH-poppler-data \
mingw-w64-$MSYS2_ARCH-python \
mingw-w64-$MSYS2_ARCH-python-gobject \
mingw-w64-$MSYS2_ARCH-qoi \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-suitesparse \
mingw-w64-$MSYS2_ARCH-vala \
mingw-w64-$MSYS2_ARCH-xpm-nox
# XXX We've got a weird error when the prefix is in the current dir. # XXX We've got a weird error when the prefix is in the current dir.
# Until we figure it out, this trick seems to work, even though it's # Until we figure it out, this trick seems to work, even though it's

View File

@ -1,89 +1,34 @@
#!/bin/bash #!/bin/bash
# $MINGW_PACKAGE_PREFIX is defined by MSYS2.
# https://github.com/msys2/MSYS2-packages/blob/master/filesystem/msystem
set -e set -e
if [[ "$MSYSTEM" == "MINGW32" ]]; then if [[ "$MSYSTEM" == "MINGW32" ]]; then
export ARTIFACTS_SUFFIX="-w32" export ARTIFACTS_SUFFIX="-w32"
export MSYS2_ARCH="i686"
export MSYS_PREFIX="/c/msys64/mingw32/" export MSYS_PREFIX="/c/msys64/mingw32/"
export PATH="/mingw32/bin:$PATH" export PATH="/mingw32/bin:$PATH"
export GIMP_DISTRIB=`realpath ./gimp-w32` export GIMP_DISTRIB=`realpath ./gimp-w32`
elif [[ "$MSYSTEM" == "MINGW64" ]]; then elif [[ "$MSYSTEM" == "MINGW64" ]]; then
export ARTIFACTS_SUFFIX="-w64" export ARTIFACTS_SUFFIX="-w64"
export MSYS2_ARCH="x86_64"
export MSYS_PREFIX="/c/msys64/mingw64/" export MSYS_PREFIX="/c/msys64/mingw64/"
export PATH="/mingw64/bin:$PATH" export PATH="/mingw64/bin:$PATH"
export GIMP_DISTRIB=`realpath ./gimp-w64` export GIMP_DISTRIB=`realpath ./gimp-w64`
else # [[ "$MSYSTEM" == "CLANGARM64" ]]; else # [[ "$MSYSTEM" == "CLANGARM64" ]];
export ARTIFACTS_SUFFIX="-arm64" export ARTIFACTS_SUFFIX="-arm64"
export MSYS2_ARCH="clang-aarch64"
export MSYS_PREFIX="/c/msys64/clangarm64/" export MSYS_PREFIX="/c/msys64/clangarm64/"
export PATH="/clangarm64/bin:$PATH" export PATH="/clangarm64/bin:$PATH"
export GIMP_DISTRIB=`realpath ./gimp-arm64` export GIMP_DISTRIB=`realpath ./gimp-arm64`
fi fi
export OPTIONAL_PACKAGES=""
if [[ "$MSYSTEM" == "CLANGARM64" ]]; then
export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-lua51"
else
export OPTIONAL_PACKAGES="mingw-w64-$MSYS2_ARCH-luajit"
fi
# Update everything # Update everything
pacman --noconfirm -Suy pacman --noconfirm -Suy
# Install the required packages # Install the required (pre-built) packages again
pacman --noconfirm -S --needed \ export DEPS_PATH="build/windows/gitlab-ci/all-deps-uni.txt"
base-devel \ sed -i "s/DEPS_ARCH_/${MINGW_PACKAGE_PREFIX}-/g" $DEPS_PATH
mingw-w64-$MSYS2_ARCH-binutils \ export GIMP_DEPS=`cat $DEPS_PATH`
mingw-w64-$MSYS2_ARCH-toolchain \ pacman --noconfirm -S --needed base-devel $GIMP_DEPS
mingw-w64-$MSYS2_ARCH-ccache \
\
$OPTIONAL_PACKAGES \
mingw-w64-$MSYS2_ARCH-lua51-lgi \
\
mingw-w64-$MSYS2_ARCH-aalib \
mingw-w64-$MSYS2_ARCH-appstream-glib \
mingw-w64-$MSYS2_ARCH-atk \
mingw-w64-$MSYS2_ARCH-brotli \
mingw-w64-$MSYS2_ARCH-cairo \
mingw-w64-$MSYS2_ARCH-cfitsio \
mingw-w64-$MSYS2_ARCH-drmingw \
mingw-w64-$MSYS2_ARCH-gexiv2 \
mingw-w64-$MSYS2_ARCH-ghostscript \
mingw-w64-$MSYS2_ARCH-glib2 \
mingw-w64-$MSYS2_ARCH-glib-networking \
mingw-w64-$MSYS2_ARCH-gobject-introspection \
mingw-w64-$MSYS2_ARCH-gobject-introspection-runtime \
mingw-w64-$MSYS2_ARCH-graphviz \
mingw-w64-$MSYS2_ARCH-gtk3 \
mingw-w64-$MSYS2_ARCH-iso-codes \
mingw-w64-$MSYS2_ARCH-json-c \
mingw-w64-$MSYS2_ARCH-json-glib \
mingw-w64-$MSYS2_ARCH-lcms2 \
mingw-w64-$MSYS2_ARCH-lensfun \
mingw-w64-$MSYS2_ARCH-libarchive \
mingw-w64-$MSYS2_ARCH-libheif \
mingw-w64-$MSYS2_ARCH-libiff \
mingw-w64-$MSYS2_ARCH-libilbm \
mingw-w64-$MSYS2_ARCH-libjxl \
mingw-w64-$MSYS2_ARCH-libmypaint \
mingw-w64-$MSYS2_ARCH-libspiro \
mingw-w64-$MSYS2_ARCH-libwebp \
mingw-w64-$MSYS2_ARCH-libwmf \
mingw-w64-$MSYS2_ARCH-maxflow \
mingw-w64-$MSYS2_ARCH-mypaint-brushes \
mingw-w64-$MSYS2_ARCH-openexr \
mingw-w64-$MSYS2_ARCH-pango \
mingw-w64-$MSYS2_ARCH-poppler \
mingw-w64-$MSYS2_ARCH-poppler-data \
mingw-w64-$MSYS2_ARCH-python \
mingw-w64-$MSYS2_ARCH-python3-gobject \
mingw-w64-$MSYS2_ARCH-qoi \
mingw-w64-$MSYS2_ARCH-shared-mime-info \
mingw-w64-$MSYS2_ARCH-suitesparse \
mingw-w64-$MSYS2_ARCH-vala \
mingw-w64-$MSYS2_ARCH-xpm-nox
export GIMP_PREFIX="`realpath ./_install`${ARTIFACTS_SUFFIX}" export GIMP_PREFIX="`realpath ./_install`${ARTIFACTS_SUFFIX}"
export PATH="$GIMP_PREFIX/bin:$PATH" export PATH="$GIMP_PREFIX/bin:$PATH"

View File

@ -0,0 +1,49 @@
DEPS_ARCH_binutils
DEPS_ARCH_meson
DEPS_ARCH_ccache
DEPS_ARCH_aalib
DEPS_ARCH_appstream-glib
DEPS_ARCH_atk
DEPS_ARCH_brotli
DEPS_ARCH_cairo
DEPS_ARCH_cfitsio
DEPS_ARCH_drmingw
DEPS_ARCH_gexiv2
DEPS_ARCH_ghostscript
DEPS_ARCH_gi-docgen
DEPS_ARCH_glib2
DEPS_ARCH_glib-networking
DEPS_ARCH_gobject-introspection
DEPS_ARCH_gobject-introspection-runtime
DEPS_ARCH_graphviz
DEPS_ARCH_gtk3
DEPS_ARCH_headers-git
DEPS_ARCH_iso-codes
DEPS_ARCH_json-c
DEPS_ARCH_json-glib
DEPS_ARCH_lcms2
DEPS_ARCH_lensfun
DEPS_ARCH_libarchive
DEPS_ARCH_libheif
DEPS_ARCH_libiff
DEPS_ARCH_libilbm
DEPS_ARCH_libjxl
DEPS_ARCH_libmypaint
DEPS_ARCH_libspiro
DEPS_ARCH_libwebp
DEPS_ARCH_libwmf
DEPS_ARCH_luajit
DEPS_ARCH_lua51-lgi
DEPS_ARCH_maxflow
DEPS_ARCH_mypaint-brushes
DEPS_ARCH_openexr
DEPS_ARCH_pango
DEPS_ARCH_poppler
DEPS_ARCH_poppler-data
DEPS_ARCH_python
DEPS_ARCH_python-gobject
DEPS_ARCH_qoi
DEPS_ARCH_shared-mime-info
DEPS_ARCH_suitesparse
DEPS_ARCH_vala
DEPS_ARCH_xpm-nox