[arch-commits] Commit in kdelibs4support/trunk (2 files)

Antonio Rojas arojas at archlinux.org
Tue Sep 17 09:50:19 UTC 2019


    Date: Tuesday, September 17, 2019 @ 09:50:19
  Author: arojas
Revision: 362980

Fix the NetworkManager backend

Added:
  kdelibs4support/trunk/kdelibs4support-nm-1.20.patch
Modified:
  kdelibs4support/trunk/PKGBUILD

-------------------------------+
 PKGBUILD                      |   11 ++++-
 kdelibs4support-nm-1.20.patch |   76 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 84 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-09-17 07:37:21 UTC (rev 362979)
+++ PKGBUILD	2019-09-17 09:50:19 UTC (rev 362980)
@@ -4,7 +4,7 @@
 
 pkgname=kdelibs4support
 pkgver=5.62.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Porting aid from KDELibs4'
 arch=(x86_64)
 url='https://community.kde.org/Frameworks'
@@ -12,13 +12,18 @@
 depends=(kunitconversion kitemmodels kemoticons kded kparts)
 makedepends=(extra-cmake-modules kdoctools qt5-tools networkmanager perl-uri kdesignerplugin)
 groups=(kf5-aids)
-source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/$pkgname-$pkgver.tar.xz"{,.sig})
+source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/portingAids/$pkgname-$pkgver.tar.xz"{,.sig}
+        kdelibs4support-nm-1.20.patch)
 sha256sums=('9cc10b4727b8ee3bae46af796e7da5d6ae620c543278814176a389ea178595ed'
-            'SKIP')
+            'SKIP'
+            '969ced5045f924713b9febc4c2cd6f2567b57404f7aac5f32b2cb4e7461925b1')
 validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure at kde.org>
 
 prepare() {
   mkdir -p build
+
+  cd $pkgname-$pkgver
+  patch -p1 -i ../kdelibs4support-nm-1.20.patch # Detect NetworkManager 1.20
 }
 
 build() {

Added: kdelibs4support-nm-1.20.patch
===================================================================
--- kdelibs4support-nm-1.20.patch	                        (rev 0)
+++ kdelibs4support-nm-1.20.patch	2019-09-17 09:50:19 UTC (rev 362980)
@@ -0,0 +1,76 @@
+diff --git a/cmake/modules/FindNetworkManager.cmake b/cmake/modules/FindNetworkManager.cmake
+index ced2017c..a82d43da 100644
+--- a/cmake/modules/FindNetworkManager.cmake
++++ b/cmake/modules/FindNetworkManager.cmake
+@@ -14,29 +14,27 @@
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+ 
+ 
+-IF (NETWORKMANAGER_INCLUDE_DIRS AND NM-UTIL_INCLUDE_DIRS)
++IF (NETWORKMANAGER_INCLUDE_DIRS)
+    # in cache already
+    SET(NetworkManager_FIND_QUIETLY TRUE)
+-ENDIF (NETWORKMANAGER_INCLUDE_DIRS AND NM-UTIL_INCLUDE_DIRS)
++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 NetworkManager )
+-   PKG_SEARCH_MODULE( NM-UTIL libnm-util )
++   PKG_SEARCH_MODULE( NETWORKMANAGER libnm )
+ ENDIF (NOT WIN32)
+ 
+-IF (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND)
++IF (NETWORKMANAGER_FOUND)
+    IF (NOT NetworkManager_FIND_QUIETLY)
+       MESSAGE(STATUS "Found NetworkManager ${NETWORKMANAGER_VERSION}: ${NETWORKMANAGER_LIBRARY_DIRS}")
+-      MESSAGE(STATUS "Found libnm-util: ${NM-UTIL_LIBRARY_DIRS}")
+    ENDIF (NOT NetworkManager_FIND_QUIETLY)
+-ELSE (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND)
++ELSE (NETWORKMANAGER_FOUND)
+    IF (NetworkManager_FIND_REQUIRED)
+-      MESSAGE(FATAL_ERROR "Could NOT find NetworkManager or libnm-util, check FindPkgConfig output above!")
++      MESSAGE(FATAL_ERROR "Could NOT find NetworkManager, check FindPkgConfig output above!")
+    ENDIF (NetworkManager_FIND_REQUIRED)
+-ENDIF (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND)
++ENDIF (NETWORKMANAGER_FOUND)
+ 
+-MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS NM-UTIL_INCLUDE_DIRS)
++MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS)
+ 
+diff --git a/src/solid-networkstatus/kded/CMakeLists.txt b/src/solid-networkstatus/kded/CMakeLists.txt
+index 9fa30651..e8d33d74 100644
+--- a/src/solid-networkstatus/kded/CMakeLists.txt
++++ b/src/solid-networkstatus/kded/CMakeLists.txt
+@@ -16,12 +16,10 @@ set_package_properties(NetworkManager PROPERTIES DESCRIPTION "The NetworkManager
+                       )
+ 
+ if(NETWORKMANAGER_FOUND)
+-    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()
++    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()
+ 
+ 
+diff --git a/src/solid-networkstatus/kded/networkmanagerstatus.h b/src/solid-networkstatus/kded/networkmanagerstatus.h
+index bbe0879a..2104abd8 100644
+--- a/src/solid-networkstatus/kded/networkmanagerstatus.h
++++ b/src/solid-networkstatus/kded/networkmanagerstatus.h
+@@ -38,7 +38,7 @@ public:
+     /* reimp */ bool isSupported() const;
+     /* reimp */ QString serviceName() const;
+ 
+-private slots:
++private Q_SLOTS:
+     void nmStateChanged( uint nmState );
+ 
+ private:


More information about the arch-commits mailing list