From 25c7d4610e946cdc68b08de7d9126dbd9819d63539319552e7eb6817bb59631e Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 15 Sep 2014 19:45:41 +0000 Subject: [PATCH 1/6] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=14 --- libdbusmenu-qt5.changes | 10 +++ libdbusmenu-qt5.spec | 6 +- ...usmenu-qt_0.9.2+14.04.20131209.orig.tar.gz | 3 - ...usmenu-qt_0.9.3+14.10.20140619.orig.tar.gz | 3 + noqDebug-qWarnings.patch | 87 ++++++++++++++----- 5 files changed, 79 insertions(+), 30 deletions(-) delete mode 100644 libdbusmenu-qt_0.9.2+14.04.20131209.orig.tar.gz create mode 100644 libdbusmenu-qt_0.9.3+14.10.20140619.orig.tar.gz diff --git a/libdbusmenu-qt5.changes b/libdbusmenu-qt5.changes index bef5236..3f07fe0 100644 --- a/libdbusmenu-qt5.changes +++ b/libdbusmenu-qt5.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Mon Sep 15 19:31:29 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 0.9.3+14.10.20140619 + * Users of dbusmenu-qt no longer need to call + include_directories(${dbusmenu-qt5_INCLUDE_DIRS}). + Simply adding dbusmenu-qt5 to the target_link_libraries() + call takes care of defining the include directory. +- Rebase noqDebug-qWarnings.patch + ------------------------------------------------------------------- Mon Jun 2 21:37:10 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/libdbusmenu-qt5.spec b/libdbusmenu-qt5.spec index 7d1a4d1..9049427 100644 --- a/libdbusmenu-qt5.spec +++ b/libdbusmenu-qt5.spec @@ -19,14 +19,14 @@ %define rname libdbusmenu-qt Name: libdbusmenu-qt5 -Version: 0.9.2+14.04.20131209 +Version: 0.9.3+14.10.20140619 Release: 0 Url: https://launchpad.net/libdbusmenu-qt/ Summary: A Qt implementation of the DBusMenu protocol License: LGPL-2.0+ Group: System/Libraries -Source0: http://archive.ubuntu.com/ubuntu/pool/main/libd/%{rname}/%{rname}_%{version}.orig.tar.gz -Source99: baselibs.conf +Source: http://archive.ubuntu.com/ubuntu/pool/main/libd/%{rname}/%{rname}_%{version}.orig.tar.gz +Source1: baselibs.conf # PATCH-FIX-UPSTREAM noqDebug-qWarnings.patch -- libdbusmenu uses it's own qDebug's and qWarnings, # which are useless, and annoy users, so this patch just disables them in release mode Patch1: noqDebug-qWarnings.patch diff --git a/libdbusmenu-qt_0.9.2+14.04.20131209.orig.tar.gz b/libdbusmenu-qt_0.9.2+14.04.20131209.orig.tar.gz deleted file mode 100644 index 8e67d8e..0000000 --- a/libdbusmenu-qt_0.9.2+14.04.20131209.orig.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f7caf94fe27ce146a637af3062aa5bac90caec37cc30cd5ef638e46ccd4f264b -size 45800 diff --git a/libdbusmenu-qt_0.9.3+14.10.20140619.orig.tar.gz b/libdbusmenu-qt_0.9.3+14.10.20140619.orig.tar.gz new file mode 100644 index 0000000..8f2c249 --- /dev/null +++ b/libdbusmenu-qt_0.9.3+14.10.20140619.orig.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e531b29388317f48e22c652c7111e9c7750aa7d429a72742c49a1c8af1e61968 +size 46641 diff --git a/noqDebug-qWarnings.patch b/noqDebug-qWarnings.patch index 8ef4018..58a4708 100644 --- a/noqDebug-qWarnings.patch +++ b/noqDebug-qWarnings.patch @@ -1,7 +1,8 @@ -diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/CMakeLists.txt libdbusmenu-qt-0.9.2+14.04.20131209/CMakeLists.txt ---- libdbusmenu-qt-0.9.2+14.04.20131209.orig/CMakeLists.txt 2013-12-09 03:29:47.000000000 +0100 -+++ libdbusmenu-qt-0.9.2+14.04.20131209/CMakeLists.txt 2013-12-18 21:58:01.847669366 +0100 -@@ -91,7 +91,7 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0ee9154..597a7de 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,7 +91,7 @@ install(FILES ${CMAKE_BINARY_DIR}/dbusmenu-${QT_SUFFIX}.pc add_subdirectory(src) if (NOT USE_QT5) # TODO port tests to Qt5 @@ -10,10 +11,11 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/CMakeLists.txt libdbusmenu-q endif() add_subdirectory(tools) -diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuexporter.cpp libdbusmenu-qt-0.9.2+14.04.20131209/src/dbusmenuexporter.cpp ---- libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuexporter.cpp 2013-12-09 03:29:47.000000000 +0100 -+++ libdbusmenu-qt-0.9.2+14.04.20131209/src/dbusmenuexporter.cpp 2013-12-18 21:59:13.984767528 +0100 -@@ -160,7 +160,9 @@ +diff --git a/src/dbusmenuexporter.cpp b/src/dbusmenuexporter.cpp +index f25718d..8868efb 100644 +--- a/src/dbusmenuexporter.cpp ++++ b/src/dbusmenuexporter.cpp +@@ -160,7 +160,9 @@ void DBusMenuExporterPrivate::fillLayoutItem(DBusMenuLayoutItem *item, QMenu *me Q_FOREACH(QAction *action, menu->actions()) { int actionId = m_idForAction.value(action, -1); if (actionId == -1) { @@ -23,7 +25,7 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuexporter.cpp lib continue; } -@@ -185,7 +187,9 @@ +@@ -185,7 +187,9 @@ void DBusMenuExporterPrivate::addAction(QAction *action, int parentId) { int id = m_idForAction.value(action, -1); if (id != -1) { @@ -33,10 +35,21 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuexporter.cpp lib return; } QVariantMap map = propertiesForAction(action); -diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuimporter.cpp libdbusmenu-qt-0.9.2+14.04.20131209/src/dbusmenuimporter.cpp ---- libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuimporter.cpp 2013-12-09 03:29:47.000000000 +0100 -+++ libdbusmenu-qt-0.9.2+14.04.20131209/src/dbusmenuimporter.cpp 2013-12-18 22:06:44.057140849 +0100 -@@ -191,7 +191,9 @@ +diff --git a/src/dbusmenuimporter.cpp b/src/dbusmenuimporter.cpp +index 2a4c514..2f03729 100644 +--- a/src/dbusmenuimporter.cpp ++++ b/src/dbusmenuimporter.cpp +@@ -94,7 +94,9 @@ public: + QDBusPendingCallWatcher *refresh(int id) + { + #ifdef BENCHMARK ++#ifndef QT_NO_DEBUG + DMDEBUG << "Starting refresh chrono for id" << id; ++#endif + sChrono.start(); + #endif + QDBusPendingCall call = m_interface->asyncCall("GetLayout", id, 1, QStringList()); +@@ -193,7 +195,9 @@ public: updateActionShortcut(action, value); } else if (key == "children-display") { } else { @@ -46,7 +59,7 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuimporter.cpp lib } } -@@ -239,7 +241,9 @@ +@@ -241,7 +245,9 @@ public: action->setProperty(DBUSMENU_PROPERTY_ICON_DATA_HASH, dataHash); QPixmap pix; if (!pix.loadFromData(data)) { @@ -56,7 +69,17 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuimporter.cpp lib action->setIcon(QIcon()); return; } -@@ -390,7 +394,9 @@ +@@ -312,7 +318,9 @@ public: + } + + if (watcher->isError()) { ++#ifndef QT_NO_DEBUG + DMWARNING << watcher->error().message(); ++#endif + return false; + } + +@@ -436,18 +444,24 @@ void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher) QDBusPendingReply reply = *watcher; if (!reply.isValid()) { @@ -66,7 +89,12 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuimporter.cpp lib return; } -@@ -401,7 +407,9 @@ + #ifdef BENCHMARK ++#ifndef QT_NO_DEBUG + DMDEBUG << "- items received:" << sChrono.elapsed() << "ms"; ++#endif + #endif + DBusMenuLayoutItem rootItem = reply.argumentAt<1>(); QMenu *menu = d->menuForId(parentId); if (!menu) { @@ -76,17 +104,27 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuimporter.cpp lib return; } -@@ -494,7 +502,9 @@ +@@ -474,7 +488,9 @@ void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher) + } + } + #ifdef BENCHMARK ++#ifndef QT_NO_DEBUG + DMDEBUG << "- Menu filled:" << sChrono.elapsed() << "ms"; ++#endif + #endif + } + +@@ -513,7 +529,9 @@ void DBusMenuImporter::slotMenuAboutToShow() QPointer guard(this); - if (!waitForWatcher(watcher, ABOUT_TO_SHOW_TIMEOUT)) { + if (!d->waitForWatcher(watcher, ABOUT_TO_SHOW_TIMEOUT)) { +#ifndef QT_NO_DEBUG DMWARNING << "Application did not answer to AboutToShow() before timeout"; +#endif } #ifdef BENCHMARK -@@ -522,7 +532,9 @@ +@@ -541,7 +559,9 @@ void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher * QDBusPendingReply reply = *watcher; if (reply.isError()) { @@ -96,19 +134,20 @@ diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/dbusmenuimporter.cpp lib return; } bool needRefresh = reply.argumentAt<0>(); -@@ -534,7 +546,9 @@ +@@ -553,7 +573,9 @@ void DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher * d->m_idsRefreshedByAboutToShow << id; watcher = d->refresh(id); - if (!waitForWatcher(watcher, REFRESH_TIMEOUT)) { + if (!d->waitForWatcher(watcher, REFRESH_TIMEOUT)) { +#ifndef QT_NO_DEBUG DMWARNING << "Application did not refresh before timeout"; +#endif } } } -diff -Naur libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/debug_p.h libdbusmenu-qt-0.9.2+14.04.20131209/src/debug_p.h ---- libdbusmenu-qt-0.9.2+14.04.20131209.orig/src/debug_p.h 2013-12-09 03:29:47.000000000 +0100 -+++ libdbusmenu-qt-0.9.2+14.04.20131209/src/debug_p.h 2013-12-18 22:02:33.923267953 +0100 +diff --git a/src/debug_p.h b/src/debug_p.h +index bff37bd..ecdd3a5 100644 +--- a/src/debug_p.h ++++ b/src/debug_p.h @@ -36,12 +36,10 @@ #define DMVAR(var) DMDEBUG << #var ":" << var From 26c5c832e34df35b721e3784685e0c1b4806901dff399f5d4e5fd3c5ae9e0cbd Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 15 Sep 2014 19:56:38 +0000 Subject: [PATCH 2/6] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=15 --- cmake-policy.patch | 15 +++++++++++++++ libdbusmenu-qt5.changes | 1 + libdbusmenu-qt5.spec | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 cmake-policy.patch diff --git a/cmake-policy.patch b/cmake-policy.patch new file mode 100644 index 0000000..de6e07b --- /dev/null +++ b/cmake-policy.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 597a7de..38bd7f4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,6 +2,10 @@ project(dbusmenu-qt) + cmake_minimum_required(VERSION 2.8.11) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") + ++if (POLICY CMP0021) ++ cmake_policy(SET CMP0021 OLD) ++endif (POLICY CMP0021) ++ + # Build options + option(WITH_DOC "Build documentation (requires Doxygen)" ON) + diff --git a/libdbusmenu-qt5.changes b/libdbusmenu-qt5.changes index 3f07fe0..da7716c 100644 --- a/libdbusmenu-qt5.changes +++ b/libdbusmenu-qt5.changes @@ -7,6 +7,7 @@ Mon Sep 15 19:31:29 UTC 2014 - hrvoje.senjan@gmail.com Simply adding dbusmenu-qt5 to the target_link_libraries() call takes care of defining the include directory. - Rebase noqDebug-qWarnings.patch +- Added cmake-policy.patch for openSUSE 13.1 ------------------------------------------------------------------- Mon Jun 2 21:37:10 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/libdbusmenu-qt5.spec b/libdbusmenu-qt5.spec index 9049427..268a1a4 100644 --- a/libdbusmenu-qt5.spec +++ b/libdbusmenu-qt5.spec @@ -30,6 +30,8 @@ Source1: baselibs.conf # PATCH-FIX-UPSTREAM noqDebug-qWarnings.patch -- libdbusmenu uses it's own qDebug's and qWarnings, # which are useless, and annoy users, so this patch just disables them in release mode Patch1: noqDebug-qWarnings.patch +# PATCH-FIX-UPSTREAM cmake-policy.patch -- CMake 2.8.12 creates a fatal error on relative include dirs for a target. silence that policy +Patch2: cmake-policy.patch #Needed for DISABLE_FIND_PACKAGE BuildRequires: cmake >= 2.8.6 BuildRequires: doxygen @@ -69,6 +71,7 @@ This package contains development files for libdbusmenu-qt5. %prep %setup -q -n %{rname}-%{version} %patch1 -p1 +%patch2 -p1 # Remove build time references so build-compare can do its work sed -i "s/HTML_TIMESTAMP = YES/HTML_TIMESTAMP = NO/" Doxyfile.in From 43d366bfd00fa754380254bc4a3e8a2f22507c033e940be08fc4d2a1e758d73f Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 15 Sep 2014 20:02:19 +0000 Subject: [PATCH 3/6] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=16 --- cmake-policy.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake-policy.patch b/cmake-policy.patch index de6e07b..187a385 100644 --- a/cmake-policy.patch +++ b/cmake-policy.patch @@ -7,7 +7,7 @@ index 597a7de..38bd7f4 100644 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") +if (POLICY CMP0021) -+ cmake_policy(SET CMP0021 OLD) ++ cmake_policy(SET CMP0021 WARN) +endif (POLICY CMP0021) + # Build options From 966317ffa53dae25b8f2b27281ad0441bd09958467e119ff77f8ca34dd24abba Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 15 Sep 2014 20:05:43 +0000 Subject: [PATCH 4/6] aargh, buggy cmake OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=17 --- cmake-policy.patch | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake-policy.patch b/cmake-policy.patch index 187a385..5a63b9d 100644 --- a/cmake-policy.patch +++ b/cmake-policy.patch @@ -1,14 +1,12 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 597a7de..38bd7f4 100644 +index 597a7de..5185d5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -2,6 +2,10 @@ project(dbusmenu-qt) +@@ -2,6 +2,8 @@ project(dbusmenu-qt) cmake_minimum_required(VERSION 2.8.11) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") -+if (POLICY CMP0021) -+ cmake_policy(SET CMP0021 WARN) -+endif (POLICY CMP0021) ++cmake_policy(SET CMP0021 OLD) + # Build options option(WITH_DOC "Build documentation (requires Doxygen)" ON) From 38291e2932a60a16f26649ed015b5c8fc18ac39c8fb6d152d3e8d2750163dc7e Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 15 Sep 2014 20:11:44 +0000 Subject: [PATCH 5/6] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=18 --- cmake-policy.patch | 13 ------------- full_include_dir.patch | 13 +++++++++++++ libdbusmenu-qt5.changes | 2 +- libdbusmenu-qt5.spec | 6 ++++-- 4 files changed, 18 insertions(+), 16 deletions(-) delete mode 100644 cmake-policy.patch create mode 100644 full_include_dir.patch diff --git a/cmake-policy.patch b/cmake-policy.patch deleted file mode 100644 index 5a63b9d..0000000 --- a/cmake-policy.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 597a7de..5185d5d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -2,6 +2,8 @@ project(dbusmenu-qt) - cmake_minimum_required(VERSION 2.8.11) - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") - -+cmake_policy(SET CMP0021 OLD) -+ - # Build options - option(WITH_DOC "Build documentation (requires Doxygen)" ON) - diff --git a/full_include_dir.patch b/full_include_dir.patch new file mode 100644 index 0000000..30d2ced --- /dev/null +++ b/full_include_dir.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 980e872..abedad7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -95,7 +95,7 @@ endif() + + # Make sure linking to the target adds dbusmenu-qt install directory + target_include_directories(dbusmenu-${QT_SUFFIX} +- INTERFACE "$") ++ INTERFACE "$") + + install(TARGETS dbusmenu-${QT_SUFFIX} + EXPORT dbusmenu-${QT_SUFFIX}-targets diff --git a/libdbusmenu-qt5.changes b/libdbusmenu-qt5.changes index da7716c..2ffb99e 100644 --- a/libdbusmenu-qt5.changes +++ b/libdbusmenu-qt5.changes @@ -7,7 +7,7 @@ Mon Sep 15 19:31:29 UTC 2014 - hrvoje.senjan@gmail.com Simply adding dbusmenu-qt5 to the target_link_libraries() call takes care of defining the include directory. - Rebase noqDebug-qWarnings.patch -- Added cmake-policy.patch for openSUSE 13.1 +- Added full_include_dir.patch for openSUSE 13.1 ------------------------------------------------------------------- Mon Jun 2 21:37:10 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/libdbusmenu-qt5.spec b/libdbusmenu-qt5.spec index 268a1a4..0cb52d1 100644 --- a/libdbusmenu-qt5.spec +++ b/libdbusmenu-qt5.spec @@ -30,8 +30,8 @@ Source1: baselibs.conf # PATCH-FIX-UPSTREAM noqDebug-qWarnings.patch -- libdbusmenu uses it's own qDebug's and qWarnings, # which are useless, and annoy users, so this patch just disables them in release mode Patch1: noqDebug-qWarnings.patch -# PATCH-FIX-UPSTREAM cmake-policy.patch -- CMake 2.8.12 creates a fatal error on relative include dirs for a target. silence that policy -Patch2: cmake-policy.patch +# PATCH-FIX-UPSTREAM full_include_dir.patch -- CMake 2.8.12 creates a fatal error on relative include dirs for a target. silence that policy +Patch2: full_include_dir.patch #Needed for DISABLE_FIND_PACKAGE BuildRequires: cmake >= 2.8.6 BuildRequires: doxygen @@ -71,7 +71,9 @@ This package contains development files for libdbusmenu-qt5. %prep %setup -q -n %{rname}-%{version} %patch1 -p1 +%if 0%{?suse_version} <= 1310 %patch2 -p1 +%endif # Remove build time references so build-compare can do its work sed -i "s/HTML_TIMESTAMP = YES/HTML_TIMESTAMP = NO/" Doxyfile.in From 721b6e0a6283503ffdfd7d01fd073e270738310048eed713a7a7a1977b8ff20d Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Mon, 15 Sep 2014 20:35:59 +0000 Subject: [PATCH 6/6] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt5/libdbusmenu-qt5?expand=0&rev=19 --- full_include_dir.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/full_include_dir.patch b/full_include_dir.patch index 30d2ced..9ae4087 100644 --- a/full_include_dir.patch +++ b/full_include_dir.patch @@ -1,5 +1,5 @@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 980e872..abedad7 100644 +index 980e872..fbcd0b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -95,7 +95,7 @@ endif() @@ -7,7 +7,7 @@ index 980e872..abedad7 100644 # Make sure linking to the target adds dbusmenu-qt install directory target_include_directories(dbusmenu-${QT_SUFFIX} - INTERFACE "$") -+ INTERFACE "$") ++ INTERFACE "$") install(TARGETS dbusmenu-${QT_SUFFIX} EXPORT dbusmenu-${QT_SUFFIX}-targets