Am 14.04.2018 um 15:21 schrieb Michael Biebl: > I tried updating solid-networkstartus to use QT_NO_KEYWORDS and the Q_ > macros, but ran into a problem. The QNtrack headers use the slots > keyword, so if I set -DQT_NO_KEYWORDS, > solid-networkstatus/kded/ntracknetworkstate.cpp fails to compile. > > So while I could get the networkmanager backend compile successfully > with the attached patch, I had to disable QNtrack support.
I found a way to avoid that situation. As networkmanagerstatus.cpp only uses the D-Bus interface, using #include <nm-dbus-interface.h> instead of #include <NetworkManager.h> was sufficient and it avoids that gio related headers are included, so -DQT_NO_KEYWORDS is not necessary. Lubo, as NM upstream, wdyt about using nm-dbus-interface.h directly instead of the include-all NetworkManager.h? v2 of the patch is attached. Regards, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
diff -Nru kde-runtime-17.08.3/debian/changelog kde-runtime-17.08.3/debian/changelog --- kde-runtime-17.08.3/debian/changelog 2018-01-11 09:22:25.000000000 +0100 +++ kde-runtime-17.08.3/debian/changelog 2018-04-14 15:02:04.000000000 +0200 @@ -1,3 +1,12 @@ +kde-runtime (4:17.08.3-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Update solid-networkstatus to use libnm. (Closes: #862883) + This requires the use of -DQT_NO_KEYWORDS which is not compatible with + QNtrack, so disable support for that backend. + + -- Michael Biebl <bi...@debian.org> Sat, 14 Apr 2018 13:02:04 +0000 + kde-runtime (4:17.08.3-1) unstable; urgency=medium * Team upload. diff -Nru kde-runtime-17.08.3/debian/control kde-runtime-17.08.3/debian/control --- kde-runtime-17.08.3/debian/control 2018-01-06 11:49:18.000000000 +0100 +++ kde-runtime-17.08.3/debian/control 2018-04-14 15:02:04.000000000 +0200 @@ -24,7 +24,7 @@ libjpeg-dev, libkactivities-dev, liblzma-dev, - libnm-util-dev (>= 0.7) [linux-any], + libnm-dev (>= 1.0.0) [linux-any], libntrack-qt4-dev [linux-any], libopenexr-dev, libphonon-dev (>= 4:4.6.0really4.4.3), @@ -35,7 +35,6 @@ libwebp-dev, libx11-dev, libxcursor-dev, - network-manager-dev (>= 0.7.0) [linux-any], pkg-config, pkg-kde-tools (>= 0.12), shared-mime-info, diff -Nru kde-runtime-17.08.3/debian/patches/cmake-add-NetworkManager-module.patch kde-runtime-17.08.3/debian/patches/cmake-add-NetworkManager-module.patch --- kde-runtime-17.08.3/debian/patches/cmake-add-NetworkManager-module.patch 1970-01-01 01:00:00.000000000 +0100 +++ kde-runtime-17.08.3/debian/patches/cmake-add-NetworkManager-module.patch 2018-04-14 15:02:04.000000000 +0200 @@ -0,0 +1,56 @@ +From 5711ab8b4b053e5d2f4f0b5831ff2a1d37cdf9fa Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel <lkund...@v3.sk> +Date: Tue, 19 Dec 2017 19:45:23 +0100 +Subject: [PATCH] cmake: add NetworkManager module + +This one looks for libnm as opposed to the deprecated libnm-glib. +--- + cmake/modules/FindNetworkManager.cmake | 40 ++++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) + create mode 100644 cmake/modules/FindNetworkManager.cmake + +Index: kde-runtime-17.08.3/cmake/modules/FindNetworkManager.cmake +=================================================================== +--- /dev/null ++++ kde-runtime-17.08.3/cmake/modules/FindNetworkManager.cmake +@@ -0,0 +1,40 @@ ++# - Try to find NetworkManager ++# Once done this will define ++# ++# NETWORKMANAGER_FOUND - system has NetworkManager ++# NETWORKMANAGER_INCLUDE_DIRS - the NetworkManager include directories ++# NETWORKMANAGER_LIBRARIES - the libraries needed to use NetworkManager ++# NETWORKMANAGER_CFLAGS - Compiler switches required for using NetworkManager ++# NETWORKMANAGER_VERSION - version number of NetworkManager ++ ++# Copyright (c) 2006, Alexander Neundorf, <neund...@kde.org> ++# Copyright (c) 2007, Will Stephenson, <wstephen...@kde.org> ++# ++# Redistribution and use is allowed according to the terms of the BSD license. ++# For details see the accompanying COPYING-CMAKE-SCRIPTS file. ++ ++ ++IF (NETWORKMANAGER_INCLUDE_DIRS) ++ # in cache already ++ SET(NetworkManager_FIND_QUIETLY TRUE) ++ENDIF (NETWORKMANAGER_INCLUDE_DIRS) ++ ++IF (NOT WIN32) ++ # use pkg-config to get the directories and then use these values ++ # in the FIND_PATH() and FIND_LIBRARY() calls ++ find_package(PkgConfig) ++ PKG_SEARCH_MODULE( NETWORKMANAGER libnm ) ++ENDIF (NOT WIN32) ++ ++IF (NETWORKMANAGER_FOUND) ++ IF (NOT NetworkManager_FIND_QUIETLY) ++ MESSAGE(STATUS "Found libnm ${NETWORKMANAGER_VERSION}: ${NETWORKMANAGER_LIBRARY_DIRS}") ++ ENDIF (NOT NetworkManager_FIND_QUIETLY) ++ELSE (NETWORKMANAGER_FOUND) ++ IF (NetworkManager_FIND_REQUIRED) ++ MESSAGE(FATAL_ERROR "Could NOT find libnm, check FindPkgConfig output above!") ++ ENDIF (NetworkManager_FIND_REQUIRED) ++ENDIF (NETWORKMANAGER_FOUND) ++ ++MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS) ++ diff -Nru kde-runtime-17.08.3/debian/patches/libnm-1.0.0.patch kde-runtime-17.08.3/debian/patches/libnm-1.0.0.patch --- kde-runtime-17.08.3/debian/patches/libnm-1.0.0.patch 1970-01-01 01:00:00.000000000 +0100 +++ kde-runtime-17.08.3/debian/patches/libnm-1.0.0.patch 2018-04-14 15:02:04.000000000 +0200 @@ -0,0 +1,72 @@ +Index: kde-runtime-17.08.3/solid-networkstatus/kded/networkmanagerstatus.cpp +=================================================================== +--- kde-runtime-17.08.3.orig/solid-networkstatus/kded/networkmanagerstatus.cpp 2018-04-14 21:08:42.199315782 +0200 ++++ kde-runtime-17.08.3/solid-networkstatus/kded/networkmanagerstatus.cpp 2018-04-14 21:08:52.263504608 +0200 +@@ -28,11 +28,7 @@ + + #include <QtDBus/QDBusReply> + +-#include <NetworkManager.h> +- +-#if !defined(NM_CHECK_VERSION) +- #define NM_CHECK_VERSION(x,y,z) 0 +-#endif ++#include <nm-dbus-interface.h> + + NetworkManagerStatus::NetworkManagerStatus( QObject *parent ) + : SystemStatusInterface( parent ), +@@ -85,23 +81,17 @@ + case NM_STATE_CONNECTING: + status = Solid::Networking::Connecting; + break; +-#if NM_CHECK_VERSION(0,8,992) + case NM_STATE_CONNECTED_LOCAL: + case NM_STATE_CONNECTED_SITE: + case NM_STATE_CONNECTED_GLOBAL: +-#else +- case NM_STATE_CONNECTED: +-#endif + status = Solid::Networking::Connected; + break; + case NM_STATE_DISCONNECTED: + status = Solid::Networking::Unconnected; + break; +-#if NM_CHECK_VERSION(0,8,992) + case NM_STATE_DISCONNECTING: + status = Solid::Networking::Disconnecting; + break; +-#endif + } + + return status; +Index: kde-runtime-17.08.3/solid-networkstatus/kded/CMakeLists.txt +=================================================================== +--- kde-runtime-17.08.3.orig/solid-networkstatus/kded/CMakeLists.txt 2018-04-14 21:08:42.199315782 +0200 ++++ kde-runtime-17.08.3/solid-networkstatus/kded/CMakeLists.txt 2018-04-14 21:09:07.151783944 +0200 +@@ -8,7 +8,7 @@ + wicdcustomtypes.cpp + ) + +-macro_optional_find_package(NetworkManager) ++macro_optional_find_package(NetworkManager 1.0.0) + set_package_properties(NetworkManager PROPERTIES DESCRIPTION "The NetworkManager headers" + URL "http://projects.gnome.org/NetworkManager" + TYPE OPTIONAL +@@ -22,13 +22,10 @@ + if (GLIB_PKG_FOUND) + include_directories(${GLIB_PKG_INCLUDE_DIRS}) + endif() +- macro_ensure_version("0.7.0" ${NETWORKMANAGER_VERSION} NM_0_7) +- if(NM_0_7) +- MESSAGE(STATUS "Adding in-process NetworkManager service-wart to kded module") +- set(kded_networkstatus_PART_SRCS ${kded_networkstatus_PART_SRCS} networkmanagerstatus.cpp) +- include_directories(${NETWORKMANAGER_INCLUDE_DIRS}) +- add_definitions(-DNM_BACKEND_ENABLED) +- endif(NM_0_7) ++ MESSAGE(STATUS "Adding in-process NetworkManager service-wart to kded module") ++ set(kded_networkstatus_PART_SRCS ${kded_networkstatus_PART_SRCS} networkmanagerstatus.cpp) ++ include_directories(${NETWORKMANAGER_INCLUDE_DIRS}) ++ add_definitions(-DNM_BACKEND_ENABLED) + endif(NETWORKMANAGER_FOUND) + + macro_optional_find_package(QNtrack) diff -Nru kde-runtime-17.08.3/debian/patches/series kde-runtime-17.08.3/debian/patches/series --- kde-runtime-17.08.3/debian/patches/series 2017-05-22 19:34:05.000000000 +0200 +++ kde-runtime-17.08.3/debian/patches/series 2018-04-14 15:02:04.000000000 +0200 @@ -8,3 +8,5 @@ add_glib_for_nm hurd.diff Make-sure-people-are-not-trying-to-sneak-invisible-charac.patch +cmake-add-NetworkManager-module.patch +libnm-1.0.0.patch
signature.asc
Description: OpenPGP digital signature