summaryrefslogtreecommitdiff
path: root/user/kgpg/find-gpgme-with-pkg-config-first.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2023-04-12 13:28:54 +0000
committerZach van Rijn <me@zv.io>2023-04-12 13:56:05 +0000
commit1f4732be083815ae27e1694cc7f4784d35d08d6d (patch)
tree41d70fbd02ff94d8cc72258c5a0a80f89000b80b /user/kgpg/find-gpgme-with-pkg-config-first.patch
parent62719523f678e26bd9b5e63088be4ad6f3386023 (diff)
downloadpackages-1f4732be083815ae27e1694cc7f4784d35d08d6d.tar.gz
packages-1f4732be083815ae27e1694cc7f4784d35d08d6d.tar.bz2
packages-1f4732be083815ae27e1694cc7f4784d35d08d6d.tar.xz
packages-1f4732be083815ae27e1694cc7f4784d35d08d6d.zip
user/kgpg: add patch to find gpgme. fixes #1003.
Diffstat (limited to 'user/kgpg/find-gpgme-with-pkg-config-first.patch')
-rw-r--r--user/kgpg/find-gpgme-with-pkg-config-first.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/user/kgpg/find-gpgme-with-pkg-config-first.patch b/user/kgpg/find-gpgme-with-pkg-config-first.patch
new file mode 100644
index 000000000..0073f5731
--- /dev/null
+++ b/user/kgpg/find-gpgme-with-pkg-config-first.patch
@@ -0,0 +1,68 @@
+From 7d6023e1a9d7899f618b1490f2907eff8efe48a5 Mon Sep 17 00:00:00 2001
+From: Rolf Eike Beer <kde@opensource.sf-tec.de>
+Date: Thu, 22 Dec 2022 16:19:07 +0100
+Subject: [PATCH] CMake: search for gpgme with pkg-config first
+
+FIXES: 461720
+---
+ cmake/FindGpgme.cmake | 29 ++++++++++++++---------------
+ 1 file changed, 14 insertions(+), 15 deletions(-)
+
+diff --git a/cmake/FindGpgme.cmake b/cmake/FindGpgme.cmake
+index e3e177f2..81117a9b 100644
+--- a/cmake/FindGpgme.cmake
++++ b/cmake/FindGpgme.cmake
+@@ -27,6 +27,8 @@
+ # Any changes here likely apply there, too.
+ #
+
++find_package(PkgConfig)
++
+ #if this is built-in, please replace, if it isn't, export into a MacroToBool.cmake of it's own
+ macro( macro_bool_to_bool FOUND_VAR )
+ foreach( _current_VAR ${ARGN} )
+@@ -49,8 +51,14 @@ MACRO(MACRO_BOOL_TO_01 FOUND_VAR )
+ ENDFOREACH(_current_VAR)
+ ENDMACRO(MACRO_BOOL_TO_01)
+
++pkg_search_module(PC_GPGME gpgme)
+
+-if ( WIN32 )
++if (PC_GPGME_FOUND)
++ set(GPGME_INCLUDES ${PC_GPGME_INCLUDE_DIRS})
++ set(GPGME_LIBRARIES ${PC_GPGME_LINK_LIBRARIES})
++ set(GPGME_VERSION ${PC_GPGME_VERSION})
++ set(GPGME_LIBRARY_DIR ${PC_GPGME_LIBRARY_DIR})
++elseif ( WIN32 )
+
+ # On Windows, we don't have a gpgme-config script, so we need to
+ # look for the stuff ourselves:
+@@ -353,20 +361,11 @@ foreach(_currentFlavour vanilla glib qt pth pthread)
+ endif()
+ endforeach()
+
+-if ( NOT Gpgme_FIND_QUIETLY )
+-
+- if ( GPGME_FOUND )
+- message( STATUS "Usable gpgme flavors found: ${_gpgme_flavours}" )
+- else()
+- message( STATUS "No usable gpgme flavors found." )
+- endif()
+-
+-endif()
+-
+-if ( Gpgme_FIND_REQUIRED AND NOT GPGME_FOUND )
+- message( FATAL_ERROR "Did not find GPGME" )
+-endif()
+-
++include(FindPackageHandleStandardArgs)
++find_package_handle_standard_args(Gpgme
++ REQUIRED_VARS GPGME_LIBRARIES
++ VERSION_VAR GPGME_VERSION
++ )
+
+ if ( WIN32 )
+ set( _gpgme_homepage "https://www.gpg4win.org" )
+--
+GitLab
+