summaryrefslogtreecommitdiffstats
path: root/meta-webserver
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2013-04-09 15:11:05 +0800
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-04-15 10:56:19 +0100
commit29fa7f9ea7dd545c1c8e72e703f30cce9076832d (patch)
tree4869f76d55c50f0761bc1797ea4f38bab5fa3349 /meta-webserver
parent12b72e1eaf552843bbd12a22075efa5f44c01d34 (diff)
downloadmeta-openembedded-29fa7f9ea7dd545c1c8e72e703f30cce9076832d.tar.gz
modphp: enable mysql option in PACKAGECONFIG
* enable mysql option in PACKAGECONFIG * add patch to support autoconf 2.59+ so we can use autotools do_configure to fix a libtool cross-compile issue Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Diffstat (limited to 'meta-webserver')
-rw-r--r--meta-webserver/recipes-php/modphp/files/php-5.3.14-aconf259.patch209
-rw-r--r--meta-webserver/recipes-php/modphp/modphp5.inc24
2 files changed, 221 insertions, 12 deletions
diff --git a/meta-webserver/recipes-php/modphp/files/php-5.3.14-aconf259.patch b/meta-webserver/recipes-php/modphp/files/php-5.3.14-aconf259.patch
new file mode 100644
index 000000000..bda0aefdf
--- /dev/null
+++ b/meta-webserver/recipes-php/modphp/files/php-5.3.14-aconf259.patch
@@ -0,0 +1,209 @@
1Patch from fedora to support autoconf 2.59+
2
3referrence to:
4https://bugs.php.net/bug.php?id=50291
5http://lists.fedoraproject.org/pipermail/scm-commits/2012-June/807312.html
6
7Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
8---
9diff --git a/build/buildcheck.sh b/build/buildcheck.sh
10index de16264..4b05c28 100755
11--- a/build/buildcheck.sh
12+++ b/build/buildcheck.sh
13@@ -28,33 +28,23 @@ if test -z "$PHP_AUTOCONF"; then
14 PHP_AUTOCONF='autoconf'
15 fi
16
17-# autoconf 2.13 or newer
18+# autoconf 2.59 or newer
19 ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
20 if test -z "$ac_version"; then
21 echo "buildconf: autoconf not found."
22-echo " You need autoconf version 2.13 or newer installed"
23+echo " You need autoconf version 2.59 or newer installed"
24 echo " to build PHP from SVN."
25 exit 1
26 fi
27 IFS=.; set $ac_version; IFS=' '
28-if test "$1" = "2" -a "$2" -lt "13" || test "$1" -lt "2"; then
29+if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
30 echo "buildconf: autoconf version $ac_version found."
31-echo " You need autoconf version 2.13 or newer installed"
32+echo " You need autoconf version 2.59 or newer installed"
33 echo " to build PHP from SVN."
34 exit 1
35 fi
36
37-if test "$1" = "2" -a "$2" -gt "59"; then
38- echo "buildconf: You need autoconf 2.59 or lower to build this version of PHP."
39- echo " You are currently trying to use $ac_version"
40- echo " Most distros have separate autoconf 2.13 or 2.59 packages."
41- echo " On Debian/Ubuntu both autoconf2.13 and autoconf2.59 packages exist."
42- echo " Install autoconf2.13 and set the PHP_AUTOCONF env var to "
43- echo " autoconf2.13 and try again."
44- exit 1
45-else
46- echo "buildconf: autoconf version $ac_version (ok)"
47-fi
48+echo "buildconf: autoconf version $ac_version (ok)"
49
50 if test "$1" = "2" -a "$2" -ge "50"; then
51 ./vcsclean
52diff --git a/configure.in b/configure.in
53index f48ce4f..6851512 100644
54--- a/configure.in
55+++ b/configure.in
56@@ -1,28 +1,6 @@
57 ## $Id$ -*- autoconf -*-
58 dnl ## Process this file with autoconf to produce a configure script.
59
60-divert(1)
61-
62-dnl ## Diversion 1 is the autoconf + automake setup phase. We also
63-dnl ## set the PHP version, deal with platform-specific compile
64-dnl ## options and check for the basic compile tools.
65-
66-dnl ## Diversion 2 is the initial checking of OS features, programs,
67-dnl ## libraries and so on.
68-
69-dnl ## In diversion 3 we check for compile-time options to the PHP
70-dnl ## core and how to deal with different system dependencies.
71-dnl ## This includes whether debugging or short tags are enabled
72-dnl ## and the default behaviour of php.ini options.
73-dnl ## This is also where an SAPI interface is selected (choosing between
74-dnl ## Apache module, CGI etc.)
75-
76-dnl ## In diversion 4 we check user-configurable general settings.
77-
78-dnl ## In diversion 5 we check which extensions should be compiled.
79-dnl ## All of these are normally in the extension directories.
80-dnl ## Diversion 5 is the last one. Here we generate files and clean up.
81-
82 dnl include Zend specific macro definitions first
83 dnl -------------------------------------------------------------------------
84 sinclude(Zend/acinclude.m4)
85@@ -30,8 +8,10 @@ sinclude(Zend/acinclude.m4)
86 dnl Basic autoconf + automake initialization, generation of config.nice.
87 dnl -------------------------------------------------------------------------
88
89-AC_PREREQ(2.13)
90+AC_PREREQ(2.59)
91 AC_INIT(README.GIT-RULES)
92+ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
93+
94
95 PHP_CONFIG_NICE(config.nice)
96
97@@ -290,14 +270,6 @@ sinclude(TSRM/threads.m4)
98 sinclude(TSRM/tsrm.m4)
99
100
101-divert(2)
102-
103-dnl ## Diversion 2 is where we set PHP-specific options and come up
104-dnl ## with reasonable default values for them. We check for pthreads here
105-dnl ## because the information is needed by the SAPI configuration.
106-dnl ## This is also where an SAPI interface is selected (choosing between
107-dnl ## Apache module, CGI etc.)
108-
109 dnl .
110 dnl -------------------------------------------------------------------------
111
112@@ -329,13 +301,6 @@ if test "$enable_maintainer_zts" = "yes"; then
113 PTHREADS_FLAGS
114 fi
115
116-divert(3)
117-
118-dnl ## In diversion 3 we check for compile-time options to the PHP
119-dnl ## core and how to deal with different system dependencies.
120-dnl ## This includes whether debugging or short tags are enabled
121-dnl ## and the default behaviour of php.ini options.
122-
123 dnl Starting system checks.
124 dnl -------------------------------------------------------------------------
125
126@@ -683,10 +648,6 @@ if test "x$php_crypt_r" = "x1"; then
127 PHP_CRYPT_R_STYLE
128 fi
129
130-divert(4)
131-
132-dnl ## In diversion 4 we check user-configurable general settings.
133-
134 dnl General settings.
135 dnl -------------------------------------------------------------------------
136 PHP_CONFIGURE_PART(General settings)
137@@ -924,11 +885,6 @@ else
138 AC_MSG_RESULT([using system default])
139 fi
140
141-divert(5)
142-
143-dnl ## In diversion 5 we check which extensions should be compiled.
144-dnl ## All of these are normally in the extension directories.
145-
146 dnl Extension configuration.
147 dnl -------------------------------------------------------------------------
148
149diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
150index e28c351..c33ae1e 100644
151--- a/ext/standard/config.m4
152+++ b/ext/standard/config.m4
153@@ -1,7 +1,5 @@
154 dnl $Id$ -*- autoconf -*-
155
156-divert(3)dnl
157-
158 dnl
159 dnl Check if flush should be called explicitly after buffered io
160 dnl
161@@ -342,8 +340,6 @@ dnl
162 AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot glob strfmon nice fpclass isinf isnan mempcpy strpncpy)
163 AC_FUNC_FNMATCH
164
165-divert(5)dnl
166-
167 dnl
168 dnl Check if there is a support means of creating a new process
169 dnl and defining which handles it receives
170diff --git a/scripts/php-config.in b/scripts/php-config.in
171index 13c25f2..d6c62cc 100644
172--- a/scripts/php-config.in
173+++ b/scripts/php-config.in
174@@ -2,6 +2,7 @@
175
176 SED="@SED@"
177 prefix="@prefix@"
178+datarootdir="@datarootdir@"
179 exec_prefix="@exec_prefix@"
180 version="@PHP_VERSION@"
181 vernum="@PHP_VERSION_ID@"
182diff --git a/scripts/phpize.in b/scripts/phpize.in
183index 40ccc77..43cd8d3 100644
184--- a/scripts/phpize.in
185+++ b/scripts/phpize.in
186@@ -2,6 +2,7 @@
187
188 # Variable declaration
189 prefix='@prefix@'
190+datarootdir='@datarootdir@'
191 exec_prefix="`eval echo @exec_prefix@`"
192 phpdir="`eval echo @libdir@`/build"
193 includedir="`eval echo @includedir@`/php"
194diff --git a/scripts/phpize.m4 b/scripts/phpize.m4
195index e3a30a5..d745ca7 100644
196--- a/scripts/phpize.m4
197+++ b/scripts/phpize.m4
198@@ -1,9 +1,8 @@
199 dnl This file becomes configure.in for self-contained extensions.
200
201-divert(1)
202-
203-AC_PREREQ(2.13)
204+AC_PREREQ(2.59)
205 AC_INIT(config.m4)
206+ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
207
208 PHP_CONFIG_NICE(config.nice)
209
diff --git a/meta-webserver/recipes-php/modphp/modphp5.inc b/meta-webserver/recipes-php/modphp/modphp5.inc
index 0d84ba441..fdf7b1857 100644
--- a/meta-webserver/recipes-php/modphp/modphp5.inc
+++ b/meta-webserver/recipes-php/modphp/modphp5.inc
@@ -2,11 +2,13 @@ SECTION = "console/network"
2DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the apache php module." 2DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the apache php module."
3LICENSE = "PHP-3.0" 3LICENSE = "PHP-3.0"
4DEPENDS = "apache2-native apache2 zlib bzip2" 4DEPENDS = "apache2-native apache2 zlib bzip2"
5INC_PR = "r1"
5 6
6SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \ 7SRC_URI = "http://www.php.net/distributions/php-${PV}.tar.bz2 \
7 file://configure.patch \ 8 file://configure.patch \
8 file://pthread-check-threads-m4.patch \ 9 file://pthread-check-threads-m4.patch \
9 file://70_mod_php5.conf \ 10 file://70_mod_php5.conf \
11 file://php-5.3.14-aconf259.patch \
10 " 12 "
11 13
12S = "${WORKDIR}/php-${PV}" 14S = "${WORKDIR}/php-${PV}"
@@ -41,25 +43,21 @@ EXTRA_OECONF = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs \
41 --enable-mbstring \ 43 --enable-mbstring \
42 --with-config-file-path=${sysconfdir}/php/apache2-php5" 44 --with-config-file-path=${sysconfdir}/php/apache2-php5"
43 45
44PACKAGECONFIG ??= "" 46PACKAGECONFIG ??= "mysql"
45PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5" 47PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config,--without-mysqli,mysql5"
46PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5" 48PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,mysql5"
47 49
48acpaths = "" 50acpaths = ""
49 51
50# 52do_configure_prepend () {
51# override the autotools do_configure, which runs autoconf, 53 rm -f build/libtool.m4 ltmain.sh aclocal.m4
52# which breaks everything... 54 find . -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!'
53# 55}
54do_configure() {
55 gnu-configize --force
56 find . -name config.m4 -o -name configure | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!'
57 export PHP_LIBXML_DIR=${STAGING_DIR_NATIVE}${layout_exec_prefix}
58 oe_runconf
59 56
57do_configure_append() {
60 # No libtool, we really don't want rpath set... 58 # No libtool, we really don't want rpath set...
61 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool 59 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool
62 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool 60 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool
63} 61}
64 62
65do_install () { 63do_install () {
@@ -76,6 +74,8 @@ do_install () {
76 install -d ${D}${bindir} 74 install -d ${D}${bindir}
77 install -m 755 scripts/phpize ${D}${bindir} 75 install -m 755 scripts/phpize ${D}${bindir}
78 install -m 755 scripts/php-config ${D}${bindir} 76 install -m 755 scripts/php-config ${D}${bindir}
77 cat aclocal-copy/libtool.m4 aclocal-copy/lt~obsolete.m4 aclocal-copy/ltoptions.m4 \
78 aclocal-copy/ltsugar.m4 aclocal-copy/ltversion.m4 > build/libtool.m4
79 79
80 oe_runmake install-build install-headers INSTALL_ROOT=${D} 80 oe_runmake install-build install-headers INSTALL_ROOT=${D}
81} 81}