php: drop some unneeded patches

Drop 0003-php-remove-host-specific-info-from-header-file.patch.
Instead we export PHP_UNAME = "Linux" to achieve the same effect.

Drop 0002-build-php.m4-don-t-unset-cache-variables.patch.
The related ac_cv_lib_xxx and ac_cv_func_xxx settings in this recipe
are also removed. This patch is not needed from the my build testing
result.

Drop 0009-php-don-t-use-broken-wrapper-for-mkdir.patch.
This patch says that the wrapper is broken, but does not say why.
Without this patch, things still build.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Chen Qi
2025-03-13 18:58:08 -07:00
committed by Khem Raj
parent 3dd94e6c16
commit 929355270a
4 changed files with 3 additions and 117 deletions
@@ -1,45 +0,0 @@
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])
@@ -1604,8 +1602,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
@@ -1,36 +0,0 @@
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
@@ -1462,7 +1462,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
@@ -1,30 +0,0 @@
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
+3 -6
View File
@@ -13,11 +13,8 @@ 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://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 \
"
@@ -34,6 +31,7 @@ SRC_URI:append:class-target = " \
"
S = "${WORKDIR}/php-${PV}"
SRC_URI[sha256sum] = "be57c347d451c905bcb4336832a864d9928dd0e20989b872705fea0ba6476c6b"
CVE_STATUS_GROUPS += "CVE_STATUS_PHP"
@@ -52,6 +50,8 @@ inherit autotools pkgconfig python3native gettext multilib_header multilib_scrip
SSTATE_SCAN_FILES += "phpize"
SSTATE_SCAN_FILES += "build-defs.h"
export PHP_UNAME = "Linux"
PHP_LIBDIR = "${libdir}/php${PHP_MAJOR_VERSION}"
# Common EXTRA_OECONF
@@ -71,7 +71,6 @@ EXTRA_OECONF = "--enable-mbstring \
--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} \
"
@@ -82,8 +81,6 @@ EXTRA_OECONF:append:riscv32 = " --with-pcre-jit=no"
# 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 = " \
--with-zlib=${STAGING_LIBDIR_NATIVE}/.. \
--without-iconv \