diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-22 10:51:20 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-28 08:27:01 +0100 |
commit | 8557df11b592490d3dd6a389597b0cc3c920ec16 (patch) | |
tree | e87a35c681e7d1969f702467a64b275782f0295b /meta/recipes-support/libxslt | |
parent | 834245f0f76f6cdb9272e2b70ef4e807dd869bd7 (diff) | |
download | poky-8557df11b592490d3dd6a389597b0cc3c920ec16.tar.gz |
libxslt: Use pkg-config for dependencies
(From OE-Core rev: f0479e60b660778ab27b946d426daa17a08a28ea)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libxslt')
-rw-r--r-- | meta/recipes-support/libxslt/libxslt/pkgconfig.patch | 118 | ||||
-rw-r--r-- | meta/recipes-support/libxslt/libxslt_1.1.28.bb | 3 |
2 files changed, 120 insertions, 1 deletions
diff --git a/meta/recipes-support/libxslt/libxslt/pkgconfig.patch b/meta/recipes-support/libxslt/libxslt/pkgconfig.patch new file mode 100644 index 0000000000..89d14c944d --- /dev/null +++ b/meta/recipes-support/libxslt/libxslt/pkgconfig.patch | |||
@@ -0,0 +1,118 @@ | |||
1 | Use pkg-config to find gcrypt and libxml2. | ||
2 | |||
3 | Upstream-Status: Pending [libxml2 is upstreamable] | ||
4 | |||
5 | RP 2014/5/22 | ||
6 | |||
7 | Index: libxslt-1.1.28/configure.in | ||
8 | =================================================================== | ||
9 | --- libxslt-1.1.28.orig/configure.in 2014-05-13 16:46:02.278474967 +0000 | ||
10 | +++ libxslt-1.1.28/configure.in 2014-05-13 16:53:56.510472561 +0000 | ||
11 | @@ -376,6 +376,8 @@ | ||
12 | AC_SUBST(PYTHON_SUBDIR) | ||
13 | AC_SUBST(PYTHON_LIBS) | ||
14 | |||
15 | +PKG_PROG_PKG_CONFIG | ||
16 | + | ||
17 | AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)]) | ||
18 | WITH_CRYPTO=0 | ||
19 | if test "$with_crypto" = "no" ; then | ||
20 | @@ -391,26 +393,13 @@ | ||
21 | WITH_CRYPTO=1 | ||
22 | ;; | ||
23 | *) | ||
24 | - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) | ||
25 | - if test "$LIBGCRYPT_CONFIG" != "no" ; then | ||
26 | - LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version` | ||
27 | - if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42") | ||
28 | - then | ||
29 | - LIBGCRYPT_CFLAGS="" | ||
30 | - LIBGCRYPT_LIBS="" | ||
31 | - echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.' | ||
32 | - else | ||
33 | - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags` | ||
34 | - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs` | ||
35 | - AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.]) | ||
36 | - echo 'Crypto extensions will be available.' | ||
37 | + PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [ | ||
38 | + AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.]) | ||
39 | + echo 'Crypto extensions will be available.' | ||
40 | WITH_CRYPTO=1 | ||
41 | - fi | ||
42 | - else | ||
43 | - LIBGCRYPT_CFLAGS="" | ||
44 | - LIBGCRYPT_LIBS="" | ||
45 | - echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.' | ||
46 | - fi | ||
47 | + ], [ | ||
48 | + echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.' | ||
49 | + ]) | ||
50 | esac | ||
51 | fi | ||
52 | AC_SUBST(WITH_CRYPTO) | ||
53 | @@ -471,24 +460,8 @@ | ||
54 | dnl some tweaking - David Härdeman 30/10/2001 | ||
55 | dnl | ||
56 | |||
57 | -LIBXML_CONFIG_PREFIX="" | ||
58 | LIBXML_SRC="" | ||
59 | |||
60 | -AC_ARG_WITH(libxml-prefix, | ||
61 | - [ --with-libxml-prefix=[PFX] Specify location of libxml config], | ||
62 | - LIBXML_CONFIG_PREFIX=$withval | ||
63 | -) | ||
64 | - | ||
65 | -AC_ARG_WITH(libxml-include-prefix, | ||
66 | - [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers], | ||
67 | - LIBXML_CFLAGS="-I$withval" | ||
68 | -) | ||
69 | - | ||
70 | -AC_ARG_WITH(libxml-libs-prefix, | ||
71 | - [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs], | ||
72 | - LIBXML_LIBS="-L$withval" | ||
73 | -) | ||
74 | - | ||
75 | AC_ARG_WITH(libxml-src, | ||
76 | [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)], | ||
77 | LIBXML_SRC="$withval" | ||
78 | @@ -551,28 +524,9 @@ | ||
79 | fi | ||
80 | fi | ||
81 | |||
82 | -dnl | ||
83 | -dnl make sure xml2-config is executable, | ||
84 | -dnl test version and init our variables | ||
85 | -dnl | ||
86 | - | ||
87 | -if ${XML_CONFIG} --libs print > /dev/null 2>&1 | ||
88 | -then | ||
89 | - XMLVERS=`$XML_CONFIG --version` | ||
90 | - if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION) | ||
91 | - then | ||
92 | - AC_MSG_RESULT($XMLVERS found) | ||
93 | - else | ||
94 | - AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt) | ||
95 | - fi | ||
96 | - LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`" | ||
97 | - if test "x$LIBXML_SRC" = "x"; then | ||
98 | - LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`" | ||
99 | - fi | ||
100 | -else | ||
101 | - AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.]) | ||
102 | -fi | ||
103 | - | ||
104 | +PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],, | ||
105 | + [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])] | ||
106 | +) | ||
107 | |||
108 | AC_SUBST(CFLAGS) | ||
109 | AC_SUBST(CPPFLAGS) | ||
110 | @@ -597,7 +551,7 @@ | ||
111 | |||
112 | if test "$with_plugins" = "yes" ; then | ||
113 | AC_MSG_CHECKING([libxml2 module support]) | ||
114 | - WITH_MODULES="`$XML_CONFIG --modules`" | ||
115 | + WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`" | ||
116 | if test "${WITH_MODULES}" = "1"; then | ||
117 | AC_MSG_RESULT(yes) | ||
118 | else | ||
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/meta/recipes-support/libxslt/libxslt_1.1.28.bb index 24401bb4be..5401f3ce89 100644 --- a/meta/recipes-support/libxslt/libxslt_1.1.28.bb +++ b/meta/recipes-support/libxslt/libxslt_1.1.28.bb | |||
@@ -9,7 +9,8 @@ SECTION = "libs" | |||
9 | DEPENDS = "libxml2" | 9 | DEPENDS = "libxml2" |
10 | 10 | ||
11 | SRC_URI = "ftp://xmlsoft.org/libxslt//libxslt-${PV}.tar.gz \ | 11 | SRC_URI = "ftp://xmlsoft.org/libxslt//libxslt-${PV}.tar.gz \ |
12 | file://pkgconfig_fix.patch" | 12 | file://pkgconfig_fix.patch \ |
13 | file://pkgconfig.patch" | ||
13 | 14 | ||
14 | SRC_URI[md5sum] = "9667bf6f9310b957254fdcf6596600b7" | 15 | SRC_URI[md5sum] = "9667bf6f9310b957254fdcf6596600b7" |
15 | SRC_URI[sha256sum] = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c" | 16 | SRC_URI[sha256sum] = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c" |