aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/php
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/php')
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch93
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch23
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch42
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch56
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch (renamed from meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch)214
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch63
-rw-r--r--meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch26
-rw-r--r--meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch45
-rw-r--r--meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch36
-rw-r--r--meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch33
-rw-r--r--meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch (renamed from meta-oe/recipes-devtools/php/php/pear-makefile.patch)21
-rw-r--r--meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch (renamed from meta-oe/recipes-devtools/php/php/phar-makefile.patch)24
-rw-r--r--meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch32
-rw-r--r--meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch (renamed from meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch)40
-rw-r--r--meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch31
-rw-r--r--meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch35
-rw-r--r--meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch53
-rw-r--r--meta-oe/recipes-devtools/php/php/70_mod_php5.conf12
-rw-r--r--meta-oe/recipes-devtools/php/php/70_mod_php8.conf (renamed from meta-oe/recipes-devtools/php/php/70_mod_php7.conf)4
-rw-r--r--meta-oe/recipes-devtools/php/php/CVE-2019-6978.patch192
-rwxr-xr-xmeta-oe/recipes-devtools/php/php/debian-php-fixheader.patch31
-rw-r--r--meta-oe/recipes-devtools/php/php/iconv.patch37
-rw-r--r--meta-oe/recipes-devtools/php/php/php-fpm.service55
-rw-r--r--meta-oe/recipes-devtools/php/php/php_exec_native.patch22
-rw-r--r--meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch34
-rw-r--r--meta-oe/recipes-devtools/php/php_8.2.18.bb (renamed from meta-oe/recipes-devtools/php/php_7.3.11.bb)212
26 files changed, 579 insertions, 887 deletions
diff --git a/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch b/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch
new file mode 100644
index 0000000000..5b8c76209a
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch
@@ -0,0 +1,93 @@
+From 1eeb59366d6140a799f6051fb9f57d988b81fd5b Mon Sep 17 00:00:00 2001
+From: easyaspi314 <easyaspi314@users.noreply.github.com>
+Date: Wed, 12 Apr 2023 13:33:07 +0800
+Subject: [PATCH] Change whether to inline XXH3_hashLong_withSecret to a config
+ option
+
+Change whether to inline XXH3_hashLong_withSecret to a config option to fix
+GCC 12 -Og.
+
+Upstream-Status: Submitted [https://github.com/php/php-src/pull/11062]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ ext/hash/xxhash/xxhash.h | 35 +++++++++++++++++++++++++++++++++--
+ 1 file changed, 33 insertions(+), 2 deletions(-)
+
+diff --git a/ext/hash/xxhash/xxhash.h b/ext/hash/xxhash/xxhash.h
+index b5bd2864..8e816c05 100644
+--- a/ext/hash/xxhash/xxhash.h
++++ b/ext/hash/xxhash/xxhash.h
+@@ -1375,6 +1375,23 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
+ */
+ # define XXH_NO_INLINE_HINTS 0
+
++/*!
++ * @def XXH3_INLINE_SECRET
++ * @brief Determines whether to inline the XXH3 withSecret code.
++ *
++ * When the secret size is known, the compiler can improve the performance
++ * of XXH3_64bits_withSecret() and XXH3_128bits_withSecret().
++ *
++ * However, if the secret size is not known, it doesn't have any benefit. This
++ * happens when xxHash is compiled into a global symbol. Therefore, if
++ * @ref XXH_INLINE_ALL is *not* defined, this will be defined to 0.
++ *
++ * Additionally, this defaults to 0 on GCC 12+, which has an issue with function pointers
++ * that are *sometimes* force inline on -Og, and it is impossible to automatically
++ * detect this optimization level.
++ */
++# define XXH3_INLINE_SECRET 0
++
+ /*!
+ * @def XXH32_ENDJMP
+ * @brief Whether to use a jump for `XXH32_finalize`.
+@@ -1439,6 +1456,15 @@ XXH3_128bits_reset_withSecretandSeed(XXH3_state_t* statePtr,
+ # endif
+ #endif
+
++#ifndef XXH3_INLINE_SECRET
++# if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ >= 12) \
++ || !defined(XXH_INLINE_ALL)
++# define XXH3_INLINE_SECRET 0
++# else
++# define XXH3_INLINE_SECRET 1
++# endif
++#endif
++
+ #ifndef XXH32_ENDJMP
+ /* generally preferable for performance */
+ # define XXH32_ENDJMP 0
+@@ -1515,6 +1541,11 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size)
+ # define XXH_NO_INLINE static
+ #endif
+
++#if XXH3_INLINE_SECRET
++# define XXH3_WITH_SECRET_INLINE XXH_FORCE_INLINE
++#else
++# define XXH3_WITH_SECRET_INLINE XXH_NO_INLINE
++#endif
+
+
+ /* *************************************
+@@ -4465,7 +4496,7 @@ XXH3_hashLong_64b_internal(const void* XXH_RESTRICT input, size_t len,
+ * so that the compiler can properly optimize the vectorized loop.
+ * This makes a big performance difference for "medium" keys (<1 KB) when using AVX instruction set.
+ */
+-XXH_FORCE_INLINE XXH64_hash_t
++XXH3_WITH_SECRET_INLINE XXH64_hash_t
+ XXH3_hashLong_64b_withSecret(const void* XXH_RESTRICT input, size_t len,
+ XXH64_hash_t seed64, const xxh_u8* XXH_RESTRICT secret, size_t secretLen)
+ {
+@@ -5263,7 +5294,7 @@ XXH3_hashLong_128b_default(const void* XXH_RESTRICT input, size_t len,
+ * It's important for performance to pass @secretLen (when it's static)
+ * to the compiler, so that it can properly optimize the vectorized loop.
+ */
+-XXH_FORCE_INLINE XXH128_hash_t
++XXH3_WITH_SECRET_INLINE XXH128_hash_t
+ XXH3_hashLong_128b_withSecret(const void* XXH_RESTRICT input, size_t len,
+ XXH64_hash_t seed64,
+ const void* XXH_RESTRICT secret, size_t secretLen)
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch b/meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch
deleted file mode 100644
index ccc6d4ede1..0000000000
--- a/meta-oe/recipes-devtools/php/php/0001-Use-pkg-config-for-libxml2-detection.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Use pkg-config for libxml2 detection.
-
-xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.in | 15 ++-------------
- 1 file changed, 2 insertions(+), 13 deletions(-)
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -2481,8 +2481,8 @@ AC_DEFUN([PHP_SETUP_LIBXML], [
- 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`
-+ LIBXML_LIBS=`pkg-config --libs libxml-2.0`
-+ LIBXML_INCS=`pkg-config --cflags libxml-2.0`
- else
- AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
- fi
diff --git a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch b/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch
deleted file mode 100644
index 51dbe269cb..0000000000
--- a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-don-t-unset-cache-variables.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From d2679c89c0b15b90e5360b4863258a7955e5f4e5 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Tue, 12 Feb 2019 15:59:19 +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 <anuj.mittal@intel.com>
-
-update patch to version 7.3.2
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- acinclude.m4 | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 25f900d..2641969 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -1921,8 +1921,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])
-@@ -1954,8 +1952,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-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch b/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch
deleted file mode 100644
index 15329261bf..0000000000
--- a/meta-oe/recipes-devtools/php/php/0001-acinclude.m4-skip-binconfig-check-for-libxml.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From a2d146b8dd9d02f523d1e205d79792626a71dec3 Mon Sep 17 00:00:00 2001
-From: Anuj Mittal <anuj.mittal@intel.com>
-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 <anuj.mittal@intel.com>
-
----
- 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-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch
index 34f433f40a..c743697469 100644
--- a/meta-oe/recipes-devtools/php/php/0001-opcache-config.m4-enable-opcache.patch
+++ b/meta-oe/recipes-devtools/php/php/0001-ext-opcache-config.m4-enable-opcache.patch
@@ -1,30 +1,38 @@
-From 8de5ba69d20d049b8ca983a9470c7303142ec0b3 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Sun, 28 Apr 2019 16:55:13 +0800
-Subject: [PATCH] From fb139d9707dabe1684b472a08a6eb5761ede4a3a Mon Sep 17
- 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Tue, 12
- Feb 2019 14:56:16 +0800 Subject: [PATCH] opcache/config.m4: enable opcache
+From 889583912ddd7abc628f2703892ec4884db6419a Mon Sep 17 00:00:00 2001
+From: Soumya Sambu <soumya.sambu@windriver.com>
+Date: Tue, 7 May 2024 08:39:16 +0000
+Subject: [PATCH 01/11] ext/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.
+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 <anuj.mittal@intel.com>
-update patch to version 7.3.4
+update patch to version 7.4.4
Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to version 8.0.12
+fix issue linking with librt
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+
+update patch to version 8.1.0
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+
+update patch to version 8.2.18
+Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
---
- ext/opcache/config.m4 | 312 +-------------------------------------------------
- 1 file changed, 6 insertions(+), 306 deletions(-)
+ ext/opcache/config.m4 | 204 ++----------------------------------------
+ 1 file changed, 8 insertions(+), 196 deletions(-)
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
-index 4810217..22c3d61 100644
+index 6bf07ad3..5d645b86 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
-@@ -27,319 +27,19 @@ if test "$PHP_OPCACHE" != "no"; then
- AC_CHECK_HEADERS([unistd.h sys/uio.h])
+@@ -113,209 +113,21 @@ if test "$PHP_OPCACHE" != "no"; then
+ AC_CHECK_FUNCS([mprotect])
AC_MSG_CHECKING(for sysvipc shared memory support)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
@@ -35,7 +43,7 @@ index 4810217..22c3d61 100644
-#include <unistd.h>
-#include <string.h>
-
--int main() {
+-int main(void) {
- pid_t pid;
- int status;
- int ipc_id;
@@ -91,13 +99,14 @@ index 4810217..22c3d61 100644
- }
- return 0;
-}
--]])],[dnl
+-]])],[have_shm_ipc=yes],[have_shm_ipc=no],[have_shm_ipc=no])
+- if test "$have_shm_ipc" = "yes"; then
- AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
-- msg=yes],[msg=no],[msg=no])
-- AC_MSG_RESULT([$msg])
--
+- fi
+ AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support])
-+
++ have_shm_ipc=yes
+ AC_MSG_RESULT([$have_shm_ipc])
+
AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <sys/types.h>
@@ -115,7 +124,7 @@ index 4810217..22c3d61 100644
-# define MAP_FAILED ((void*)-1)
-#endif
-
--int main() {
+-int main(void) {
- pid_t pid;
- int status;
- char *shm;
@@ -145,68 +154,24 @@ index 4810217..22c3d61 100644
- }
- return 0;
-}
--]])],[dnl
+-]])],[have_shm_mmap_anon=yes],[have_shm_mmap_anon=no],[
+- case $host_alias in
+- *linux*)
+- have_shm_mmap_anon=yes
+- ;;
+- *)
+- have_shm_mmap_anon=no
+- ;;
+- esac
+-])
+- if test "$have_shm_mmap_anon" = "yes"; then
- 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])
+- fi
+ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
++ have_shm_mmap_anon=yes
+ AC_MSG_RESULT([$have_shm_mmap_anon])
- AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support)
-- AC_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <sys/types.h>
--#include <sys/wait.h>
--#include <sys/mman.h>
--#include <sys/stat.h>
--#include <fcntl.h>
--#include <unistd.h>
--#include <string.h>
--
--#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_DEFINE(HAVE_SHM_MMAP_ZERO, 1, [Define if you have mmap("/dev/zero") SHM support])
-
+ PHP_CHECK_FUNC_LIB(shm_open, rt, root)
AC_MSG_CHECKING(for mmap() using shm_open() shared memory support)
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <sys/types.h>
@@ -223,14 +188,14 @@ index 4810217..22c3d61 100644
-# define MAP_FAILED ((void*)-1)
-#endif
-
--int main() {
+-int main(void) {
- pid_t pid;
- int status;
- int fd;
- char *shm;
- char tmpname[4096];
-
-- sprintf(tmpname,"test.shm.%dXXXXXX", getpid());
+- sprintf(tmpname,"/opcache.test.shm.%dXXXXXX", getpid());
- if (mktemp(tmpname) == NULL) {
- return 1;
- }
@@ -271,84 +236,19 @@ index 4810217..22c3d61 100644
- }
- return 0;
-}
--]])],[dnl
+-]])],[have_shm_mmap_posix=yes],[have_shm_mmap_posix=no],[have_shm_mmap_posix=no])
+- if test "$have_shm_mmap_posix" = "yes"; then
- 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])
+- PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])
+- fi
+- AC_MSG_RESULT([$have_shm_mmap_posix])
+ 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_RUN_IFELSE([AC_LANG_SOURCE([[
--#include <sys/types.h>
--#include <sys/wait.h>
--#include <sys/mman.h>
--#include <sys/stat.h>
--#include <fcntl.h>
--#include <unistd.h>
--#include <string.h>
--#include <stdlib.h>
--#include <stdio.h>
--
--#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])
-+ AC_DEFINE(HAVE_SHM_MMAP_FILE, 1, [Define if you have mmap() SHM support])
++ AC_MSG_RESULT([yes])
++ have_shm_mmap_posix=yes
++ PHP_CHECK_LIBRARY(rt, shm_unlink, [PHP_ADD_LIBRARY(rt,1,OPCACHE_SHARED_LIBADD)])
PHP_NEW_EXTENSION(opcache,
ZendAccelerator.c \
--
-2.7.4
+2.40.0
diff --git a/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch b/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch
deleted file mode 100644
index fce9738f54..0000000000
--- a/meta-oe/recipes-devtools/php/php/0001-main-php_ini.c-build-empty-php_load_zend_extension_c.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 2842aa2a078eb1cad55540b61e7edf111395150d Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-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 <thomas.petazzoni@bootlin.com>
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- 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-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
deleted file mode 100644
index 2f7d581555..0000000000
--- a/meta-oe/recipes-devtools/php/php/0001-php-don-t-use-broken-wrapper-for-mkdir.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From ebc101e0728b9db6c687cff525e5dfc8eb0edbf3 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 2/8] php: don't use broken wrapper for mkdir
-
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
----
-
-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-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch b/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch
new file mode 100644
index 0000000000..6183f49c28
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0002-build-php.m4-don-t-unset-cache-variables.patch
@@ -0,0 +1,45 @@
+From 1af203e8e385d46ad3e33b1c253b1c564aa99034 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:01:55 -0500
+Subject: [PATCH 02/11] build/php.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 <anuj.mittal@intel.com>
+
+update this patch to 7.4.4, acinclude.m4 move to build/php.m4
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+ build/php.m4 | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/build/php.m4 b/build/php.m4
+index 9746ba28f3..93551d9ca7 100644
+--- a/build/php.m4
++++ b/build/php.m4
+@@ -1568,8 +1568,6 @@ dnl PHP_CHECK_FUNC_LIB
+ 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])
+@@ -1601,8 +1599,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and
+ dnl 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.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch b/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch
new file mode 100644
index 0000000000..9637ed9516
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0003-php-remove-host-specific-info-from-header-file.patch
@@ -0,0 +1,36 @@
+From c81d0bd3491a6c6371d9df2f43956d109f984310 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:02:29 -0500
+Subject: [PATCH 03/11] php: remove host specific info from header file
+
+Based on:
+https://sources.debian.org/data/main/p/php7.3/7.3.6-1/debian/patches/
+ 0036-php-5.4.9-fixheader.patch
+
+Upstream-Status: Inappropriate [not author]
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1eafd62a44..90c94323aa 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1289,7 +1289,7 @@ PHP_REMOVE_USR_LIB(LDFLAGS)
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
+
+-UNAME=`uname -a | xargs`
++UNAME=`uname | xargs`
+ PHP_UNAME=${PHP_UNAME:-$UNAME}
+ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
+ PHP_OS=`uname | xargs`
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch b/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch
new file mode 100644
index 0000000000..19a8bf8e4f
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0004-configure.ac-don-t-include-build-libtool.m4.patch
@@ -0,0 +1,33 @@
+From 41ef1121682c245b10df7de4b78c45baf9114c04 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:03:46 -0500
+Subject: [PATCH 04/11] configure.ac: don't include build/libtool.m4
+
+we delete build/libtool.m4 before do_configure,
+we will use libtool.m4 under ACLOCALDIR
+
+Upstream-Status: Inappropriate [oe-specific]
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 90c94323aa..161e7c3f53 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -6,7 +6,6 @@ dnl ----------------------------------------------------------------------------
+ m4_include([build/ax_check_compile_flag.m4])
+ m4_include([build/ax_func_which_gethostbyname_r.m4])
+ m4_include([build/ax_gcc_func_attribute.m4])
+-m4_include([build/libtool.m4])
+ m4_include([build/php_cxx_compile_stdcxx.m4])
+ m4_include([build/php.m4])
+ m4_include([build/pkg.m4])
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/pear-makefile.patch b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch
index fcbf25be9b..37752ef949 100644
--- a/meta-oe/recipes-devtools/php/php/pear-makefile.patch
+++ b/meta-oe/recipes-devtools/php/php/0005-pear-fix-Makefile.frag-for-Yocto.patch
@@ -1,17 +1,23 @@
-From edd575a546d56bb5683aff19782b16963d61fd0b Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-Status: Pending
+From f22958b4c1348eec3bb4c0f2cbe2d22676e0ad23 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:04:29 -0500
+Subject: [PATCH 05/11] pear: fix Makefile.frag for Yocto
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
+Upstream-Status: Pending
+
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
+index 9408757a3a..69072f39e0 100644
--- a/pear/Makefile.frag
+++ b/pear/Makefile.frag
-@@ -12,7 +12,7 @@ PEAR_SUFFIX = -ds a$(program_suffix)
+@@ -10,7 +10,7 @@ PEAR_SUFFIX = -ds a$(program_suffix)
PEAR_INSTALLER_URL = https://pear.php.net/install-pear-nozlib.phar
install-pear-installer: $(SAPI_CLI_PATH)
@@ -20,3 +26,6 @@ index bbe8ec3..16f43e2 100644
install-pear:
@echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/"
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/phar-makefile.patch b/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch
index 336cf0d629..acf2940839 100644
--- a/meta-oe/recipes-devtools/php/php/phar-makefile.patch
+++ b/meta-oe/recipes-devtools/php/php/0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch
@@ -1,24 +1,28 @@
-From 08962a56f69963e01892d98ca5b75de8354bd3f5 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Fix phar packaging
+From eab5babdadea487bbbef025068c553f5ba741774 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:07:25 -0500
+Subject: [PATCH 06/11] ext/phar/Makefile.frag: Fix phar packaging
Inherited from OE-Classic, with some additions to fix host paths leaking
into the target package.
Upstream-Status: Inappropriate [config]
+update patch to version 7.4.4
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
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
+@@ -10,20 +10,9 @@ pharcmd: $(builddir)/phar.php $(builddir
- 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_SETTINGS = -n -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=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"; \
@@ -34,9 +38,9 @@ index 0e3713f..22f7898 100644
- $(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)"; `
++ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; `
+
-+PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";`
++PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "/usr/bin/env $(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-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch b/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch
new file mode 100644
index 0000000000..9776e7f6db
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0007-sapi-cli-config.m4-fix-build-directory.patch
@@ -0,0 +1,32 @@
+From 03aa51625e0d1aa156c2f7cd71503b1f435d35a4 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:08:06 -0500
+Subject: [PATCH 07/11] sapi/cli/config.m4: fix build directory
+
+Upstream-Status: Inappropriate
+
+update patch to version 7.4.4
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+ 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 d17d531683..f2f87f9164 100644
+--- a/sapi/cli/config.m4
++++ b/sapi/cli/config.m4
+@@ -47,7 +47,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.
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch b/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch
index 16359af9fd..78bae58e00 100644
--- a/meta-oe/recipes-devtools/php/php/imap-fix-autofoo.patch
+++ b/meta-oe/recipes-devtools/php/php/0008-ext-imap-config.m4-fix-include-paths.patch
@@ -1,32 +1,23 @@
-From c084c8349d1780980e232cb28b60a109e3d89438 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-Status: Pending
+From c3c20db4415e0f6c4a601d6f9da1f3746a96b301 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:08:58 -0500
+Subject: [PATCH 08/11] ext/imap/config.m4: fix include paths
+Upstream-Status: Pending
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
---
- acinclude.m4 | 2 +-
ext/imap/config.m4 | 10 ++--------
- 2 files changed, 3 insertions(+), 9 deletions(-)
+ 1 file changed, 2 insertions(+), 8 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
+index 5086a312d0..0e938bd544 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)
+@@ -110,7 +110,7 @@ if test "$PHP_IMAP" != "no"; then
+ PHP_NEW_EXTENSION(imap, php_imap.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
AC_DEFINE(HAVE_IMAP,1,[ ])
- for i in $PHP_IMAP /usr/local /usr; do
@@ -34,7 +25,7 @@ index badb6e2..8ff803c 100644
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
+@@ -199,13 +199,7 @@ if test "$PHP_IMAP" != "no"; then
AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
fi
@@ -49,3 +40,6 @@ index badb6e2..8ff803c 100644
IMAP_LIB=$lib
IMAP_LIB_CHK($PHP_LIBDIR)
IMAP_LIB_CHK(c-client)
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch b/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch
new file mode 100644
index 0000000000..b5a33cca7f
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0009-php-don-t-use-broken-wrapper-for-mkdir.patch
@@ -0,0 +1,31 @@
+From 8707720c0aea405f0e06d67354f239232cc823cc Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:10:02 -0500
+Subject: [PATCH 09/11] php: don't use broken wrapper for mkdir
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to version 7.4.4
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+Upstream-Status: Pending
+
+ build/Makefile.global | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/Makefile.global b/build/Makefile.global
+index 6566d052de..eb39421f2a 100644
+--- a/build/Makefile.global
++++ b/build/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
+
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch b/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch
new file mode 100644
index 0000000000..e3b8cd4707
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/0010-iconv-fix-detection.patch
@@ -0,0 +1,35 @@
+From a04aabc5b80371e579fbaffdd417627390d22722 Mon Sep 17 00:00:00 2001
+From: Claude Bing <cbing@cybernetics.com>
+Date: Tue, 9 Nov 2021 13:10:33 -0500
+Subject: [PATCH 10/11] iconv: fix detection
+
+Upstream-Status: Pending
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+
+update patch to version 7.4.4
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+
+update patch to version 8.0.12
+Signed-off-by: Claude Bing <cbing@cybernetics.com>
+---
+ build/php.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/build/php.m4 b/build/php.m4
+index 93551d9ca7..dba50825fb 100644
+--- a/build/php.m4
++++ b/build/php.m4
+@@ -1919,7 +1919,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+ unset ICONV_DIR
+
+ dnl Check libc first if no path is provided in --with-iconv.
+- 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 -liconv in.
+ LIBS_save="$LIBS"
+ LIBS=
+--
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch b/meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch
deleted file mode 100644
index f36ddac262..0000000000
--- a/meta-oe/recipes-devtools/php/php/0048-Use-pkg-config-for-FreeType2-detection.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= <ondrej@sury.org>
-Date: Mon, 22 Oct 2018 06:54:31 +0000
-Subject: Use pkg-config for FreeType2 detection
-
----
- ext/gd/config.m4 | 30 +++++++++++++++++++-----------
- 1 file changed, 19 insertions(+), 11 deletions(-)
-
-diff --git a/ext/gd/config.m4 b/ext/gd/config.m4
-index 498d870..d28c6ae 100644
---- a/ext/gd/config.m4
-+++ b/ext/gd/config.m4
-@@ -184,21 +184,29 @@ AC_DEFUN([PHP_GD_XPM],[
- AC_DEFUN([PHP_GD_FREETYPE2],[
- if test "$PHP_FREETYPE_DIR" != "no"; then
-
-- for i in $PHP_FREETYPE_DIR /usr/local /usr; do
-- if test -f "$i/bin/freetype-config"; then
-- FREETYPE2_DIR=$i
-- FREETYPE2_CONFIG="$i/bin/freetype-config"
-- break
-+ if test -z "$PKG_CONFIG"; then
-+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-+ fi
-+ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then
-+ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2`
-+ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2`
-+ else
-+ for i in $PHP_FREETYPE_DIR /usr/local /usr; do
-+ if test -f "$i/bin/freetype-config"; then
-+ FREETYPE2_DIR=$i
-+ FREETYPE2_CONFIG="$i/bin/freetype-config"
-+ break
-+ fi
-+ done
-+
-+ if test -z "$FREETYPE2_DIR"; then
-+ AC_MSG_ERROR([freetype-config not found.])
- fi
-- done
-
-- if test -z "$FREETYPE2_DIR"; then
-- AC_MSG_ERROR([freetype-config not found.])
-+ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
-+ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
- fi
-
-- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags`
-- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs`
--
- PHP_EVAL_INCLINE($FREETYPE2_CFLAGS)
- PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD)
- AC_DEFINE(HAVE_LIBFREETYPE,1,[ ])
diff --git a/meta-oe/recipes-devtools/php/php/70_mod_php5.conf b/meta-oe/recipes-devtools/php/php/70_mod_php5.conf
deleted file mode 100644
index 1de6fb11ac..0000000000
--- a/meta-oe/recipes-devtools/php/php/70_mod_php5.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-# vim: ft=apache sw=4 ts=4
-<IfDefine PHP5>
- # Load the module first
- <IfModule !sapi_apache2.c>
- LoadModule php5_module lib/apache2/modules/libphp5.so
- </IfModule>
-
- # 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
-</IfDefine>
diff --git a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf
index d206265a25..58ce408aa4 100644
--- a/meta-oe/recipes-devtools/php/php/70_mod_php7.conf
+++ b/meta-oe/recipes-devtools/php/php/70_mod_php8.conf
@@ -1,6 +1,6 @@
-LoadModule php7_module lib/apache2/modules/libphp7.so
+LoadModule php_module lib/apache2/modules/libphp.so
-<FilesMatch "\.ph(p[2-7]?|tml)$">
+<FilesMatch "\.ph(p[2-8]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
diff --git a/meta-oe/recipes-devtools/php/php/CVE-2019-6978.patch b/meta-oe/recipes-devtools/php/php/CVE-2019-6978.patch
deleted file mode 100644
index b7cdfd964c..0000000000
--- a/meta-oe/recipes-devtools/php/php/CVE-2019-6978.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From 089f7c0bc28d399b0420aa6ef058e4c1c120b2ae Mon Sep 17 00:00:00 2001
-From: "Christoph M. Becker" <cmbecker69@gmx.de>
-Date: Sat, 19 Jan 2019 10:35:39 +0100
-Subject: [PATCH] Sync with upstream
-
-Even though libgd/libgd#492 is not a relevant bug fix for PHP, since
-the binding doesn't use the `gdImage*Ptr()` functions at all, we're
-porting the fix to stay in sync here.
----
- ext/gd/libgd/gd_gif_out.c | 20 +++++++++++++++++---
- ext/gd/libgd/gd_jpeg.c | 17 ++++++++++++++---
- ext/gd/libgd/gd_wbmp.c | 18 +++++++++++++++---
- 3 files changed, 46 insertions(+), 9 deletions(-)
-
-Upstream-Status: Backport [http://git.php.net/?p=php-src.git;a=commit;h=089f7c0bc28d399b0420aa6ef058e4c1c120b2ae]
-CVE: CVE-2019-6978
-
-Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
-
-diff --git a/ext/gd/libgd/gd_gif_out.c b/ext/gd/libgd/gd_gif_out.c
-index 1f2a6b936a..2e1f38af70 100644
---- a/ext/gd/libgd/gd_gif_out.c
-+++ b/ext/gd/libgd/gd_gif_out.c
-@@ -97,12 +97,18 @@ static void cl_hash (register count_int chsize, GifCtx *ctx);
- static void char_init (GifCtx *ctx);
- static void char_out (int c, GifCtx *ctx);
- static void flush_char (GifCtx *ctx);
-+
-+static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out);
-+
- void * gdImageGifPtr (gdImagePtr im, int *size)
- {
- void *rv;
- gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
-- gdImageGifCtx (im, out);
-- rv = gdDPExtractData (out, size);
-+ if (!_gdImageGifCtx(im, out)) {
-+ rv = gdDPExtractData(out, size);
-+ } else {
-+ rv = NULL;
-+ }
- out->gd_free (out);
- return rv;
- }
-@@ -115,6 +121,12 @@ void gdImageGif (gdImagePtr im, FILE * outFile)
- }
-
- void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
-+{
-+ _gdImageGifCtx(im, out);
-+}
-+
-+/* returns 0 on success, 1 on failure */
-+static int _gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
- {
- gdImagePtr pim = 0, tim = im;
- int interlace, BitsPerPixel;
-@@ -125,7 +137,7 @@ void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
- based temporary image. */
- pim = gdImageCreatePaletteFromTrueColor(im, 1, 256);
- if (!pim) {
-- return;
-+ return 1;
- }
- tim = pim;
- }
-@@ -138,6 +150,8 @@ void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out)
- /* Destroy palette based temporary image. */
- gdImageDestroy( pim);
- }
-+
-+ return 0;
- }
-
- static int
-diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c
-index 8cf71fcbc9..ef46c4a22c 100644
---- a/ext/gd/libgd/gd_jpeg.c
-+++ b/ext/gd/libgd/gd_jpeg.c
-@@ -132,6 +132,7 @@ const char * gdJpegGetVersionString()
- }
- }
-
-+static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality);
-
- /*
- * Write IM to OUTFILE as a JFIF-formatted JPEG image, using quality
-@@ -153,8 +154,11 @@ void *gdImageJpegPtr (gdImagePtr im, int *size, int quality)
- {
- void *rv;
- gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
-- gdImageJpegCtx (im, out, quality);
-- rv = gdDPExtractData (out, size);
-+ if (!_gdImageJpegCtx(im, out, quality)) {
-+ rv = gdDPExtractData(out, size);
-+ } else {
-+ rv = NULL;
-+ }
- out->gd_free (out);
-
- return rv;
-@@ -163,6 +167,12 @@ void *gdImageJpegPtr (gdImagePtr im, int *size, int quality)
- void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
-
- void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
-+{
-+ _gdImageJpegCtx(im, outfile, quality);
-+}
-+
-+/* returns 0 on success, 1 on failure */
-+static int _gdImageJpegCtx(gdImagePtr im, gdIOCtx *outfile, int quality)
- {
- struct jpeg_compress_struct cinfo;
- struct jpeg_error_mgr jerr;
-@@ -184,7 +194,7 @@ void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
- if (row) {
- gdFree (row);
- }
-- return;
-+ return 1;
- }
-
- cinfo.err->error_exit = fatal_jpeg_error;
-@@ -277,6 +287,7 @@ void gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
- jpeg_finish_compress (&cinfo);
- jpeg_destroy_compress (&cinfo);
- gdFree (row);
-+ return 0;
- }
-
- gdImagePtr gdImageCreateFromJpeg (FILE * inFile)
-diff --git a/ext/gd/libgd/gd_wbmp.c b/ext/gd/libgd/gd_wbmp.c
-index 55ced3443d..fd9edad2ca 100644
---- a/ext/gd/libgd/gd_wbmp.c
-+++ b/ext/gd/libgd/gd_wbmp.c
-@@ -82,6 +82,7 @@ int gd_getin (void *in)
- return (gdGetC((gdIOCtx *) in));
- }
-
-+static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out);
-
- /* gdImageWBMPCtx
- ** --------------
-@@ -93,6 +94,12 @@ int gd_getin (void *in)
- ** out: the stream where to write
- */
- void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out)
-+{
-+ _gdImageWBMPCtx(image, fg, out);
-+}
-+
-+/* returns 0 on success, 1 on failure */
-+static int _gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out)
- {
- int x, y, pos;
- Wbmp *wbmp;
-@@ -100,7 +107,7 @@ void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out)
- /* create the WBMP */
- if ((wbmp = createwbmp (gdImageSX (image), gdImageSY (image), WBMP_WHITE)) == NULL) {
- gd_error("Could not create WBMP");
-- return;
-+ return 1;
- }
-
- /* fill up the WBMP structure */
-@@ -116,7 +123,9 @@ void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out)
-
- /* write the WBMP to a gd file descriptor */
- if (writewbmp (wbmp, &gd_putout, out)) {
-+ freewbmp(wbmp);
- gd_error("Could not save WBMP");
-+ return 1;
- }
- /* des submitted this bugfix: gdFree the memory. */
- freewbmp(wbmp);
-@@ -204,8 +213,11 @@ void * gdImageWBMPPtr (gdImagePtr im, int *size, int fg)
- {
- void *rv;
- gdIOCtx *out = gdNewDynamicCtx(2048, NULL);
-- gdImageWBMPCtx(im, fg, out);
-- rv = gdDPExtractData(out, size);
-+ if (!_gdImageWBMPCtx(im, fg, out)) {
-+ rv = gdDPExtractData(out, size);
-+ } else {
-+ rv = NULL;
-+ }
- out->gd_free(out);
-
- return rv;
---
-2.17.1
-
diff --git a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch b/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
deleted file mode 100755
index 21050f7605..0000000000
--- a/meta-oe/recipes-devtools/php/php/debian-php-fixheader.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-php: remove host specific info from header file
-
-https://sources.debian.org/data/main/p/php7.3/7.3.6-1/debian/patches/
- 0036-php-5.4.9-fixheader.patch
-
-Upstream-Status: Inappropriate [not author]
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
----
-From: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
-Date: Sat, 2 May 2015 10:26:56 +0200
-Subject: php-5.4.9-fixheader
-
-Make generated php_config.h constant across rebuilds.
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 433d7e6..41893d7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1357,7 +1357,7 @@ PHP_BUILD_DATE=`date -u +%Y-%m-%d`
- fi
- AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
-
--PHP_UNAME=`uname -a | xargs`
-+PHP_UNAME=`uname | xargs`
- AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
- PHP_OS=`uname | xargs`
- AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
diff --git a/meta-oe/recipes-devtools/php/php/iconv.patch b/meta-oe/recipes-devtools/php/php/iconv.patch
deleted file mode 100644
index ecf7d87207..0000000000
--- a/meta-oe/recipes-devtools/php/php/iconv.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 17cc5645f3acf943a5a06465d09d0ebcfea987bd Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Wed, 2 Nov 2011 16:54:57 +0100
-Subject: [PATCH] Upstream-Status: Pending
-
----
- 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-oe/recipes-devtools/php/php/php-fpm.service b/meta-oe/recipes-devtools/php/php/php-fpm.service
index ac79dc931a..918ffe6749 100644
--- a/meta-oe/recipes-devtools/php/php/php-fpm.service
+++ b/meta-oe/recipes-devtools/php/php/php-fpm.service
@@ -1,10 +1,57 @@
+# It's not recommended to modify this file in-place, because it
+# will be overwritten during upgrades. If you want to customize,
+# the best way is to use the "systemctl edit" command.
+
[Unit]
-Description=PHP-FPM
+Description=The PHP FastCGI Process Manager
After=network.target
+
[Service]
-Type=forking
+Type=simple
PIDFile=@LOCALSTATEDIR@/run/php-fpm.pid
-ExecStart=@SYSCONFDIR@/init.d/php-fpm start
-ExecStop=@SYSCONFDIR@/init.d/php-fpm stop
+ExecStart=@SBINDIR@/php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf
+ExecReload=@BINDIR@/kill -USR2 $MAINPID
+
+# Set up a new file system namespace and mounts private /tmp and /var/tmp directories
+# so this service cannot access the global directories and other processes cannot
+# access this service's directories.
+PrivateTmp=true
+
+# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit.
+ProtectSystem=full
+
+# Sets up a new /dev namespace for the executed processes and only adds API pseudo devices
+# such as /dev/null, /dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it,
+# but no physical devices such as /dev/sda.
+PrivateDevices=true
+
+# Explicit module loading will be denied. This allows to turn off module load and unload
+# operations on modular kernels. It is recommended to turn this on for most services that
+# do not need special file systems or extra kernel modules to work.
+ProtectKernelModules=true
+
+# Kernel variables accessible through /proc/sys, /sys, /proc/sysrq-trigger, /proc/latency_stats,
+# /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq will be made read-only to all processes
+# of the unit. Usually, tunable kernel variables should only be written at boot-time, with the
+# sysctl.d(5) mechanism. Almost no services need to write to these at runtime; it is hence
+# recommended to turn this on for most services.
+ProtectKernelTunables=true
+
+# The Linux Control Groups (cgroups(7)) hierarchies accessible through /sys/fs/cgroup will be
+# made read-only to all processes of the unit. Except for container managers no services should
+# require write access to the control groups hierarchies; it is hence recommended to turn this on
+# for most services
+ProtectControlGroups=true
+
+# Any attempts to enable realtime scheduling in a process of the unit are refused.
+RestrictRealtime=true
+
+# Restricts the set of socket address families accessible to the processes of this unit.
+# Protects against vulnerabilities such as CVE-2016-8655
+RestrictAddressFamilies=AF_INET AF_INET6 AF_NETLINK AF_UNIX
+
+# Takes away the ability to create or manage any kind of namespace
+RestrictNamespaces=true
+
[Install]
WantedBy=multi-user.target
diff --git a/meta-oe/recipes-devtools/php/php/php_exec_native.patch b/meta-oe/recipes-devtools/php/php/php_exec_native.patch
deleted file mode 100644
index 80409000d3..0000000000
--- a/meta-oe/recipes-devtools/php/php/php_exec_native.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From d251b5aa3d23803d016ca16818e2e1d2f2b70a02 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-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-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch b/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
deleted file mode 100644
index 21057439c9..0000000000
--- a/meta-oe/recipes-devtools/php/php/xfail_two_bug_tests.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-php-ptest: xfail two tests
-
-If and when these tests are modified to expect the correct output, they will
-succeed and generate warnings in the test summary. This patch can then be removed.
-
-Note that we add a closing '?>' to one test so that it can be executed directly by php.
-
-Upstream-Status: Pending
-
-Signed-off-By: Joe Slater <joe.slater@windriver.com>
-
-
---- a/tests/basic/bug71273.phpt
-+++ b/tests/basic/bug71273.phpt
-@@ -16,6 +16,8 @@ Bug #71273 A wrong ext directory setup i
- var_dump(preg_match(",.+a[\\/].+[\\/]w.php_kartoffelbrei.dll.+,s", $out));
- ?>
- ==DONE==
-+--XFAIL--
-+Output is int(0), not int(1)
- --EXPECT--
- int(1)
- ==DONE==
---- a/tests/run-test/bug75042-3.phpt
-+++ b/tests/run-test/bug75042-3.phpt
-@@ -8,5 +8,8 @@ display_errors=1
- nonexistentsharedmodule
- --FILE--
- <?php
-+?>
-+--XFAIL--
-+No warning message printed.
- --EXPECTF--
- PHP Warning: PHP Startup: Unable to load dynamic library '%snonexistentsharedmodule.%s' %A
diff --git a/meta-oe/recipes-devtools/php/php_7.3.11.bb b/meta-oe/recipes-devtools/php/php_8.2.18.bb
index e7fb847fa9..da04ffba62 100644
--- a/meta-oe/recipes-devtools/php/php_7.3.11.bb
+++ b/meta-oe/recipes-devtools/php/php_8.2.18.bb
@@ -3,41 +3,48 @@ HOMEPAGE = "http://www.php.net"
SECTION = "console/network"
LICENSE = "PHP-3.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fb07bfc51f6d5e0c30b65d9701233b2e"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fd469cce1a919f0cc95bab7afb28d19d"
BBCLASSEXTEND = "native"
-DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native lemon-native"
-DEPENDS_class-native = "zlib-native libxml2-native"
+DEPENDS = "zlib bzip2 libxml2 virtual/libiconv php-native"
+DEPENDS:append:libc-musl = " libucontext"
+DEPENDS:class-native = "zlib-native libxml2-native"
PHP_MAJOR_VERSION = "${@d.getVar('PV').split('.')[0]}"
SRC_URI = "http://php.net/distributions/php-${PV}.tar.bz2 \
- file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \
- file://0001-acinclude.m4-don-t-unset-cache-variables.patch \
- file://0048-Use-pkg-config-for-FreeType2-detection.patch \
- file://0001-Use-pkg-config-for-libxml2-detection.patch \
- file://debian-php-fixheader.patch \
- file://CVE-2019-6978.patch \
+ file://0002-build-php.m4-don-t-unset-cache-variables.patch \
+ file://0003-php-remove-host-specific-info-from-header-file.patch \
+ file://0004-configure.ac-don-t-include-build-libtool.m4.patch \
+ file://0006-ext-phar-Makefile.frag-Fix-phar-packaging.patch \
+ file://0009-php-don-t-use-broken-wrapper-for-mkdir.patch \
+ file://0010-iconv-fix-detection.patch \
+ file://0001-Change-whether-to-inline-XXH3_hashLong_withSecret-to.patch \
"
-SRC_URI_append_class-target = " \
- file://iconv.patch \
- file://imap-fix-autofoo.patch \
- file://php_exec_native.patch \
+SRC_URI:append:class-target = " \
+ file://0001-ext-opcache-config.m4-enable-opcache.patch \
+ file://0005-pear-fix-Makefile.frag-for-Yocto.patch \
+ file://0007-sapi-cli-config.m4-fix-build-directory.patch \
+ file://0008-ext-imap-config.m4-fix-include-paths.patch \
file://php-fpm.conf \
file://php-fpm-apache.conf \
file://70_mod_php${PHP_MAJOR_VERSION}.conf \
file://php-fpm.service \
- file://pear-makefile.patch \
- file://phar-makefile.patch \
- file://0001-opcache-config.m4-enable-opcache.patch \
- file://xfail_two_bug_tests.patch \
"
+
S = "${WORKDIR}/php-${PV}"
-SRC_URI[md5sum] = "21b710b4126d4d54714de9693a6c7b0d"
-SRC_URI[sha256sum] = "92d1ff4b13c7093635f1ec338a5e6891ca99b10e65fbcadd527e5bb84d11b5e7"
+SRC_URI[sha256sum] = "ca0b07c254200320f518ac5b3df540a9cf14d866f3c93edc3013b52e06fac796"
+
+CVE_STATUS_GROUPS += "CVE_STATUS_PHP"
+CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored."
+CVE_STATUS_PHP = " \
+ CVE-2007-2728 \
+ CVE-2007-3205 \
+ CVE-2007-4596 \
+"
-inherit autotools pkgconfig pythonnative gettext
+inherit autotools pkgconfig python3native gettext multilib_header multilib_script systemd
# phpize is not scanned for absolute paths by default (but php-config is).
#
@@ -55,7 +62,6 @@ COMMON_EXTRA_OECONF = "--enable-sockets \
--libdir=${PHP_LIBDIR} \
"
EXTRA_OECONF = "--enable-mbstring \
- --enable-wddx \
--enable-fpm \
--with-libdir=${baselib} \
--with-gettext=${STAGING_LIBDIR}/.. \
@@ -68,12 +74,16 @@ EXTRA_OECONF = "--enable-mbstring \
${COMMON_EXTRA_OECONF} \
"
-EXTRA_OECONF_append_riscv64 = " --with-pcre-jit=no"
-EXTRA_OECONF_append_riscv32 = " --with-pcre-jit=no"
+EXTRA_OECONF:append:riscv64 = " --with-pcre-jit=no"
+EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no"
+# Needs fibers assembly implemented for rv32
+# for example rv64 implementation is below
+# see https://github.com/php/php-src/commit/70b02d75f2abe3a292d49c4a4e9e4f850c2fee68
+EXTRA_OECONF:append:riscv32:libc-musl = " --disable-fiber-asm"
CACHED_CONFIGUREVARS += "ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=yes"
-EXTRA_OECONF_class-native = " \
+EXTRA_OECONF:class-native = " \
--with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
--without-iconv \
${COMMON_EXTRA_OECONF} \
@@ -82,9 +92,9 @@ EXTRA_OECONF_class-native = " \
PACKAGECONFIG ??= "mysql sqlite3 imap opcache openssl \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 pam', d)} \
"
-PACKAGECONFIG_class-native = ""
+PACKAGECONFIG:class-native = ""
-PACKAGECONFIG[zip] = "--enable-zip --with-libzip=${STAGING_EXECPREFIXDIR},,libzip"
+PACKAGECONFIG[zip] = "--with-zip --with-zlib-dir=${STAGING_EXECPREFIXDIR},,libzip"
PACKAGECONFIG[mysql] = "--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
@@ -96,7 +106,7 @@ PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \
,--without-sqlite3 --without-pdo-sqlite \
,sqlite3"
PACKAGECONFIG[pgsql] = "--with-pgsql=${STAGING_DIR_TARGET}${exec_prefix},--without-pgsql,postgresql"
-PACKAGECONFIG[soap] = "--enable-libxml --enable-soap, --disable-soap, libxml2"
+PACKAGECONFIG[soap] = "--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} \
@@ -107,38 +117,56 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
PACKAGECONFIG[opcache] = "--enable-opcache,--disable-opcache"
PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
PACKAGECONFIG[valgrind] = "--with-valgrind=${STAGING_DIR_TARGET}/usr,--with-valgrind=no,valgrind"
+PACKAGECONFIG[mbregex] = "--enable-mbregex, --disable-mbregex, oniguruma"
+PACKAGECONFIG[mbstring] = "--enable-mbstring,,"
+export HOSTCC = "${BUILD_CC}"
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 += " -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED -I${STAGING_INCDIR}/apache2"
+
+# Adding these flags enables dynamic library support, which is disabled by
+# default when cross compiling
+# See https://bugs.php.net/bug.php?id=60109
+CFLAGS += " -DHAVE_LIBDL "
+LDFLAGS += " -ldl "
+LDFLAGS:append:libc-musl = " -lucontext "
+LDFLAGS:append:riscv64 = " -latomic"
EXTRA_OEMAKE = "INSTALL_ROOT=${D}"
acpaths = ""
-do_configure_prepend () {
+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_SBINDIR_NATIVE}/httpd!'
}
-do_configure_append() {
+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
+ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+ sed -i -e's@${RECIPE_SYSROOT}@@g' \
+ -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \
+ -e's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \
+ -e's@-ffile-prefix-map=[^ ]*[ ]*@@g' \
+ -e's@-fmacro-prefix-map=[^ ]*[ ]*@@g' \
+ ${B}/main/build-defs.h \
+ ${B}/scripts/php-config
}
-do_install_append_class-native() {
+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() {
+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() {
+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
@@ -147,18 +175,13 @@ do_install_prepend_class-target() {
}
# fixme
-do_install_append_class-target() {
+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
@@ -170,21 +193,13 @@ do_install_append_class-target() {
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
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_system_unitdir}/php-fpm.service
+ sed -i -e 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${systemd_system_unitdir}/php-fpm.service
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_system_unitdir}/php-fpm.service
+ sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/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}${sysconfdir}/apache2/modules.d
install -d ${D}${sysconfdir}/php/apache2-php${PHP_MAJOR_VERSION}
@@ -197,6 +212,14 @@ do_install_append_class-target() {
fi
}
+MULTILIB_SCRIPTS += "${PN}:${bindir}/php-config \
+ ${PN}:${bindir}/phpize \
+"
+
+do_install:append () {
+ oe_multilib_header php/main/build-defs.h php/main/php_config.h
+}
+
SYSROOT_PREPROCESS_FUNCS += "php_sysroot_preprocess"
php_sysroot_preprocess () {
@@ -210,31 +233,39 @@ php_sysroot_preprocess () {
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}"
+PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-phpdbg ${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}"
+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}"
+
+ALLOW_EMPTY:${PN} = "1"
INITSCRIPT_PACKAGES = "${PN}-fpm"
inherit update-rc.d
-FILES_${PN}-dbg =+ "${bindir}/.debug \
+# WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php: ELF binary /usr/libexec/apache2/modules/libphp.so has relocations in .text [textrel]
+#WARNING: lib32-php-8.0.12-r0 do_package_qa: QA Issue: lib32-php-opcache: ELF binary /usr/lib/php8/extensions/no-debug-zts-20200930/opcache.so has relocations in .text [textrel]
+INSANE_SKIP:${PN}:append:x86 = " textrel"
+INSANE_SKIP:${PN}-opcache:append:x86 = " textrel"
+
+FILES:${PN}-dbg =+ "${bindir}/.debug \
${libexecdir}/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 ${sysconfdir}/php-fpm.d/www.conf.default"
-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 \
+FILES:${PN}-doc += "${PHP_LIBDIR}/php/doc"
+FILES:${PN}-cli = "${bindir}/php"
+FILES:${PN}-phpdbg = "${bindir}/phpdbg"
+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 ${sysconfdir}/php-fpm.d/www.conf.default"
+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 \
@@ -242,34 +273,27 @@ FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${PHP_LIBDIR}/php/PEAR \
${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 \
+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} ${libexecdir}/apache2"
+FILES:${PN}-staticdev += "${PHP_LIBDIR}/extensions/*/*.a"
+FILES:${PN}-opcache = "${PHP_LIBDIR}/extensions/*/opcache${SOLIBSDEV}"
+FILES:${PN} = "${PHP_LIBDIR}/php"
+FILES:${PN} += "${bindir} ${libexecdir}/apache2"
-SUMMARY_${PN}-modphp = "PHP module for the Apache HTTP server"
-FILES_${PN}-modphp = "${libdir}/apache2 ${sysconfdir}"
+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}"
+RPROVIDES:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
+RREPLACES:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
+RCONFLICTS:${PN}-modphp = "${MODPHP_OLDPACKAGE}"
-do_install_append_class-native() {
+SYSTEMD_SERVICE:${PN}-fpm = "php-fpm.service"
+SYSTEMD_PACKAGES += "${PN}-fpm"
+
+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"