File Start-requiring-NM-1.0.0.patch of Package libNetworkManagerQt4
From 00fb55206b0c5cc51bd187ad7b3261b3866c1d33 Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
Date: Thu, 29 Mar 2018 09:07:11 +0200
Subject: Start requiring NM 1.0.0
---
diff --git a/FindNetworkManager.cmake b/FindNetworkManager.cmake
index ece8835..e5f114d 100644
--- a/FindNetworkManager.cmake
+++ b/FindNetworkManager.cmake
@@ -9,48 +9,49 @@
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
# Copyright (c) 2007, Will Stephenson, <wstephenson@kde.org>
-# Copyright (c) 2015, Jan Grulich, <jgrulich@redhat.com>
-
-# 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 AND (NM-UTIL_INCLUDE_DIRS OR NM-CORE_INCLUDE_DIRS))
+# Copyright (c) 2015-2018, Jan Grulich, <jgrulich@redhat.com>
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of the University nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+
+
+IF (NETWORKMANAGER_INCLUDE_DIRS)
# in cache already
SET(NetworkManager_FIND_QUIETLY TRUE)
-ENDIF (NETWORKMANAGER_INCLUDE_DIRS AND (NM-UTIL_INCLUDE_DIRS OR NM-CORE_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(NETWORKMANAGER libnm)
IF (NETWORKMANAGER_FOUND)
IF (NetworkManager_FIND_VERSION AND ("${NETWORKMANAGER_VERSION}" VERSION_LESS "${NetworkManager_FIND_VERSION}"))
MESSAGE(FATAL_ERROR "NetworkManager ${NETWORKMANAGER_VERSION} is too old, need at least ${NetworkManager_FIND_VERSION}")
ELSE ()
- # Since NetworkManager 1.0.0 we need to find different libraries
- IF (NetworkManager_FIND_VERSION AND ("${NETWORKMANAGER_VERSION}" VERSION_LESS "1.0.0"))
- PKG_SEARCH_MODULE( NM-UTIL libnm-util )
- PKG_SEARCH_MODULE( NM-GLIB libnm-glib )
- IF (NM-UTIL_FOUND AND NM-GLIB_FOUND)
- IF (NOT NetworkManager_FIND_QUIETLY)
- MESSAGE(STATUS "Found libnm-util: ${NM-UTIL_LIBRARY_DIRS}")
- MESSAGE(STATUS "Found libnm-glib: ${NM-GLIB_LIBRARY_DIRS}")
- ENDIF ()
- ELSE ()
- MESSAGE(FATAL_ERROR "Could NOT find libnm-util or libnm-glib, check FindPkgConfig output above!")
- ENDIF ()
- ELSE ()
- PKG_SEARCH_MODULE( NM-CORE libnm )
- IF (NM-CORE_FOUND)
- IF (NOT NetworkManager_FIND_QUIETLY)
- MESSAGE(STATUS "Found libnm-core: ${NM-CORE_LIBRARY_DIRS}")
- ENDIF ()
- ELSE ()
- MESSAGE(FATAL_ERROR "Could NOT find libnm-core, check FindPkgConfig output above!")
- ENDIF ()
+ IF (NOT NetworkManager_FIND_QUIETLY)
+ MESSAGE(STATUS "Found NetworkManager: ${NETWORKMANAGER_LIBRARY_DIRS}")
ENDIF ()
ENDIF ()
ELSE ()
@@ -58,5 +59,5 @@ IF (NOT WIN32)
ENDIF ()
ENDIF (NOT WIN32)
-MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS NM-UTIL_INCLUDE_DIRS NM-GLIB_INCLUDE_DIRS NM-CORE_INCLUDE_DIRS)
+MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS)
--
cgit v1.1