X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=cross-compile%2Fmsys2%2Fsigrok-native-msys2;h=f41b67aba824641c590d1f59225dd9ef6d6dc5df;hb=473d0272a2e55f2019de0af6460663fd99e10e5b;hp=3084bcb9e0ef0c5d66664dca3d3848aa5dd7a7a9;hpb=cbb27416befdf449b3421cf50270c6b0e8a606ad;p=sigrok-util.git diff --git a/cross-compile/msys2/sigrok-native-msys2 b/cross-compile/msys2/sigrok-native-msys2 index 3084bcb..f41b67a 100755 --- a/cross-compile/msys2/sigrok-native-msys2 +++ b/cross-compile/msys2/sigrok-native-msys2 @@ -42,6 +42,13 @@ DEBUG=0 # ----------------------------------------------------------------------------- +# Abort if the user runs the script in an "MSYS2 MSYS" shell. +if [ $MSYSTEM = "MSYS" ]; then + echo "Building in an 'MSYS2 MSYS' shell will not work, aborting." + echo "Please use the 'MSYS2 MinGW 64-bit' (or 32-bit) shell." + exit +fi + # The build target type: "i686" (32bit) or "x86_64" (64bit). # This is selected based on which MSYS2 shell is being used to do the build. TARGET=$MSYSTEM_CARCH @@ -72,9 +79,12 @@ fi PYPATH=$PREFIX/$PYBASE +# Eliminate the host Python path environment variable, if any is set. +export PYTHONPATH= + # ----------------------------------------------------------------------------- -P="$PREFIX/lib/pkgconfig" +P="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" C="$C --prefix=$PREFIX" L="--disable-shared --enable-static"