commit: 29fa8033e84586abd55419d920590576494de472 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> AuthorDate: Sun Jan 17 12:48:22 2016 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Sun Jan 17 12:48:55 2016 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=29fa8033
kde-apps/libakonadi: Fix testtools patch Package-Manager: portage-2.2.26 .../libakonadi-15.12.0-fix-possible-crash.patch | 59 ---------------------- .../libakonadi-15.12.2-testtools-optional.patch | 57 +++++++++++++++++++++ .../libakonadi/libakonadi-15.12.49.9999.ebuild | 6 +-- kde-apps/libakonadi/libakonadi-9999.ebuild | 6 +-- 4 files changed, 63 insertions(+), 65 deletions(-) diff --git a/kde-apps/libakonadi/files/libakonadi-15.12.0-fix-possible-crash.patch b/kde-apps/libakonadi/files/libakonadi-15.12.0-fix-possible-crash.patch deleted file mode 100644 index 5c3144c..0000000 --- a/kde-apps/libakonadi/files/libakonadi-15.12.0-fix-possible-crash.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Weng Xuetian <[email protected]> -Date: Thu, 17 Dec 2015 16:19:36 +0000 -Subject: Fix possible crash upon application exits (e.g. kmail) -X-Git-Url: http://quickgit.kde.org/?p=kdepimlibs.git&a=commitdiff&h=c6bf33a9018587e96a350bfd0b2bffde1859db27 ---- -Fix possible crash upon application exits (e.g. kmail) - -Qt lambda connection will not automatically disconnect if no context -qobject is provided. Since SessionPrivate is not a qobject, disconnect -the connection in the destructor to prevent accessing deleted object. - -REVIEW: 126395 ---- - - ---- a/src/core/session.cpp -+++ b/src/core/session.cpp -@@ -301,15 +301,16 @@ - // Shutdown the thread before QApplication event loop quits - the - // thread()->wait() mechanism in ConnectionThread dtor crashes sometimes - // when called from QApplication destructor -- QObject::connect(qApp, &QCoreApplication::aboutToQuit, -- [this]() { -- delete connThread; -- connThread = Q_NULLPTR; -- }); -+ connThreadCleanUp = QObject::connect(qApp, &QCoreApplication::aboutToQuit, -+ [this]() { -+ delete connThread; -+ connThread = Q_NULLPTR; -+ }); - } - - SessionPrivate::~SessionPrivate() - { -+ QObject::disconnect(connThreadCleanUp); - delete connThread; - } - - ---- a/src/core/session_p.h -+++ b/src/core/session_p.h -@@ -29,6 +29,7 @@ - - #include <QtCore/QQueue> - #include <QtCore/QThreadStorage> -+#include <QtCore/QMetaObject> - #include <QFile> - - class QIODevice; -@@ -125,6 +126,7 @@ - Session *mParent; - QThread *thread; - ConnectionThread *connThread; -+ QMetaObject::Connection connThreadCleanUp; - QByteArray sessionId; - bool connected; - qint64 theNextTag; - diff --git a/kde-apps/libakonadi/files/libakonadi-15.12.2-testtools-optional.patch b/kde-apps/libakonadi/files/libakonadi-15.12.2-testtools-optional.patch new file mode 100644 index 0000000..e92bd38 --- /dev/null +++ b/kde-apps/libakonadi/files/libakonadi-15.12.2-testtools-optional.patch @@ -0,0 +1,57 @@ +commit 7161f629b39ca84972510eb8333a78c5a5efcec9 +Author: Andreas Sturmlechner <[email protected]> +Date: Sun Jan 17 13:34:17 2016 +0100 + + [libakonadi] Make tools optional + +diff --git a/akonadi/CMakeLists.txt b/akonadi/CMakeLists.txt +index c80db92..e36c0ab 100644 +--- a/akonadi/CMakeLists.txt ++++ b/akonadi/CMakeLists.txt +@@ -43,6 +43,8 @@ else() + set(KF5Akonadi_DATA_DIR "${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_DATADIR_KF5}/akonadi") + endif() + ++option(BUILD_TOOLS "Build and install tools for testing purposes." TRUE) ++ + ########### Find packages ########### + find_package(KF5ItemViews ${KF5_VERSION} CONFIG REQUIRED) + find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED) +@@ -93,12 +95,16 @@ add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII") + configure_file(akonadiprivate_export.h.in "${CMAKE_CURRENT_BINARY_DIR}/akonadiprivate_export.h") + + add_subdirectory(src) +-add_subdirectory(autotests/testrunner) +-add_subdirectory(autotests/testresource) ++# add testrunner (application for managing a self-contained test environment) ++if(BUILD_TOOLS) ++ add_subdirectory(autotests/testrunner) ++ add_subdirectory(autotests/testresource) ++ add_subdirectory(autotests/testsearchplugin) ++endif() + +-if(BUILD_TESTING) +- add_subdirectory(autotests) +- add_subdirectory(tests) ++if(BUILD_TOOLS AND BUILD_TESTING) ++ add_subdirectory(autotests) ++ add_subdirectory(tests) + endif() + ########### CMake Config Files ########### + +diff --git a/akonadi/autotests/CMakeLists.txt b/akonadi/autotests/CMakeLists.txt +index 308cf22..dc69a26 100644 +--- a/akonadi/autotests/CMakeLists.txt ++++ b/akonadi/autotests/CMakeLists.txt +@@ -25,11 +25,6 @@ include_directories( + ${Boost_INCLUDE_DIR} + ) + +-# add testrunner (application for managing a self-contained test +-# environment) +- +-add_subdirectory(testsearchplugin) +- + # convenience macro to add akonadi qtestlib unit-tests + macro(add_akonadi_test _source) + set(_test ${_source}) diff --git a/kde-apps/libakonadi/libakonadi-15.12.49.9999.ebuild b/kde-apps/libakonadi/libakonadi-15.12.49.9999.ebuild index d895446..7890628 100644 --- a/kde-apps/libakonadi/libakonadi-15.12.49.9999.ebuild +++ b/kde-apps/libakonadi/libakonadi-15.12.49.9999.ebuild @@ -60,7 +60,7 @@ else S="${WORKDIR}/${KMNAME}-${PV}/akonadi" fi -PATCHES=( "${FILESDIR}/${PN}-15.11.80-testtools-optional.patch" ) +PATCHES=( "${FILESDIR}/${PN}-15.12.2-testtools-optional.patch" ) src_prepare() { kde5_src_prepare @@ -73,8 +73,8 @@ src_prepare() { src_configure() { local mycmakeargs=( $(cmake-utils_use_find_package designer Qt5Designer) - $(cmake-utils_use_build tools) - $(cmake-utils_use_build test TESTING) + -DBUILD_TESTING=$(usex test) + -DBUILD_TOOLS=$(usex tools) ) kde5_src_configure } diff --git a/kde-apps/libakonadi/libakonadi-9999.ebuild b/kde-apps/libakonadi/libakonadi-9999.ebuild index d895446..7890628 100644 --- a/kde-apps/libakonadi/libakonadi-9999.ebuild +++ b/kde-apps/libakonadi/libakonadi-9999.ebuild @@ -60,7 +60,7 @@ else S="${WORKDIR}/${KMNAME}-${PV}/akonadi" fi -PATCHES=( "${FILESDIR}/${PN}-15.11.80-testtools-optional.patch" ) +PATCHES=( "${FILESDIR}/${PN}-15.12.2-testtools-optional.patch" ) src_prepare() { kde5_src_prepare @@ -73,8 +73,8 @@ src_prepare() { src_configure() { local mycmakeargs=( $(cmake-utils_use_find_package designer Qt5Designer) - $(cmake-utils_use_build tools) - $(cmake-utils_use_build test TESTING) + -DBUILD_TESTING=$(usex test) + -DBUILD_TOOLS=$(usex tools) ) kde5_src_configure }
