summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch')
-rw-r--r--meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch130
1 files changed, 130 insertions, 0 deletions
diff --git a/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch b/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
new file mode 100644
index 0000000000..71867067b6
--- /dev/null
+++ b/meta/recipes-support/libxslt/libxslt/0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch
@@ -0,0 +1,130 @@
1From ed71ac9548a2bb6ecd2dc5ad880c604975f872b0 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Thu, 2 Jun 2016 14:20:04 +0300
4Subject: [PATCH] Use pkg-config to find gcrypt and libxml2.
5
6Upstream-Status: Pending [libxml2 is upstreamable]
7
8RP 2014/5/22
9
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11---
12 configure.in | 70 +++++++++++-------------------------------------------------
13 1 file changed, 12 insertions(+), 58 deletions(-)
14
15diff --git a/configure.in b/configure.in
16index 8bdf45a..0b2b312 100644
17--- a/configure.in
18+++ b/configure.in
19@@ -377,6 +377,8 @@ AC_SUBST(pythondir)
20 AC_SUBST(PYTHON_SUBDIR)
21 AC_SUBST(PYTHON_LIBS)
22
23+PKG_PROG_PKG_CONFIG
24+
25 AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
26 WITH_CRYPTO=0
27 CRYPTO_TESTDIR=
28@@ -394,27 +396,14 @@ case $host in
29 CRYPTO_TESTDIR=crypto
30 ;;
31 *)
32- AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
33- if test "$LIBGCRYPT_CONFIG" != "no" ; then
34- LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
35- if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
36- then
37- LIBGCRYPT_CFLAGS=""
38- LIBGCRYPT_LIBS=""
39- echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
40- else
41- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
42- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
43- AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
44- echo 'Crypto extensions will be available.'
45+ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
46+ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
47+ echo 'Crypto extensions will be available.'
48 WITH_CRYPTO=1
49 CRYPTO_TESTDIR=crypto
50- fi
51- else
52- LIBGCRYPT_CFLAGS=""
53- LIBGCRYPT_LIBS=""
54- echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
55- fi
56+ ], [
57+ echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
58+ ])
59 esac
60 fi
61 AC_SUBST(WITH_CRYPTO)
62@@ -476,24 +465,8 @@ dnl original work - Mathieu Lacage 30/03/2000
63 dnl some tweaking - David Härdeman 30/10/2001
64 dnl
65
66-LIBXML_CONFIG_PREFIX=""
67 LIBXML_SRC=""
68
69-AC_ARG_WITH(libxml-prefix,
70- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
71- LIBXML_CONFIG_PREFIX=$withval
72-)
73-
74-AC_ARG_WITH(libxml-include-prefix,
75- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
76- LIBXML_CFLAGS="-I$withval"
77-)
78-
79-AC_ARG_WITH(libxml-libs-prefix,
80- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
81- LIBXML_LIBS="-L$withval"
82-)
83-
84 AC_ARG_WITH(libxml-src,
85 [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
86 LIBXML_SRC="$withval"
87@@ -556,28 +529,9 @@ then
88 fi
89 fi
90
91-dnl
92-dnl make sure xml2-config is executable,
93-dnl test version and init our variables
94-dnl
95-
96-if ${XML_CONFIG} --libs print > /dev/null 2>&1
97-then
98- XMLVERS=`$XML_CONFIG --version`
99- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
100- then
101- AC_MSG_RESULT($XMLVERS found)
102- else
103- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
104- fi
105- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
106- if test "x$LIBXML_SRC" = "x"; then
107- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
108- fi
109-else
110- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
111-fi
112-
113+PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
114+ [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
115+)
116
117 AC_SUBST(CFLAGS)
118 AC_SUBST(CPPFLAGS)
119@@ -602,7 +556,7 @@ fi
120
121 if test "$with_plugins" = "yes" ; then
122 AC_MSG_CHECKING([libxml2 module support])
123- WITH_MODULES="`$XML_CONFIG --modules`"
124+ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
125 if test "${WITH_MODULES}" = "1"; then
126 AC_MSG_RESULT(yes)
127 else
128--
1292.8.1
130