[packages/collectd] fix libgcrypt >= 1.11 detection

atler atler at pld-linux.org
Mon Jul 1 14:04:29 CEST 2024


commit a8931168d24e5aaeda638cdee8b8efda6a6a0022
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jul 1 13:12:50 2024 +0200

    fix libgcrypt >= 1.11 detection

 collectd.spec       |  2 ++
 libgcrypt1.11.patch | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
---
diff --git a/collectd.spec b/collectd.spec
index 5798090..554dc17 100644
--- a/collectd.spec
+++ b/collectd.spec
@@ -204,6 +204,7 @@ Source11:	%{name}-rrdtool.conf
 Patch0:		%{name}-collection.patch
 Patch1:		glibc-2.36.patch
 Patch2:		noquote.patch
+Patch3:		libgcrypt1.11.patch
 URL:		http://collectd.org/
 %{?with_ipmi:BuildRequires:	OpenIPMI-devel >= 2.0.14-3}
 BuildRequires:	autoconf
@@ -1375,6 +1376,7 @@ Perl files from Collectd package
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %{__libtoolize} --ltdl
diff --git a/libgcrypt1.11.patch b/libgcrypt1.11.patch
new file mode 100644
index 0000000..cb81e24
--- /dev/null
+++ b/libgcrypt1.11.patch
@@ -0,0 +1,38 @@
+--- collectd-5.9.2/configure.ac.orig	2019-10-01 14:00:47.000000000 +0200
++++ collectd-5.9.2/configure.ac	2024-07-01 13:03:11.069669675 +0200
+@@ -2578,23 +2578,33 @@
+       GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
+       with_libgcrypt="yes"
+     else
++      with_gpgrt_config="gpgrt-config"
+       with_libgcrypt_config="gcrypt-config"
+       with_libgcrypt="$withval"
+     fi; fi; fi
+   ],
+   [
+     with_libgcrypt_config="libgcrypt-config"
++    with_gpgrt_config="gpgrt-config"
+     with_libgcrypt="yes"
+   ]
+ )
+ 
+ if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"; then
+   if test "x$GCRYPT_CPPFLAGS" = "x"; then
+-    GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
++    if $with_gpgrt_config libgcrypt --exists >/dev/null 2>&1; then
++      GCRYPT_CPPFLAGS=`"$with_gpgrt_config" libgcrypt --cflags 2>/dev/null`
++    else
++      GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
++    fi
+   fi
+ 
+   if test "x$GCRYPT_LIBS" = "x"; then
+-    GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
++    if $with_gpgrt_config libgcrypt --exists >/dev/null 2>&1; then
++      GCRYPT_LIBS=`"$with_gpgrt_config" libgcrypt --libs 2>/dev/null`
++    else
++      GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
++    fi
+   fi
+ fi
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/collectd.git/commitdiff/a8931168d24e5aaeda638cdee8b8efda6a6a0022



More information about the pld-cvs-commit mailing list