c92df77f0a5f9afb89655aa6de1d9723684194de
[AGL/meta-agl.git] / meta-app-framework / recipes-support / xmlsec1 / xmlsec1 / Only-require-libxslt-in-.pc-files-when-necessary.patch
1 From 1e39acf581ef47876b058da41774cbc92560d797 Mon Sep 17 00:00:00 2001
2 From: Manuel Bachmann <manuel.bachmann@iot.bzh>
3 Date: Wed, 27 Jan 2016 14:16:40 +0100
4 Subject: [PATCH] Only require libxslt in .pc files when necessary
5
6 If we build xmlsec without libxslt ("--without-libxslt" at
7 configure time), dependent packages will still require it
8 because it is unconditionally mentioned in .pc files (used
9 by pkg-config).
10
11 We now make sure that this dependency is mentioned only if
12 the configure script validates libxslt presence.
13
14 Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
15 ---
16  configure.in         | 4 ++++
17  xmlsec-gcrypt.pc.in  | 2 +-
18  xmlsec-gnutls.pc.in  | 2 +-
19  xmlsec-nss.pc.in     | 2 +-
20  xmlsec-openssl.pc.in | 2 +-
21  xmlsec.pc.in         | 2 +-
22  6 files changed, 9 insertions(+), 5 deletions(-)
23
24 diff --git a/configure.in b/configure.in
25 index 7d976d0..a8350a9 100644
26 --- a/configure.in
27 +++ b/configure.in
28 @@ -255,6 +255,7 @@ dnl ==========================================================================
29  dnl find libxslt
30  dnl ==========================================================================
31  XMLSEC_NO_LIBXSLT="1"
32 +LIBXSLT_COND="libxslt >="
33  LIBXSLT_MIN_VERSION=1.0.20
34  LIBXSLT_CONFIG="xslt-config"
35  LIBXSLT_CFLAGS=""
36 @@ -324,6 +325,8 @@ fi
37  if test "z$LIBXSLT_FOUND" = "zyes" ; then
38      XMLSEC_NO_LIBXSLT="0"
39  else
40 +    LIBXSLT_COND=""
41 +    LIBXSLT_MIN_VERSION=""
42      XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_NO_XSLT=1"
43  fi
44  
45 @@ -332,6 +335,7 @@ AC_SUBST(LIBXSLT_CFLAGS)
46  AC_SUBST(LIBXSLT_LIBS)
47  AC_SUBST(LIBXSLT_CONFIG)
48  AC_SUBST(LIBXSLT_MIN_VERSION)
49 +AC_SUBST(LIBXSLT_COND)
50  
51  dnl ==========================================================================
52  dnl See if we can find a crypto library
53 diff --git a/xmlsec-gcrypt.pc.in b/xmlsec-gcrypt.pc.in
54 index 1c00496..33bc2ff 100644
55 --- a/xmlsec-gcrypt.pc.in
56 +++ b/xmlsec-gcrypt.pc.in
57 @@ -6,6 +6,6 @@ includedir=@includedir@
58  Name: xmlsec1-gcrypt
59  Version: @VERSION@
60  Description: XML Security Library implements XML Signature and XML Encryption standards
61 -Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@
62 +Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@
63  Cflags: -DXMLSEC_CRYPTO=\"gcrypt\" @XMLSEC_GCRYPT_CFLAGS@
64  Libs: @XMLSEC_GCRYPT_LIBS@
65 diff --git a/xmlsec-gnutls.pc.in b/xmlsec-gnutls.pc.in
66 index e538cd4..d01cf82 100644
67 --- a/xmlsec-gnutls.pc.in
68 +++ b/xmlsec-gnutls.pc.in
69 @@ -6,6 +6,6 @@ includedir=@includedir@
70  Name: xmlsec1-gnutls
71  Version: @VERSION@
72  Description: XML Security Library implements XML Signature and XML Encryption standards
73 -Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@
74 +Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@
75  Cflags: -DXMLSEC_CRYPTO=\"gnutls\" @XMLSEC_GNUTLS_CFLAGS@
76  Libs: @XMLSEC_GNUTLS_LIBS@
77 diff --git a/xmlsec-nss.pc.in b/xmlsec-nss.pc.in
78 index a6d6c5c..75f0232 100644
79 --- a/xmlsec-nss.pc.in
80 +++ b/xmlsec-nss.pc.in
81 @@ -6,6 +6,6 @@ includedir=@includedir@
82  Name: xmlsec1-nss
83  Version: @VERSION@
84  Description: XML Security Library implements XML Signature and XML Encryption standards
85 -Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ @NSPR_PACKAGE@ >= @MOZILLA_MIN_VERSION@ @NSS_PACKAGE@ >= @MOZILLA_MIN_VERSION@
86 +Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ @NSPR_PACKAGE@ >= @MOZILLA_MIN_VERSION@ @NSS_PACKAGE@ >= @MOZILLA_MIN_VERSION@
87  Cflags: -DXMLSEC_CRYPTO=\"nss\" -DXMLSEC_CRYPTO_NSS=1 @XMLSEC_CORE_CFLAGS@
88  Libs: -L${libdir} -lxmlsec1-nss @XMLSEC_CORE_LIBS@
89 diff --git a/xmlsec-openssl.pc.in b/xmlsec-openssl.pc.in
90 index 85ee2b0..e9d0651 100644
91 --- a/xmlsec-openssl.pc.in
92 +++ b/xmlsec-openssl.pc.in
93 @@ -6,6 +6,6 @@ includedir=@includedir@
94  Name: xmlsec1-openssl
95  Version: @VERSION@
96  Description: XML Security Library implements XML Signature and XML Encryption standards
97 -Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ 
98 +Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@
99  Cflags: -DXMLSEC_CRYPTO=\"openssl\" @XMLSEC_OPENSSL_CFLAGS@
100  Libs: @XMLSEC_OPENSSL_LIBS@
101 diff --git a/xmlsec.pc.in b/xmlsec.pc.in
102 index a750ab8..14ea670 100644
103 --- a/xmlsec.pc.in
104 +++ b/xmlsec.pc.in
105 @@ -6,6 +6,6 @@ includedir=@includedir@
106  Name: xmlsec1
107  Version: @VERSION@
108  Description: XML Security Library implements XML Signature and XML Encryption standards
109 -Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ libxslt >= @LIBXSLT_MIN_VERSION@ 
110 +Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_COND@ @LIBXSLT_MIN_VERSION@ 
111  Cflags: -DXMLSEC_CRYPTO=\"@XMLSEC_CRYPTO@\" -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 @XMLSEC_CORE_CFLAGS@
112  Libs: -L${libdir} @XMLSEC_CORE_LIBS@ 
113 -- 
114 2.6.2
115