From 937001cecdb2d5d1c1a68659943334a192f4e4c7 Mon Sep 17 00:00:00 2001 From: Matthew Brush Date: Sat, 3 Oct 2020 10:36:12 -0700 Subject: [PATCH] Put back unconditional downloading of the GTK+3 bundle in `cross-build-mingw.sh`. Also re-arrange the code a little bit to make it clearer what it's doing. --- scripts/cross-build-mingw.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/cross-build-mingw.sh b/scripts/cross-build-mingw.sh index ab39757fc1..02ddcb4d26 100755 --- a/scripts/cross-build-mingw.sh +++ b/scripts/cross-build-mingw.sh @@ -42,13 +42,6 @@ EOF done shift $((OPTIND - 1)) -if [ "$GTK3" = yes ]; then - BUNDLE_ZIP="$GTK3_BUNDLE_ZIP" -else - BUNDLE_ZIP="$GTK2_BUNDLE_ZIP" - CONFIGUREFLAGS="$CONFIGUREFLAGS --enable-gtk2=yes" -fi - # USAGE: fetch_and_unzip URL DEST_PREFIX fetch_and_unzip() { @@ -88,7 +81,15 @@ cd "$BUILDDIR" mkdir _deps -fetch_and_unzip "$BUNDLE_ZIP" _deps +# both the GTK2 and GTK3 build require files from the GTK3 bundle +# so download and unzip it unconditionally +fetch_and_unzip "$GTK3_BUNDLE_ZIP" _deps + +if [ "$GTK3" = no ]; then + fetch_and_unzip "$GTK2_BUNDLE_ZIP" _deps + CONFIGUREFLAGS="$CONFIGUREFLAGS --enable-gtk2=yes" +fi + # fixup the prefix= in the pkg-config files sed -i "s%^\(prefix=\).*$%\1$PWD/_deps%" _deps/lib/pkgconfig/*.pc