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

atler atler at pld-linux.org
Mon Aug 12 14:47:31 CEST 2024


commit 9bd7e2c4afb55f11d04f0e963ae555062976e99d
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Aug 12 14:47:19 2024 +0200

    fix detection of libgcrypt >= 1.10

 grive2.spec         |  2 ++
 libgcrypt1.10.patch | 25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+)
---
diff --git a/grive2.spec b/grive2.spec
index 6cba0c3..314f8ec 100644
--- a/grive2.spec
+++ b/grive2.spec
@@ -10,6 +10,7 @@ Source0:	https://github.com/vitalif/grive2/archive/v%{version}/%{name}-%{version
 # Source0-md5:	2ffb02ae2ddaba51fc8f31bb322efd93
 Patch0:		binutils-2.34.patch
 Patch1:		missing-includes.patch
+Patch2:		libgcrypt1.10.patch
 URL:		https://github.com/vitalif/grive2
 BuildRequires:	binutils-devel
 BuildRequires:	boost-devel >= 1.40.0
@@ -39,6 +40,7 @@ Google Document List.
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -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/grive2.git/commitdiff/9bd7e2c4afb55f11d04f0e963ae555062976e99d



More information about the pld-cvs-commit mailing list