summaryrefslogtreecommitdiffstats
path: root/meta-app-framework/recipes-support/xmlsec1/xmlsec1/Only-require-libxslt-in-.pc-files-when-necessary.patch
blob: c92df77f0a5f9afb89655aa6de1d9723684194de (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
From 1e39acf581ef47876b058da41774cbc92560d797 Mon Sep 17 00:00:00 2001
From: Manuel Bachmann <manuel.bachmann@iot.bzh>
Date: Wed, 27 Jan 2016 14:16:40 +0100
Subject: [PATCH] Only require libxslt in .pc files when necessary

If we build xmlsec without libxslt ("--without-libxslt" at
configure time), dependent packages will still require it
because it is unconditionally mentioned in .pc files (used
by pkg-config).

We now make sure that this dependency is mentioned only if
the configure script validates libxslt presence.

Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
---
 configure.in         | 4 ++++
 xmlsec-gcrypt.pc.in  | 2 +-
 xmlsec-gnutls.pc.in  | 2 +-
 xmlsec-nss.pc.in     | 2 +-
 xmlsec-openssl.pc.in | 2 +-
 xmlsec.pc.in         | 2 +-
 6 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/configure.in b/configure.in
index 7d976d0..a8350a9 100644
--- a/configure.in
+++ b/configure.in
@@ -255,6 +255,7 @@ dnl ==========================================================================
 dnl find libxslt
 dnl ==========================================================================
 XMLSEC_NO_LIBXSLT="1"
+LIBXSLT_COND="libxslt >="
 LIBXSLT_MIN_VERSION=1.0.20
 LIBXSLT_CONFIG="xslt-config"
 LIBXSLT_CFLAGS=""
@@ -324,6 +325,8 @@ fi
 if test "z$LIBXSLT_FOUND" = "zyes" ; then
     XMLSEC_NO_LIBXSLT="0"
 else
+    LIBXSLT_COND=""
+    LIBXSLT_MIN_VERSION=""
     XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_NO_XSLT=1"
 fi
 
@@ -332,6 +335,7 @@ AC_SUBST(LIBXSLT_CFLAGS)
 AC_SUBST(LIBXSLT_LIBS)
 AC_SUBST(LIBXSLT_CONFIG)
 AC_SUBST(LIBXSLT_MIN_VERSION)
+AC_SUBST(LIBXSLT_COND)
 
 dnl ==========================================================================
 dnl See if we can find a crypto library
diff --git a/xmlsec-gcrypt.pc.in b/xmlsec-gcrypt.pc.in
index 1c00496..33bc2ff 100644
--- a/xmlsec-gcrypt.pc.in
+++ b/xmlsec-gcrypt.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
 Name: xmlsec1-gcrypt
 Version: @VERSION@
 Description: XML Security Library implements XML Signature and XML Encryption standards
-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@
+Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@
 Cflags: -DXMLSEC_CRYPTO=\"gcrypt\" @XMLSEC_GCRYPT_CFLAGS@
 Libs: @XMLSEC_GCRYPT_LIBS@
diff --git a/xmlsec-gnutls.pc.in b/xmlsec-gnutls.pc.in
index e538cd4..d01cf82 100644
--- a/xmlsec-gnutls.pc.in
+++ b/xmlsec-gnutls.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
 Name: xmlsec1-gnutls
 Version: @VERSION@
 Description: XML Security Library implements XML Signature and XML Encryption standards
-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@
+Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@
 Cflags: -DXMLSEC_CRYPTO=\"gnutls\" @XMLSEC_GNUTLS_CFLAGS@
 Libs: @XMLSEC_GNUTLS_LIBS@
diff --git a/xmlsec-nss.pc.in b/xmlsec-nss.pc.in
index a6d6c5c..75f0232 100644
--- a/xmlsec-nss.pc.in
+++ b/xmlsec-nss.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
 Name: xmlsec1-nss
 Version: @VERSION@
 Description: XML Security Library implements XML Signature and XML Encryption standards
-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ @NSPR_PACKAGE@ >= @MOZILLA_MIN_VERSION@ @NSS_PACKAGE@ >= @MOZILLA_MIN_VERSION@
+Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ @NSPR_PACKAGE@ >= @MOZILLA_MIN_VERSION@ @NSS_PACKAGE@ >= @MOZILLA_MIN_VERSION@
 Cflags: -DXMLSEC_CRYPTO=\"nss\" -DXMLSEC_CRYPTO_NSS=1 @XMLSEC_CORE_CFLAGS@
 Libs: -L${libdir} -lxmlsec1-nss @XMLSEC_CORE_LIBS@
diff --git a/xmlsec-openssl.pc.in b/xmlsec-openssl.pc.in
index 85ee2b0..e9d0651 100644
--- a/xmlsec-openssl.pc.in
+++ b/xmlsec-openssl.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
 Name: xmlsec1-openssl
 Version: @VERSION@
 Description: XML Security Library implements XML Signature and XML Encryption standards
-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ 
+Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@
 Cflags: -DXMLSEC_CRYPTO=\"openssl\" @XMLSEC_OPENSSL_CFLAGS@
 Libs: @XMLSEC_OPENSSL_LIBS@
diff --git a/xmlsec.pc.in b/xmlsec.pc.in
index a750ab8..14ea670 100644
--- a/xmlsec.pc.in
+++ b/xmlsec.pc.in
@@ -6,6 +6,6 @@ includedir=@includedir@
 Name: xmlsec1
 Version: @VERSION@
 Description: XML Security Library implements XML Signature and XML Encryption standards
-Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ 
+Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ 
 Cflags: -DXMLSEC_CRYPTO=\"@XMLSEC_CRYPTO@\" -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 @XMLSEC_CORE_CFLAGS@
 Libs: -L${libdir} @XMLSEC_CORE_LIBS@ 
-- 
2.6.2