Advertisement
Guest User

Untitled

a guest
Jan 6th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.66 KB | None | 0 0
  1. This file is part of MXE.
  2. See index.html for further information.
  3.  
  4. Contains ad hoc patches for cross building.
  5.  
  6. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  7. From: Boris Nagaev <bnagaev@gmail.com>
  8. Date: Sun, 30 Aug 2015 00:28:50 +0200
  9. Subject: [PATCH] do not check qmake existance
  10.  
  11. Fix ./configure error:
  12.  
  13. checking for mxe/usr/i686-w64-mingw32.static/qt/bin/qmake...
  14. configure: error: cannot check for file existence when
  15. cross compiling
  16.  
  17. diff --git a/m4/qbittorrent.m4 b/m4/qbittorrent.m4
  18. index 1111111..2222222 100644
  19. --- a/m4/qbittorrent.m4
  20. +++ b/m4/qbittorrent.m4
  21. @@ -12,9 +12,9 @@ AC_DEFUN([FIND_QT4],
  22. [QT_QMAKE=`AS_DIRNAME(["$QT_QMAKE"])`])
  23. ])
  24.  
  25. -AC_CHECK_FILE([$QT_QMAKE/qmake],
  26. +AS_IF([$QT_QMAKE/qmake],
  27. [QT_QMAKE="$QT_QMAKE/qmake"],
  28. - [AC_CHECK_FILE([$QT_QMAKE/qmake-qt4],
  29. + [AS_IF([$QT_QMAKE/qmake-qt4],
  30. [QT_QMAKE="$QT_QMAKE/qmake-qt4"],
  31. [QT_QMAKE=""])
  32. ])
  33. @@ -36,7 +36,7 @@ AC_DEFUN([FIND_QT5],
  34. [host_bins])
  35. ])
  36.  
  37. -AC_CHECK_FILE([$QT_QMAKE/qmake],
  38. +AS_IF([$QT_QMAKE/qmake],
  39. [QT_QMAKE="$QT_QMAKE/qmake"],
  40. [AC_CHECK_FILE([$QT_QMAKE/qmake-qt5],
  41. [QT_QMAKE="$QT_QMAKE/qmake-qt5"],
  42.  
  43. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  44. From: Boris Nagaev <bnagaev@gmail.com>
  45. Date: Sun, 30 Aug 2015 01:58:17 +0200
  46. Subject: [PATCH] convert includes like <Windows.h> to lowercase
  47.  
  48.  
  49. diff --git a/src/app/application.cpp b/src/app/application.cpp
  50. index 1111111..2222222 100644
  51. --- a/src/app/application.cpp
  52. +++ b/src/app/application.cpp
  53. @@ -37,7 +37,7 @@
  54. #ifndef DISABLE_GUI
  55. #include "gui/guiiconprovider.h"
  56. #ifdef Q_OS_WIN
  57. -#include <Windows.h>
  58. +#include <windows.h>
  59. #include <QSharedMemory>
  60. #include <QSessionManager>
  61. #endif // Q_OS_WIN
  62. diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp
  63. index 1111111..2222222 100644
  64. --- a/src/base/bittorrent/torrenthandle.cpp
  65. +++ b/src/base/bittorrent/torrenthandle.cpp
  66. @@ -43,7 +43,7 @@
  67. #include <boost/bind.hpp>
  68.  
  69. #ifdef Q_OS_WIN
  70. -#include <Windows.h>
  71. +#include <windows.h>
  72. #endif
  73.  
  74. #include "base/logger.h"
  75. diff --git a/src/base/preferences.cpp b/src/base/preferences.cpp
  76. index 1111111..2222222 100644
  77. --- a/src/base/preferences.cpp
  78. +++ b/src/base/preferences.cpp
  79. @@ -47,7 +47,7 @@
  80. #endif
  81.  
  82. #ifdef Q_OS_WIN
  83. -#include <ShlObj.h>
  84. +#include <shlobj.h>
  85. #include <winreg.h>
  86. #endif
  87.  
  88. diff --git a/src/base/utils/misc.cpp b/src/base/utils/misc.cpp
  89. index 1111111..2222222 100644
  90. --- a/src/base/utils/misc.cpp
  91. +++ b/src/base/utils/misc.cpp
  92. @@ -48,7 +48,7 @@
  93.  
  94. #ifdef Q_OS_WIN
  95. #include <windows.h>
  96. -#include <PowrProf.h>
  97. +#include <powrprof.h>
  98. const int UNLEN = 256;
  99. #else
  100. #include <unistd.h>
  101. diff --git a/src/gui/powermanagement/powermanagement.cpp b/src/gui/powermanagement/powermanagement.cpp
  102. index 1111111..2222222 100644
  103. --- a/src/gui/powermanagement/powermanagement.cpp
  104. +++ b/src/gui/powermanagement/powermanagement.cpp
  105. @@ -40,7 +40,7 @@
  106. #endif
  107.  
  108. #ifdef Q_OS_WIN
  109. -#include <Windows.h>
  110. +#include <windows.h>
  111. #endif
  112.  
  113. PowerManagement::PowerManagement(QObject *parent) : QObject(parent), m_busy(false)
  114.  
  115. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
  116. From: Boris Nagaev <bnagaev@gmail.com>
  117. Date: Sun, 30 Aug 2015 02:02:39 +0200
  118. Subject: [PATCH] fix library list
  119.  
  120. Replace library list hardcoded in qmake files with
  121. libraries found by autotools.
  122.  
  123. diff --git a/configure b/configure
  124. index 1111111..2222222 100755
  125. --- a/configure
  126. +++ b/configure
  127. @@ -8345,7 +8345,7 @@ fi
  128. $as_echo "$as_me: Running qmake to generate the makefile..." >&6;}
  129. CONFDIR="$( cd "$( dirname "$0" )" && pwd )"
  130.  
  131. -$QT_QMAKE -r $CONFDIR/qbittorrent.pro
  132. +$QT_QMAKE -r $CONFDIR/qbittorrent.pro "QMAKE_LRELEASE=$QMAKE_LRELEASE" "CONF_LIBS=$LIBS"
  133.  
  134. ret="$?"
  135.  
  136. diff --git a/winconf-mingw.pri b/winconf-mingw.pri
  137. index 1111111..2222222 100644
  138. --- a/winconf-mingw.pri
  139. +++ b/winconf-mingw.pri
  140. @@ -20,19 +20,8 @@ CONFIG(debug, debug|release) {
  141.  
  142. RC_FILE = qbittorrent_mingw.rc
  143.  
  144. -# Adapt the lib names/versions accordingly
  145. -CONFIG(debug, debug|release) {
  146. - LIBS += libtorrent \
  147. - libboost_system-mgw45-mt-d-1_47 \
  148. - libboost_filesystem-mgw45-mt-d-1_47 \
  149. - libboost_thread-mgw45-mt-d-1_47
  150. -} else {
  151. - LIBS += libtorrent \
  152. - libboost_system-mgw45-mt-1_47 \
  153. - libboost_filesystem-mgw45-mt-1_47 \
  154. - libboost_thread-mgw45-mt-1_47
  155. -}
  156. +LIBS += $$CONF_LIBS
  157.  
  158. LIBS += libadvapi32 libshell32 libuser32
  159. -LIBS += libcrypto.dll libssl.dll libwsock32 libws2_32 libz libiconv.dll
  160. +LIBS += libcrypto libssl libwsock32 libws2_32 libz libiconv
  161. LIBS += libpowrprof
  162. diff --git a/winconf.pri b/winconf.pri
  163. index 1111111..2222222 100644
  164. --- a/winconf.pri
  165. +++ b/winconf.pri
  166. @@ -9,15 +9,6 @@ INCLUDEPATH += $$quote(C:/qBittorrent/Zlib/include)
  167. # Point this to the openssl include folder
  168. INCLUDEPATH += $$quote(C:/qBittorrent/openssl/include)
  169.  
  170. -# Point this to the boost lib folder
  171. -LIBS += $$quote(-LC:/qBittorrent/boost_1_51_0/stage/lib)
  172. -# Point this to the libtorrent lib folder
  173. -LIBS += $$quote(-LC:/qBittorrent/RC_0_16/bin/<path-according-to-the-build-options-chosen>)
  174. -# Point this to the zlib lib folder
  175. -LIBS += $$quote(-LC:/qBittorrent/Zlib/lib)
  176. -# Point this to the openssl lib folder
  177. -LIBS += $$quote(-LC:/qBittorrent/openssl/lib)
  178. -
  179. # LIBTORRENT DEFINES
  180. DEFINES += BOOST_ALL_NO_LIB
  181. DEFINES += BOOST_ASIO_HASH_MAP_BUCKETS=1021
  182. @@ -46,9 +37,4 @@ CONFIG(debug, debug|release) {
  183. # Enable backtrace support
  184. CONFIG += strace_win
  185.  
  186. -win32-g++ {
  187. - include(winconf-mingw.pri)
  188. -}
  189. -else {
  190. - include(winconf-msvc.pri)
  191. -}
  192. +include(winconf-mingw.pri)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement