]> sigrok.org Git - sigrok-util.git/commitdiff
sigrok-cross-mingw: Document required MXE fixes/workarounds.
authorUwe Hermann <redacted>
Tue, 28 Jul 2015 18:33:03 +0000 (20:33 +0200)
committerUwe Hermann <redacted>
Tue, 28 Jul 2015 18:33:03 +0000 (20:33 +0200)
cross-compile/mingw/README
cross-compile/mingw/mxe_fixes.patch [new file with mode: 0644]

index 5efd439f5034084e3e78fd8aab179f16685f3f74..248af546f939a81855dda33142d834eecf2979c2 100644 (file)
@@ -37,6 +37,10 @@ First, get the MXE cross-compile environment for MinGW-w64/Windows:
  $ git clone https://github.com/mxe/mxe.git mxe-git
  $ cd mxe-git
 
+Apply some fixes that are currently required for a proper build:
+
+ $ patch -p1 < mxe_fixes.patch
+
 For now we need to build gcc and winpthreads in two steps. First:
 
  $ make MXE_TARGETS=i686-w64-mingw32.static gcc winpthreads
diff --git a/cross-compile/mingw/mxe_fixes.patch b/cross-compile/mingw/mxe_fixes.patch
new file mode 100644 (file)
index 0000000..e7c09f3
--- /dev/null
@@ -0,0 +1,66 @@
+These patches are currently required to get a properly working
+MXE setup for sigrok usage.
+
+ - Force libzip to use its own mkstemp() implementation.
+   http://sigrok.org/bugzilla/show_bug.cgi?id=570#c2
+
+ - Disable currently broken freetds (optional Qt dependency).
+   https://github.com/mxe/mxe/issues/770
+
+ - Disable currently broken qtassistant (we don't need it anyway).
+   https://github.com/mxe/mxe/issues/565
+   
+diff --git a/src/libzip.mk b/src/libzip.mk
+index 99606d3..fd18276 100644
+--- a/src/libzip.mk
++++ b/src/libzip.mk
+@@ -18,7 +18,8 @@ endef
+ define $(PKG)_BUILD
+     cd '$(1)' && ./configure \
+-        $(MXE_CONFIGURE_OPTS)
++        $(MXE_CONFIGURE_OPTS) \
++      ac_cv_func_mkstemp=no
+     $(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT) SUBDIRS=lib
+     '$(TARGET)-gcc' \
+diff --git a/src/qt.mk b/src/qt.mk
+index f71f5c9..d7fdff1 100644
+--- a/src/qt.mk
++++ b/src/qt.mk
+@@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := 76aef40335c0701e5be7bb3a9101df5d22fe3666
+ $(PKG)_SUBDIR   := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION)
+ $(PKG)_FILE     := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION).tar.gz
+ $(PKG)_URL      := http://download.qt.io/official_releases/qt/4.8/$($(PKG)_VERSION)/$($(PKG)_FILE)
+-$(PKG)_DEPS     := gcc postgresql freetds openssl zlib libpng jpeg libmng tiff sqlite dbus
++$(PKG)_DEPS     := gcc postgresql openssl zlib libpng jpeg libmng tiff sqlite dbus
+ define $(PKG)_UPDATE
+     $(WGET) -q -O- http://download.qt-project.org/official_releases/qt/4.8/ | \
+@@ -56,7 +56,6 @@ define $(PKG)_BUILD
+         -qt-sql-odbc \
+         -qt-sql-psql \
+         -no-sql-mysql \
+-        -qt-sql-tds -D Q_USE_SYBASE \
+         -system-zlib \
+         -system-libpng \
+         -system-libjpeg \
+@@ -76,12 +75,12 @@ define $(PKG)_BUILD
+     $(MAKE) -C '$(1)/tools/linguist/lrelease' -j '$(JOBS)' install
+     ln -fs '$(PREFIX)/$(TARGET)/bin/lrelease' '$(PREFIX)/bin/$(TARGET)-lrelease'
+-    cd '$(1)/tools/assistant' && '$(1)/bin/qmake' assistant.pro
+-    # can't figure out where -lQtCLucene comes from so use
+-    # sed on the output instead of patching the input
+-    $(MAKE) -C '$(1)/tools/assistant' sub-lib-qmake_all
+-    $(SED) -i 's,-lQtCLucene$$,-lQtCLucene4,' '$(1)/tools/assistant/lib/Makefile.Release'
+-    $(MAKE) -C '$(1)/tools/assistant' -j '$(JOBS)' install
++    ## cd '$(1)/tools/assistant' && '$(1)/bin/qmake' assistant.pro
++    ## # can't figure out where -lQtCLucene comes from so use
++    ## # sed on the output instead of patching the input
++    ## $(MAKE) -C '$(1)/tools/assistant' sub-lib-qmake_all
++    ## $(SED) -i 's,-lQtCLucene$$,-lQtCLucene4,' '$(1)/tools/assistant/lib/Makefile.Release'
++    ## $(MAKE) -C '$(1)/tools/assistant' -j '$(JOBS)' install
+     # likewise for these two
+     cd '$(1)/tools/designer/src/designer' && '$(1)/bin/qmake' designer.pro