[packages/grive] fix detection of libgcrypt >= 1.10

atler atler at pld-linux.org
Mon Aug 12 14:45:29 CEST 2024


commit 288ea23215c9f4bfd06647298f2f3a96affa3819
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Aug 12 14:44:54 2024 +0200

    fix detection of libgcrypt >= 1.10

 grive.spec          |  2 ++
 libgcrypt1.10.patch | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
---
diff --git a/grive.spec b/grive.spec
index 04cb788..c41a59e 100644
--- a/grive.spec
+++ b/grive.spec
@@ -18,6 +18,7 @@ Patch1:		%{name}-bgrive_cmake_fix.patch
 Patch2:		build.patch
 Patch3:		binutils-2.34.patch
 Patch4:		%{name}-json-c-0.14.patch
+Patch5:		libgcrypt1.10.patch
 URL:		https://github.com/Grive/grive
 BuildRequires:	QtCore-devel >= 4
 BuildRequires:	QtGui-devel >= 4
@@ -64,6 +65,7 @@ Graficzny interfejs użytkownika do Grive.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 install -d build
diff --git a/libgcrypt1.10.patch b/libgcrypt1.10.patch
new file mode 100644
index 0000000..c296188
--- /dev/null
+++ b/libgcrypt1.10.patch
@@ -0,0 +1,25 @@
+--- grive-27817e835fe115ebbda5410ec904aa49a2ad01f1/cmake/Modules/FindLibGcrypt.cmake.orig	2013-05-02 18:40:04.000000000 +0200
++++ grive-27817e835fe115ebbda5410ec904aa49a2ad01f1/cmake/Modules/FindLibGcrypt.cmake	2024-08-12 14:38:00.878491532 +0200
+@@ -34,6 +34,22 @@
+   IF(LIBGCRYPT_LIBRARIES AND LIBGCRYPT_CFLAGS)
+     SET(LIBGCRYPT_FOUND TRUE)
+   ENDIF(LIBGCRYPT_LIBRARIES AND LIBGCRYPT_CFLAGS)
++ELSE(LIBGCRYPTCONFIG_EXECUTABLE)
++  FIND_PROGRAM(GPGRTCONFIG_EXECUTABLE NAMES gpgrt-config)
++  IF(GPGRTCONFIG_EXECUTABLE)
++  
++    EXEC_PROGRAM(${GPGRTCONFIG_EXECUTABLE} ARGS libgcrypt --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_LIBRARIES)
++    
++    EXEC_PROGRAM(${GPGRTCONFIG_EXECUTABLE} ARGS libgcrypt --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE LIBGCRYPT_CFLAGS)
++    
++    IF(${LIBGCRYPT_CFLAGS} MATCHES "\n")
++      SET(LIBGCRYPT_CFLAGS " ")
++    ENDIF(${LIBGCRYPT_CFLAGS} MATCHES "\n")
++    
++    IF(LIBGCRYPT_LIBRARIES AND LIBGCRYPT_CFLAGS)
++      SET(LIBGCRYPT_FOUND TRUE)
++    ENDIF(LIBGCRYPT_LIBRARIES AND LIBGCRYPT_CFLAGS)
++  ENDIF(GPGRTCONFIG_EXECUTABLE)
+ 
+ ENDIF(LIBGCRYPTCONFIG_EXECUTABLE)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/grive.git/commitdiff/288ea23215c9f4bfd06647298f2f3a96affa3819



More information about the pld-cvs-commit mailing list