From afdf986224d1dc2a717bd29fe3111dc2154465d0 Mon Sep 17 00:00:00 2001 From: breakings Date: Sat, 30 Jul 2022 22:39:35 +0800 Subject: [PATCH] php8: update to 8.1.8 (#488) * php8: fixup libiconv usage (refs openwrt/openwrt#10024) Since the OpenWrt's stub libiconv implementation is now gone, we can build against musl's internal one or the external libiconv implementation. This needs minor adjustements in the makefile to allow PHPs build to choose the right path when cross-compiling. Signed-off-by: Michael Heimpold * php8: update to 8.1.8 This fixes: - CVE-2022-31627 Signed-off-by: Michael Heimpold Co-authored-by: Michael Heimpold --- lang/php8/Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lang/php8/Makefile b/lang/php8/Makefile index ebe56e03..ad46f998 100644 --- a/lang/php8/Makefile +++ b/lang/php8/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=8.1.7 +PKG_VERSION:=8.1.8 PKG_RELEASE:=1 PKG_MAINTAINER:=Michael Heimpold @@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:php:php PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_HASH:=f042322f1b5a9f7c2decb84b7086ef676896c2f7178739b9672afafa964ed0e5 +PKG_HASH:=04c065515bc347bc68e0bb1ac7182669a98a731e4a17727e5731650ad3d8de4c PKG_BUILD_PARALLEL:=1 PKG_USE_MIPS16:=0 @@ -270,7 +270,13 @@ else endif ifneq ($(SDK)$(CONFIG_PACKAGE_php8-mod-iconv),) - CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)" + ifeq ($(CONFIG_BUILD_NLS),y) + CONFIGURE_VARS+= iconv_impl_name="gnu_libiconv" + CONFIGURE_ARGS+= --with-iconv=shared,"$(ICONV_PREFIX)" + else + CONFIGURE_VARS+= ac_cv_func_iconv=yes + CONFIGURE_ARGS+= --with-iconv=shared + endif else CONFIGURE_ARGS+= --without-iconv endif @@ -485,7 +491,6 @@ endif CONFIGURE_VARS+= \ ac_cv_c_bigendian_php=$(if $(CONFIG_BIG_ENDIAN),yes,no) \ php_cv_cc_rpath="no" \ - iconv_impl_name="gnu_libiconv" \ ac_cv_php_xml2_config_path="$(STAGING_DIR)/host/bin/xml2-config" \ ac_cv_u8t_decompose=yes \ ac_cv_have_pcre2_jit=no