php: add fix for updated ICU 68+

Recently, I updated icu for issues with node feed, but it broke
compiling of php7.

Error:
/foo/target-aarch64_cortex-a53_musl/php-7.2.34/ext/intl/collator/collator_sort.c:349:26: error: 'TRUE' undeclared (first use in this function)
  collator_sort_internal( TRUE, INTERNAL_FUNCTION_PARAM_PASSTHRU );
                          ^~~~
/foo/target-aarch64_cortex-a53_musl/php-7.2.34/ext/intl/collator/collator_sort.c:349:26: note: each undeclared identifier is reported only once for each function it appears in
/foo/target-aarch64_cortex-a53_musl/php-7.2.34/ext/intl/collator/collator_sort.c: In function 'zif_collator_asort':
/foo/target-aarch64_cortex-a53_musl/php-7.2.34/ext/intl/collator/collator_sort.c:543:26: error: 'FALSE' undeclared (first use in this function); did you mean 'FILE'?
  collator_sort_internal( FALSE, INTERNAL_FUNCTION_PARAM_PASSTHRU );
                          ^~~~~
                          FILE
make[3]: *** [Makefile:1031: ext/intl/collator/collator_sort.lo] Error 1

More details:
https://github.com/php/php-src/commit/8eaaabd

Backport of patch from PHP7.3 didn't work for me, but this one was suggested that
Homebrew is using it and it works for me. However, PHP7.2 is EoL.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
This commit is contained in:
Josef Schlehofer 2021-03-22 13:53:24 +01:00
parent 44b301125f
commit 41388ed8a2
No known key found for this signature in database
GPG key ID: B950216FE4329F4C

View file

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=php
PKG_VERSION:=7.2.34
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
@ -170,6 +170,10 @@ endef
# not everything groks --disable-nls
DISABLE_NLS:=
# due to updated ICU
TARGET_CFLAGS += -DU_DEFINE_FALSE_AND_TRUE=1
TARGET_CXXFLAGS += -DU_DEFINE_FALSE_AND_TRUE=1
CONFIGURE_ARGS+= \
--enable-cli \
--enable-cgi \