Patchwork PHP 5.5.15

login
register
mail settings
Submitter Boszormenyi Zoltan
Date Aug. 21, 2014, 10:13 a.m.
Message ID <55c56fabb920e066ba8915e51fb4ecdf.squirrel@webmail.prtelecom.hu>
Download mbox | patch
Permalink /patch/78739/
State Not Applicable
Headers show

Comments

Boszormenyi Zoltan - Aug. 21, 2014, 10:13 a.m.
> Hello,
>
> as a follow-up to my yesterday's mail about "[PATCH] Allow using a more
> recent php", here's the proof of the pudding.
>
> I needed GD support in PHP, and it turned out that PHP 5.4.x only supports
> GD 2.0, while current OE has 2.1. Not wanting to downgrade GD, I chose to
> upgrade PHP.
>
> I had to update imap-fix-autofoo.patch so it applies cleanly and I also
> had to fix https://bugs.php.net/bug.php?id=66103 so it can be cross
> compiled. (I also submitted the patch at the link).
>
> I enabled more extensions in PHP than what was in the previous version,
> this is what I needed locally.
>
> Comments?
>
> Feel free to use it in any way.

This time with the patch attached. :-)

>
> Best regards,
> Zoltán Böszörményi
>
>
Martin Jansa - Aug. 21, 2014, 11:14 a.m.
On Thu, Aug 21, 2014 at 12:13:05PM +0200, zboszor@pr.hu wrote:
> > Hello,
> >
> > as a follow-up to my yesterday's mail about "[PATCH] Allow using a more
> > recent php", here's the proof of the pudding.
> >
> > I needed GD support in PHP, and it turned out that PHP 5.4.x only supports
> > GD 2.0, while current OE has 2.1. Not wanting to downgrade GD, I chose to
> > upgrade PHP.
> >
> > I had to update imap-fix-autofoo.patch so it applies cleanly and I also
> > had to fix https://bugs.php.net/bug.php?id=66103 so it can be cross
> > compiled. (I also submitted the patch at the link).
> >
> > I enabled more extensions in PHP than what was in the previous version,
> > this is what I needed locally.
> >
> > Comments?
> >
> > Feel free to use it in any way.
> 
> This time with the patch attached. :-)

Can you please send inline patch (preferably with git send-email as
README suggests)?

There is also issue with some files not being tracked by sstate:
[^/]*/usr/lib/php/\.channels.*
[^/]*/usr/lib/php/\.registry.*
[^/]*/usr/lib/php/\.depdb.*
[^/]*/usr/lib/php/\.filemap
[^/]*/usr/lib/php/\.lock

Can someone interested in php look into fixing them? You can detect them
easily with openembedded-core/scripts/sstate-sysroot-cruft.sh after
building php (not reusing it from ssstate).

> > Best regards,
> > Zoltán Böszörményi
> >
> >

> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php-5.5.15/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
> new file mode 100644
> index 0000000..9b71e9d
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
> @@ -0,0 +1,26 @@
> +From 411ec4b31fdcc524f13fe5be80fd6769b7d16a5d Mon Sep 17 00:00:00 2001
> +From: Koen Kooi <koen@dominion.thruhere.net>
> +Date: Thu, 3 Nov 2011 14:27:15 +0100
> +Subject: [PATCH] php: don't use broken wrapper for mkdir
> +
> +Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> +---
> +
> +Upstream-Status: Inappropriate
> +
> + Makefile.global |    2 +-
> + 1 files changed, 1 insertions(+), 1 deletions(-)
> +
> +diff --git a/Makefile.global b/Makefile.global
> +index 8dad0e4..abdb5d2 100644
> +--- a/Makefile.global
> ++++ b/Makefile.global
> +@@ -1,4 +1,4 @@
> +-mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
> ++mkinstalldirs = mkdir -p
> + INSTALL = $(top_srcdir)/build/shtool install -c
> + INSTALL_DATA = $(INSTALL) -m 644
> + 
> +-- 
> +1.7.2.5
> +
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/acinclude-xml2-config.patch b/meta-oe/recipes-devtools/php/php-5.5.15/acinclude-xml2-config.patch
> new file mode 100644
> index 0000000..bf519d2
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/acinclude-xml2-config.patch
> @@ -0,0 +1,18 @@
> +--- /orig-acinclude.m4 2007-02-20 15:03:25.000000000 +0200
> ++++ /acinclude.m4      2007-02-20 15:03:24.000000000 +0200
> +@@ -2359,12 +2359,9 @@
> + AC_DEFUN([PHP_SETUP_LIBXML], [
> + AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
> + [
> +-  for i in $PHP_LIBXML_DIR /usr/local /usr; do
> +-    if test -x "$i/bin/xml2-config"; then
> +-      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
> +-      break
> +-    fi
> +-  done
> ++
> ++      ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
> ++
> + ])
> +
> +   if test -x "$ac_cv_php_xml2_config_path"; then
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/fix-fpm-cross-compile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/fix-fpm-cross-compile.patch
> new file mode 100644
> index 0000000..b009347
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/fix-fpm-cross-compile.patch
> @@ -0,0 +1,38 @@
> +From 0b44f16ea2f18a08eb1249db6621840527eab5e0 Mon Sep 17 00:00:00 2001
> +From: Jerome Loyet <fat@php.net>
> +Date: Wed, 23 May 2012 11:40:22 +0200
> +Subject: [PATCH] - Fixed bug #61839 (Unable to cross-compile PHP with
> + --enable-fpm)
> +
> +---
> +Upstream-Status: Applied 
> +http://git.php.net/?p=php-src.git;a=commit;h=0b44f16ea2f18a08eb1249db6621840527eab5e0
> +
> + NEWS               | 1 +
> + sapi/fpm/config.m4 | 4 ++++
> + 2 files changed, 5 insertions(+)
> +
> +diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
> +index 8962810..6c860c9 100644
> +--- a/sapi/fpm/config.m4
> ++++ b/sapi/fpm/config.m4
> +@@ -192,6 +192,8 @@ AC_DEFUN([AC_FPM_TRACE],
> +       have_ptrace=no
> +       have_broken_ptrace=yes
> +       AC_MSG_RESULT([no])
> ++    ], [
> ++      AC_MSG_RESULT([skipped (cross compiling)])
> +     ])
> +   fi
> + 
> +@@ -264,6 +266,8 @@ AC_DEFUN([AC_FPM_TRACE],
> +     ], [
> +       proc_mem_file=""
> +       AC_MSG_RESULT([no])
> ++    ], [
> ++      AC_MSG_RESULT([skipped (cross compiling)])
> +     ])
> +   fi
> +   
> +-- 
> +1.7.11.5
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/flock-type-crosscompile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/flock-type-crosscompile.patch
> new file mode 100644
> index 0000000..1e8c587
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/flock-type-crosscompile.patch
> @@ -0,0 +1,49 @@
> +diff -durpN php-5.5.15.old/configure.in php-5.5.15/configure.in
> +--- php-5.5.15.old/configure.in	2014-07-23 11:00:58.000000000 +0200
> ++++ php-5.5.15/configure.in	2014-08-21 10:28:03.109623271 +0200
> +@@ -687,6 +687,10 @@ asprintf \
> + nanosleep \
> + )
> + 
> ++PHP_ARG_WITH(flock-type, flock ordering type (use for cross compiling),
> ++[  --with-flock-type={linux|bsd}
> ++                          Set the flock ordering type for further checks during cross-compiling], unknown, no)
> ++
> + dnl Some systems (like OpenSolaris) do not have nanosleep in libc
> + PHP_CHECK_FUNC_LIB(nanosleep, rt)
> + 
> +diff -durpN php-5.5.15.old/ext/opcache/config.m4 php-5.5.15/ext/opcache/config.m4
> +--- php-5.5.15.old/ext/opcache/config.m4	2014-07-23 11:00:58.000000000 +0200
> ++++ php-5.5.15/ext/opcache/config.m4	2014-08-21 10:40:40.207914012 +0200
> +@@ -341,7 +341,14 @@ AC_TRY_RUN([
> + 	flock_type=linux
> +     AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
> +     AC_MSG_RESULT("yes")
> +-], AC_MSG_RESULT("no") )
> ++], AC_MSG_RESULT("no"), [
> ++  if test "$PHP_FLOCK_TYPE" == "linux"; then
> ++    AC_MSG_RESULT("yes")
> ++    flock_type=linux
> ++  else
> ++    AC_MSG_RESULT("no")
> ++  fi
> ++] )
> + 
> + AC_MSG_CHECKING("whether flock struct is BSD ordered")
> + AC_TRY_RUN([
> +@@ -357,7 +364,14 @@ AC_TRY_RUN([
> + 	flock_type=bsd
> +     AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) 
> +     AC_MSG_RESULT("yes")
> +-], AC_MSG_RESULT("no") )
> ++], AC_MSG_RESULT("no"), [
> ++  if test "$PHP_FLOCK_TYPE" == "bsd"; then
> ++    AC_MSG_RESULT("yes")
> ++    flock_type=bsd
> ++  else
> ++    AC_MSG_RESULT("no")
> ++  fi
> ++])
> + 
> + if test "$flock_type" == "unknown"; then
> + 	AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/iconv.patch b/meta-oe/recipes-devtools/php/php-5.5.15/iconv.patch
> new file mode 100644
> index 0000000..f3d2a16
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/iconv.patch
> @@ -0,0 +1,27 @@
> +diff --git a/acinclude.m4 b/acinclude.m4
> +index 4c28b80..d6491a1 100644
> +--- a/acinclude.m4
> ++++ b/acinclude.m4
> +@@ -2439,7 +2439,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
> +   dnl Check libc first if no path is provided in --with-iconv
> +   dnl
> + 
> +-  if test "$PHP_ICONV" = "yes"; then
> ++  dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes
> ++  if test "$PHP_ICONV" != "no"; then
> +     dnl Reset LIBS temporarily as it may have already been included
> +     dnl -liconv in.
> +     LIBS_save="$LIBS"
> +diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
> +index d673b0a..1fbef13 100644
> +--- a/ext/iconv/config.m4
> ++++ b/ext/iconv/config.m4
> +@@ -15,7 +15,7 @@ if test "$PHP_ICONV" != "no"; then
> + 
> +   if test "$iconv_avail" != "no"; then
> +     if test -z "$ICONV_DIR"; then
> +-      for i in /usr/local /usr; do
> ++      for i in $PHP_ICONV /usr/local /usr; do
> +         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
> +           PHP_ICONV_PREFIX="$i"
> +           break
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/imap-fix-autofoo.patch b/meta-oe/recipes-devtools/php/php-5.5.15/imap-fix-autofoo.patch
> new file mode 100644
> index 0000000..d687705
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/imap-fix-autofoo.patch
> @@ -0,0 +1,39 @@
> +diff -durpN php-5.4.31.old/acinclude.m4 php-5.4.31/acinclude.m4
> +--- php-5.4.31.old/acinclude.m4	2014-08-21 09:39:14.355458436 +0200
> ++++ php-5.4.31/acinclude.m4	2014-08-21 09:36:59.426390224 +0200
> +@@ -2357,7 +2357,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
> +       PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
> +     fi
> + 
> +-    for i in $PHP_OPENSSL_DIR; do
> ++    for i in $PHP_OPENSSL_DIR $PHP_OPENSSL_DIR/usr; do
> +       if test -r $i/include/openssl/evp.h; then
> +         OPENSSL_INCDIR=$i/include
> +       fi
> +diff -durpN php-5.4.31.old/ext/imap/config.m4 php-5.4.31/ext/imap/config.m4
> +--- php-5.4.31.old/ext/imap/config.m4	2014-07-23 02:59:30.000000000 +0200
> ++++ php-5.4.31/ext/imap/config.m4	2014-08-21 09:36:25.174374637 +0200
> +@@ -109,7 +109,7 @@ if test "$PHP_IMAP" != "no"; then
> +     PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
> +     AC_DEFINE(HAVE_IMAP,1,[ ])
> + 
> +-    for i in $PHP_IMAP /usr/local /usr; do
> ++    for i in $PHP_IMAP $PHP_IMAP/usr /usr/local /usr; do
> +       IMAP_INC_CHK()
> +       el[]IMAP_INC_CHK(/include/c-client)
> +       el[]IMAP_INC_CHK(/include/imap)
> +@@ -198,13 +198,7 @@ if test "$PHP_IMAP" != "no"; then
> +       AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
> +     fi
> + 
> +-    if test ! -r "$IMAP_DIR/c-client/libc-client.a" && test -r "$IMAP_DIR/c-client/c-client.a" ; then
> +-      ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
> +-    elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
> +-      ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
> +-    fi
> +-
> +-    for lib in c-client4 c-client imap; do
> ++    for lib in /usr/lib c-client4 c-client imap; do
> +       IMAP_LIB=$lib
> +       IMAP_LIB_CHK($PHP_LIBDIR)
> +       IMAP_LIB_CHK(c-client)
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/pear-makefile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/pear-makefile.patch
> new file mode 100644
> index 0000000..1928b98
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/pear-makefile.patch
> @@ -0,0 +1,13 @@
> +diff --git a/pear/Makefile.frag b/pear/Makefile.frag
> +index 1f6f70e..b19a77c 100644
> +--- a/pear/Makefile.frag
> ++++ b/pear/Makefile.frag
> +@@ -11,7 +11,7 @@ PEAR_PREFIX = -dp a${program_prefix}
> + PEAR_SUFFIX = -ds a$(program_suffix)
> + 
> + install-pear-installer: $(SAPI_CLI_PATH)
> +-	@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
> ++	@$(PHP_NATIVE_DIR)/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
> + 
> + install-pear:
> + 	@echo "Installing PEAR environment:      $(INSTALL_ROOT)$(peardir)/"
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/phar-makefile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/phar-makefile.patch
> new file mode 100644
> index 0000000..6fde251
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/phar-makefile.patch
> @@ -0,0 +1,26 @@
> +diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
> +index fc93d1d..9a8cd65 100755
> +--- a/ext/phar/Makefile.frag
> ++++ b/ext/phar/Makefile.frag
> +@@ -6,19 +6,8 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
> + 
> + PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
> + PHP_PHARCMD_EXECUTABLE = ` \
> +-	if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \
> +-		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
> +-		if test "x$(PHP_MODULES)" != "x"; then \
> +-		$(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
> +-		for i in bz2 zlib phar; do \
> +-			if test -f "$(top_builddir)/modules/$$i.la"; then \
> +-				. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
> +-			fi; \
> +-		done; \
> +-		fi; \
> +-	else \
> +-		$(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
> +-	fi;`
> ++		$(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
> ++
> + PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
> + 
> + $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm-apache.conf b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm-apache.conf
> new file mode 100644
> index 0000000..77cdd82
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm-apache.conf
> @@ -0,0 +1,6 @@
> +# Taken from http://wiki.apache.org/httpd/PHP-FPM
> +
> +LoadModule proxy_module      lib/apache2/modules/mod_proxy.so
> +LoadModule proxy_fcgi_module lib/apache2/modules/mod_proxy_fcgi.so
> +
> +ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/apache2/htdocs/
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm.conf b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm.conf
> new file mode 100644
> index 0000000..21e3dfb
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm.conf
> @@ -0,0 +1,510 @@
> +;;;;;;;;;;;;;;;;;;;;;
> +; FPM Configuration ;
> +;;;;;;;;;;;;;;;;;;;;;
> +
> +; All relative paths in this configuration file are relative to PHP's install
> +; prefix (/usr). This prefix can be dynamicaly changed by using the
> +; '-p' argument from the command line.
> +
> +; Include one or more files. If glob(3) exists, it is used to include a bunch of
> +; files from a glob(3) pattern. This directive can be used everywhere in the
> +; file.
> +; Relative path can also be used. They will be prefixed by:
> +;  - the global prefix if it's been set (-p arguement)
> +;  - /usr otherwise
> +;include=etc/fpm.d/*.conf
> +
> +;;;;;;;;;;;;;;;;;;
> +; Global Options ;
> +;;;;;;;;;;;;;;;;;;
> +
> +[global]
> +; Pid file
> +; Note: the default prefix is /var
> +; Default Value: none
> +;pid = run/php-fpm.pid
> +
> +; Error log file
> +; If it's set to "syslog", log is sent to syslogd instead of being written
> +; in a local file.
> +; Note: the default prefix is /var
> +; Default Value: log/php-fpm.log
> +;error_log = log/php-fpm.log
> +
> +; syslog_facility is used to specify what type of program is logging the
> +; message. This lets syslogd specify that messages from different facilities
> +; will be handled differently.
> +; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
> +; Default Value: daemon
> +;syslog.facility = daemon
> +
> +; syslog_ident is prepended to every message. If you have multiple FPM
> +; instances running on the same server, you can change the default value
> +; which must suit common needs.
> +; Default Value: php-fpm
> +;syslog.ident = php-fpm
> +
> +; Log level
> +; Possible Values: alert, error, warning, notice, debug
> +; Default Value: notice
> +;log_level = notice
> +
> +; If this number of child processes exit with SIGSEGV or SIGBUS within the time
> +; interval set by emergency_restart_interval then FPM will restart. A value
> +; of '0' means 'Off'.
> +; Default Value: 0
> +;emergency_restart_threshold = 0
> +
> +; Interval of time used by emergency_restart_interval to determine when 
> +; a graceful restart will be initiated.  This can be useful to work around
> +; accidental corruptions in an accelerator's shared memory.
> +; Available Units: s(econds), m(inutes), h(ours), or d(ays)
> +; Default Unit: seconds
> +; Default Value: 0
> +;emergency_restart_interval = 0
> +
> +; Time limit for child processes to wait for a reaction on signals from master.
> +; Available units: s(econds), m(inutes), h(ours), or d(ays)
> +; Default Unit: seconds
> +; Default Value: 0
> +;process_control_timeout = 0
> +
> +; The maximum number of processes FPM will fork. This has been design to control
> +; the global number of processes when using dynamic PM within a lot of pools.
> +; Use it with caution.
> +; Note: A value of 0 indicates no limit
> +; Default Value: 0
> +; process.max = 128
> +
> +; Specify the nice(2) priority to apply to the master process (only if set)
> +; The value can vary from -19 (highest priority) to 20 (lower priority)
> +; Note: - It will only work if the FPM master process is launched as root
> +;       - The pool process will inherit the master process priority
> +;         unless it specified otherwise
> +; Default Value: no set
> +; process.priority = -19
> +
> +; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
> +; Default Value: yes
> +;daemonize = yes
> + 
> +; Set open file descriptor rlimit for the master process.
> +; Default Value: system defined value
> +;rlimit_files = 1024
> + 
> +; Set max core size rlimit for the master process.
> +; Possible Values: 'unlimited' or an integer greater or equal to 0
> +; Default Value: system defined value
> +;rlimit_core = 0
> +
> +; Specify the event mechanism FPM will use. The following is available:
> +; - select     (any POSIX os)
> +; - poll       (any POSIX os)
> +; - epoll      (linux >= 2.5.44)
> +; - kqueue     (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
> +; - /dev/poll  (Solaris >= 7)
> +; - port       (Solaris >= 10)
> +; Default Value: not set (auto detection)
> +; events.mechanism = epoll
> +
> +;;;;;;;;;;;;;;;;;;;;
> +; Pool Definitions ; 
> +;;;;;;;;;;;;;;;;;;;;
> +
> +; Multiple pools of child processes may be started with different listening
> +; ports and different management options.  The name of the pool will be
> +; used in logs and stats. There is no limitation on the number of pools which
> +; FPM can handle. Your system will tell you anyway :)
> +
> +; Start a new pool named 'www'.
> +; the variable $pool can we used in any directive and will be replaced by the
> +; pool name ('www' here)
> +[www]
> +
> +; Per pool prefix
> +; It only applies on the following directives:
> +; - 'slowlog'
> +; - 'listen' (unixsocket)
> +; - 'chroot'
> +; - 'chdir'
> +; - 'php_values'
> +; - 'php_admin_values'
> +; When not set, the global prefix (or /usr) applies instead.
> +; Note: This directive can also be relative to the global prefix.
> +; Default Value: none
> +;prefix = /path/to/pools/$pool
> +
> +; Unix user/group of processes
> +; Note: The user is mandatory. If the group is not set, the default user's group
> +;       will be used.
> +user = nobody
> +;group = nobody
> +
> +; The address on which to accept FastCGI requests.
> +; Valid syntaxes are:
> +;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
> +;                            a specific port;
> +;   'port'                 - to listen on a TCP socket to all addresses on a
> +;                            specific port;
> +;   '/path/to/unix/socket' - to listen on a unix socket.
> +; Note: This value is mandatory.
> +listen = 127.0.0.1:9000
> +
> +; Set listen(2) backlog. A value of '-1' means unlimited.
> +; Default Value: 128 (-1 on FreeBSD and OpenBSD)
> +;listen.backlog = -1
> +
> +; Set permissions for unix socket, if one is used. In Linux, read/write
> +; permissions must be set in order to allow connections from a web server. Many
> +; BSD-derived systems allow connections regardless of permissions. 
> +; Default Values: user and group are set as the running user
> +;                 mode is set to 0666
> +;listen.owner = nobody
> +;listen.group = nobody
> +;listen.mode = 0666
> + 
> +; List of ipv4 addresses of FastCGI clients which are allowed to connect.
> +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
> +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
> +; must be separated by a comma. If this value is left blank, connections will be
> +; accepted from any ip address.
> +; Default Value: any
> +;listen.allowed_clients = 127.0.0.1
> +
> +; Specify the nice(2) priority to apply to the pool processes (only if set)
> +; The value can vary from -19 (highest priority) to 20 (lower priority)
> +; Note: - It will only work if the FPM master process is launched as root
> +;       - The pool processes will inherit the master process priority
> +;         unless it specified otherwise
> +; Default Value: no set
> +; priority = -19
> +
> +; Choose how the process manager will control the number of child processes.
> +; Possible Values:
> +;   static  - a fixed number (pm.max_children) of child processes;
> +;   dynamic - the number of child processes are set dynamically based on the
> +;             following directives. With this process management, there will be
> +;             always at least 1 children.
> +;             pm.max_children      - the maximum number of children that can
> +;                                    be alive at the same time.
> +;             pm.start_servers     - the number of children created on startup.
> +;             pm.min_spare_servers - the minimum number of children in 'idle'
> +;                                    state (waiting to process). If the number
> +;                                    of 'idle' processes is less than this
> +;                                    number then some children will be created.
> +;             pm.max_spare_servers - the maximum number of children in 'idle'
> +;                                    state (waiting to process). If the number
> +;                                    of 'idle' processes is greater than this
> +;                                    number then some children will be killed.
> +;  ondemand - no children are created at startup. Children will be forked when
> +;             new requests will connect. The following parameter are used:
> +;             pm.max_children           - the maximum number of children that
> +;                                         can be alive at the same time.
> +;             pm.process_idle_timeout   - The number of seconds after which
> +;                                         an idle process will be killed.
> +; Note: This value is mandatory.
> +pm = dynamic
> +
> +; The number of child processes to be created when pm is set to 'static' and the
> +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
> +; This value sets the limit on the number of simultaneous requests that will be
> +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
> +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
> +; CGI. The below defaults are based on a server without much resources. Don't
> +; forget to tweak pm.* to fit your needs.
> +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
> +; Note: This value is mandatory.
> +pm.max_children = 5
> +
> +; The number of child processes created on startup.
> +; Note: Used only when pm is set to 'dynamic'
> +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
> +pm.start_servers = 2
> +
> +; The desired minimum number of idle server processes.
> +; Note: Used only when pm is set to 'dynamic'
> +; Note: Mandatory when pm is set to 'dynamic'
> +pm.min_spare_servers = 1
> +
> +; The desired maximum number of idle server processes.
> +; Note: Used only when pm is set to 'dynamic'
> +; Note: Mandatory when pm is set to 'dynamic'
> +pm.max_spare_servers = 3
> +
> +; The number of seconds after which an idle process will be killed.
> +; Note: Used only when pm is set to 'ondemand'
> +; Default Value: 10s
> +;pm.process_idle_timeout = 10s;
> + 
> +; The number of requests each child process should execute before respawning.
> +; This can be useful to work around memory leaks in 3rd party libraries. For
> +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
> +; Default Value: 0
> +;pm.max_requests = 500
> +
> +; The URI to view the FPM status page. If this value is not set, no URI will be
> +; recognized as a status page. It shows the following informations:
> +;   pool                 - the name of the pool;
> +;   process manager      - static, dynamic or ondemand;
> +;   start time           - the date and time FPM has started;
> +;   start since          - number of seconds since FPM has started;
> +;   accepted conn        - the number of request accepted by the pool;
> +;   listen queue         - the number of request in the queue of pending
> +;                          connections (see backlog in listen(2));
> +;   max listen queue     - the maximum number of requests in the queue
> +;                          of pending connections since FPM has started;
> +;   listen queue len     - the size of the socket queue of pending connections;
> +;   idle processes       - the number of idle processes;
> +;   active processes     - the number of active processes;
> +;   total processes      - the number of idle + active processes;
> +;   max active processes - the maximum number of active processes since FPM
> +;                          has started;
> +;   max children reached - number of times, the process limit has been reached,
> +;                          when pm tries to start more children (works only for
> +;                          pm 'dynamic' and 'ondemand');
> +; Value are updated in real time.
> +; Example output:
> +;   pool:                 www
> +;   process manager:      static
> +;   start time:           01/Jul/2011:17:53:49 +0200
> +;   start since:          62636
> +;   accepted conn:        190460
> +;   listen queue:         0
> +;   max listen queue:     1
> +;   listen queue len:     42
> +;   idle processes:       4
> +;   active processes:     11
> +;   total processes:      15
> +;   max active processes: 12
> +;   max children reached: 0
> +;
> +; By default the status page output is formatted as text/plain. Passing either
> +; 'html', 'xml' or 'json' in the query string will return the corresponding
> +; output syntax. Example:
> +;   http://www.foo.bar/status
> +;   http://www.foo.bar/status?json
> +;   http://www.foo.bar/status?html
> +;   http://www.foo.bar/status?xml
> +;
> +; By default the status page only outputs short status. Passing 'full' in the
> +; query string will also return status for each pool process.
> +; Example: 
> +;   http://www.foo.bar/status?full
> +;   http://www.foo.bar/status?json&full
> +;   http://www.foo.bar/status?html&full
> +;   http://www.foo.bar/status?xml&full
> +; The Full status returns for each process:
> +;   pid                  - the PID of the process;
> +;   state                - the state of the process (Idle, Running, ...);
> +;   start time           - the date and time the process has started;
> +;   start since          - the number of seconds since the process has started;
> +;   requests             - the number of requests the process has served;
> +;   request duration     - the duration in ??s of the requests;
> +;   request method       - the request method (GET, POST, ...);
> +;   request URI          - the request URI with the query string;
> +;   content length       - the content length of the request (only with POST);
> +;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
> +;   script               - the main script called (or '-' if not set);
> +;   last request cpu     - the %cpu the last request consumed
> +;                          it's always 0 if the process is not in Idle state
> +;                          because CPU calculation is done when the request
> +;                          processing has terminated;
> +;   last request memory  - the max amount of memory the last request consumed
> +;                          it's always 0 if the process is not in Idle state
> +;                          because memory calculation is done when the request
> +;                          processing has terminated;
> +; If the process is in Idle state, then informations are related to the
> +; last request the process has served. Otherwise informations are related to
> +; the current request being served.
> +; Example output:
> +;   ************************
> +;   pid:                  31330
> +;   state:                Running
> +;   start time:           01/Jul/2011:17:53:49 +0200
> +;   start since:          63087
> +;   requests:             12808
> +;   request duration:     1250261
> +;   request method:       GET
> +;   request URI:          /test_mem.php?N=10000
> +;   content length:       0
> +;   user:                 -
> +;   script:               /home/fat/web/docs/php/test_mem.php
> +;   last request cpu:     0.00
> +;   last request memory:  0
> +;
> +; Note: There is a real-time FPM status monitoring sample web page available
> +;       It's available in: /usr/share/fpm/status.html
> +;
> +; Note: The value must start with a leading slash (/). The value can be
> +;       anything, but it may not be a good idea to use the .php extension or it
> +;       may conflict with a real PHP file.
> +; Default Value: not set 
> +;pm.status_path = /status
> + 
> +; The ping URI to call the monitoring page of FPM. If this value is not set, no
> +; URI will be recognized as a ping page. This could be used to test from outside
> +; that FPM is alive and responding, or to
> +; - create a graph of FPM availability (rrd or such);
> +; - remove a server from a group if it is not responding (load balancing);
> +; - trigger alerts for the operating team (24/7).
> +; Note: The value must start with a leading slash (/). The value can be
> +;       anything, but it may not be a good idea to use the .php extension or it
> +;       may conflict with a real PHP file.
> +; Default Value: not set
> +;ping.path = /ping
> +
> +; This directive may be used to customize the response of a ping request. The
> +; response is formatted as text/plain with a 200 response code.
> +; Default Value: pong
> +;ping.response = pong
> +
> +; The access log file
> +; Default: not set
> +;access.log = log/$pool.access.log
> +
> +; The access log format.
> +; The following syntax is allowed
> +;  %%: the '%' character
> +;  %C: %CPU used by the request
> +;      it can accept the following format:
> +;      - %{user}C for user CPU only
> +;      - %{system}C for system CPU only
> +;      - %{total}C  for user + system CPU (default)
> +;  %d: time taken to serve the request
> +;      it can accept the following format:
> +;      - %{seconds}d (default)
> +;      - %{miliseconds}d
> +;      - %{mili}d
> +;      - %{microseconds}d
> +;      - %{micro}d
> +;  %e: an environment variable (same as $_ENV or $_SERVER)
> +;      it must be associated with embraces to specify the name of the env
> +;      variable. Some exemples:
> +;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
> +;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
> +;  %f: script filename
> +;  %l: content-length of the request (for POST request only)
> +;  %m: request method
> +;  %M: peak of memory allocated by PHP
> +;      it can accept the following format:
> +;      - %{bytes}M (default)
> +;      - %{kilobytes}M
> +;      - %{kilo}M
> +;      - %{megabytes}M
> +;      - %{mega}M
> +;  %n: pool name
> +;  %o: ouput header
> +;      it must be associated with embraces to specify the name of the header:
> +;      - %{Content-Type}o
> +;      - %{X-Powered-By}o
> +;      - %{Transfert-Encoding}o
> +;      - ....
> +;  %p: PID of the child that serviced the request
> +;  %P: PID of the parent of the child that serviced the request
> +;  %q: the query string 
> +;  %Q: the '?' character if query string exists
> +;  %r: the request URI (without the query string, see %q and %Q)
> +;  %R: remote IP address
> +;  %s: status (response code)
> +;  %t: server time the request was received
> +;      it can accept a strftime(3) format:
> +;      %d/%b/%Y:%H:%M:%S %z (default)
> +;  %T: time the log has been written (the request has finished)
> +;      it can accept a strftime(3) format:
> +;      %d/%b/%Y:%H:%M:%S %z (default)
> +;  %u: remote user
> +;
> +; Default: "%R - %u %t \"%m %r\" %s"
> +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
> + 
> +; The log file for slow requests
> +; Default Value: not set
> +; Note: slowlog is mandatory if request_slowlog_timeout is set
> +;slowlog = log/$pool.log.slow
> + 
> +; The timeout for serving a single request after which a PHP backtrace will be
> +; dumped to the 'slowlog' file. A value of '0s' means 'off'.
> +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
> +; Default Value: 0
> +;request_slowlog_timeout = 0
> + 
> +; The timeout for serving a single request after which the worker process will
> +; be killed. This option should be used when the 'max_execution_time' ini option
> +; does not stop script execution for some reason. A value of '0' means 'off'.
> +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
> +; Default Value: 0
> +;request_terminate_timeout = 0
> + 
> +; Set open file descriptor rlimit.
> +; Default Value: system defined value
> +;rlimit_files = 1024
> + 
> +; Set max core size rlimit.
> +; Possible Values: 'unlimited' or an integer greater or equal to 0
> +; Default Value: system defined value
> +;rlimit_core = 0
> + 
> +; Chroot to this directory at the start. This value must be defined as an
> +; absolute path. When this value is not set, chroot is not used.
> +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
> +; of its subdirectories. If the pool prefix is not set, the global prefix
> +; will be used instead.
> +; Note: chrooting is a great security feature and should be used whenever 
> +;       possible. However, all PHP paths will be relative to the chroot
> +;       (error_log, sessions.save_path, ...).
> +; Default Value: not set
> +;chroot = 
> + 
> +; Chdir to this directory at the start.
> +; Note: relative path can be used.
> +; Default Value: current directory or / when chroot
> +;chdir = /var/www
> + 
> +; Redirect worker stdout and stderr into main error log. If not set, stdout and
> +; stderr will be redirected to /dev/null according to FastCGI specs.
> +; Note: on highloaded environement, this can cause some delay in the page
> +; process time (several ms).
> +; Default Value: no
> +;catch_workers_output = yes
> +
> +; Limits the extensions of the main script FPM will allow to parse. This can
> +; prevent configuration mistakes on the web server side. You should only limit
> +; FPM to .php extensions to prevent malicious users to use other extensions to
> +; exectute php code.
> +; Note: set an empty value to allow all extensions.
> +; Default Value: .php
> +;security.limit_extensions = .php .php3 .php4 .php5
> + 
> +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
> +; the current environment.
> +; Default Value: clean env
> +;env[HOSTNAME] = $HOSTNAME
> +;env[PATH] = /usr/local/bin:/usr/bin:/bin
> +;env[TMP] = /tmp
> +;env[TMPDIR] = /tmp
> +;env[TEMP] = /tmp
> +
> +; Additional php.ini defines, specific to this pool of workers. These settings
> +; overwrite the values previously defined in the php.ini. The directives are the
> +; same as the PHP SAPI:
> +;   php_value/php_flag             - you can set classic ini defines which can
> +;                                    be overwritten from PHP call 'ini_set'. 
> +;   php_admin_value/php_admin_flag - these directives won't be overwritten by
> +;                                     PHP call 'ini_set'
> +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
> +
> +; Defining 'extension' will load the corresponding shared extension from
> +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
> +; overwrite previously defined php.ini values, but will append the new value
> +; instead.
> +
> +; Note: path INI options can be relative and will be expanded with the prefix
> +; (pool, global or /usr)
> +
> +; Default Value: nothing is defined by default except the values in php.ini and
> +;                specified at startup with the -d argument
> +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
> +;php_flag[display_errors] = off
> +;php_admin_value[error_log] = /var/log/fpm-php.www.log
> +;php_admin_flag[log_errors] = on
> +;php_admin_value[memory_limit] = 32M
> diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/php_exec_native.patch b/meta-oe/recipes-devtools/php/php-5.5.15/php_exec_native.patch
> new file mode 100644
> index 0000000..31be1b7
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php-5.5.15/php_exec_native.patch
> @@ -0,0 +1,19 @@
> +---
> + sapi/cli/config.m4 |    2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +--- php-5.4.14.orig/sapi/cli/config.m4
> ++++ php-5.4.14/sapi/cli/config.m4
> +@@ -34,11 +34,11 @@ if test "$PHP_CLI" != "no"; then
> +     BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
> +     ;;
> +   esac
> + 
> +   dnl Set executable for tests
> +-  PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
> ++  PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php"
> +   PHP_SUBST(PHP_EXECUTABLE)
> + 
> +   dnl Expose to Makefile
> +   PHP_SUBST(SAPI_CLI_PATH)
> +   PHP_SUBST(BUILD_CLI)
> diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
> index b1bf79c..b7eb5ce 100644
> --- a/meta-oe/recipes-devtools/php/php.inc
> +++ b/meta-oe/recipes-devtools/php/php.inc
> @@ -1,19 +1,21 @@
>  DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI."
>  HOMEPAGE = "http://www.php.net"
>  SECTION = "console/network"
> -LICENSE = "PHP-3.0"
> +LICENSE = "PHP-3.01"
>  BBCLASSEXTEND = "native"
>  DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \
> -           libc-client openssl"
> +           libc-client openssl libmcrypt mariadb curl \
> +	   gd jpeg libpng libxpm freetype t1lib"
>  DEPENDS_virtclass-native = "zlib-native libxml2-native"
>  
> -INC_PR = "r5"
> +INC_PR = "r12"
>  
>  # The new PHP downloads server groups PHP releases by major version so find
>  # the major version of the PHP recipe.
>  PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}"
>  
> -SRC_URI = "http://museum.php.net/php${PHP_MAJVER}/php-${PV}.tar.bz2"
> +FETCHCMD_wget += "--trust-server-names"
> +SRC_URI = "http://php.net/get/php-${PV}.tar.bz2/from/this/mirror;downloadfilename=php-${PV}.tar.bz2"
>  
>  S = "${WORKDIR}/php-${PV}"
>  
> @@ -24,16 +26,28 @@ SSTATE_SCAN_FILES += "build-defs.h"
>  # Common EXTRA_OECONF
>  COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared"
>  EXTRA_OECONF = "--enable-mbstring \
> -                --enable-wddx \
> -                --enable-fpm \
> -                --with-imap=${STAGING_DIR_HOST} \
> -                --with-gettext=${STAGING_LIBDIR}/.. \
> -                --with-imap-ssl=${STAGING_DIR_HOST} \
> -                --with-zlib=${STAGING_LIBDIR}/.. \
> -                --with-iconv=${STAGING_LIBDIR}/.. \
> -                --with-libxml-dir=${STAGING_BINDIR_CROSS} \
> -                ${COMMON_EXTRA_OECONF} \
> +		--enable-wddx \
> +		--enable-fpm \
> +		--enable-bcmath \
> +		--enable-opcache \
> +		--with-flock-type=linux \
> +		--with-imap=${STAGING_DIR_HOST} \
> +		--with-gettext=${STAGING_LIBDIR}/.. \
> +		--with-mcrypt=${STAGING_LIBDIR}/.. \
> +		--with-curl=${STAGING_LIBDIR}/.. \
> +		--with-openssl=${STAGING_LIBDIR}/.. \
> +		--with-imap-ssl=${STAGING_DIR_HOST} \
> +		--with-zlib=${STAGING_LIBDIR}/.. \
> +		--with-iconv=${STAGING_LIBDIR}/.. \
> +		--with-libxml-dir=${STAGING_BINDIR_CROSS} \
> +		--with-gd=${STAGING_LIBDIR}/.. \
> +		--with-zlib-dir=${STAGING_LIBDIR}/.. \
> +		--with-png-dir=${STAGING_LIBDIR}/.. \
> +		--with-jpeg-dir=${STAGING_LIBDIR}/.. \
> +		--with-xpm-dir=${STAGING_LIBDIR}/.. \
> +		${COMMON_EXTRA_OECONF} \
>  "
> +
>  EXTRA_OECONF_virtclass-native = " \
>                  --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
>                  --with-libxml-dir=${STAGING_BINDIR_NATIVE} \
> diff --git a/meta-oe/recipes-devtools/php/php_5.5.15.bb b/meta-oe/recipes-devtools/php/php_5.5.15.bb
> new file mode 100644
> index 0000000..149900a
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/php/php_5.5.15.bb
> @@ -0,0 +1,22 @@
> +require php.inc
> +
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=52dd90569008fee5bcdbb22d945b1108"
> +
> +PR = "${INC_PR}.0"
> +
> +SRC_URI += "file://acinclude-xml2-config.patch \
> +            file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch"
> +
> +SRC_URI_append_pn-php += "file://iconv.patch \
> +            file://imap-fix-autofoo.patch \
> +            file://pear-makefile.patch \
> +            file://phar-makefile.patch \
> +            file://php_exec_native.patch \
> +            file://fix-fpm-cross-compile.patch \
> +            file://php-fpm.conf \
> +            file://php-fpm-apache.conf \
> +	    file://flock-type-crosscompile.patch \
> +"
> +
> +SRC_URI[md5sum] = "5cb5f2ed9099299f8a4c952d59d93812"
> +SRC_URI[sha256sum] = "00f24226b12fee27e332383b6304f1b9ed3f4d9173dd728a68c5c3f5a59b8ba7"
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Khem Raj - Aug. 25, 2014, 7:01 a.m.
On 14-08-21 13:14:43, Martin Jansa wrote:
> On Thu, Aug 21, 2014 at 12:13:05PM +0200, zboszor@pr.hu wrote:
> > > Hello,
> > >
> > > as a follow-up to my yesterday's mail about "[PATCH] Allow using a more
> > > recent php", here's the proof of the pudding.
> > >
> > > I needed GD support in PHP, and it turned out that PHP 5.4.x only supports
> > > GD 2.0, while current OE has 2.1. Not wanting to downgrade GD, I chose to
> > > upgrade PHP.
> > >
> > > I had to update imap-fix-autofoo.patch so it applies cleanly and I also
> > > had to fix https://bugs.php.net/bug.php?id=66103 so it can be cross
> > > compiled. (I also submitted the patch at the link).
> > >
> > > I enabled more extensions in PHP than what was in the previous version,
> > > this is what I needed locally.
> > >
> > > Comments?
> > >
> > > Feel free to use it in any way.
> > 
> > This time with the patch attached. :-)
> 
> Can you please send inline patch (preferably with git send-email as
> README suggests)?
> 
> There is also issue with some files not being tracked by sstate:
> [^/]*/usr/lib/php/\.channels.*
> [^/]*/usr/lib/php/\.registry.*
> [^/]*/usr/lib/php/\.depdb.*
> [^/]*/usr/lib/php/\.filemap
> [^/]*/usr/lib/php/\.lock
> 

they should be packaged in FILES_${PN}-pear, so sstate should track them
is it because they start with a 'dot' ?

Patch

diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php-5.5.15/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
new file mode 100644
index 0000000..9b71e9d
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
@@ -0,0 +1,26 @@ 
+From 411ec4b31fdcc524f13fe5be80fd6769b7d16a5d Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Thu, 3 Nov 2011 14:27:15 +0100
+Subject: [PATCH] php: don't use broken wrapper for mkdir
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+
+Upstream-Status: Inappropriate
+
+ Makefile.global |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile.global b/Makefile.global
+index 8dad0e4..abdb5d2 100644
+--- a/Makefile.global
++++ b/Makefile.global
+@@ -1,4 +1,4 @@
+-mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
++mkinstalldirs = mkdir -p
+ INSTALL = $(top_srcdir)/build/shtool install -c
+ INSTALL_DATA = $(INSTALL) -m 644
+ 
+-- 
+1.7.2.5
+
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/acinclude-xml2-config.patch b/meta-oe/recipes-devtools/php/php-5.5.15/acinclude-xml2-config.patch
new file mode 100644
index 0000000..bf519d2
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/acinclude-xml2-config.patch
@@ -0,0 +1,18 @@ 
+--- /orig-acinclude.m4 2007-02-20 15:03:25.000000000 +0200
++++ /acinclude.m4      2007-02-20 15:03:24.000000000 +0200
+@@ -2359,12 +2359,9 @@
+ AC_DEFUN([PHP_SETUP_LIBXML], [
+ AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path,
+ [
+-  for i in $PHP_LIBXML_DIR /usr/local /usr; do
+-    if test -x "$i/bin/xml2-config"; then
+-      ac_cv_php_xml2_config_path="$i/bin/xml2-config"
+-      break
+-    fi
+-  done
++
++      ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config"
++
+ ])
+
+   if test -x "$ac_cv_php_xml2_config_path"; then
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/fix-fpm-cross-compile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/fix-fpm-cross-compile.patch
new file mode 100644
index 0000000..b009347
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/fix-fpm-cross-compile.patch
@@ -0,0 +1,38 @@ 
+From 0b44f16ea2f18a08eb1249db6621840527eab5e0 Mon Sep 17 00:00:00 2001
+From: Jerome Loyet <fat@php.net>
+Date: Wed, 23 May 2012 11:40:22 +0200
+Subject: [PATCH] - Fixed bug #61839 (Unable to cross-compile PHP with
+ --enable-fpm)
+
+---
+Upstream-Status: Applied 
+http://git.php.net/?p=php-src.git;a=commit;h=0b44f16ea2f18a08eb1249db6621840527eab5e0
+
+ NEWS               | 1 +
+ sapi/fpm/config.m4 | 4 ++++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
+index 8962810..6c860c9 100644
+--- a/sapi/fpm/config.m4
++++ b/sapi/fpm/config.m4
+@@ -192,6 +192,8 @@ AC_DEFUN([AC_FPM_TRACE],
+       have_ptrace=no
+       have_broken_ptrace=yes
+       AC_MSG_RESULT([no])
++    ], [
++      AC_MSG_RESULT([skipped (cross compiling)])
+     ])
+   fi
+ 
+@@ -264,6 +266,8 @@ AC_DEFUN([AC_FPM_TRACE],
+     ], [
+       proc_mem_file=""
+       AC_MSG_RESULT([no])
++    ], [
++      AC_MSG_RESULT([skipped (cross compiling)])
+     ])
+   fi
+   
+-- 
+1.7.11.5
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/flock-type-crosscompile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/flock-type-crosscompile.patch
new file mode 100644
index 0000000..1e8c587
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/flock-type-crosscompile.patch
@@ -0,0 +1,49 @@ 
+diff -durpN php-5.5.15.old/configure.in php-5.5.15/configure.in
+--- php-5.5.15.old/configure.in	2014-07-23 11:00:58.000000000 +0200
++++ php-5.5.15/configure.in	2014-08-21 10:28:03.109623271 +0200
+@@ -687,6 +687,10 @@ asprintf \
+ nanosleep \
+ )
+ 
++PHP_ARG_WITH(flock-type, flock ordering type (use for cross compiling),
++[  --with-flock-type={linux|bsd}
++                          Set the flock ordering type for further checks during cross-compiling], unknown, no)
++
+ dnl Some systems (like OpenSolaris) do not have nanosleep in libc
+ PHP_CHECK_FUNC_LIB(nanosleep, rt)
+ 
+diff -durpN php-5.5.15.old/ext/opcache/config.m4 php-5.5.15/ext/opcache/config.m4
+--- php-5.5.15.old/ext/opcache/config.m4	2014-07-23 11:00:58.000000000 +0200
++++ php-5.5.15/ext/opcache/config.m4	2014-08-21 10:40:40.207914012 +0200
+@@ -341,7 +341,14 @@ AC_TRY_RUN([
+ 	flock_type=linux
+     AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
+     AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
++], AC_MSG_RESULT("no"), [
++  if test "$PHP_FLOCK_TYPE" == "linux"; then
++    AC_MSG_RESULT("yes")
++    flock_type=linux
++  else
++    AC_MSG_RESULT("no")
++  fi
++] )
+ 
+ AC_MSG_CHECKING("whether flock struct is BSD ordered")
+ AC_TRY_RUN([
+@@ -357,7 +364,14 @@ AC_TRY_RUN([
+ 	flock_type=bsd
+     AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) 
+     AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
++], AC_MSG_RESULT("no"), [
++  if test "$PHP_FLOCK_TYPE" == "bsd"; then
++    AC_MSG_RESULT("yes")
++    flock_type=bsd
++  else
++    AC_MSG_RESULT("no")
++  fi
++])
+ 
+ if test "$flock_type" == "unknown"; then
+ 	AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/iconv.patch b/meta-oe/recipes-devtools/php/php-5.5.15/iconv.patch
new file mode 100644
index 0000000..f3d2a16
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/iconv.patch
@@ -0,0 +1,27 @@ 
+diff --git a/acinclude.m4 b/acinclude.m4
+index 4c28b80..d6491a1 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2439,7 +2439,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+   dnl Check libc first if no path is provided in --with-iconv
+   dnl
+ 
+-  if test "$PHP_ICONV" = "yes"; then
++  dnl must check against no, not against yes as PHP_ICONV can also include a path, which implies yes
++  if test "$PHP_ICONV" != "no"; then
+     dnl Reset LIBS temporarily as it may have already been included
+     dnl -liconv in.
+     LIBS_save="$LIBS"
+diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
+index d673b0a..1fbef13 100644
+--- a/ext/iconv/config.m4
++++ b/ext/iconv/config.m4
+@@ -15,7 +15,7 @@ if test "$PHP_ICONV" != "no"; then
+ 
+   if test "$iconv_avail" != "no"; then
+     if test -z "$ICONV_DIR"; then
+-      for i in /usr/local /usr; do
++      for i in $PHP_ICONV /usr/local /usr; do
+         if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
+           PHP_ICONV_PREFIX="$i"
+           break
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/imap-fix-autofoo.patch b/meta-oe/recipes-devtools/php/php-5.5.15/imap-fix-autofoo.patch
new file mode 100644
index 0000000..d687705
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/imap-fix-autofoo.patch
@@ -0,0 +1,39 @@ 
+diff -durpN php-5.4.31.old/acinclude.m4 php-5.4.31/acinclude.m4
+--- php-5.4.31.old/acinclude.m4	2014-08-21 09:39:14.355458436 +0200
++++ php-5.4.31/acinclude.m4	2014-08-21 09:36:59.426390224 +0200
+@@ -2357,7 +2357,7 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
+       PHP_OPENSSL_DIR="/usr/local/ssl /usr/local /usr /usr/local/openssl"
+     fi
+ 
+-    for i in $PHP_OPENSSL_DIR; do
++    for i in $PHP_OPENSSL_DIR $PHP_OPENSSL_DIR/usr; do
+       if test -r $i/include/openssl/evp.h; then
+         OPENSSL_INCDIR=$i/include
+       fi
+diff -durpN php-5.4.31.old/ext/imap/config.m4 php-5.4.31/ext/imap/config.m4
+--- php-5.4.31.old/ext/imap/config.m4	2014-07-23 02:59:30.000000000 +0200
++++ php-5.4.31/ext/imap/config.m4	2014-08-21 09:36:25.174374637 +0200
+@@ -109,7 +109,7 @@ if test "$PHP_IMAP" != "no"; then
+     PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared)
+     AC_DEFINE(HAVE_IMAP,1,[ ])
+ 
+-    for i in $PHP_IMAP /usr/local /usr; do
++    for i in $PHP_IMAP $PHP_IMAP/usr /usr/local /usr; do
+       IMAP_INC_CHK()
+       el[]IMAP_INC_CHK(/include/c-client)
+       el[]IMAP_INC_CHK(/include/imap)
+@@ -198,13 +198,7 @@ if test "$PHP_IMAP" != "no"; then
+       AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+     fi
+ 
+-    if test ! -r "$IMAP_DIR/c-client/libc-client.a" && test -r "$IMAP_DIR/c-client/c-client.a" ; then
+-      ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+-    elif test ! -r "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" && test -r "$IMAP_DIR/$PHP_LIBDIR/c-client.a"; then
+-      ln -s "$IMAP_DIR/$PHP_LIBDIR/c-client.a" "$IMAP_DIR/$PHP_LIBDIR/libc-client.a" >/dev/null 2>&1
+-    fi
+-
+-    for lib in c-client4 c-client imap; do
++    for lib in /usr/lib c-client4 c-client imap; do
+       IMAP_LIB=$lib
+       IMAP_LIB_CHK($PHP_LIBDIR)
+       IMAP_LIB_CHK(c-client)
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/pear-makefile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/pear-makefile.patch
new file mode 100644
index 0000000..1928b98
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/pear-makefile.patch
@@ -0,0 +1,13 @@ 
+diff --git a/pear/Makefile.frag b/pear/Makefile.frag
+index 1f6f70e..b19a77c 100644
+--- a/pear/Makefile.frag
++++ b/pear/Makefile.frag
+@@ -11,7 +11,7 @@ PEAR_PREFIX = -dp a${program_prefix}
+ PEAR_SUFFIX = -ds a$(program_suffix)
+ 
+ install-pear-installer: $(SAPI_CLI_PATH)
+-	@$(top_builddir)/sapi/cli/php $(PEAR_INSTALL_FLAGS) pear/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
++	@$(PHP_NATIVE_DIR)/php $(PEAR_INSTALL_FLAGS) $(builddir)/install-pear-nozlib.phar -d "$(peardir)" -b "$(bindir)" ${PEAR_PREFIX} ${PEAR_SUFFIX}
+ 
+ install-pear:
+ 	@echo "Installing PEAR environment:      $(INSTALL_ROOT)$(peardir)/"
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/phar-makefile.patch b/meta-oe/recipes-devtools/php/php-5.5.15/phar-makefile.patch
new file mode 100644
index 0000000..6fde251
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/phar-makefile.patch
@@ -0,0 +1,26 @@ 
+diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag
+index fc93d1d..9a8cd65 100755
+--- a/ext/phar/Makefile.frag
++++ b/ext/phar/Makefile.frag
+@@ -6,19 +6,8 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar
+ 
+ PHP_PHARCMD_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0'
+ PHP_PHARCMD_EXECUTABLE = ` \
+-	if test -x "$(top_builddir)/$(SAPI_CLI_PATH)"; then \
+-		$(top_srcdir)/build/shtool echo -n -- "$(top_builddir)/$(SAPI_CLI_PATH) -n"; \
+-		if test "x$(PHP_MODULES)" != "x"; then \
+-		$(top_srcdir)/build/shtool echo -n -- " -d extension_dir=$(top_builddir)/modules"; \
+-		for i in bz2 zlib phar; do \
+-			if test -f "$(top_builddir)/modules/$$i.la"; then \
+-				. $(top_builddir)/modules/$$i.la; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
+-			fi; \
+-		done; \
+-		fi; \
+-	else \
+-		$(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \
+-	fi;`
++		$(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
++
+ PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
+ 
+ $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm-apache.conf b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm-apache.conf
new file mode 100644
index 0000000..77cdd82
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm-apache.conf
@@ -0,0 +1,6 @@ 
+# Taken from http://wiki.apache.org/httpd/PHP-FPM
+
+LoadModule proxy_module      lib/apache2/modules/mod_proxy.so
+LoadModule proxy_fcgi_module lib/apache2/modules/mod_proxy_fcgi.so
+
+ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/share/apache2/htdocs/
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm.conf b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm.conf
new file mode 100644
index 0000000..21e3dfb
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/php-fpm.conf
@@ -0,0 +1,510 @@ 
+;;;;;;;;;;;;;;;;;;;;;
+; FPM Configuration ;
+;;;;;;;;;;;;;;;;;;;;;
+
+; All relative paths in this configuration file are relative to PHP's install
+; prefix (/usr). This prefix can be dynamicaly changed by using the
+; '-p' argument from the command line.
+
+; Include one or more files. If glob(3) exists, it is used to include a bunch of
+; files from a glob(3) pattern. This directive can be used everywhere in the
+; file.
+; Relative path can also be used. They will be prefixed by:
+;  - the global prefix if it's been set (-p arguement)
+;  - /usr otherwise
+;include=etc/fpm.d/*.conf
+
+;;;;;;;;;;;;;;;;;;
+; Global Options ;
+;;;;;;;;;;;;;;;;;;
+
+[global]
+; Pid file
+; Note: the default prefix is /var
+; Default Value: none
+;pid = run/php-fpm.pid
+
+; Error log file
+; If it's set to "syslog", log is sent to syslogd instead of being written
+; in a local file.
+; Note: the default prefix is /var
+; Default Value: log/php-fpm.log
+;error_log = log/php-fpm.log
+
+; syslog_facility is used to specify what type of program is logging the
+; message. This lets syslogd specify that messages from different facilities
+; will be handled differently.
+; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
+; Default Value: daemon
+;syslog.facility = daemon
+
+; syslog_ident is prepended to every message. If you have multiple FPM
+; instances running on the same server, you can change the default value
+; which must suit common needs.
+; Default Value: php-fpm
+;syslog.ident = php-fpm
+
+; Log level
+; Possible Values: alert, error, warning, notice, debug
+; Default Value: notice
+;log_level = notice
+
+; If this number of child processes exit with SIGSEGV or SIGBUS within the time
+; interval set by emergency_restart_interval then FPM will restart. A value
+; of '0' means 'Off'.
+; Default Value: 0
+;emergency_restart_threshold = 0
+
+; Interval of time used by emergency_restart_interval to determine when 
+; a graceful restart will be initiated.  This can be useful to work around
+; accidental corruptions in an accelerator's shared memory.
+; Available Units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;emergency_restart_interval = 0
+
+; Time limit for child processes to wait for a reaction on signals from master.
+; Available units: s(econds), m(inutes), h(ours), or d(ays)
+; Default Unit: seconds
+; Default Value: 0
+;process_control_timeout = 0
+
+; The maximum number of processes FPM will fork. This has been design to control
+; the global number of processes when using dynamic PM within a lot of pools.
+; Use it with caution.
+; Note: A value of 0 indicates no limit
+; Default Value: 0
+; process.max = 128
+
+; Specify the nice(2) priority to apply to the master process (only if set)
+; The value can vary from -19 (highest priority) to 20 (lower priority)
+; Note: - It will only work if the FPM master process is launched as root
+;       - The pool process will inherit the master process priority
+;         unless it specified otherwise
+; Default Value: no set
+; process.priority = -19
+
+; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
+; Default Value: yes
+;daemonize = yes
+ 
+; Set open file descriptor rlimit for the master process.
+; Default Value: system defined value
+;rlimit_files = 1024
+ 
+; Set max core size rlimit for the master process.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+
+; Specify the event mechanism FPM will use. The following is available:
+; - select     (any POSIX os)
+; - poll       (any POSIX os)
+; - epoll      (linux >= 2.5.44)
+; - kqueue     (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
+; - /dev/poll  (Solaris >= 7)
+; - port       (Solaris >= 10)
+; Default Value: not set (auto detection)
+; events.mechanism = epoll
+
+;;;;;;;;;;;;;;;;;;;;
+; Pool Definitions ; 
+;;;;;;;;;;;;;;;;;;;;
+
+; Multiple pools of child processes may be started with different listening
+; ports and different management options.  The name of the pool will be
+; used in logs and stats. There is no limitation on the number of pools which
+; FPM can handle. Your system will tell you anyway :)
+
+; Start a new pool named 'www'.
+; the variable $pool can we used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Per pool prefix
+; It only applies on the following directives:
+; - 'slowlog'
+; - 'listen' (unixsocket)
+; - 'chroot'
+; - 'chdir'
+; - 'php_values'
+; - 'php_admin_values'
+; When not set, the global prefix (or /usr) applies instead.
+; Note: This directive can also be relative to the global prefix.
+; Default Value: none
+;prefix = /path/to/pools/$pool
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+;       will be used.
+user = nobody
+;group = nobody
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+;   'ip.add.re.ss:port'    - to listen on a TCP socket to a specific address on
+;                            a specific port;
+;   'port'                 - to listen on a TCP socket to all addresses on a
+;                            specific port;
+;   '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = 127.0.0.1:9000
+
+; Set listen(2) backlog. A value of '-1' means unlimited.
+; Default Value: 128 (-1 on FreeBSD and OpenBSD)
+;listen.backlog = -1
+
+; Set permissions for unix socket, if one is used. In Linux, read/write
+; permissions must be set in order to allow connections from a web server. Many
+; BSD-derived systems allow connections regardless of permissions. 
+; Default Values: user and group are set as the running user
+;                 mode is set to 0666
+;listen.owner = nobody
+;listen.group = nobody
+;listen.mode = 0666
+ 
+; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
+; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
+; must be separated by a comma. If this value is left blank, connections will be
+; accepted from any ip address.
+; Default Value: any
+;listen.allowed_clients = 127.0.0.1
+
+; Specify the nice(2) priority to apply to the pool processes (only if set)
+; The value can vary from -19 (highest priority) to 20 (lower priority)
+; Note: - It will only work if the FPM master process is launched as root
+;       - The pool processes will inherit the master process priority
+;         unless it specified otherwise
+; Default Value: no set
+; priority = -19
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+;   static  - a fixed number (pm.max_children) of child processes;
+;   dynamic - the number of child processes are set dynamically based on the
+;             following directives. With this process management, there will be
+;             always at least 1 children.
+;             pm.max_children      - the maximum number of children that can
+;                                    be alive at the same time.
+;             pm.start_servers     - the number of children created on startup.
+;             pm.min_spare_servers - the minimum number of children in 'idle'
+;                                    state (waiting to process). If the number
+;                                    of 'idle' processes is less than this
+;                                    number then some children will be created.
+;             pm.max_spare_servers - the maximum number of children in 'idle'
+;                                    state (waiting to process). If the number
+;                                    of 'idle' processes is greater than this
+;                                    number then some children will be killed.
+;  ondemand - no children are created at startup. Children will be forked when
+;             new requests will connect. The following parameter are used:
+;             pm.max_children           - the maximum number of children that
+;                                         can be alive at the same time.
+;             pm.process_idle_timeout   - The number of seconds after which
+;                                         an idle process will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI. The below defaults are based on a server without much resources. Don't
+; forget to tweak pm.* to fit your needs.
+; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
+; Note: This value is mandatory.
+pm.max_children = 5
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+pm.start_servers = 2
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 1
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 3
+
+; The number of seconds after which an idle process will be killed.
+; Note: Used only when pm is set to 'ondemand'
+; Default Value: 10s
+;pm.process_idle_timeout = 10s;
+ 
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
+
+; The URI to view the FPM status page. If this value is not set, no URI will be
+; recognized as a status page. It shows the following informations:
+;   pool                 - the name of the pool;
+;   process manager      - static, dynamic or ondemand;
+;   start time           - the date and time FPM has started;
+;   start since          - number of seconds since FPM has started;
+;   accepted conn        - the number of request accepted by the pool;
+;   listen queue         - the number of request in the queue of pending
+;                          connections (see backlog in listen(2));
+;   max listen queue     - the maximum number of requests in the queue
+;                          of pending connections since FPM has started;
+;   listen queue len     - the size of the socket queue of pending connections;
+;   idle processes       - the number of idle processes;
+;   active processes     - the number of active processes;
+;   total processes      - the number of idle + active processes;
+;   max active processes - the maximum number of active processes since FPM
+;                          has started;
+;   max children reached - number of times, the process limit has been reached,
+;                          when pm tries to start more children (works only for
+;                          pm 'dynamic' and 'ondemand');
+; Value are updated in real time.
+; Example output:
+;   pool:                 www
+;   process manager:      static
+;   start time:           01/Jul/2011:17:53:49 +0200
+;   start since:          62636
+;   accepted conn:        190460
+;   listen queue:         0
+;   max listen queue:     1
+;   listen queue len:     42
+;   idle processes:       4
+;   active processes:     11
+;   total processes:      15
+;   max active processes: 12
+;   max children reached: 0
+;
+; By default the status page output is formatted as text/plain. Passing either
+; 'html', 'xml' or 'json' in the query string will return the corresponding
+; output syntax. Example:
+;   http://www.foo.bar/status
+;   http://www.foo.bar/status?json
+;   http://www.foo.bar/status?html
+;   http://www.foo.bar/status?xml
+;
+; By default the status page only outputs short status. Passing 'full' in the
+; query string will also return status for each pool process.
+; Example: 
+;   http://www.foo.bar/status?full
+;   http://www.foo.bar/status?json&full
+;   http://www.foo.bar/status?html&full
+;   http://www.foo.bar/status?xml&full
+; The Full status returns for each process:
+;   pid                  - the PID of the process;
+;   state                - the state of the process (Idle, Running, ...);
+;   start time           - the date and time the process has started;
+;   start since          - the number of seconds since the process has started;
+;   requests             - the number of requests the process has served;
+;   request duration     - the duration in µs of the requests;
+;   request method       - the request method (GET, POST, ...);
+;   request URI          - the request URI with the query string;
+;   content length       - the content length of the request (only with POST);
+;   user                 - the user (PHP_AUTH_USER) (or '-' if not set);
+;   script               - the main script called (or '-' if not set);
+;   last request cpu     - the %cpu the last request consumed
+;                          it's always 0 if the process is not in Idle state
+;                          because CPU calculation is done when the request
+;                          processing has terminated;
+;   last request memory  - the max amount of memory the last request consumed
+;                          it's always 0 if the process is not in Idle state
+;                          because memory calculation is done when the request
+;                          processing has terminated;
+; If the process is in Idle state, then informations are related to the
+; last request the process has served. Otherwise informations are related to
+; the current request being served.
+; Example output:
+;   ************************
+;   pid:                  31330
+;   state:                Running
+;   start time:           01/Jul/2011:17:53:49 +0200
+;   start since:          63087
+;   requests:             12808
+;   request duration:     1250261
+;   request method:       GET
+;   request URI:          /test_mem.php?N=10000
+;   content length:       0
+;   user:                 -
+;   script:               /home/fat/web/docs/php/test_mem.php
+;   last request cpu:     0.00
+;   last request memory:  0
+;
+; Note: There is a real-time FPM status monitoring sample web page available
+;       It's available in: /usr/share/fpm/status.html
+;
+; Note: The value must start with a leading slash (/). The value can be
+;       anything, but it may not be a good idea to use the .php extension or it
+;       may conflict with a real PHP file.
+; Default Value: not set 
+;pm.status_path = /status
+ 
+; The ping URI to call the monitoring page of FPM. If this value is not set, no
+; URI will be recognized as a ping page. This could be used to test from outside
+; that FPM is alive and responding, or to
+; - create a graph of FPM availability (rrd or such);
+; - remove a server from a group if it is not responding (load balancing);
+; - trigger alerts for the operating team (24/7).
+; Note: The value must start with a leading slash (/). The value can be
+;       anything, but it may not be a good idea to use the .php extension or it
+;       may conflict with a real PHP file.
+; Default Value: not set
+;ping.path = /ping
+
+; This directive may be used to customize the response of a ping request. The
+; response is formatted as text/plain with a 200 response code.
+; Default Value: pong
+;ping.response = pong
+
+; The access log file
+; Default: not set
+;access.log = log/$pool.access.log
+
+; The access log format.
+; The following syntax is allowed
+;  %%: the '%' character
+;  %C: %CPU used by the request
+;      it can accept the following format:
+;      - %{user}C for user CPU only
+;      - %{system}C for system CPU only
+;      - %{total}C  for user + system CPU (default)
+;  %d: time taken to serve the request
+;      it can accept the following format:
+;      - %{seconds}d (default)
+;      - %{miliseconds}d
+;      - %{mili}d
+;      - %{microseconds}d
+;      - %{micro}d
+;  %e: an environment variable (same as $_ENV or $_SERVER)
+;      it must be associated with embraces to specify the name of the env
+;      variable. Some exemples:
+;      - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
+;      - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
+;  %f: script filename
+;  %l: content-length of the request (for POST request only)
+;  %m: request method
+;  %M: peak of memory allocated by PHP
+;      it can accept the following format:
+;      - %{bytes}M (default)
+;      - %{kilobytes}M
+;      - %{kilo}M
+;      - %{megabytes}M
+;      - %{mega}M
+;  %n: pool name
+;  %o: ouput header
+;      it must be associated with embraces to specify the name of the header:
+;      - %{Content-Type}o
+;      - %{X-Powered-By}o
+;      - %{Transfert-Encoding}o
+;      - ....
+;  %p: PID of the child that serviced the request
+;  %P: PID of the parent of the child that serviced the request
+;  %q: the query string 
+;  %Q: the '?' character if query string exists
+;  %r: the request URI (without the query string, see %q and %Q)
+;  %R: remote IP address
+;  %s: status (response code)
+;  %t: server time the request was received
+;      it can accept a strftime(3) format:
+;      %d/%b/%Y:%H:%M:%S %z (default)
+;  %T: time the log has been written (the request has finished)
+;      it can accept a strftime(3) format:
+;      %d/%b/%Y:%H:%M:%S %z (default)
+;  %u: remote user
+;
+; Default: "%R - %u %t \"%m %r\" %s"
+;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
+ 
+; The log file for slow requests
+; Default Value: not set
+; Note: slowlog is mandatory if request_slowlog_timeout is set
+;slowlog = log/$pool.log.slow
+ 
+; The timeout for serving a single request after which a PHP backtrace will be
+; dumped to the 'slowlog' file. A value of '0s' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_slowlog_timeout = 0
+ 
+; The timeout for serving a single request after which the worker process will
+; be killed. This option should be used when the 'max_execution_time' ini option
+; does not stop script execution for some reason. A value of '0' means 'off'.
+; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
+; Default Value: 0
+;request_terminate_timeout = 0
+ 
+; Set open file descriptor rlimit.
+; Default Value: system defined value
+;rlimit_files = 1024
+ 
+; Set max core size rlimit.
+; Possible Values: 'unlimited' or an integer greater or equal to 0
+; Default Value: system defined value
+;rlimit_core = 0
+ 
+; Chroot to this directory at the start. This value must be defined as an
+; absolute path. When this value is not set, chroot is not used.
+; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
+; of its subdirectories. If the pool prefix is not set, the global prefix
+; will be used instead.
+; Note: chrooting is a great security feature and should be used whenever 
+;       possible. However, all PHP paths will be relative to the chroot
+;       (error_log, sessions.save_path, ...).
+; Default Value: not set
+;chroot = 
+ 
+; Chdir to this directory at the start.
+; Note: relative path can be used.
+; Default Value: current directory or / when chroot
+;chdir = /var/www
+ 
+; Redirect worker stdout and stderr into main error log. If not set, stdout and
+; stderr will be redirected to /dev/null according to FastCGI specs.
+; Note: on highloaded environement, this can cause some delay in the page
+; process time (several ms).
+; Default Value: no
+;catch_workers_output = yes
+
+; Limits the extensions of the main script FPM will allow to parse. This can
+; prevent configuration mistakes on the web server side. You should only limit
+; FPM to .php extensions to prevent malicious users to use other extensions to
+; exectute php code.
+; Note: set an empty value to allow all extensions.
+; Default Value: .php
+;security.limit_extensions = .php .php3 .php4 .php5
+ 
+; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
+; the current environment.
+; Default Value: clean env
+;env[HOSTNAME] = $HOSTNAME
+;env[PATH] = /usr/local/bin:/usr/bin:/bin
+;env[TMP] = /tmp
+;env[TMPDIR] = /tmp
+;env[TEMP] = /tmp
+
+; Additional php.ini defines, specific to this pool of workers. These settings
+; overwrite the values previously defined in the php.ini. The directives are the
+; same as the PHP SAPI:
+;   php_value/php_flag             - you can set classic ini defines which can
+;                                    be overwritten from PHP call 'ini_set'. 
+;   php_admin_value/php_admin_flag - these directives won't be overwritten by
+;                                     PHP call 'ini_set'
+; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
+
+; Defining 'extension' will load the corresponding shared extension from
+; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
+; overwrite previously defined php.ini values, but will append the new value
+; instead.
+
+; Note: path INI options can be relative and will be expanded with the prefix
+; (pool, global or /usr)
+
+; Default Value: nothing is defined by default except the values in php.ini and
+;                specified at startup with the -d argument
+;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
+;php_flag[display_errors] = off
+;php_admin_value[error_log] = /var/log/fpm-php.www.log
+;php_admin_flag[log_errors] = on
+;php_admin_value[memory_limit] = 32M
diff --git a/meta-oe/recipes-devtools/php/php-5.5.15/php_exec_native.patch b/meta-oe/recipes-devtools/php/php-5.5.15/php_exec_native.patch
new file mode 100644
index 0000000..31be1b7
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php-5.5.15/php_exec_native.patch
@@ -0,0 +1,19 @@ 
+---
+ sapi/cli/config.m4 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- php-5.4.14.orig/sapi/cli/config.m4
++++ php-5.4.14/sapi/cli/config.m4
+@@ -34,11 +34,11 @@ if test "$PHP_CLI" != "no"; then
+     BUILD_CLI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_BINARY_OBJS) \$(PHP_CLI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CLI_PATH)"
+     ;;
+   esac
+ 
+   dnl Set executable for tests
+-  PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
++  PHP_EXECUTABLE="${PHP_NATIVE_DIR}/php"
+   PHP_SUBST(PHP_EXECUTABLE)
+ 
+   dnl Expose to Makefile
+   PHP_SUBST(SAPI_CLI_PATH)
+   PHP_SUBST(BUILD_CLI)
diff --git a/meta-oe/recipes-devtools/php/php.inc b/meta-oe/recipes-devtools/php/php.inc
index b1bf79c..b7eb5ce 100644
--- a/meta-oe/recipes-devtools/php/php.inc
+++ b/meta-oe/recipes-devtools/php/php.inc
@@ -1,19 +1,21 @@ 
 DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI."
 HOMEPAGE = "http://www.php.net"
 SECTION = "console/network"
-LICENSE = "PHP-3.0"
+LICENSE = "PHP-3.01"
 BBCLASSEXTEND = "native"
 DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \
-           libc-client openssl"
+           libc-client openssl libmcrypt mariadb curl \
+	   gd jpeg libpng libxpm freetype t1lib"
 DEPENDS_virtclass-native = "zlib-native libxml2-native"
 
-INC_PR = "r5"
+INC_PR = "r12"
 
 # The new PHP downloads server groups PHP releases by major version so find
 # the major version of the PHP recipe.
 PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}"
 
-SRC_URI = "http://museum.php.net/php${PHP_MAJVER}/php-${PV}.tar.bz2"
+FETCHCMD_wget += "--trust-server-names"
+SRC_URI = "http://php.net/get/php-${PV}.tar.bz2/from/this/mirror;downloadfilename=php-${PV}.tar.bz2"
 
 S = "${WORKDIR}/php-${PV}"
 
@@ -24,16 +26,28 @@  SSTATE_SCAN_FILES += "build-defs.h"
 # Common EXTRA_OECONF
 COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared"
 EXTRA_OECONF = "--enable-mbstring \
-                --enable-wddx \
-                --enable-fpm \
-                --with-imap=${STAGING_DIR_HOST} \
-                --with-gettext=${STAGING_LIBDIR}/.. \
-                --with-imap-ssl=${STAGING_DIR_HOST} \
-                --with-zlib=${STAGING_LIBDIR}/.. \
-                --with-iconv=${STAGING_LIBDIR}/.. \
-                --with-libxml-dir=${STAGING_BINDIR_CROSS} \
-                ${COMMON_EXTRA_OECONF} \
+		--enable-wddx \
+		--enable-fpm \
+		--enable-bcmath \
+		--enable-opcache \
+		--with-flock-type=linux \
+		--with-imap=${STAGING_DIR_HOST} \
+		--with-gettext=${STAGING_LIBDIR}/.. \
+		--with-mcrypt=${STAGING_LIBDIR}/.. \
+		--with-curl=${STAGING_LIBDIR}/.. \
+		--with-openssl=${STAGING_LIBDIR}/.. \
+		--with-imap-ssl=${STAGING_DIR_HOST} \
+		--with-zlib=${STAGING_LIBDIR}/.. \
+		--with-iconv=${STAGING_LIBDIR}/.. \
+		--with-libxml-dir=${STAGING_BINDIR_CROSS} \
+		--with-gd=${STAGING_LIBDIR}/.. \
+		--with-zlib-dir=${STAGING_LIBDIR}/.. \
+		--with-png-dir=${STAGING_LIBDIR}/.. \
+		--with-jpeg-dir=${STAGING_LIBDIR}/.. \
+		--with-xpm-dir=${STAGING_LIBDIR}/.. \
+		${COMMON_EXTRA_OECONF} \
 "
+
 EXTRA_OECONF_virtclass-native = " \
                 --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
                 --with-libxml-dir=${STAGING_BINDIR_NATIVE} \
diff --git a/meta-oe/recipes-devtools/php/php_5.5.15.bb b/meta-oe/recipes-devtools/php/php_5.5.15.bb
new file mode 100644
index 0000000..149900a
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php_5.5.15.bb
@@ -0,0 +1,22 @@ 
+require php.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=52dd90569008fee5bcdbb22d945b1108"
+
+PR = "${INC_PR}.0"
+
+SRC_URI += "file://acinclude-xml2-config.patch \
+            file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch"
+
+SRC_URI_append_pn-php += "file://iconv.patch \
+            file://imap-fix-autofoo.patch \
+            file://pear-makefile.patch \
+            file://phar-makefile.patch \
+            file://php_exec_native.patch \
+            file://fix-fpm-cross-compile.patch \
+            file://php-fpm.conf \
+            file://php-fpm-apache.conf \
+	    file://flock-type-crosscompile.patch \
+"
+
+SRC_URI[md5sum] = "5cb5f2ed9099299f8a4c952d59d93812"
+SRC_URI[sha256sum] = "00f24226b12fee27e332383b6304f1b9ed3f4d9173dd728a68c5c3f5a59b8ba7"