From dc6b11f4cc6035b4701e1d7f7c91b2f45757e7a2 Mon Sep 17 00:00:00 2001
From: Alejandro Enedino Hernandez Samaniego
 <alejandro@enedino.org>
Date: Wed, 26 Feb 2020 13:55:16 -0800
Subject: [PATCH] use pkg-config for gcrypt instead

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>

Upstream-Status: Inappropriate [oe-specific]

---
 cmake/FindGCRYPT.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: weechat-2.7.1/cmake/FindGCRYPT.cmake
===================================================================
--- weechat-2.7.1.orig/cmake/FindGCRYPT.cmake
+++ weechat-2.7.1/cmake/FindGCRYPT.cmake
@@ -27,15 +27,15 @@
 #  GCRYPT_LDFLAGS = ldflags to use to compile
 #
 
-find_program(LIBGCRYPT_CONFIG_EXECUTABLE NAMES libgcrypt-config)
+find_program(LIBGCRYPT_CONFIG_EXECUTABLE NAMES pkg-config)
 
 set(GCRYPT_LDFLAGS)
 set(GCRYPT_CFLAGS)
 
 if(LIBGCRYPT_CONFIG_EXECUTABLE)
 
-  execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
-  execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+  execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} libgcrypt --libs RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)
+  execute_process(COMMAND ${LIBGCRYPT_CONFIG_EXECUTABLE} libgcrypt --cflags RESULT_VARIABLE _return_VALUE OUTPUT_VARIABLE GCRYPT_CFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET)

   if(NOT DEFINED ${GCRYPT_CFLAGS})
     set(GCRYPT_CFLAGS " ")
