Use pkg-config to locate libgcrypt
Debian ships an own patch here https://sources.debian.org/src/purple-lurch/0.7.0-2.1/debian/patches/libgcrypt-pkgconfig.diff/ to fix purple-lurch: FTBFS against libgcrypt 1.11.
This seems to be required because libgcrypt 1.11 does not ship libgcrypt-config anymore which is still used here:
https://github.com/gkdr/lurch/blob/v0.7.0/Makefile#L7
The patch is the following, maybe something for integrating into this project directly?
Description: Use pkg-config to locate libgcrypt
Author: Andreas Metzler <[email protected]>
Bug-Debian: https://bugs.debian.org/1071952
Last-Update: 2024-07-09
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,10 @@
#
CC ?= gcc
PKG_CONFIG ?= pkg-config
XML2_CONFIG ?= xml2-config
-LIBGCRYPT_CONFIG ?= libgcrypt-config
MKDIR = mkdir
MKDIR_P = mkdir -p
INSTALL = install
INSTALL_LIB = $(INSTALL) -m 755
@@ -36,11 +35,11 @@ LIBSIGNAL_PROTOCOL_CFLAGS = $(shell $(PK
LIBSIGNAL_PROTOCOL_LDFLAGS = $(shell $(PKG_CONFIG) --cflags libsignal-protocol-c)
XML2_CFLAGS ?= $(shell $(XML2_CONFIG) --cflags)
XML2_LDFLAGS ?= $(shell $(XML2_CONFIG) --libs)
-LIBGCRYPT_LDFLAGS ?= $(shell $(LIBGCRYPT_CONFIG) --libs)
+LIBGCRYPT_LDFLAGS ?= $(shell $(PKG_CONFIG) --libs libgcrypt)
USE_DYNAMIC_LIBS=libsignal-protocol-c libaxc libomemo
USE_DYNAMIC_LIBS:=$(shell pkg-config --exists $(USE_DYNAMIC_LIBS) && \
echo '$(USE_DYNAMIC_LIBS)')
Hi @iasdeoupxe,
Thanks for telling me about it. Do you happen to know if that's a Debian specific change or if this can be generally applied?
Not really familiar but did some search and found this:
rsyslog/rsyslog#5405
which has:
Problem is
libgcrypt-configwas dropped bylibgcryptrecently. This appears to have been planned for at least a year.
The relevant bug report also has:
Please switch from using libgcrypt-config to pkg-config to locate libgcrypt. libgcrypt-config will be dropped in the next libgcrypt major release.
so it seems it is a libgcrypt change not specific to Debian IIUC.
Thank you for looking into it! Seems like a sensible change, then.