diff options
author | Koen Kooi <koen.kooi@linaro.org> | 2014-06-19 08:54:28 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-08-05 12:02:40 +0200 |
commit | 466e0278acc96aabd29877933b22ae19e23cf810 (patch) | |
tree | 20915c3c9a36dc2481877709a42f5f4f3e88d5df | |
parent | 6ec7600da97c0fb1a2fe0966a0319f006717d857 (diff) | |
download | meta-openembedded-466e0278acc96aabd29877933b22ae19e23cf810.tar.gz |
php 5.4.14: use pkg-config for libxml2 detection
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
3 files changed, 93 insertions, 3 deletions
diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc index b1bf79cfc0..030c090655 100644 --- a/meta-oe/recipes-devtools/php/php.inc +++ b/meta-oe/recipes-devtools/php/php.inc | |||
@@ -31,12 +31,10 @@ EXTRA_OECONF = "--enable-mbstring \ | |||
31 | --with-imap-ssl=${STAGING_DIR_HOST} \ | 31 | --with-imap-ssl=${STAGING_DIR_HOST} \ |
32 | --with-zlib=${STAGING_LIBDIR}/.. \ | 32 | --with-zlib=${STAGING_LIBDIR}/.. \ |
33 | --with-iconv=${STAGING_LIBDIR}/.. \ | 33 | --with-iconv=${STAGING_LIBDIR}/.. \ |
34 | --with-libxml-dir=${STAGING_BINDIR_CROSS} \ | ||
35 | ${COMMON_EXTRA_OECONF} \ | 34 | ${COMMON_EXTRA_OECONF} \ |
36 | " | 35 | " |
37 | EXTRA_OECONF_virtclass-native = " \ | 36 | EXTRA_OECONF_virtclass-native = " \ |
38 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ | 37 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ |
39 | --with-libxml-dir=${STAGING_BINDIR_NATIVE} \ | ||
40 | ${COMMON_EXTRA_OECONF} \ | 38 | ${COMMON_EXTRA_OECONF} \ |
41 | " | 39 | " |
42 | 40 | ||
diff --git a/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch new file mode 100644 index 0000000000..823007e687 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch | |||
@@ -0,0 +1,90 @@ | |||
1 | From 0ff5d4adc9f5950d66738272b3ba88ef74f69117 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen.kooi@linaro.org> | ||
3 | Date: Tue, 17 Jun 2014 09:53:00 +0200 | ||
4 | Subject: [PATCH] acinclude: use pkgconfig for libxml2 config | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen.kooi@linaro.org> | ||
7 | Upstream-Status: pending | ||
8 | --- | ||
9 | acinclude.m4 | 63 ++++++++++++++++++++++-------------------------------------- | ||
10 | 1 file changed, 23 insertions(+), 40 deletions(-) | ||
11 | |||
12 | diff --git a/acinclude.m4 b/acinclude.m4 | ||
13 | index 9c7a305..211dbd3 100644 | ||
14 | --- a/acinclude.m4 | ||
15 | +++ b/acinclude.m4 | ||
16 | @@ -2529,48 +2529,31 @@ dnl | ||
17 | dnl Common setup macro for libxml | ||
18 | dnl | ||
19 | AC_DEFUN([PHP_SETUP_LIBXML], [ | ||
20 | -AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path, | ||
21 | -[ | ||
22 | - | ||
23 | - ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config" | ||
24 | - | ||
25 | +PKG_CHECK_MODULES([LIBXML], [libxml-2.0 > 2.6.11], [ | ||
26 | + PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) | ||
27 | + PHP_EVAL_INCLINE($LIBXML_CFLAGS) | ||
28 | + | ||
29 | + dnl Check that build works with given libs | ||
30 | + AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [ | ||
31 | + PHP_TEST_BUILD(xmlInitParser, | ||
32 | + [ | ||
33 | + php_cv_libxml_build_works=yes | ||
34 | + AC_MSG_RESULT(yes) | ||
35 | + ], [ | ||
36 | + AC_MSG_RESULT(no) | ||
37 | + AC_MSG_ERROR([build test failed. Please check the config.log for details.]) | ||
38 | + ], [ | ||
39 | + [$]$1 | ||
40 | + ]) | ||
41 | + ]) | ||
42 | + if test "$php_cv_libxml_build_works" = "yes"; then | ||
43 | + AC_DEFINE(HAVE_LIBXML, 1, [ ]) | ||
44 | + fi | ||
45 | + $2 | ||
46 | +], [ | ||
47 | + AC_MSG_ERROR([$LIBXML_PKG_ERRORS]) | ||
48 | ]) | ||
49 | |||
50 | - if test -x "$ac_cv_php_xml2_config_path"; then | ||
51 | - XML2_CONFIG="$ac_cv_php_xml2_config_path" | ||
52 | - libxml_full_version=`$XML2_CONFIG --version` | ||
53 | - ac_IFS=$IFS | ||
54 | - IFS="." | ||
55 | - set $libxml_full_version | ||
56 | - IFS=$ac_IFS | ||
57 | - LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` | ||
58 | - if test "$LIBXML_VERSION" -ge "2006011"; then | ||
59 | - LIBXML_LIBS=`$XML2_CONFIG --libs` | ||
60 | - LIBXML_INCS=`$XML2_CONFIG --cflags` | ||
61 | - PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) | ||
62 | - PHP_EVAL_INCLINE($LIBXML_INCS) | ||
63 | - | ||
64 | - dnl Check that build works with given libs | ||
65 | - AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [ | ||
66 | - PHP_TEST_BUILD(xmlInitParser, | ||
67 | - [ | ||
68 | - php_cv_libxml_build_works=yes | ||
69 | - ], [ | ||
70 | - AC_MSG_RESULT(no) | ||
71 | - AC_MSG_ERROR([build test failed. Please check the config.log for details.]) | ||
72 | - ], [ | ||
73 | - [$]$1 | ||
74 | - ]) | ||
75 | - ]) | ||
76 | - if test "$php_cv_libxml_build_works" = "yes"; then | ||
77 | - AC_DEFINE(HAVE_LIBXML, 1, [ ]) | ||
78 | - fi | ||
79 | - $2 | ||
80 | - else | ||
81 | - AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) | ||
82 | - fi | ||
83 | -ifelse([$3],[],,[else $3]) | ||
84 | - fi | ||
85 | ]) | ||
86 | |||
87 | dnl ------------------------------------------------------------------------- | ||
88 | -- | ||
89 | 1.9.3 | ||
90 | |||
diff --git a/meta-oe/recipes-devtools/php/php_5.4.14.bb b/meta-oe/recipes-devtools/php/php_5.4.14.bb index 4e0efb1ede..3c9d3c0e89 100644 --- a/meta-oe/recipes-devtools/php/php_5.4.14.bb +++ b/meta-oe/recipes-devtools/php/php_5.4.14.bb | |||
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" | |||
5 | PR = "${INC_PR}.0" | 5 | PR = "${INC_PR}.0" |
6 | 6 | ||
7 | SRC_URI += "file://acinclude-xml2-config.patch \ | 7 | SRC_URI += "file://acinclude-xml2-config.patch \ |
8 | file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch" | 8 | file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ |
9 | file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ | ||
10 | " | ||
9 | 11 | ||
10 | SRC_URI_append_pn-php += "file://iconv.patch \ | 12 | SRC_URI_append_pn-php += "file://iconv.patch \ |
11 | file://imap-fix-autofoo.patch \ | 13 | file://imap-fix-autofoo.patch \ |