summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-30 11:40:02 +0200
committerRemi Collet <remi@remirepo.net>2020-09-30 11:40:02 +0200
commit930830304c4a7f05d7f4d4ec25cd83cd44b0eb9b (patch)
tree732c4ac2fdc3db152daa8d885ff6f5624075f057
parentb087aa85ee6ab8173614ac9d30fa30990c1cb93d (diff)
rebuild for PHP 8.0.0RC1
add patch from https://github.com/swoole/swoole-src/pull/3713
-rw-r--r--3713.patch30
-rw-r--r--php-pecl-swoole4.spec11
2 files changed, 40 insertions, 1 deletions
diff --git a/3713.patch b/3713.patch
new file mode 100644
index 0000000..87961db
--- /dev/null
+++ b/3713.patch
@@ -0,0 +1,30 @@
+From c7c83174a0bdf01ce202afaccb1eff45717ca427 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 30 Sep 2020 11:35:59 +0200
+Subject: [PATCH] fix for 8.0.0RC1
+
+---
+ php_swoole.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/php_swoole.h b/php_swoole.h
+index 35be68aae7..be7d2385dd 100644
+--- a/php_swoole.h
++++ b/php_swoole.h
+@@ -1129,8 +1129,16 @@ 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 PHP_VERSION_ID < 80000
+ if (php_url_encode_hash_ex(HASH_OF(zdata), formstr, NULL, 0, NULL, 0, NULL, 0, NULL, NULL, (int) PHP_QUERY_RFC1738) == FAILURE)
+ {
++#else
++ 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);
++ }
++ else
++ {
++#endif
+ if (formstr->s)
+ {
+ smart_str_free(formstr);
diff --git a/php-pecl-swoole4.spec b/php-pecl-swoole4.spec
index 2fe1009..6afe5b5 100644
--- a/php-pecl-swoole4.spec
+++ b/php-pecl-swoole4.spec
@@ -34,7 +34,7 @@
Summary: PHP's asynchronous concurrent distributed networking framework
Name: %{?sub_prefix}php-pecl-%{pecl_name}4
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
# Extension is ASL 2.0
# Hiredis is BSD
License: ASL 2.0 and BSD
@@ -45,6 +45,7 @@ Patch0: https://github.com/swoole/swoole-src/commit/bebc3a0890156b9067b1
Patch1: https://github.com/swoole/swoole-src/commit/7d4eaed41ae94237ed9e4ae72ac166b6e7617047.patch
Patch2: https://github.com/swoole/swoole-src/commit/0a1ab3d5b1cfde8b905192bec0535bc61b92871a.patch
Patch3: https://patch-diff.githubusercontent.com/raw/swoole/swoole-src/pull/3686.patch
+Patch4: https://patch-diff.githubusercontent.com/raw/swoole/swoole-src/pull/3713.patch
%if 0%{?rhel} == 6
BuildRequires: devtoolset-6-toolchain
@@ -103,6 +104,9 @@ Obsoletes: php73-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -169,6 +173,7 @@ cd NTS
%patch1 -p1 -b .up1
%patch2 -p1 -b .up2
%patch3 -p1 -b .pr3686
+%patch4 -p1 -b .pr3713
# Sanity check, really often broken
extver=$(sed -n '/#define SWOOLE_VERSION /{s/.* "//;s/".*$//;p}' include/swoole_version.h)
@@ -338,6 +343,10 @@ cd ../ZTS
%changelog
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 4.5.4-3
+- rebuild for PHP 8.0.0RC1
+- add patch from https://github.com/swoole/swoole-src/pull/3713
+
* Sun Sep 20 2020 Remi Collet <remi@remirepo.net> - 4.5.4-2
- add upstream patch for EL-6 and for PHP 8
- add patch for EL-6 from