summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-swoole5.spec12
-rw-r--r--swoole-php83.patch27
2 files changed, 35 insertions, 4 deletions
diff --git a/php-pecl-swoole5.spec b/php-pecl-swoole5.spec
index 8d316fb..a026054 100644
--- a/php-pecl-swoole5.spec
+++ b/php-pecl-swoole5.spec
@@ -58,6 +58,7 @@ URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
Patch0: %{pecl_name}-syslib.patch
+Patch1: %{pecl_name}-php83.patch
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
@@ -93,7 +94,6 @@ Requires: %{?scl_prefix}php-curl%{?_isa}
Requires: %{?scl_prefix}php-json%{?_isa}
Requires: %{?scl_prefix}php-sockets%{?_isa}
Requires: %{?scl_prefix}php-mysqlnd%{?_isa}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -165,6 +165,7 @@ sed \
cd %{sources}
%patch -P0 -p1 -b .pr5038
+%patch -P1 -p1 -b .php83
cp -p thirdparty/hiredis/COPYING hiredis-COPYING
%if %{with nghttpd2}
@@ -237,14 +238,14 @@ make %{?_smp_mflags}
}
cd %{sources}
-%{_bindir}/phpize
+%{__phpize}
cd ../NTS
-peclbuild %{_bindir}/php-config
+peclbuild %{__phpconfig}
%if %{with_zts}
cd ../ZTS
-peclbuild %{_bindir}/zts-php-config
+peclbuild %{__ztsphpconfig}
%endif
@@ -354,6 +355,9 @@ cd ../ZTS
%changelog
+* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 5.0.3-2
+- add upstream patch for PHP 8.3
+
* Wed Apr 26 2023 Remi Collet <remi@remirepo.net> - 5.0.3-1
- update to 5.0.3
- use system libnghttp2
diff --git a/swoole-php83.patch b/swoole-php83.patch
new file mode 100644
index 0000000..7075078
--- /dev/null
+++ b/swoole-php83.patch
@@ -0,0 +1,27 @@
+From db71b11de6facd0d35bacc156a2a8092bb216182 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=E8=99=9E=E7=81=AA?= <995645888@qq.com>
+Date: Sun, 23 Jul 2023 11:47:40 +0800
+Subject: [PATCH] The PHPAPI php_url_encode_hash_ex() function has had its
+ signature change (#5099)
+
+---
+ ext-src/php_swoole_private.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ext-src/php_swoole_private.h b/ext-src/php_swoole_private.h
+index 8c9f26df65..571808bb8b 100644
+--- a/ext-src/php_swoole_private.h
++++ b/ext-src/php_swoole_private.h
+@@ -957,7 +957,11 @@ static sw_inline char *php_swoole_url_encode(const char *value, size_t value_len
+
+ static sw_inline char *php_swoole_http_build_query(zval *zdata, size_t *length, smart_str *formstr) {
+ if (HASH_OF(zdata)) {
+- php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, (int) PHP_QUERY_RFC1738);
++ #if PHP_VERSION_ID < 80300
++ php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, (int) PHP_QUERY_RFC1738);
++ #else
++ php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, NULL, NULL, (int) PHP_QUERY_RFC1738);
++ #endif
+ } else {
+ if (formstr->s) {
+ smart_str_free(formstr);