File 0001-Don-t-search-for-and-link-to-libcln-when-using-libqa.patch of Package plasma5-workspace

From 78663165b6b969493577d5e9cd8d5213464445b5 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Tue, 29 Aug 2017 08:24:30 +0200
Subject: [PATCH] Don't search for and link to libcln when using
 libqalculate>=2.0

Plasma doesn't use any cln code directly, only via libqalculate. In version 2.0, libqalculate dropped cln in favor of gmp, so the cln dependency
becomes unnecessary.

Differential Revision: https://phabricator.kde.org/D7590
---
 cmake/FindQalculate.cmake | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/cmake/FindQalculate.cmake b/cmake/FindQalculate.cmake
index 53bd302e..b8e74f45 100644
--- a/cmake/FindQalculate.cmake
+++ b/cmake/FindQalculate.cmake
@@ -51,7 +51,9 @@ else(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES)
       pkg_check_modules(_pc_QALCULATE libqalculate)
     endif(QALCULATE_MIN_VERSION)
 
-    pkg_check_modules(_pc_CLN cln)
+    if(${_pc_QALCULATE_VERSION} VERSION_LESS 2.0.0)
+      pkg_check_modules(_pc_CLN cln)
+    endif()
 
     if(_pc_QALCULATE_FOUND)
       set(QALCULATE_CFLAGS ${_pc_QALCULATE_CFLAGS})
@@ -73,13 +75,15 @@ else(QALCULATE_CFLAGS AND QALCULATE_LIBRARIES)
       ${INCLUDE_INSTALL_DIR}
     )
 
-    find_library(CLN_LIBRARIES
-      NAMES
-      cln
-      PATHS
-      ${_pc_CLN_LIBRARY_DIRS}
-      ${LIB_INSTALL_DIR}
-    )
+    if(${_pc_QALCULATE_VERSION} VERSION_LESS 2.0.0)
+      find_library(CLN_LIBRARIES
+        NAMES
+        cln
+        PATHS
+        ${_pc_CLN_LIBRARY_DIRS}
+        ${LIB_INSTALL_DIR}
+      )
+    endif()
 
   else(NOT WIN32)
     # XXX: currently no libqalculate on windows
-- 
2.14.1

openSUSE Build Service is sponsored by