From: Simon McVittie Date: Fri, 24 Jun 2022 16:21:00 +0000 (+0100) Subject: CI: Factor out Wine setup so that it applies equally to Meson X-Git-Tag: dbus-1.15.0~32^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00c18a8050650f197a318f8dc97b5647e656988a;p=thirdparty%2Fdbus.git CI: Factor out Wine setup so that it applies equally to Meson Signed-off-by: Simon McVittie --- diff --git a/tools/ci-build.sh b/tools/ci-build.sh index 86da12824..b04f04130 100755 --- a/tools/ci-build.sh +++ b/tools/ci-build.sh @@ -231,6 +231,22 @@ esac cd "$builddir" +case "$ci_host" in + (*-w64-mingw32) + # If we're dynamically linking libgcc, make sure Wine will find it + if [ "$ci_test" = yes ]; then + if [ "${ci_distro%%-*}" = opensuse ] && [ "${ci_host%%-*}" = x86_64 ]; then + export WINEARCH=win64 + fi + libgcc_path= + if [ "$ci_runtime" = "shared" ]; then + libgcc_path=$(dirname "$("${ci_host}-gcc" -print-libgcc-file-name)") + fi + init_wine "${dep_prefix}/bin" "${builddir}/bin" ${libgcc_path:+"$libgcc_path"} + fi + ;; +esac + make="make -j${ci_parallel} V=1 VERBOSE=1" case "$ci_buildsys" in @@ -379,22 +395,12 @@ case "$ci_buildsys" in (*-w64-mingw32) # CFLAGS and CXXFLAGS does do work, checked with cmake 3.15 export LDFLAGS="-${ci_runtime}-libgcc" - # enable tests if supported - if [ "$ci_test" = yes ]; then - # choose correct wine architecture - if [ "${ci_distro%%-*}" = opensuse ]; then - if [ "${ci_host%%-*}" = x86_64 ]; then - export WINEARCH=win64 - cmake=mingw64-cmake - else - cmake=mingw32-cmake - fi - fi - libgcc_path= - if [ "$ci_runtime" = "shared" ]; then - libgcc_path=$(dirname "$("${ci_host}-gcc" -print-libgcc-file-name)") + if [ "${ci_distro%%-*}" = opensuse ]; then + if [ "${ci_host%%-*}" = x86_64 ]; then + cmake=mingw64-cmake + else + cmake=mingw32-cmake fi - init_wine "${dep_prefix}/bin" "$(pwd)/bin" ${libgcc_path:+"$libgcc_path"} cmdwrapper="xvfb-run -a" fi set _ "$@"