diff --git a/Dockerfile.windows b/Dockerfile.windows index cec0227..ccd5a3b 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -40,6 +40,7 @@ RUN git clone -b master https://github.com/monero-project/monero && \ RUN make -j$THREADS -C /depends HOST=x86_64-w64-mingw32 NO_QT=1 +COPY contrib/QTBUG-92199-fix.patch . RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \ cd qt5 && \ git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \ @@ -50,6 +51,7 @@ RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \ git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \ git clone git://code.qt.io/qt/qtxmlpatterns.git -b ${QT_VERSION} --depth 1 && \ git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \ + cd qtbase && cat ../../QTBUG-92199-fix.patch && git apply ../../QTBUG-92199-fix.patch && cd .. && \ OPENSSL_LIBS="-lssl -lcrypto -lws2_32" \ ./configure --prefix=/depends/x86_64-w64-mingw32 -xplatform win32-g++ \ -device-option CROSS_COMPILE=/usr/bin/x86_64-w64-mingw32- \ diff --git a/contrib/patches/polyseed/force-static-mingw.patch b/contrib/patches/polyseed/force-static-mingw.patch new file mode 100644 index 0000000..f05cb2b --- /dev/null +++ b/contrib/patches/polyseed/force-static-mingw.patch @@ -0,0 +1,23 @@ +--- a/include/polyseed.h ++++ b/include/polyseed.h +@@ -93,13 +93,13 @@ Shared/static library definitions + - define POLYSEED_STATIC when linking to the static library + */ + #if defined(_WIN32) || defined(__CYGWIN__) +- #ifdef POLYSEED_SHARED +- #define POLYSEED_API __declspec(dllexport) +- #elif !defined(POLYSEED_STATIC) +- #define POLYSEED_API __declspec(dllimport) +- #else +- #define POLYSEED_API +- #endif ++// #ifdef POLYSEED_SHARED ++// #define POLYSEED_API __declspec(dllexport) ++// #elif !defined(POLYSEED_STATIC) ++// #define POLYSEED_API __declspec(dllimport) ++// #else ++ #define POLYSEED_API ++// #endif + #define POLYSEED_PRIVATE + #else + #ifdef POLYSEED_SHARED diff --git a/contrib/patches/polyseed/no_shared.patch b/contrib/patches/polyseed/no_shared.patch new file mode 100644 index 0000000..8a5f73b --- /dev/null +++ b/contrib/patches/polyseed/no_shared.patch @@ -0,0 +1,42 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,19 +28,20 @@ if(NOT CMAKE_BUILD_TYPE) + message(STATUS "Setting default build type: ${CMAKE_BUILD_TYPE}") + endif() + +-add_library(polyseed SHARED ${polyseed_sources}) +-set_property(TARGET polyseed PROPERTY POSITION_INDEPENDENT_CODE ON) +-set_property(TARGET polyseed PROPERTY PUBLIC_HEADER include/polyseed.h) +-include_directories(polyseed +- include/) +-target_compile_definitions(polyseed PRIVATE POLYSEED_SHARED) +-set_target_properties(polyseed PROPERTIES VERSION 1.0.0 +- SOVERSION 1 +- C_STANDARD 11 +- C_STANDARD_REQUIRED ON) ++#add_library(polyseed SHARED ${polyseed_sources}) ++#set_property(TARGET polyseed PROPERTY POSITION_INDEPENDENT_CODE ON) ++#set_property(TARGET polyseed PROPERTY PUBLIC_HEADER include/polyseed.h) ++#include_directories(polyseed ++# include/) ++#target_compile_definitions(polyseed PRIVATE POLYSEED_SHARED) ++#set_target_properties(polyseed PROPERTIES VERSION 1.0.0 ++# SOVERSION 1 ++# C_STANDARD 11 ++# C_STANDARD_REQUIRED ON) + + add_library(polyseed_static STATIC ${polyseed_sources}) + set_property(TARGET polyseed_static PROPERTY POSITION_INDEPENDENT_CODE ON) ++set_property(TARGET polyseed_static PROPERTY PUBLIC_HEADER include/polyseed.h) + include_directories(polyseed_static + include/) + target_compile_definitions(polyseed_static PRIVATE POLYSEED_STATIC) +@@ -57,7 +58,7 @@ target_link_libraries(polyseed-tests + PRIVATE polyseed_static) + + include(GNUInstallDirs) +-install(TARGETS polyseed polyseed_static ++install(TARGETS polyseed_static + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}