]> sigrok.org Git - sigrok-util.git/commitdiff
sigrok-cross-mingw: 64bit: Generate missing libpython34.a.
authorUwe Hermann <redacted>
Sat, 9 Dec 2017 22:38:20 +0000 (23:38 +0100)
committerUwe Hermann <redacted>
Sat, 9 Dec 2017 22:38:20 +0000 (23:38 +0100)
This might fix (parts of) bug #1069, but tests so far have shown
issues, so this might need more work. It's a start, though.

cross-compile/mingw/README
cross-compile/mingw/sigrok-cross-mingw

index 9ace134c58aeb14f825b56ab6aa956859070dd9e..7620f62b824c57f3f95da33ef632b0278c25ec7d 100644 (file)
@@ -46,7 +46,7 @@ Build all required packages:
  $ make MXE_TARGETS=i686-w64-mingw32.static.posix \
    MXE_PLUGIN_DIRS=plugins/examples/qt5-freeze \
    gcc glib libzip libusb1 libftdi1 glibmm qtbase qtimageformats qtsvg \
-   boost check qtbase_CONFIGURE_OPTS='-no-sql-mysql'
+   boost check gendef qtbase_CONFIGURE_OPTS='-no-sql-mysql'
 
 This will take a while.
 
index c5c3a39af91d9473ac93452c72295c2231a0aed4..8e5a61831b2ee7c696d7645679eece0b29e1d1c3 100755 (executable)
@@ -120,6 +120,19 @@ EOF
 $WGET http://www.sigrok.org/tmp/python34_$TARGET.dll -O $PREFIX/python34.dll
 $WGET http://www.sigrok.org/tmp/python34_$TARGET.zip -O $PREFIX/python34.zip
 
+# In order to link against Python we need libpython34.a.
+# The upstream Python 32bit installer ships this, the x86_64 installer
+# doesn't. Thus, we generate the file manually here.
+if [ $TARGET = "x86_64" ]; then
+       cp $PREFIX/python34.dll .
+       $MXE/usr/$TARGET-w64-mingw32.static.posix/bin/gendef python34.dll
+       $MXE/usr/bin/$TARGET-w64-mingw32.static.posix-dlltool \
+               --dllname python34.dll --def python34.def \
+               --output-lib libpython34.a
+       mv -f libpython34.a $PREFIX/Python34/libs
+       rm -f python34.dll
+fi
+
 # Zadig (we ship this with frontends for easy driver switching).
 $WGET http://zadig.akeo.ie/downloads/zadig.exe -O $PREFIX/zadig.exe
 $WGET http://zadig.akeo.ie/downloads/zadig_xp.exe -O $PREFIX/zadig_xp.exe