summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-php
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2014-10-13 12:39:14 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-10-14 11:48:58 +0200
commitd1951db22a9971a1bb7cf25810ec3bdc9669a6f1 (patch)
treefcdb3be5311b03c753cd03a6875996b89475c31c /meta-webserver/recipes-php
parent681413157866cf2544f27e7ca22496f277e0c63a (diff)
downloadmeta-openembedded-d1951db22a9971a1bb7cf25810ec3bdc9669a6f1.tar.gz
modphp: using PKGCONFIG and PACKAGECONFIG for libxml and soap
Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-webserver/recipes-php')
-rw-r--r--meta-webserver/recipes-php/modphp/files/0001-using-pkgconfig-to-check-libxml.patch74
-rw-r--r--meta-webserver/recipes-php/modphp/modphp5.inc6
2 files changed, 78 insertions, 2 deletions
diff --git a/meta-webserver/recipes-php/modphp/files/0001-using-pkgconfig-to-check-libxml.patch b/meta-webserver/recipes-php/modphp/files/0001-using-pkgconfig-to-check-libxml.patch
new file mode 100644
index 000000000..bab5ff2dc
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/files/0001-using-pkgconfig-to-check-libxml.patch
@@ -0,0 +1,74 @@
1[PATCH] using pkgconfig to check libxml
2
3Upstream-Status: Pending
4
5Use pkg-config for the libxml2 dependency, not the -config script.
6
7Signed-off-by: Roy.Li <rongqing.li@windriver.com>
8---
9 acinclude.m4 | 48 ++++++------------------------------------------
10 1 file changed, 6 insertions(+), 42 deletions(-)
11
12diff --git a/acinclude.m4 b/acinclude.m4
13index d348f57..9f691a5 100644
14--- a/acinclude.m4
15+++ b/acinclude.m4
16@@ -2530,49 +2530,13 @@ 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- for i in $PHP_LIBXML_DIR /usr/local /usr; do
23- if test -x "$i/bin/xml2-config"; then
24- ac_cv_php_xml2_config_path="$i/bin/xml2-config"
25- break
26- fi
27- done
28-])
29+ PKG_CHECK_MODULES(PKG_XML2, [libxml-2.0],,)
30+ if test "x$PKG_XML2_CFLAGS" != "x"; then
31+ PHP_EVAL_INCLINE($PKG_XML2_CFLAGS, $1)
32+ PHP_EVAL_LIBLINE($PKG_XML2_LIBS)
33+ AC_DEFINE(HAVE_LIBXML, 1, [ ])
34+ $2
35
36- if test -x "$ac_cv_php_xml2_config_path"; then
37- XML2_CONFIG="$ac_cv_php_xml2_config_path"
38- libxml_full_version=`$XML2_CONFIG --version`
39- ac_IFS=$IFS
40- IFS="."
41- set $libxml_full_version
42- IFS=$ac_IFS
43- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
44- if test "$LIBXML_VERSION" -ge "2006011"; then
45- LIBXML_LIBS=`$XML2_CONFIG --libs`
46- LIBXML_INCS=`$XML2_CONFIG --cflags`
47- PHP_EVAL_LIBLINE($LIBXML_LIBS, $1)
48- PHP_EVAL_INCLINE($LIBXML_INCS)
49-
50- dnl Check that build works with given libs
51- AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [
52- PHP_TEST_BUILD(xmlInitParser,
53- [
54- php_cv_libxml_build_works=yes
55- ], [
56- AC_MSG_RESULT(no)
57- AC_MSG_ERROR([build test failed. Please check the config.log for details.])
58- ], [
59- [$]$1
60- ])
61- ])
62- if test "$php_cv_libxml_build_works" = "yes"; then
63- AC_DEFINE(HAVE_LIBXML, 1, [ ])
64- fi
65- $2
66- else
67- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
68- fi
69 ifelse([$3],[],,[else $3])
70 fi
71 ])
72--
731.9.1
74
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc
index 69324295a..c1cdf726e 100644
--- a/meta-webserver/recipes-php/modphp/modphp5.inc
+++ b/meta-webserver/recipes-php/modphp/modphp5.inc
@@ -8,13 +8,14 @@ SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \
8 file://configure.patch \ 8 file://configure.patch \
9 file://pthread-check-threads-m4.patch \ 9 file://pthread-check-threads-m4.patch \
10 file://70_mod_php5.conf \ 10 file://70_mod_php5.conf \
11 file://0001-using-pkgconfig-to-check-libxml.patch \
11" 12"
12 13
13S = "${WORKDIR}/php-${PV}" 14S = "${WORKDIR}/php-${PV}"
14 15
15LIC_FILES_CHKSUM = "file://LICENSE;md5=52dd90569008fee5bcdbb22d945b1108" 16LIC_FILES_CHKSUM = "file://LICENSE;md5=52dd90569008fee5bcdbb22d945b1108"
16 17
17inherit autotools 18inherit autotools pkgconfig
18 19
19CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" 20CFLAGS += " -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
20 21
@@ -32,7 +33,6 @@ EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \
32 --disable-xmlreader \ 33 --disable-xmlreader \
33 --disable-xmlwriter \ 34 --disable-xmlwriter \
34 --disable-simplexml \ 35 --disable-simplexml \
35 --disable-libxml \
36 --disable-dom \ 36 --disable-dom \
37 --disable-rpath \ 37 --disable-rpath \
38 --libdir=${libdir}/php5 \ 38 --libdir=${libdir}/php5 \
@@ -47,6 +47,8 @@ EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \
47PACKAGECONFIG ??= "mysql" 47PACKAGECONFIG ??= "mysql"
48PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5" 48PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5"
49PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5" 49PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5"
50PACKAGECONFIG[libxml] = "--enable-libxml,--disable-libxml,libxml2"
51PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2"
50 52
51acpaths = "" 53acpaths = ""
52 54