* [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection
@ 2014-06-19 6:54 Koen Kooi
2014-06-19 7:33 ` Koen Kooi
2014-06-20 12:57 ` Richard Purdie
0 siblings, 2 replies; 4+ messages in thread
From: Koen Kooi @ 2014-06-19 6:54 UTC (permalink / raw)
To: openembedded-devel; +Cc: Koen Kooi
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
Changes since v3:
* swapped fi/$i lines
This finally fixes the build!
meta-oe/recipes-devtools/php/php.inc | 2 -
...cinclude-use-pkgconfig-for-libxml2-config.patch | 90 ++++++++++++++++++++++
meta-oe/recipes-devtools/php/php_5.4.14.bb | 4 +-
3 files changed, 93 insertions(+), 3 deletions(-)
create mode 100644 meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
index b1bf79c..030c090 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 \
--with-imap-ssl=${STAGING_DIR_HOST} \
--with-zlib=${STAGING_LIBDIR}/.. \
--with-iconv=${STAGING_LIBDIR}/.. \
- --with-libxml-dir=${STAGING_BINDIR_CROSS} \
${COMMON_EXTRA_OECONF} \
"
EXTRA_OECONF_virtclass-native = " \
--with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
- --with-libxml-dir=${STAGING_BINDIR_NATIVE} \
${COMMON_EXTRA_OECONF} \
"
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 0000000..823007e
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
@@ -0,0 +1,90 @@
+From 0ff5d4adc9f5950d66738272b3ba88ef74f69117 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen.kooi@linaro.org>
+Date: Tue, 17 Jun 2014 09:53:00 +0200
+Subject: [PATCH] acinclude: use pkgconfig for libxml2 config
+
+Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
+Upstream-Status: pending
+---
+ acinclude.m4 | 63 ++++++++++++++++++++++--------------------------------------
+ 1 file changed, 23 insertions(+), 40 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 9c7a305..211dbd3 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2529,48 +2529,31 @@ dnl
+ dnl Common setup macro for libxml
+ dnl
+ AC_DEFUN([PHP_SETUP_LIBXML], [
+-AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
+-[
+-
+- ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
+-
++PKG_CHECK_MODULES([LIBXML], [libxml-2.0 > 2.6.11], [
++ PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
++ PHP_EVAL_INCLINE($LIBXML_CFLAGS)
++
++ dnl Check that build works with given libs
++ AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
++ PHP_TEST_BUILD(xmlInitParser,
++ [
++ php_cv_libxml_build_works=yes
++ AC_MSG_RESULT(yes)
++ ], [
++ AC_MSG_RESULT(no)
++ AC_MSG_ERROR([build test failed. Please check the config.log for details.])
++ ], [
++ [$]$1
++ ])
++ ])
++ if test "$php_cv_libxml_build_works" = "yes"; then
++ AC_DEFINE(HAVE_LIBXML, 1, [ ])
++ fi
++ $2
++], [
++ AC_MSG_ERROR([$LIBXML_PKG_ERRORS])
+ ])
+
+- if test -x "$ac_cv_php_xml2_config_path"; then
+- XML2_CONFIG="$ac_cv_php_xml2_config_path"
+- libxml_full_version=`$XML2_CONFIG --version`
+- ac_IFS=$IFS
+- IFS="."
+- set $libxml_full_version
+- IFS=$ac_IFS
+- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
+- if test "$LIBXML_VERSION" -ge "2006011"; then
+- LIBXML_LIBS=`$XML2_CONFIG --libs`
+- LIBXML_INCS=`$XML2_CONFIG --cflags`
+- PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
+- PHP_EVAL_INCLINE($LIBXML_INCS)
+-
+- dnl Check that build works with given libs
+- AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
+- PHP_TEST_BUILD(xmlInitParser,
+- [
+- php_cv_libxml_build_works=yes
+- ], [
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR([build test failed. Please check the config.log for details.])
+- ], [
+- [$]$1
+- ])
+- ])
+- if test "$php_cv_libxml_build_works" = "yes"; then
+- AC_DEFINE(HAVE_LIBXML, 1, [ ])
+- fi
+- $2
+- else
+- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
+- fi
+-ifelse([$3],[],,[else $3])
+- fi
+ ])
+
+ dnl -------------------------------------------------------------------------
+--
+1.9.3
+
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 4e0efb1..3c9d3c0 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"
PR = "${INC_PR}.0"
SRC_URI += "file://acinclude-xml2-config.patch \
- file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch"
+ file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \
+ file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \
+ "
SRC_URI_append_pn-php += "file://iconv.patch \
file://imap-fix-autofoo.patch \
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection
2014-06-19 6:54 [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection Koen Kooi
@ 2014-06-19 7:33 ` Koen Kooi
2014-06-20 12:57 ` Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2014-06-19 7:33 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The subject was meant to say 'PATCHv4', but I made a copy/paste error.
Koen Kooi schreef op 19-06-14 08:54:
> Signed-off-by: Koen Kooi <koen.kooi@linaro.org> ---
>
> Changes since v3: * swapped fi/$i lines
>
> This finally fixes the build!
>
> meta-oe/recipes-devtools/php/php.inc | 2 -
> ...cinclude-use-pkgconfig-for-libxml2-config.patch | 90
> ++++++++++++++++++++++ meta-oe/recipes-devtools/php/php_5.4.14.bb
> | 4 +- 3 files changed, 93 insertions(+), 3 deletions(-) create mode
> 100644
> meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
>
> diff --git a/meta-oe/recipes-devtools/php/php.inc
> b/meta-oe/recipes-devtools/php/php.inc index b1bf79c..030c090 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 \ --with-imap-ssl=${STAGING_DIR_HOST} \
> --with-zlib=${STAGING_LIBDIR}/.. \ --with-iconv=${STAGING_LIBDIR}/.. \ -
> --with-libxml-dir=${STAGING_BINDIR_CROSS} \ ${COMMON_EXTRA_OECONF} \ "
> EXTRA_OECONF_virtclass-native = " \
> --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ -
> --with-libxml-dir=${STAGING_BINDIR_NATIVE} \ ${COMMON_EXTRA_OECONF} \ "
>
> 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 0000000..823007e --- /dev/null +++
> b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
>
>
@@ -0,0 +1,90 @@
> +From 0ff5d4adc9f5950d66738272b3ba88ef74f69117 Mon Sep 17 00:00:00 2001
> +From: Koen Kooi <koen.kooi@linaro.org> +Date: Tue, 17 Jun 2014 09:53:00
> +0200 +Subject: [PATCH] acinclude: use pkgconfig for libxml2 config +
> +Signed-off-by: Koen Kooi <koen.kooi@linaro.org> +Upstream-Status:
> pending +--- + acinclude.m4 | 63
> ++++++++++++++++++++++-------------------------------------- + 1 file
> changed, 23 insertions(+), 40 deletions(-) + +diff --git a/acinclude.m4
> b/acinclude.m4 +index 9c7a305..211dbd3 100644 +--- a/acinclude.m4 ++++
> b/acinclude.m4 +@@ -2529,48 +2529,31 @@ dnl + dnl Common setup macro for
> libxml + dnl + AC_DEFUN([PHP_SETUP_LIBXML], [ +-AC_CACHE_CHECK([for
> xml2-config path], ac_cv_php_xml2_config_path, +-[ +- +-
> ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config" +-
> ++PKG_CHECK_MODULES([LIBXML], [libxml-2.0 > 2.6.11], [ ++
> PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) ++ PHP_EVAL_INCLINE($LIBXML_CFLAGS)
> ++ ++ dnl Check that build works with given libs ++
> AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
> ++ PHP_TEST_BUILD(xmlInitParser, ++ [ ++
> php_cv_libxml_build_works=yes ++ AC_MSG_RESULT(yes) ++ ], [ ++
> AC_MSG_RESULT(no) ++ AC_MSG_ERROR([build test failed. Please check
> the config.log for details.]) ++ ], [ ++ [$]$1 ++ ]) ++ ]) ++
> if test "$php_cv_libxml_build_works" = "yes"; then ++
> AC_DEFINE(HAVE_LIBXML, 1, [ ]) ++ fi ++ $2 ++], [ ++
> AC_MSG_ERROR([$LIBXML_PKG_ERRORS]) + ]) + +- if test -x
> "$ac_cv_php_xml2_config_path"; then +-
> XML2_CONFIG="$ac_cv_php_xml2_config_path" +-
> libxml_full_version=`$XML2_CONFIG --version` +- ac_IFS=$IFS +-
> IFS="." +- set $libxml_full_version +- IFS=$ac_IFS +-
> LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` +- if test
> "$LIBXML_VERSION" -ge "2006011"; then +- LIBXML_LIBS=`$XML2_CONFIG
> --libs` +- LIBXML_INCS=`$XML2_CONFIG --cflags` +-
> PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) +-
> PHP_EVAL_INCLINE($LIBXML_INCS) +- +- dnl Check that build works with
> given libs +- AC_CACHE_CHECK(whether libxml build works,
> php_cv_libxml_build_works, [ +- PHP_TEST_BUILD(xmlInitParser, +-
> [ +- php_cv_libxml_build_works=yes +- ], [ +-
> AC_MSG_RESULT(no) +- AC_MSG_ERROR([build test failed. Please
> check the config.log for details.]) +- ], [ +- [$]$1 +-
> ]) +- ]) +- if test "$php_cv_libxml_build_works" = "yes"; then
> +- AC_DEFINE(HAVE_LIBXML, 1, [ ]) +- fi +- $2 +-
> else +- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
> +- fi +-ifelse([$3],[],,[else $3]) +- fi + ]) + + dnl
> -------------------------------------------------------------------------
>
>
+--
> +1.9.3 + 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 4e0efb1..3c9d3c0
> 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"
> PR = "${INC_PR}.0"
>
> SRC_URI += "file://acinclude-xml2-config.patch \ -
> file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch" +
> file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ +
> file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ +
> "
>
> SRC_URI_append_pn-php += "file://iconv.patch \
> file://imap-fix-autofoo.patch \
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org
iD8DBQFTopJnMkyGM64RGpERAng2AKCBmgFlNsS+KwLiqwfq9sakyuNPOwCcCPRp
XCsI6H/2TpwVXRf2pvnCBTM=
=RJ2R
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection
2014-06-19 6:54 [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection Koen Kooi
2014-06-19 7:33 ` Koen Kooi
@ 2014-06-20 12:57 ` Richard Purdie
1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2014-06-20 12:57 UTC (permalink / raw)
To: openembedded-devel; +Cc: Koen Kooi
On Thu, 2014-06-19 at 08:54 +0200, Koen Kooi wrote:
> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> ---
>
> Changes since v3:
> * swapped fi/$i lines
>
> This finally fixes the build!
>
> meta-oe/recipes-devtools/php/php.inc | 2 -
> ...cinclude-use-pkgconfig-for-libxml2-config.patch | 90 ++++++++++++++++++++++
> meta-oe/recipes-devtools/php/php_5.4.14.bb | 4 +-
> 3 files changed, 93 insertions(+), 3 deletions(-)
> create mode 100644 meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
>
> diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
> index b1bf79c..030c090 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 \
> --with-imap-ssl=${STAGING_DIR_HOST} \
> --with-zlib=${STAGING_LIBDIR}/.. \
> --with-iconv=${STAGING_LIBDIR}/.. \
> - --with-libxml-dir=${STAGING_BINDIR_CROSS} \
> ${COMMON_EXTRA_OECONF} \
> "
> EXTRA_OECONF_virtclass-native = " \
> --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
> - --with-libxml-dir=${STAGING_BINDIR_NATIVE} \
> ${COMMON_EXTRA_OECONF} \
> "
>
> 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 0000000..823007e
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
> @@ -0,0 +1,90 @@
> +From 0ff5d4adc9f5950d66738272b3ba88ef74f69117 Mon Sep 17 00:00:00 2001
> +From: Koen Kooi <koen.kooi@linaro.org>
> +Date: Tue, 17 Jun 2014 09:53:00 +0200
> +Subject: [PATCH] acinclude: use pkgconfig for libxml2 config
> +
> +Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
> +Upstream-Status: pending
> +---
> + acinclude.m4 | 63 ++++++++++++++++++++++--------------------------------------
> + 1 file changed, 23 insertions(+), 40 deletions(-)
> +
> +diff --git a/acinclude.m4 b/acinclude.m4
> +index 9c7a305..211dbd3 100644
> +--- a/acinclude.m4
> ++++ b/acinclude.m4
> +@@ -2529,48 +2529,31 @@ dnl
> + dnl Common setup macro for libxml
> + dnl
> + AC_DEFUN([PHP_SETUP_LIBXML], [
> +-AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
> +-[
> +-
> +- ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
> +-
> ++PKG_CHECK_MODULES([LIBXML], [libxml-2.0 > 2.6.11], [
> ++ PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
> ++ PHP_EVAL_INCLINE($LIBXML_CFLAGS)
> ++
> ++ dnl Check that build works with given libs
> ++ AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
> ++ PHP_TEST_BUILD(xmlInitParser,
> ++ [
> ++ php_cv_libxml_build_works=yes
> ++ AC_MSG_RESULT(yes)
> ++ ], [
> ++ AC_MSG_RESULT(no)
> ++ AC_MSG_ERROR([build test failed. Please check the config.log for details.])
> ++ ], [
> ++ [$]$1
> ++ ])
> ++ ])
> ++ if test "$php_cv_libxml_build_works" = "yes"; then
> ++ AC_DEFINE(HAVE_LIBXML, 1, [ ])
> ++ fi
> ++ $2
> ++], [
> ++ AC_MSG_ERROR([$LIBXML_PKG_ERRORS])
> + ])
> +
> +- if test -x "$ac_cv_php_xml2_config_path"; then
> +- XML2_CONFIG="$ac_cv_php_xml2_config_path"
> +- libxml_full_version=`$XML2_CONFIG --version`
> +- ac_IFS=$IFS
> +- IFS="."
> +- set $libxml_full_version
> +- IFS=$ac_IFS
> +- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
> +- if test "$LIBXML_VERSION" -ge "2006011"; then
> +- LIBXML_LIBS=`$XML2_CONFIG --libs`
> +- LIBXML_INCS=`$XML2_CONFIG --cflags`
> +- PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
> +- PHP_EVAL_INCLINE($LIBXML_INCS)
> +-
> +- dnl Check that build works with given libs
> +- AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
> +- PHP_TEST_BUILD(xmlInitParser,
> +- [
> +- php_cv_libxml_build_works=yes
> +- ], [
> +- AC_MSG_RESULT(no)
> +- AC_MSG_ERROR([build test failed. Please check the config.log for details.])
> +- ], [
> +- [$]$1
> +- ])
> +- ])
> +- if test "$php_cv_libxml_build_works" = "yes"; then
> +- AC_DEFINE(HAVE_LIBXML, 1, [ ])
> +- fi
> +- $2
> +- else
> +- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
> +- fi
> +-ifelse([$3],[],,[else $3])
> +- fi
> + ])
> +
Dropping the ifelse([$3],[],,[else $3]) isn't quite right,
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/tree/meta-oe/recipes-devtools/php/php/pkgconfig.patch?h=rpurdie/meta-oe&id=ffd98ac82cc69a1fa1d7fbc197f247aeea221b4b
is a fractional improvement.
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection
@ 2014-06-19 6:04 Koen Kooi
0 siblings, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2014-06-19 6:04 UTC (permalink / raw)
To: openembedded-devel; +Cc: Koen Kooi
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
---
Changes since v2:
* AC_MSG_RESULT(yes) on success
php-native builds, but php still errors out with xml errors.
...cinclude-use-pkgconfig-for-libxml2-config.patch | 90 ++++++++++++++++++++++
meta-oe/recipes-devtools/php/php_5.4.14.bb | 4 +-
2 files changed, 93 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
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 0000000..acace8e
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch
@@ -0,0 +1,90 @@
+From 0ff5d4adc9f5950d66738272b3ba88ef74f69117 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen.kooi@linaro.org>
+Date: Tue, 17 Jun 2014 09:53:00 +0200
+Subject: [PATCH] acinclude: use pkgconfig for libxml2 config
+
+Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
+Upstream-Status: pending
+---
+ acinclude.m4 | 63 ++++++++++++++++++++++--------------------------------------
+ 1 file changed, 23 insertions(+), 40 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 9c7a305..211dbd3 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2529,48 +2529,31 @@ dnl
+ dnl Common setup macro for libxml
+ dnl
+ AC_DEFUN([PHP_SETUP_LIBXML], [
+-AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
+-[
+-
+- ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
+-
++PKG_CHECK_MODULES([LIBXML], [libxml-2.0 > 2.6.11], [
++ PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
++ PHP_EVAL_INCLINE($LIBXML_CFLAGS)
++
++ dnl Check that build works with given libs
++ AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
++ PHP_TEST_BUILD(xmlInitParser,
++ [
++ php_cv_libxml_build_works=yes
++ AC_MSG_RESULT(yes)
++ ], [
++ AC_MSG_RESULT(no)
++ AC_MSG_ERROR([build test failed. Please check the config.log for details.])
++ ], [
++ [$]$1
++ ])
++ ])
++ if test "$php_cv_libxml_build_works" = "yes"; then
++ AC_DEFINE(HAVE_LIBXML, 1, [ ])
++ $2
++ fi
++], [
++ AC_MSG_ERROR([$LIBXML_PKG_ERRORS])
+ ])
+
+- if test -x "$ac_cv_php_xml2_config_path"; then
+- XML2_CONFIG="$ac_cv_php_xml2_config_path"
+- libxml_full_version=`$XML2_CONFIG --version`
+- ac_IFS=$IFS
+- IFS="."
+- set $libxml_full_version
+- IFS=$ac_IFS
+- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
+- if test "$LIBXML_VERSION" -ge "2006011"; then
+- LIBXML_LIBS=`$XML2_CONFIG --libs`
+- LIBXML_INCS=`$XML2_CONFIG --cflags`
+- PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
+- PHP_EVAL_INCLINE($LIBXML_INCS)
+-
+- dnl Check that build works with given libs
+- AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
+- PHP_TEST_BUILD(xmlInitParser,
+- [
+- php_cv_libxml_build_works=yes
+- ], [
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR([build test failed. Please check the config.log for details.])
+- ], [
+- [$]$1
+- ])
+- ])
+- if test "$php_cv_libxml_build_works" = "yes"; then
+- AC_DEFINE(HAVE_LIBXML, 1, [ ])
+- fi
+- $2
+- else
+- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
+- fi
+-ifelse([$3],[],,[else $3])
+- fi
+ ])
+
+ dnl -------------------------------------------------------------------------
+--
+1.9.3
+
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 4e0efb1..3c9d3c0 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"
PR = "${INC_PR}.0"
SRC_URI += "file://acinclude-xml2-config.patch \
- file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch"
+ file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \
+ file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \
+ "
SRC_URI_append_pn-php += "file://iconv.patch \
file://imap-fix-autofoo.patch \
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-20 12:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-19 6:54 [meta-oe][PATCHv3] php 5.4.14: use pkg-config for libxml2 detection Koen Kooi
2014-06-19 7:33 ` Koen Kooi
2014-06-20 12:57 ` Richard Purdie
-- strict thread matches above, loose matches on Subject: below --
2014-06-19 6:04 Koen Kooi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.