summarylogtreecommitdiffstats
path: root/0001-Replace-libgcrypt-configure-with-pkg-config.patch
blob: 48ac6ec8a4757e2ab195e687bff2a1370d891a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 467344ffc31eda6eb44d95123615942921c83389 Mon Sep 17 00:00:00 2001
From: Denis Speransky <speranskiy@gmx.com>
Date: Sun, 17 Nov 2024 08:50:27 +0100
Subject: [PATCH] migrate to pkg-configure

---
 configure | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index fd8d363a..cef792a1 100755
--- a/configure
+++ b/configure
@@ -402,8 +402,8 @@ detect_gnutls()
 {
 	if $PKG_CONFIG --exists gnutls; then
 		cat <<EOF >>Makefile.settings
-EFLAGS+=$($PKG_CONFIG --libs gnutls) $(libgcrypt-config --libs)
-CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(libgcrypt-config --cflags)
+EFLAGS+=$($PKG_CONFIG --libs gnutls) $(pkg-config --libs libgcrypt)
+CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(pkg-config --cflags libgcrypt)
 EOF
 		ssl=gnutls
 		if ! $PKG_CONFIG gnutls --atleast-version=2.8; then
@@ -413,8 +413,8 @@ EOF
 		ret=1
 	elif libgnutls-config --version > /dev/null 2> /dev/null; then
 		cat <<EOF >>Makefile.settings
-EFLAGS+=$(libgnutls-config --libs) $(libgcrypt-config --libs)
-CFLAGS+=$(libgnutls-config --cflags) $(libgcrypt-config --cflags)
+EFLAGS+=$($PKG_CONFIG --libs gnutls) $(pkg-config --libs libgcrypt)
+CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(pkg-config --cflags libgcrypt)
 EOF
 		
 		ssl=gnutls
@@ -762,15 +762,15 @@ fi
 if [ "$otr" = 1 ]; then
 	# BI == built-in
 	echo '#define OTR_BI' >> config.h
-	echo "EFLAGS+=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings
-	echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings
+	echo "EFLAGS+=$($PKG_CONFIG --libs gnutls) $(pkg-config --libs libgcrypt)" >> Makefile.settings
+	echo "CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(pkg-config --cflags libgcrypt)" >> Makefile.settings
 	echo 'OTR_BI=otr.o' >> Makefile.settings
 elif [ "$otr" = "plugin" ]; then
 	# for some mysterious reason beyond the comprehension of my mortal mind,
 	# the libgcrypt flags aren't needed when building as plugin. add them anyway.
 	echo '#define OTR_PI' >> config.h
-	echo "OTRFLAGS=$($PKG_CONFIG --libs libotr) $(libgcrypt-config --libs)" >> Makefile.settings
-	echo "CFLAGS+=$($PKG_CONFIG --cflags libotr) $(libgcrypt-config --cflags)" >> Makefile.settings
+	echo "EFLAGS+=$($PKG_CONFIG --libs gnutls) $(pkg-config --libs libgcrypt)" >> Makefile.settings
+	echo "CFLAGS+=$($PKG_CONFIG --cflags gnutls) $(pkg-config --cflags libgcrypt)" >> Makefile.settings
 	echo 'OTR_PI=otr.so' >> Makefile.settings
 fi
 
-- 
2.47.0