]> sigrok.org Git - sigrok-util.git/blobdiff - cross-compile/mingw/mxe_fixes.patch
sigrok-cross-mingw: Add required libusb patch for MXE.
[sigrok-util.git] / cross-compile / mingw / mxe_fixes.patch
index e7c09f38c2dd15333dafc21b2b80bf7cfeb1941b..45e6a5a4e2fff1c275c16efee9c544e4b0ede5ac 100644 (file)
@@ -1,17 +1,41 @@
 These patches are currently required to get a properly working
 MXE setup for sigrok usage.
 
+ - libsigrok currently requires a special libusb branch.
+
  - 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/libusb1.mk b/src/libusb1.mk
+index 0b58dff3..281a1169 100644
+--- a/src/libusb1.mk
++++ b/src/libusb1.mk
+@@ -5,10 +5,10 @@ $(PKG)_WEBSITE  := http://libusb.org/
+ $(PKG)_DESCR    := LibUsb-1.0
+ $(PKG)_IGNORE   :=
+ $(PKG)_VERSION  := 1.0.21
+-$(PKG)_CHECKSUM := 7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b
+-$(PKG)_SUBDIR   := libusb-$($(PKG)_VERSION)
+-$(PKG)_FILE     := libusb-$($(PKG)_VERSION).tar.bz2
+-$(PKG)_URL      := https://$(SOURCEFORGE_MIRROR)/project/libusb/libusb-1.0/libusb-$($(PKG)_VERSION)/$($(PKG)_FILE)
++$(PKG)_CHECKSUM := 58fee7f3f05fda209d14c55763df36ab86028bd9ab82c9bb74f1d5ab3208bcfd
++$(PKG)_SUBDIR   := libusb-event-abstraction-v4
++$(PKG)_FILE     := libusb-event-abstraction-v4.zip
++$(PKG)_URL      := https://github.com/dickens/libusb/archive/event-abstraction-v4.zip
+ $(PKG)_DEPS     := cc
+ define $(PKG)_UPDATE
+@@ -19,7 +19,7 @@ define $(PKG)_UPDATE
+ endef
+ define $(PKG)_BUILD
+-    cd '$(1)' && ./configure \
++    cd '$(1)' && autoreconf -i && ./configure \
+         $(MXE_CONFIGURE_OPTS) \
+         CFLAGS=-D_WIN32_WINNT=0x0500
+     $(MAKE) -C '$(1)' -j '$(JOBS)' install
 diff --git a/src/libzip.mk b/src/libzip.mk
-index 99606d3..fd18276 100644
+index 28ea792c..ee1bcfbe 100644
 --- a/src/libzip.mk
 +++ b/src/libzip.mk
 @@ -18,7 +18,8 @@ endef
@@ -20,47 +44,7 @@ index 99606d3..fd18276 100644
      cd '$(1)' && ./configure \
 -        $(MXE_CONFIGURE_OPTS)
 +        $(MXE_CONFIGURE_OPTS) \
-+      ac_cv_func_mkstemp=no
++        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