diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-04-18 19:07:01 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-04-18 19:49:47 +0200 |
commit | b39e91844b5fcda06bcf14b6b49e807252e172f1 (patch) | |
tree | caecf3f6997b11c393fc005ee39a1cea231b232e /mail-client | |
parent | net-analyzer/lft: Old. (diff) | |
download | gentoo-b39e91844b5fcda06bcf14b6b49e807252e172f1.tar.gz gentoo-b39e91844b5fcda06bcf14b6b49e807252e172f1.tar.bz2 gentoo-b39e91844b5fcda06bcf14b6b49e807252e172f1.zip |
mail-client/trojita: Fix build with Qt 5.11_beta3
Package-Manager: Portage-2.3.30, Repoman-2.3.9
Diffstat (limited to 'mail-client')
-rw-r--r-- | mail-client/trojita/files/trojita-0.7-qt-5.11b3.patch | 207 | ||||
-rw-r--r-- | mail-client/trojita/trojita-0.7-r2.ebuild | 3 |
2 files changed, 209 insertions, 1 deletions
diff --git a/mail-client/trojita/files/trojita-0.7-qt-5.11b3.patch b/mail-client/trojita/files/trojita-0.7-qt-5.11b3.patch new file mode 100644 index 000000000000..32d1a0219725 --- /dev/null +++ b/mail-client/trojita/files/trojita-0.7-qt-5.11b3.patch @@ -0,0 +1,207 @@ +From 7a9f7e0629aa28ffafc4433bbdf43a011754d7c3 Mon Sep 17 00:00:00 2001 +From: Andreas Sturmlechner <asturm@gentoo.org> +Date: Wed, 18 Apr 2018 18:53:23 +0200 +Subject: [PATCH] Fix build with Qt 5.11_beta3 (dropping qt5_use_modules) + +--- + CMakeLists.txt | 1 - + cmake/TrojitaOption.cmake | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3a882370..781e576b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,6 @@ + project(trojita) + set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + +-# Qt5's qt5_use_modules need 2.8.9+ + # On win32, we need QtMain linking, which means 2.8.11+ + # EL7 ships 2.8.11, Debian 8 ships 3.0.2, and Ubuntu 14.04 LTS has 2.8.12 + cmake_minimum_required(VERSION 2.8.11) +diff --git a/cmake/TrojitaOption.cmake b/cmake/TrojitaOption.cmake +index ed99e952..8ac6b6be 100644 +--- a/cmake/TrojitaOption.cmake ++++ b/cmake/TrojitaOption.cmake +@@ -100,7 +100,7 @@ macro(trojita_add_plugin target type) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS BUILD_PLUGIN) + target_link_libraries(${target} Plugins) + if (WITH_QT5) +- qt5_use_modules(${target} Core) ++ target_link_libraries(${target} Qt5::Core) + else() + target_link_libraries(${target} ${QT_QTCORE_LIBRARY}) + endif() +-- +2.17.0 + +From 94adf1d2e3e2d4a9e0c59fa9423ae711cf55c6fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jkt@kde.org> +Date: Wed, 19 Oct 2016 21:58:57 +0200 +Subject: [PATCH] cmake: do not use qt5_use_modules + +...because the documentation suggests going with imported targets and +target_link_libraries. + +Change-Id: I403d40d0b0ac8d88cadb011c2c2a643221f15daf +--- + CMakeLists.txt | 42 ++++++++++++++++-------------------------- + 1 file changed, 16 insertions(+), 26 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92a682f7..f0d395d6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -552,13 +552,13 @@ set_source_files_properties(${version_files} + add_library(Common STATIC ${libCommon_SOURCES}) + set_property(TARGET Common APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + add_dependencies(Common version) +-qt5_use_modules(Common Core Network) ++target_link_libraries(Common Qt5::Network) + + add_library(AppVersion STATIC ${libAppVersion_SOURCES}) + set_property(TARGET AppVersion APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + add_dependencies(AppVersion version) + target_link_libraries(AppVersion Common) +-qt5_use_modules(AppVersion Core) ++target_link_libraries(AppVersion Qt5::Core) + + if(WITH_SHARED_PLUGINS) + add_library(Plugins SHARED ${libPlugins_SOURCES}) +@@ -569,12 +569,11 @@ else() + endif() + set_target_properties(Plugins PROPERTIES OUTPUT_NAME trojita_plugins) + set_property(TARGET Plugins APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) +-qt5_use_modules(Plugins Core) ++target_link_libraries(Plugins Qt5::Core) + + add_library(UiUtils STATIC ${libUiUtils_SOURCES}) + set_property(TARGET UiUtils APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) +-target_link_libraries(UiUtils Plugins Common) +-qt5_use_modules(UiUtils Core Gui Network) ++target_link_libraries(UiUtils Plugins Common Qt5::Gui) + + add_library(Streams STATIC ${libStreams_SOURCES}) + set_property(TARGET Streams APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) +@@ -582,36 +581,32 @@ if(WITH_ZLIB) + set_property(TARGET Streams APPEND PROPERTY INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR}) + target_link_libraries(Streams ${ZLIB_LIBRARIES}) + endif() +-qt5_use_modules(Streams Network) ++target_link_libraries(Streams Qt5::Network) + + add_library(IPC STATIC ${libIPC_SOURCES}) + set_property(TARGET IPC APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + if(WITH_DBUS) +- qt5_use_modules(IPC DBus Widgets) ++ target_link_libraries(IPC Qt5::DBus Qt5::Widgets) + else() +- qt5_use_modules(IPC Core) ++ target_link_libraries(IPC Qt5::Core) + endif() + + add_library(qwwsmtpclient STATIC ${libqwwsmtpclient_SOURCES}) +-qt5_use_modules(qwwsmtpclient Network) ++target_link_libraries(qwwsmtpclient Qt5::Network) + + add_library(MSA STATIC ${libMSA_SOURCES}) + set_property(TARGET MSA APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + target_link_libraries(MSA Imap Streams qwwsmtpclient) +-qt5_use_modules(MSA Network) + + add_library(Composer STATIC ${libComposer_SOURCES}) + set_property(TARGET Composer APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + target_link_libraries(Composer Common MSA Streams UiUtils qwwsmtpclient) +-qt5_use_modules(Composer Gui Network) + + add_library(Imap STATIC ${libImap_SOURCES}) + set_property(TARGET Imap APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) +-target_link_libraries(Imap Common Streams UiUtils) +-qt5_use_modules(Imap Gui Network Sql) ++target_link_libraries(Imap Common Streams UiUtils Qt5::Sql) + + add_library(Cryptography STATIC ${libCryptography_SOURCES}) +-qt5_use_modules(Cryptography Core) + set_property(TARGET Cryptography APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + target_link_libraries(Cryptography Common Imap) + if(WITH_MIMETIC) +@@ -636,8 +631,7 @@ endif() + ## QtKeyChain plugin + if(WITH_QTKEYCHAIN_PLUGIN) + trojita_add_plugin(trojita_plugin_QtKeychainPasswordPlugin WITH_QTKEYCHAIN_PLUGIN src/Plugins/QtKeyChain/QtKeyChainPassword.cpp) +- qt5_use_modules(trojita_plugin_QtKeychainPasswordPlugin Core DBus) +- target_link_libraries(trojita_plugin_QtKeychainPasswordPlugin ${QTKEYCHAIN_LIBRARIES}) ++ target_link_libraries(trojita_plugin_QtKeychainPasswordPlugin ${QTKEYCHAIN_LIBRARIES} Qt5::DBus) + set_property(TARGET trojita_plugin_QtKeychainPasswordPlugin APPEND PROPERTY INCLUDE_DIRECTORIES ${QTKEYCHAIN_INCLUDE_DIRS}) + endif() + +@@ -662,7 +656,7 @@ if(WITH_ABOOKADDRESSBOOK_PLUGIN) + trojita_add_plugin(trojita_plugin_AbookAddressbookPlugin WITH_ABOOKADDRESSBOOK_PLUGIN ${libAbookAddressbook_SOURCES} ${libAbookAddressbook_UI_OUT}) + set_property(TARGET trojita_plugin_AbookAddressbookPlugin APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + +- qt5_use_modules(trojita_plugin_AbookAddressbookPlugin Widgets) ++ target_link_libraries(trojita_plugin_AbookAddressbookPlugin Qt5::Widgets) + + set(be_contacts_SOURCES + ${path_AbookAddressbook}/main.cpp +@@ -675,7 +669,7 @@ if(WITH_ABOOKADDRESSBOOK_PLUGIN) + set_property(TARGET be.contacts APPEND PROPERTY COMPILE_DEFINITIONS QT_STATICPLUGIN) + target_link_libraries(be.contacts trojita_plugin_AbookAddressbookPlugin) + endif() +- qt5_use_modules(be.contacts Widgets) ++ target_link_libraries(be.contacts Qt5::Widgets) + endif() + + # Generate file static_plugins.h.in +@@ -695,15 +689,13 @@ if(WITH_DESKTOP) + # The following is needed for the LineEdit widget within the .ui files. + # The ${path_DesktopGui} is needed so that the generated ui_*.h file can find the headers of the custom widgets + set_property(TARGET DesktopGui APPEND PROPERTY INCLUDE_DIRECTORIES ${path_DesktopGui}) +- target_link_libraries(DesktopGui Common UiUtils Composer Cryptography Imap IPC MSA Plugins Streams qwwsmtpclient) ++ target_link_libraries(DesktopGui Common UiUtils Composer Cryptography Imap IPC MSA Plugins Streams qwwsmtpclient Qt5::WebKitWidgets) + + # On Windows build a real Win32 GUI application without console window + # On other platforms WIN32 flag is ignored + add_executable(trojita WIN32 ${trojita_desktop_SOURCES} ${trojita_QM}) + set_property(TARGET trojita APPEND PROPERTY COMPILE_DEFINITIONS QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII) + target_link_libraries(trojita AppVersion Common UiUtils DesktopGui ${STATIC_PLUGINS}) +- qt5_use_modules(DesktopGui Network WebKitWidgets) +- qt5_use_modules(trojita Widgets Network) + endif() + + +@@ -737,17 +729,15 @@ if(WITH_TESTS) + tests/Utils/LibMailboxSync.cpp + ) + add_library(test_LibMailboxSync STATIC ${test_LibMailboxSync_SOURCES}) +- qt5_use_modules(test_LibMailboxSync Test Network) + set_property(TARGET test_LibMailboxSync APPEND PROPERTY INCLUDE_DIRECTORIES + ${CMAKE_CURRENT_SOURCE_DIR}/tests + ${CMAKE_CURRENT_SOURCE_DIR}/tests/Utils) +- target_link_libraries(test_LibMailboxSync Imap MSA Streams Common Composer) ++ target_link_libraries(test_LibMailboxSync Imap MSA Streams Common Composer Qt5::Test) + + macro(trojita_test dir fname) + set(test_${fname}_SOURCES tests/${dir}/test_${fname}.cpp) + add_executable(test_${fname} ${test_${fname}_SOURCES}) + target_link_libraries(test_${fname} Imap MSA Streams Common Composer Cryptography test_LibMailboxSync) +- qt5_use_modules(test_${fname} Network Sql Test Widgets) + set_property(TARGET test_${fname} APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/tests) + if(NOT CMAKE_CROSSCOMPILING) + add_test(test_${fname} test_${fname}) +@@ -759,9 +749,9 @@ if(WITH_TESTS) + enable_testing() + trojita_test(Composer Composer_Submission) + trojita_test(Composer Composer_responses) ++ target_link_libraries(test_Composer_responses Qt5::WebKitWidgets) + trojita_test(Composer Html_formatting) +- qt5_use_modules(test_Composer_responses WebKitWidgets) +- qt5_use_modules(test_Html_formatting WebKitWidgets) ++ target_link_libraries(test_Html_formatting Qt5::WebKitWidgets) + trojita_test(Imap Imap_DisappearingMailboxes) + trojita_test(Imap Imap_Idle) + trojita_test(Imap Imap_LowLevelParser) +-- +2.17.0 + diff --git a/mail-client/trojita/trojita-0.7-r2.ebuild b/mail-client/trojita/trojita-0.7-r2.ebuild index 7bdba08a79cc..8a1979d7b347 100644 --- a/mail-client/trojita/trojita-0.7-r2.ebuild +++ b/mail-client/trojita/trojita-0.7-r2.ebuild @@ -45,7 +45,8 @@ DOCS=( README LICENSE ) PATCHES=( "${FILESDIR}/${P}-gpgme.patch" "${FILESDIR}/${P}-gpg-tests.patch" - ) + "${FILESDIR}/${P}-qt-5.11b3.patch" +) src_prepare() { cmake-utils_src_prepare |