From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- .../meta-oe/recipes-devtools/php/php.inc | 263 +++++++++++ .../php/php/0001-Add-lpthread-to-link.patch | 38 ++ ...cinclude-use-pkgconfig-for-libxml2-config.patch | 90 ++++ ...-acinclude.m4-don-t-unset-cache-variables.patch | 39 ++ ...nclude.m4-skip-binconfig-check-for-libxml.patch | 56 +++ ...aused-by-a-new-variable-is-declared-after.patch | 45 ++ ...i.c-build-empty-php_load_zend_extension_c.patch | 63 +++ .../0001-opcache-config.m4-enable-opcache.patch | 385 ++++++++++++++++ ...01-php-don-t-use-broken-wrapper-for-mkdir.patch | 26 ++ .../recipes-devtools/php/php/70_mod_php5.conf | 12 + .../recipes-devtools/php/php/70_mod_php7.conf | 9 + .../php/php/acinclude-xml2-config.patch | 25 + .../php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch | 61 +++ .../meta-oe/recipes-devtools/php/php/iconv.patch | 37 ++ .../php/php/imap-fix-autofoo.patch | 51 +++ .../recipes-devtools/php/php/pear-makefile.patch | 22 + .../recipes-devtools/php/php/phar-makefile.patch | 42 ++ .../recipes-devtools/php/php/php-fpm-apache.conf | 6 + .../meta-oe/recipes-devtools/php/php/php-fpm.conf | 510 +++++++++++++++++++++ .../recipes-devtools/php/php/php-fpm.service | 10 + ...hp5-0001-opcache-config.m4-enable-opcache.patch | 387 ++++++++++++++++ .../php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch | 63 +++ .../php/php/php5-pear-makefile.patch | 26 ++ .../php/php/php5-phar-makefile.patch | 46 ++ .../recipes-devtools/php/php/php_exec_native.patch | 22 + .../php/php/pthread-check-threads-m4.patch | 30 ++ .../meta-oe/recipes-devtools/php/php_5.6.35.bb | 23 + .../meta-oe/recipes-devtools/php/php_7.2.4.bb | 24 + 28 files changed, 2411 insertions(+) create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php.inc create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-Add-lpthread-to-link.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-fix-error-caused-by-a-new-variable-is-declared-after.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php5.conf create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php7.conf create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm-apache.conf create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm.conf create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm.service create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php5-phar-makefile.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php/pthread-check-threads-m4.patch create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.35.bb create mode 100644 meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb (limited to 'meta-openembedded/meta-oe/recipes-devtools/php') diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php.inc b/meta-openembedded/meta-oe/recipes-devtools/php/php.inc new file mode 100644 index 000000000..066b97cd2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php.inc @@ -0,0 +1,263 @@ +SUMMARY = "A server-side, HTML-embedded scripting language" +HOMEPAGE = "http://www.php.net" +SECTION = "console/network" + +LICENSE = "PHP-3.0" + +BBCLASSEXTEND = "native" +DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native \ + openssl" +DEPENDS_class-native = "zlib-native libxml2-native" + +PHP_MAJOR_VERSION = "${@d.getVar('PV', True).split('.')[0]}" + +SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \ + file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ + " + +SRC_URI_append_class-target = " \ + file://iconv.patch \ + file://imap-fix-autofoo.patch \ + file://php_exec_native.patch \ + file://php-fpm.conf \ + file://php-fpm-apache.conf \ + file://0001-acinclude.m4-don-t-unset-cache-variables.patch \ + file://70_mod_php${PHP_MAJOR_VERSION}.conf \ + file://php-fpm.service \ + " +S = "${WORKDIR}/php-${PV}" + +inherit autotools pkgconfig pythonnative gettext + +# phpize is not scanned for absolute paths by default (but php-config is). +# +SSTATE_SCAN_FILES += "phpize" +SSTATE_SCAN_FILES += "build-defs.h" + +PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}" + +# Common EXTRA_OECONF +COMMON_EXTRA_OECONF = "--enable-sockets \ + --enable-pcntl \ + --enable-shared \ + --disable-rpath \ + --with-pic \ + --libdir=${PHP_LIBDIR} \ +" +EXTRA_OECONF = "--enable-mbstring \ + --enable-wddx \ + --enable-fpm \ + --enable-zip \ + --with-libdir=${baselib} \ + --with-gettext=${STAGING_LIBDIR}/.. \ + --with-zlib=${STAGING_LIBDIR}/.. \ + --with-iconv=${STAGING_LIBDIR}/.. \ + --with-bz2=${STAGING_DIR_TARGET}${exec_prefix} \ + --with-config-file-path=${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} \ + ${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'ac_cv_c_bigendian_php=no', 'ac_cv_c_bigendian_php=yes', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'pam', '', 'ac_cv_lib_pam_pam_start=no', d)} \ + ${COMMON_EXTRA_OECONF} \ +" + +CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes" + +EXTRA_OECONF_class-native = " \ + --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ + --without-iconv \ + ${COMMON_EXTRA_OECONF} \ +" + +PACKAGECONFIG ??= "mysql sqlite3 imap opcache \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \ +" +PACKAGECONFIG_class-native = "" + +PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ + --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ + --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ + ,--without-mysql --without-mysqli --without-pdo-mysql \ + ,mysql5" + +PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ + --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ + , \ + ,sqlite3" +PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql" +PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2" +PACKAGECONFIG[apache2] = "--with-apxs2=${STAGING_BINDIR_CROSS}/apxs,,apache2-native apache2" +PACKAGECONFIG[pam] = ",,libpam" +PACKAGECONFIG[imap] = "--with-imap=${STAGING_DIR_HOST} \ + --with-imap-ssl=${STAGING_DIR_HOST} \ + ,--without-imap --without-imap-ssl \ + ,uw-imap" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[opcache] = ",--disable-opcache" + +export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" +export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" +CFLAGS += " -D_GNU_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2" +CFLAGS_append_aarch64 = " -O2" + +EXTRA_OEMAKE = "INSTALL_ROOT=${D}" + +acpaths = "" + +do_configure_prepend () { + rm -f ${S}/build/libtool.m4 ${S}/ltmain.sh ${S}/aclocal.m4 + find ${S} -name config.m4 | xargs -n1 sed -i 's!APXS_HTTPD=.*!APXS_HTTPD=${STAGING_BINDIR_NATIVE}/httpd!' +} + +do_configure_append() { + # No, libtool, we really don't want rpath set... + sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' ${HOST_SYS}-libtool + sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' ${HOST_SYS}-libtool +} + +do_install_append_class-native() { + rm -rf ${D}/${PHP_LIBDIR}/php/.registry + rm -rf ${D}/${PHP_LIBDIR}/php/.channels + rm -rf ${D}/${PHP_LIBDIR}/php/.[a-z]* +} + +do_install_prepend() { + cat ${ACLOCALDIR}/libtool.m4 ${ACLOCALDIR}/lt~obsolete.m4 ${ACLOCALDIR}/ltoptions.m4 \ + ${ACLOCALDIR}/ltsugar.m4 ${ACLOCALDIR}/ltversion.m4 > ${S}/build/libtool.m4 +} + +do_install_prepend_class-target() { + if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then + # Install dummy config file so apxs doesn't fail + install -d ${D}${sysconfdir}/apache2 + printf "\nLoadModule dummy_module modules/mod_dummy.so\n" > ${D}${sysconfdir}/apache2/httpd.conf + fi +} + +# fixme +do_install_append_class-target() { + install -d ${D}${sysconfdir}/ + if [ -d ${RECIPE_SYSROOT_NATIVE}${sysconfdir} ];then + install -m 0644 ${RECIPE_SYSROOT_NATIVE}${sysconfdir}/pear.conf ${D}${sysconfdir}/ + fi + rm -rf ${D}/${TMPDIR} + rm -rf ${D}/.registry + rm -rf ${D}/.channels + rm -rf ${D}/.[a-z]* + rm -rf ${D}/var + rm -f ${D}/${sysconfdir}/php-fpm.conf.default + sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}${sysconfdir}/pear.conf + install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf + install -d ${D}/${sysconfdir}/apache2/conf.d + install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf + install -d ${D}${sysconfdir}/init.d + sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm + sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm + sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm + install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm + install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/ + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + ${D}${systemd_unitdir}/system/php-fpm.service + fi + + TMP=`dirname ${D}/${TMPDIR}` + while test ${TMP} != ${D}; do + if [ -d ${TMP} ]; then + rmdir ${TMP} + fi + TMP=`dirname ${TMP}`; + done + + if ${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'true', 'false', d)}; then + install -d ${D}${libdir}/apache2/modules + install -d ${D}${sysconfdir}/apache2/modules.d + install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION} + install -m 755 libs/libphp${PHP_MAJOR_VERSION}.so ${D}${libdir}/apache2/modules + install -m 644 ${WORKDIR}/70_mod_php${PHP_MAJOR_VERSION}.conf ${D}${sysconfdir}/apache2/modules.d + sed -i s,lib/,${libdir}/, ${D}${sysconfdir}/apache2/modules.d/70_mod_php${PHP_MAJOR_VERSION}.conf + cat ${S}/php.ini-production | \ + sed -e 's,extension_dir = \"\./\",extension_dir = \"/usr/lib/extensions\",' \ + > ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}/php.ini + rm -f ${D}${sysconfdir}/apache2/httpd.conf* + fi +} + +SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess" + +php_sysroot_preprocess () { + install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + install -m 755 ${D}${bindir}/phpize ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + install -m 755 ${D}${bindir}/php-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ + + sed -i 's!eval echo /!eval echo ${STAGING_DIR_HOST}/!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/phpize + sed -i 's!^include_dir=.*!include_dir=${STAGING_INCDIR}/php!' ${SYSROOT_DESTDIR}${bindir_crossscripts}/php-config +} + +MODPHP_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', '${PN}-modphp', '', d)}" + +PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-phar ${MODPHP_PACKAGE} ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-opcache ${PN}" + +RDEPENDS_${PN} += "libgcc" +RDEPENDS_${PN}-pear = "${PN}" +RDEPENDS_${PN}-phar = "${PN}-cli" +RDEPENDS_${PN}-cli = "${PN}" +RDEPENDS_${PN}-modphp = "${PN} apache2" +RDEPENDS_${PN}-opcache = "${PN}" + +INITSCRIPT_PACKAGES = "${PN}-fpm" +inherit update-rc.d + +FILES_${PN}-dbg =+ "${bindir}/.debug \ + ${libdir}/apache2/modules/.debug" +FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc" +FILES_${PN}-cli = "${bindir}/php" +FILES_${PN}-phar = "${bindir}/phar*" +FILES_${PN}-cgi = "${bindir}/php-cgi" +FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service" +FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" +CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf" +CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" +INITSCRIPT_NAME_${PN}-fpm = "php-fpm" +INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" +FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \ + ${PHP_LIBDIR}/php/PEAR*.php ${PHP_LIBDIR}/php/System.php \ + ${PHP_LIBDIR}/php/peclcmd.php ${PHP_LIBDIR}/php/pearcmd.php \ + ${PHP_LIBDIR}/php/.channels ${PHP_LIBDIR}/php/.channels/.alias \ + ${PHP_LIBDIR}/php/.registry ${PHP_LIBDIR}/php/Archive/Tar.php \ + ${PHP_LIBDIR}/php/Console/Getopt.php ${PHP_LIBDIR}/php/OS/Guess.php \ + ${PHP_LIBDIR}/php/data/PEAR \ + ${sysconfdir}/pear.conf" +FILES_${PN}-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \ + ${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \ + ${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \ + ${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test" +FILES_${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a" +FILES_${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}" +FILES_${PN} = "${PHP_LIBDIR}/php" +FILES_${PN} += "${bindir}" + +SUMMARY_${PN}-modphp = "PHP module for the Apache HTTP server" +FILES_${PN}-modphp = "${libdir}/apache2 ${sysconfdir}" + +MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', '', d)}" +RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" +RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" +RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}" + +do_install_append_class-native() { + create_wrapper ${D}${bindir}/php \ + PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ +} + + +# Fails to build with thumb-1 (qemuarm) +# | {standard input}: Assembler messages: +# | {standard input}:3719: Error: selected processor does not support Thumb mode `smull r0,r2,r9,r3' +# | {standard input}:3720: Error: unshifted register required -- `sub r2,r2,r0,asr#31' +# | {standard input}:3796: Error: selected processor does not support Thumb mode `smull r0,r2,r3,r3' +# | {standard input}:3797: Error: unshifted register required -- `sub r2,r2,r0,asr#31' +# | make: *** [ext/standard/math.lo] Error 1 +ARM_INSTRUCTION_SET = "arm" diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-Add-lpthread-to-link.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-Add-lpthread-to-link.patch new file mode 100644 index 000000000..f70e550ff --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-Add-lpthread-to-link.patch @@ -0,0 +1,38 @@ +From ed0a954983d50267c2fc0bc13aba929ea0cad971 Mon Sep 17 00:00:00 2001 +From: Dengke Du +Date: Tue, 2 May 2017 06:34:40 +0000 +Subject: [PATCH] Add -lpthread to link + +When building the php-5.6.26, the following errors occured: + + ld: TSRM/.libs/TSRM.o: undefined reference to symbol + 'pthread_sigmask@@GLIBC_2.2.5' + + error adding symbols: DSO missing from command line + +This is because no pthread to link, so we should add it. + +Upstream-Status: Pending + +Signed-off-by: Dengke Du +--- + configure.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index a467dff1..9afef652 100644 +--- a/configure.in ++++ b/configure.in +@@ -1058,7 +1058,8 @@ case $php_sapi_module in + ;; + esac + +-EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" ++PTHREAD_LIBS="-lpthread" ++EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS $PTHREAD_LIBS" + + dnl this has to be here to prevent the openssl crypt() from + dnl overriding the system provided crypt(). +-- +2.11.0 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch new file mode 100644 index 000000000..51a5e43b6 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude-use-pkgconfig-for-libxml2-config.patch @@ -0,0 +1,90 @@ +From 003c9feaae6ed5c173edcea51193e49bc94ac39a Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 17 Jun 2014 09:53:00 +0200 +Subject: [PATCH 3/8] acinclude: use pkgconfig for libxml2 config + +Signed-off-by: Koen Kooi +Upstream-Status: pending +--- + acinclude.m4 | 63 ++++++++++++++++++++++-------------------------------------- + 1 file changed, 23 insertions(+), 40 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 206fcbf..a6c0d84 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2530,48 +2530,31 @@ dnl + dnl Common setup macro for libxml + dnl + AC_DEFUN([PHP_SETUP_LIBXML], [ +-AC_CACHE_CHECK([for xml2-config path], ac_cv_php_xml2_config_path, +-[ +- +- ac_cv_php_xml2_config_path="$PHP_LIBXML_DIR/xml2-config" +- ++PKG_CHECK_MODULES([LIBXML], [libxml-2.0 > 2.6.11], [ ++ PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) ++ PHP_EVAL_INCLINE($LIBXML_CFLAGS) ++ ++ dnl Check that build works with given libs ++ AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [ ++ PHP_TEST_BUILD(xmlInitParser, ++ [ ++ php_cv_libxml_build_works=yes ++ AC_MSG_RESULT(yes) ++ ], [ ++ AC_MSG_RESULT(no) ++ AC_MSG_ERROR([build test failed. Please check the config.log for details.]) ++ ], [ ++ [$]$1 ++ ]) ++ ]) ++ if test "$php_cv_libxml_build_works" = "yes"; then ++ AC_DEFINE(HAVE_LIBXML, 1, [ ]) ++ fi ++ $2 ++], [ ++ AC_MSG_ERROR([$LIBXML_PKG_ERRORS]) + ]) + +- if test -x "$ac_cv_php_xml2_config_path"; then +- XML2_CONFIG="$ac_cv_php_xml2_config_path" +- libxml_full_version=`$XML2_CONFIG --version` +- ac_IFS=$IFS +- IFS="." +- set $libxml_full_version +- IFS=$ac_IFS +- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` +- if test "$LIBXML_VERSION" -ge "2006011"; then +- LIBXML_LIBS=`$XML2_CONFIG --libs` +- LIBXML_INCS=`$XML2_CONFIG --cflags` +- PHP_EVAL_LIBLINE($LIBXML_LIBS, $1) +- PHP_EVAL_INCLINE($LIBXML_INCS) +- +- dnl Check that build works with given libs +- AC_CACHE_CHECK(whether libxml build works, php_cv_libxml_build_works, [ +- PHP_TEST_BUILD(xmlInitParser, +- [ +- php_cv_libxml_build_works=yes +- ], [ +- AC_MSG_RESULT(no) +- AC_MSG_ERROR([build test failed. Please check the config.log for details.]) +- ], [ +- [$]$1 +- ]) +- ]) +- if test "$php_cv_libxml_build_works" = "yes"; then +- AC_DEFINE(HAVE_LIBXML, 1, [ ]) +- fi +- $2 +- else +- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) +- fi +-ifelse([$3],[],,[else $3]) +- fi + ]) + + dnl ------------------------------------------------------------------------- +-- +1.9.3 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch new file mode 100644 index 000000000..a250cac83 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch @@ -0,0 +1,39 @@ +From dfebe81f946a83fe2499fc84d4f3dbdc5612276c Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Tue, 3 Apr 2018 11:35:03 +0800 +Subject: [PATCH] acinclude.m4: don't unset cache variables + +Unsetting prevents cache variable from being passed to configure. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Anuj Mittal +--- + acinclude.m4 | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index f6a55ec..d3346df 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -1890,8 +1890,6 @@ define([phpshift],[ifelse(index([$@],[,]),-1,,[substr([$@],incr(index([$@],[,])) + dnl + AC_DEFUN([PHP_CHECK_FUNC_LIB],[ + ifelse($2,,:,[ +- unset ac_cv_lib_$2[]_$1 +- unset ac_cv_lib_$2[]___$1 + unset found + AC_CHECK_LIB($2, $1, [found=yes], [ + AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) +@@ -1923,8 +1921,6 @@ dnl in the default libraries and as a fall back in the specified library. + dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS. + dnl + AC_DEFUN([PHP_CHECK_FUNC],[ +- unset ac_cv_func_$1 +- unset ac_cv_func___$1 + unset found + + AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ]) +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch new file mode 100644 index 000000000..15329261b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch @@ -0,0 +1,56 @@ +From a2d146b8dd9d02f523d1e205d79792626a71dec3 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Mon, 2 Apr 2018 15:27:09 +0800 +Subject: [PATCH] acinclude.m4: skip binconfig check for libxml + +We want libxml flags to be picked up using pkg-config instead of the +xml2-config file. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Anuj Mittal + +--- + acinclude.m4 | 29 ----------------------------- + 1 file changed, 29 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index d42d708..d32766a 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2525,35 +2525,6 @@ dnl + AC_DEFUN([PHP_SETUP_LIBXML], [ + found_libxml=no + +- dnl First try to find xml2-config +- 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 +- ]) +- +- if test -x "$ac_cv_php_xml2_config_path"; then +- XML2_CONFIG="$ac_cv_php_xml2_config_path" +- libxml_full_version=`$XML2_CONFIG --version` +- ac_IFS=$IFS +- IFS="." +- set $libxml_full_version +- IFS=$ac_IFS +- LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3` +- if test "$LIBXML_VERSION" -ge "2006011"; then +- found_libxml=yes +- LIBXML_LIBS=`$XML2_CONFIG --libs` +- LIBXML_INCS=`$XML2_CONFIG --cflags` +- else +- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.]) +- fi +- fi +- +- dnl If xml2-config fails, try pkg-config + if test "$found_libxml" = "no"; then + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-fix-error-caused-by-a-new-variable-is-declared-after.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-fix-error-caused-by-a-new-variable-is-declared-after.patch new file mode 100644 index 000000000..6ab101b41 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-fix-error-caused-by-a-new-variable-is-declared-after.patch @@ -0,0 +1,45 @@ +From 0d88d735887c6f2fa00a743c27124c7a52006a41 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Sun, 15 Apr 2018 19:17:27 -0700 +Subject: [PATCH] fix error caused by a new variable is declared after the + label + +There is a build failure on mips: +... +|sljitNativeMIPS_common.c: In function 'sljit_has_cpu_feature': +|sljitNativeMIPS_common.c:506:3: error: a label can only be part +of a statement and a declaration is not a statement +| sljit_sw fir; +| ^~~~~~~~ +... + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia +--- + ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c +index ee207fe..adfd342 100644 +--- a/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c ++++ b/ext/pcre/pcrelib/sljit/sljitNativeMIPS_common.c +@@ -498,12 +498,14 @@ SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil + + SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) + { ++#if defined(__GNUC__) ++ sljit_sw fir; ++#endif + switch (feature_type) { + case SLJIT_HAS_FPU: + #ifdef SLJIT_IS_FPU_AVAILABLE + return SLJIT_IS_FPU_AVAILABLE; + #elif defined(__GNUC__) +- sljit_sw fir; + asm ("cfc1 %0, $0" : "=r"(fir)); + return (fir >> 22) & 0x1; + #else +-- +2.10.2 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch new file mode 100644 index 000000000..fce9738f5 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch @@ -0,0 +1,63 @@ +From 2842aa2a078eb1cad55540b61e7edf111395150d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 26 Feb 2018 19:30:55 +0100 +Subject: [PATCH] main/php_ini.c: build empty php_load_zend_extension_cb() when + !HAVE_LIBDL + +Commit 0782a7fc6314c8bd3cbfd57f12d0479bf9cc8dc7 ("Fixed bug #74866 +extension_dir = "./ext" now use current directory for base") modified +the php_load_zend_extension_cb() function to use php_load_shlib(), and +pass a handle to the newly introduced zend_load_extension_handle() +function instead of passing the extension path to +zend_load_extension(). + +While doing so, it introduced a call to php_load_shlib() from code +that is built even when HAVE_LIBDL is not defined. However, +php_load_shlib() is not implemented when HAVE_LIBDL is not defined, +for obvious reasons. + +It turns out that zend_load_extension_handle() anyway doesn't do +anything when ZEND_EXTENSIONS_SUPPORT is defined to 0, and +ZEND_EXTENSIONS_SUPPORT is not defined when HAVE_LIBDL is not defined +(Zend/zend_portability.h). + +Fixes the following build failure when building on a system that +doesn't have libdl: + +main/php_ini.o: In function `php_load_zend_extension_cb': +php_ini.c:(.text+0x478): undefined reference to `php_load_shlib' +php_ini.c:(.text+0x4b0): undefined reference to `php_load_shlib' +collect2: error: ld returned 1 exit status + +Upstream-Status: Backport [http://git.php.net/?p=php-src.git;a=commit;h=2842aa2a078eb1cad55540b61e7edf111395150d] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Anuj Mittal +--- + main/php_ini.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/main/php_ini.c b/main/php_ini.c +index ba58eb1..fca263e 100644 +--- a/main/php_ini.c ++++ b/main/php_ini.c +@@ -350,6 +350,7 @@ static void php_load_php_extension_cb(void *arg) + + /* {{{ php_load_zend_extension_cb + */ ++#ifdef HAVE_LIBDL + static void php_load_zend_extension_cb(void *arg) + { + char *filename = *((char **) arg); +@@ -409,6 +410,9 @@ static void php_load_zend_extension_cb(void *arg) + efree(libpath); + } + } ++#else ++static void php_load_zend_extension_cb(void *arg) { } ++#endif + /* }}} */ + + /* {{{ php_init_config +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch new file mode 100644 index 000000000..0d24d34f2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch @@ -0,0 +1,385 @@ +From b2fb725dc404d471371731b663234e87cb0fca84 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Mon, 2 Apr 2018 17:54:52 +0800 +Subject: [PATCH] opcache/config.m4: enable opcache + +We can't use AC_TRY_RUN to run programs in a cross compile environment. Set +the variables directly instead since we know that we'd be running on latest +enough linux kernel. + +Upstream-Status: Inappropriate [Configuration] + +Signed-off-by: Anuj Mittal +--- + ext/opcache/config.m4 | 349 ++------------------------------------------------ + 1 file changed, 8 insertions(+), 341 deletions(-) + +diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 +index 7b500f0..10bb99a 100644 +--- a/ext/opcache/config.m4 ++++ b/ext/opcache/config.m4 +@@ -28,353 +28,20 @@ if test "$PHP_OPCACHE" != "no"; then + + AC_CHECK_HEADERS([unistd.h sys/uio.h]) + +- AC_MSG_CHECKING(for sysvipc shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include ++ AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) + +-int main() { +- pid_t pid; +- int status; +- int ipc_id; +- char *shm; +- struct shmid_ds shmbuf; ++ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) + +- ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); +- if (ipc_id == -1) { +- return 1; +- } ++ AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) + +- shm = shmat(ipc_id, NULL, 0); +- if (shm == (void *)-1) { +- shmctl(ipc_id, IPC_RMID, NULL); +- return 2; +- } +- +- if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) { +- shmdt(shm); +- shmctl(ipc_id, IPC_RMID, NULL); +- return 3; +- } +- +- shmbuf.shm_perm.uid = getuid(); +- shmbuf.shm_perm.gid = getgid(); +- shmbuf.shm_perm.mode = 0600; +- +- if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) { +- shmdt(shm); +- shmctl(ipc_id, IPC_RMID, NULL); +- return 4; +- } +- +- shmctl(ipc_id, IPC_RMID, NULL); +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +- AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_ANON +-# ifdef MAP_ANONYMOUS +-# define MAP_ANON MAP_ANONYMOUS +-# endif +-#endif +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- char *shm; +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); +- if (shm == MAP_FAILED) { +- return 1; +- } +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +- AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- int fd; +- char *shm; +- +- fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); +- if (fd == -1) { +- return 1; +- } +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +- if (shm == MAP_FAILED) { +- return 2; +- } +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +- AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- int fd; +- char *shm; +- char tmpname[4096]; +- +- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); +- if (mktemp(tmpname) == NULL) { +- return 1; +- } +- fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +- if (fd == -1) { +- return 2; +- } +- if (ftruncate(fd, 4096) < 0) { +- close(fd); +- shm_unlink(tmpname); +- return 3; +- } +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +- if (shm == MAP_FAILED) { +- return 4; +- } +- shm_unlink(tmpname); +- close(fd); +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) ++ AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) + + AC_MSG_CHECKING(for mmap() using regular file shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- int fd; +- char *shm; +- char tmpname[4096]; +- +- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); +- if (mktemp(tmpname) == NULL) { +- return 1; +- } +- fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +- if (fd == -1) { +- return 2; +- } +- if (ftruncate(fd, 4096) < 0) { +- close(fd); +- unlink(tmpname); +- return 3; +- } +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +- if (shm == MAP_FAILED) { +- return 4; +- } +- unlink(tmpname); +- close(fd); +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +-flock_type=unknown +-AC_MSG_CHECKING("whether flock struct is linux ordered") +-AC_TRY_RUN([ +- #include +- struct flock lock = { 1, 2, 3, 4, 5 }; +- int main() { +- if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) { +- return 0; +- } +- return 1; +- } +-], [ +- flock_type=linux +- AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) +- AC_MSG_RESULT("yes") +-], AC_MSG_RESULT("no") ) ++ ++ AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) + +-AC_MSG_CHECKING("whether flock struct is BSD ordered") +-AC_TRY_RUN([ +- #include +- struct flock lock = { 1, 2, 3, 4, 5 }; +- int main() { +- if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) { +- return 0; +- } +- return 1; +- } +-], [ +- flock_type=bsd +- AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) +- AC_MSG_RESULT("yes") +-], AC_MSG_RESULT("no") ) ++ flock_type=linux ++ AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) + + if test "$flock_type" = "unknown"; then + AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch new file mode 100644 index 000000000..2f7d58155 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch @@ -0,0 +1,26 @@ +From ebc101e0728b9db6c687cff525e5dfc8eb0edbf3 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 3 Nov 2011 14:27:15 +0100 +Subject: [PATCH 2/8] php: don't use broken wrapper for mkdir + +Signed-off-by: Koen Kooi +--- + +Upstream-Status: Inappropriate + + Makefile.global | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.global b/Makefile.global +index ff858c2..ae554b4 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.9.3 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php5.conf b/meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php5.conf new file mode 100644 index 000000000..1de6fb11a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php5.conf @@ -0,0 +1,12 @@ +# vim: ft=apache sw=4 ts=4 + + # Load the module first + + LoadModule php5_module lib/apache2/modules/libphp5.so + + + # Set it to handle the files + AddHandler php5-script .php .phtml .php3 .php4 .php5 + AddType application/x-httpd-php-source .phps + DirectoryIndex index.html index.html.var index.php index.phtml + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php7.conf b/meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php7.conf new file mode 100644 index 000000000..d206265a2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/70_mod_php7.conf @@ -0,0 +1,9 @@ +LoadModule php7_module lib/apache2/modules/libphp7.so + + + SetHandler application/x-httpd-php + + + + SetHandler application/x-httpd-php-source + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch new file mode 100644 index 000000000..30811a74b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/acinclude-xml2-config.patch @@ -0,0 +1,25 @@ +Upstream-status: Unknown + +diff --git a/acinclude.m4 b/acinclude.m4 +index 4fd452e..206fcbf 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2532,12 +2532,9 @@ dnl + 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 +-- +1.9.3 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch new file mode 100644 index 000000000..3e901841b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/change-AC_TRY_RUN-to-AC_TRY_LINK.patch @@ -0,0 +1,61 @@ +From 3bfcc7fdd22261eaed10949714de0a90d31e10ab Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Thu, 20 Aug 2015 16:29:35 +0800 +Subject: [PATCH] [PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK + +Upstream-Status: Pending + +AC_TRY_RUN is not suitable for cross-compile + +Signed-off-by: Roy Li + +%% original patch: change-AC_TRY_RUN-to-AC_TRY_LINK.patch +--- + ext/fileinfo/config.m4 | 31 ++++++------------------------- + 1 file changed, 6 insertions(+), 25 deletions(-) + +diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4 +index 523b4fd..0aaa4c8 100644 +--- a/ext/fileinfo/config.m4 ++++ b/ext/fileinfo/config.m4 +@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then + libmagic/readcdf.c libmagic/softmagic.c libmagic/der.c" + + AC_MSG_CHECKING([for strcasestr]) +- AC_TRY_RUN([ +-#include +-#include +-#include +- +-int main(void) +-{ +- char *s0, *s1, *ret; +- +- s0 = (char *) malloc(42); +- s1 = (char *) malloc(8); +- +- memset(s0, 'X', 42); +- s0[24] = 'Y'; +- s0[26] = 'Z'; +- s0[41] = '\0'; +- memset(s1, 'x', 8); +- s1[0] = 'y'; +- s1[2] = 'Z'; +- s1[7] = '\0'; +- +- ret = strcasestr(s0, s1); +- +- return !(NULL != ret); +-} ++ AC_TRY_COMPILE([ ++ #include ++ #include ++ #include ++ ],[ ++ strcasestr(NULL, NULL); + ],[ + dnl using the platform implementation + AC_MSG_RESULT(yes) +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch new file mode 100644 index 000000000..b6e3ceb0b --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/iconv.patch @@ -0,0 +1,37 @@ +From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 16:54:57 +0100 +Subject: [PATCH] Upstream-status: Unknown + +--- + acinclude.m4 | 3 ++- + ext/iconv/config.m4 | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index d32766a..ad5166e 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2445,7 +2445,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 6a05697..973e750 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-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch new file mode 100644 index 000000000..b5fb7d4fd --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch @@ -0,0 +1,51 @@ +From c084c8349d1780980e232cb28b60a109e3d89438 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 16:54:57 +0100 +Subject: [PATCH] Upstream-status: Unknown + +--- + acinclude.m4 | 2 +- + ext/imap/config.m4 | 10 ++-------- + 2 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index ad5166e..f6a55ec 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2350,7 +2350,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 --git a/ext/imap/config.m4 b/ext/imap/config.m4 +index badb6e2..8ff803c 100644 +--- a/ext/imap/config.m4 ++++ b/ext/imap/config.m4 +@@ -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-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch new file mode 100644 index 000000000..4bc102526 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/pear-makefile.patch @@ -0,0 +1,22 @@ +From edd575a546d56bb5683aff19782b16963d61fd0b Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 16:54:57 +0100 +Subject: [PATCH] Upstream-status: Unknown + +--- + pear/Makefile.frag | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pear/Makefile.frag b/pear/Makefile.frag +index bbe8ec3..16f43e2 100644 +--- a/pear/Makefile.frag ++++ b/pear/Makefile.frag +@@ -12,7 +12,7 @@ PEAR_SUFFIX = -ds a$(program_suffix) + PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar + + 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-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch new file mode 100644 index 000000000..336cf0d62 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/phar-makefile.patch @@ -0,0 +1,42 @@ +From 08962a56f69963e01892d98ca5b75de8354bd3f5 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 16:54:57 +0100 +Subject: [PATCH] Fix phar packaging + +Inherited from OE-Classic, with some additions to fix host paths leaking +into the target package. + +Upstream-Status: Inappropriate [config] + +--- + ext/phar/Makefile.frag | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag +index 0e3713f..22f7898 100644 +--- a/ext/phar/Makefile.frag ++++ b/ext/phar/Makefile.frag +@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir)/phar.phar + + PHP_PHARCMD_SETTINGS = -n -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;` +-PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` ++ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; ` ++ ++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` + + $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc + -@test -d $(builddir)/phar || mkdir $(builddir)/phar diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm-apache.conf b/meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm-apache.conf new file mode 100644 index 000000000..77cdd82a7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/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-openembedded/meta-oe/recipes-devtools/php/php/php-fpm.conf b/meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm.conf new file mode 100644 index 000000000..21e3dfb5c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/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-openembedded/meta-oe/recipes-devtools/php/php/php-fpm.service b/meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm.service new file mode 100644 index 000000000..ac79dc931 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php-fpm.service @@ -0,0 +1,10 @@ +[Unit] +Description=PHP-FPM +After=network.target +[Service] +Type=forking +PIDFile=@LOCALSTATEDIR@/run/php-fpm.pid +ExecStart=@SYSCONFDIR@/init.d/php-fpm start +ExecStop=@SYSCONFDIR@/init.d/php-fpm stop +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch new file mode 100644 index 000000000..7be67ea94 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-0001-opcache-config.m4-enable-opcache.patch @@ -0,0 +1,387 @@ +From fafcfac0933c17e1bf551600080eb0541186caf5 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Mon, 2 Apr 2018 17:54:52 +0800 +Subject: [PATCH] opcache/config.m4: enable opcache + +We can't use AC_TRY_RUN to run programs in a cross compile environment. Set +the variables directly instead since we know that we'd be running on latest +enough linux kernel. + +Upstream-Status: Inappropriate [Configuration] + +Signed-off-by: Anuj Mittal + +%% original patch: php5-0001-opcache-config.m4-enable-opcache.patch +--- + ext/opcache/config.m4 | 349 ++------------------------------------------------ + 1 file changed, 8 insertions(+), 341 deletions(-) + +diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 +index 5a8b86c..6e87fa5 100644 +--- a/ext/opcache/config.m4 ++++ b/ext/opcache/config.m4 +@@ -11,353 +11,20 @@ if test "$PHP_OPCACHE" != "no"; then + AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function]) + ]) + +- AC_MSG_CHECKING(for sysvipc shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include ++ AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) + +-int main() { +- pid_t pid; +- int status; +- int ipc_id; +- char *shm; +- struct shmid_ds shmbuf; ++ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) + +- ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); +- if (ipc_id == -1) { +- return 1; +- } ++ AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) + +- shm = shmat(ipc_id, NULL, 0); +- if (shm == (void *)-1) { +- shmctl(ipc_id, IPC_RMID, NULL); +- return 2; +- } +- +- if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) { +- shmdt(shm); +- shmctl(ipc_id, IPC_RMID, NULL); +- return 3; +- } +- +- shmbuf.shm_perm.uid = getuid(); +- shmbuf.shm_perm.gid = getgid(); +- shmbuf.shm_perm.mode = 0600; +- +- if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) { +- shmdt(shm); +- shmctl(ipc_id, IPC_RMID, NULL); +- return 4; +- } +- +- shmctl(ipc_id, IPC_RMID, NULL); +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +- AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_ANON +-# ifdef MAP_ANONYMOUS +-# define MAP_ANON MAP_ANONYMOUS +-# endif +-#endif +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- char *shm; +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); +- if (shm == MAP_FAILED) { +- return 1; +- } +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +- AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- int fd; +- char *shm; +- +- fd = open("/dev/zero", O_RDWR, S_IRUSR | S_IWUSR); +- if (fd == -1) { +- return 1; +- } +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +- if (shm == MAP_FAILED) { +- return 2; +- } +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +- AC_MSG_CHECKING(for mmap() using shm_open() shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- int fd; +- char *shm; +- char tmpname[4096]; +- +- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); +- if (mktemp(tmpname) == NULL) { +- return 1; +- } +- fd = shm_open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +- if (fd == -1) { +- return 2; +- } +- if (ftruncate(fd, 4096) < 0) { +- close(fd); +- shm_unlink(tmpname); +- return 3; +- } +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +- if (shm == MAP_FAILED) { +- return 4; +- } +- shm_unlink(tmpname); +- close(fd); +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) ++ AC_DEFINE(HAVE_SHM_MMAP_POSIX, 1, [Define if you have POSIX mmap() SHM support]) + + AC_MSG_CHECKING(for mmap() using regular file shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- int fd; +- char *shm; +- char tmpname[4096]; +- +- sprintf(tmpname,"test.shm.%dXXXXXX", getpid()); +- if (mktemp(tmpname) == NULL) { +- return 1; +- } +- fd = open(tmpname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); +- if (fd == -1) { +- return 2; +- } +- if (ftruncate(fd, 4096) < 0) { +- close(fd); +- unlink(tmpname); +- return 3; +- } +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); +- if (shm == MAP_FAILED) { +- return 4; +- } +- unlink(tmpname); +- close(fd); +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl +- AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +-flock_type=unknown +-AC_MSG_CHECKING("whether flock struct is linux ordered") +-AC_TRY_RUN([ +- #include +- struct flock lock = { 1, 2, 3, 4, 5 }; +- int main() { +- if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) { +- return 0; +- } +- return 1; +- } +-], [ +- flock_type=linux +- AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) +- AC_MSG_RESULT("yes") +-], AC_MSG_RESULT("no") ) ++ ++ AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support]) + +-AC_MSG_CHECKING("whether flock struct is BSD ordered") +-AC_TRY_RUN([ +- #include +- struct flock lock = { 1, 2, 3, 4, 5 }; +- int main() { +- if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) { +- return 0; +- } +- return 1; +- } +-], [ +- flock_type=bsd +- AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) +- AC_MSG_RESULT("yes") +-], AC_MSG_RESULT("no") ) ++ flock_type=linux ++ AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) + + if test "$flock_type" = "unknown"; then + AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch new file mode 100644 index 000000000..1d21f8c56 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch @@ -0,0 +1,63 @@ +From 5f49987e88dfcbdb84be6e0c9025432fbd998709 Mon Sep 17 00:00:00 2001 +From: Roy Li +Date: Thu, 20 Aug 2015 16:29:35 +0800 +Subject: [PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK + +Upstream-Status: Pending + +AC_TRY_RUN is not suitable for cross-compile + +Signed-off-by: Roy Li + +%% original patch: change-AC_TRY_RUN-to-AC_TRY_LINK.patch + +%% original patch: php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch +--- + ext/fileinfo/config.m4 | 31 ++++++------------------------- + 1 file changed, 6 insertions(+), 25 deletions(-) + +diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4 +index 7e98d62..8a8ea0e 100644 +--- a/ext/fileinfo/config.m4 ++++ b/ext/fileinfo/config.m4 +@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then + libmagic/readcdf.c libmagic/softmagic.c" + + AC_MSG_CHECKING([for strcasestr]) +- AC_TRY_RUN([ +-#include +-#include +-#include +- +-int main(void) +-{ +- char *s0, *s1, *ret; +- +- s0 = (char *) malloc(42); +- s1 = (char *) malloc(8); +- +- memset(s0, 'X', 42); +- s0[24] = 'Y'; +- s0[26] = 'Z'; +- s0[41] = '\0'; +- memset(s1, 'x', 8); +- s1[0] = 'y'; +- s1[2] = 'Z'; +- s1[7] = '\0'; +- +- ret = strcasestr(s0, s1); +- +- return !(NULL != ret); +-} ++ AC_TRY_COMPILE([ ++ #include ++ #include ++ #include ++ ],[ ++ strcasestr(NULL, NULL); + ],[ + dnl using the platform implementation + AC_MSG_RESULT(yes) +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch new file mode 100644 index 000000000..cff6426ab --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-pear-makefile.patch @@ -0,0 +1,26 @@ +From 79725e82d5981fc94eb657f0f46a499dbfc1cc40 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 16:54:57 +0100 +Subject: [PATCH] Upstream-status: Unknown + +%% original patch: php5-pear-makefile.patch +--- + pear/Makefile.frag | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pear/Makefile.frag b/pear/Makefile.frag +index 00bacae..739eeca 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)/" +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-phar-makefile.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-phar-makefile.patch new file mode 100644 index 000000000..4e1efd40c --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php5-phar-makefile.patch @@ -0,0 +1,46 @@ +From 3ea626a8d081f56b01004b7992534d4e6b81a9cc Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 16:54:57 +0100 +Subject: [PATCH] Fix phar packaging + +Inherited from OE-Classic, with some additions to fix host paths leaking +into the target package. + +Upstream-Status: Inappropriate [config] + +%% original patch: php5-phar-makefile.patch +--- + ext/phar/Makefile.frag | 17 +++-------------- + 1 file changed, 3 insertions(+), 14 deletions(-) + +diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag +index b8b1b42..1005b2d 100644 +--- a/ext/phar/Makefile.frag ++++ b/ext/phar/Makefile.frag +@@ -5,20 +5,9 @@ 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;` +-PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` ++ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; ` ++ ++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` + + $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc + -@test -d $(builddir)/phar || mkdir $(builddir)/phar +-- +2.7.4 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch new file mode 100644 index 000000000..6af0dc81a --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/php_exec_native.patch @@ -0,0 +1,22 @@ +From d251b5aa3d23803d016ca16818e2e1d2f2b70a02 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 2 Nov 2011 16:54:57 +0100 +Subject: [PATCH] Upstream-status: Inappriate + +--- + sapi/cli/config.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4 +index 2168151..20a81db 100644 +--- a/sapi/cli/config.m4 ++++ b/sapi/cli/config.m4 +@@ -50,7 +50,7 @@ if test "$PHP_CLI" != "no"; then + 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 diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php/pthread-check-threads-m4.patch b/meta-openembedded/meta-oe/recipes-devtools/php/php/pthread-check-threads-m4.patch new file mode 100644 index 000000000..0c564cd88 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php/pthread-check-threads-m4.patch @@ -0,0 +1,30 @@ +From d8067ceacbf54e79c9c6b68675332c09eaa0b55d Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Mon, 8 Apr 2013 14:29:51 +0800 +Subject: [PATCH] pthread-check + +Enable pthreads support when cross-compiling + +Upstream-Status: Inapproprate [config] + +Signed-off-by: Jackie Huang +--- + TSRM/threads.m4 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/TSRM/threads.m4 b/TSRM/threads.m4 +index 38494ce..15d9454 100644 +--- a/TSRM/threads.m4 ++++ b/TSRM/threads.m4 +@@ -86,7 +86,7 @@ int main() { + pthreads_working=no + ], [ + dnl For cross compiling running this test is of no use. NetWare supports pthreads +- pthreads_working=no ++ pthreads_working=yes + case $host_alias in + *netware*) + pthreads_working=yes +-- +1.7.4.1 + diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.35.bb b/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.35.bb new file mode 100644 index 000000000..c17c0d6a2 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php_5.6.35.bb @@ -0,0 +1,23 @@ +require php.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=b602636d46a61c0ac0432bbf5c078fe4" + +SRC_URI += "file://php5-change-AC_TRY_RUN-to-AC_TRY_LINK.patch \ + file://pthread-check-threads-m4.patch \ + file://0001-Add-lpthread-to-link.patch \ + file://acinclude-xml2-config.patch \ + file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ + " + +SRC_URI_append_class-target = " \ + file://php5-pear-makefile.patch \ + file://php5-phar-makefile.patch \ + file://php5-0001-opcache-config.m4-enable-opcache.patch \ + " + +SRC_URI[md5sum] = "905ae5f586351f3ca29d044c9484d475" +SRC_URI[sha256sum] = "ee78a7e9ca21d8ea394d037c55effff477a49dbae31c7753c547036f5bd73b92" + +DEPENDS += "libmcrypt" +EXTRA_OECONF += "--with-mcrypt=${STAGING_DIR_TARGET}${exec_prefix} \ + " diff --git a/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb b/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb new file mode 100644 index 000000000..2fd1e66c7 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-devtools/php/php_7.2.4.bb @@ -0,0 +1,24 @@ +require php.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=67e369bc8d1f2e641236b8002039a6a2" + +SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \ + file://0001-acinclude.m4-skip-binconfig-check-for-libxml.patch \ + file://0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch \ + file://0001-fix-error-caused-by-a-new-variable-is-declared-after.patch \ + " +SRC_URI_append_class-target = " \ + file://pear-makefile.patch \ + file://phar-makefile.patch \ + file://0001-opcache-config.m4-enable-opcache.patch \ + " + +SRC_URI[md5sum] = "864c64ffd2f1686b035ef8ce6a6d8478" +SRC_URI[sha256sum] = "11658a0d764dc94023b9fb60d4b5eb75d438ad17981efe70abb0d0d09a447ef3" + +PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ + --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ + ,--without-mysqli --without-pdo-mysql \ + ,mysql5" + +FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/www.conf.default" -- cgit v1.2.1