]> sigrok.org Git - sigrok-util.git/blobdiff - cross-compile/msys2/sigrok-native-msys2
sigrok-native-msys2: Add hidapi in "prepare" target.
[sigrok-util.git] / cross-compile / msys2 / sigrok-native-msys2
index 26f8b1467b51d81d3e9f68051f2f46ab28d8d904..bb692db82dc30a48bef78bc6e389c14ed503de9c 100755 (executable)
@@ -43,7 +43,7 @@ DEBUG=0
 # -----------------------------------------------------------------------------
 
 # Abort if the user runs the script in an "MSYS2 MSYS" shell.
-if [ $MSYSTEM = "MSYS2" ]; then
+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
@@ -79,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"
 
@@ -106,7 +109,8 @@ if [ "x$1" = "xprepare" ]; then
        autoconf automake autoconf-archive libtool make pkg-config wget patch \
        $W-toolchain $W-glib2 $W-glibmm $W-libusb $W-libftdi $W-check $W-boost \
        $W-libzip $W-doxygen $W-python3 $W-python3-numpy $W-python3-gobject \
-       $W-python3-setuptools $W-swig $W-qt5-static $W-cmake $W-nsis
+       $W-python3-setuptools $W-swig $W-qt5-static $W-cmake $W-nsis \
+       $W-hidapi
   exit
 fi