Source: abiword
Version: 3.0.5~dfsg-3.2
Severity: normal
Tags: patch
User: ametz...@debian.org
Usertags: libgcrypt-config-removal
Control: block 714589 by -1

Hello,

Please switch from using libgcrypt-config to pkg-config to locate
libgcrypt. libgcrypt-config will be dropped in the next libgcrypt major
release.

Upstream's AM_PATH_LIBGCRYPT() nowadays uses gpgrt-config iff
AM_PATH_GPG_ERROR() is also used. However a) abiword ships an old copy of
libgcrypt.m4 so the newer code is not used by autoreconf and b) abiword
does not use AM_PATH_GPG_ERROR(). Find attached a trivial patch to
simply switch to pkg-config (which is a lot faster than gpgrt-config.)

cu Andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
Description: Use pkg-config to locate gcrypt
 abiword has an old copy AM_PATH_LIBGCRYPT that alsways uses libgcrypt-config.
 Newer versions of that macro would use gpgrt-config when used with
 AM_PATH_GPG_ERROR() which abiword does not.
 pkgconf does the same job faster.
Author: Andreas Metzler <ametz...@debian.org>
Origin: vendor
Last-Update: 2024-05-11

--- a/configure.ac
+++ b/configure.ac
@@ -982,19 +982,16 @@ fi
 AM_CONDITIONAL(DEBUG, test "$abi_cv_debug" = "yes")
 
 #
 # Optional dependencies handling
 #
-AM_PATH_LIBGCRYPT( 1.4.5,
-		   [
-		   abi_cv_gcrypt=no
- 		   AC_DEFINE([HAVE_GCRYPT], [1], [Use gcrypt for the cryptos])
-		   ],
-		   [
-		   abi_cv_gcrypt=yes
-		   ] )
-AM_CONDITIONAL(HAVE_GCRYPT, test "$abi_cv_gcrypt" = "yes")
+PKG_CHECK_MODULES([LIBGCRYPT], [libgcrypt >= 1.4.5],
+	   [AC_DEFINE([HAVE_GCRYPT], [1], [Use gcrypt for the cryptos])]
+	   gcryptfound="yes",
+	   [AC_MSG_NOTICE([gcrypt not found])]
+	   gcryptfound="no")
+AM_CONDITIONAL(HAVE_GCRYPT, test "$gcryptfound" = "yes")
 
 if test "$abi_cv_gnomevfs" = "yes"; then 	 
     AC_DEFINE([WITH_GNOMEVFS], [1], [Define if using gnome-vfs]) 	 
 fi 	 
 	

Reply via email to