summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--1717.patch22
-rw-r--r--Makefile4
-rw-r--r--REFLECTION151
-rw-r--r--php-pecl-swoole4.spec45
4 files changed, 173 insertions, 49 deletions
diff --git a/1717.patch b/1717.patch
new file mode 100644
index 0000000..506c7ca
--- /dev/null
+++ b/1717.patch
@@ -0,0 +1,22 @@
+From 2835548fb1ddddcce082cabaa24efa17c2fada95 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 14 Jun 2018 11:21:39 +0200
+Subject: [PATCH] ensure C++ is used for link command
+
+---
+ config.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.m4 b/config.m4
+index 9664ed075..0b8ced436 100644
+--- a/config.m4
++++ b/config.m4
+@@ -630,7 +630,7 @@ if test "$PHP_SWOOLE" != "no"; then
+ LDFLAGS="$LDFLAGS -lboost_context"
+ fi
+
+- PHP_NEW_EXTENSION(swoole, $swoole_source_file, $ext_shared)
++ PHP_NEW_EXTENSION(swoole, $swoole_source_file, $ext_shared,,, cxx)
+
+ PHP_ADD_INCLUDE([$ext_srcdir])
+ PHP_ADD_INCLUDE([$ext_srcdir/include])
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
+
diff --git a/REFLECTION b/REFLECTION
index 8fa194d..e411967 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
+Extension [ <persistent> extension #147 swoole version 4.0.0 ] {
- INI {
Entry [ swoole.aio_thread_num <ALL> ]
@@ -66,7 +66,7 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
Constant [ integer SWOOLE_DTLSv1_CLIENT_METHOD ] { 17 }
Constant [ integer SWOOLE_EVENT_READ ] { 512 }
Constant [ integer SWOOLE_EVENT_WRITE ] { 1024 }
- Constant [ string SWOOLE_VERSION ] { 2.2.0 }
+ Constant [ string SWOOLE_VERSION ] { 4.0.0 }
Constant [ integer SWOOLE_ERROR_MALLOC_FAIL ] { 501 }
Constant [ integer SWOOLE_ERROR_SYSTEM_CALL_FAIL ] { 502 }
Constant [ integer SWOOLE_ERROR_PHP_FATAL_ERROR ] { 503 }
@@ -157,7 +157,7 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
Constant [ integer SW_PGSQL_NUM ] { 2 }
Constant [ integer SW_PGSQL_BOTH ] { 3 }
Constant [ integer SWOOLE_AIO_BASE ] { 0 }
- Constant [ integer SWOOLE_AIO_LINUX ] { 1 }
+ Constant [ integer SWOOLE_AIO_LINUX ] { 0 }
Constant [ integer SWOOLE_FILELOCK ] { 2 }
Constant [ integer SWOOLE_MUTEX ] { 3 }
Constant [ integer SWOOLE_SEM ] { 4 }
@@ -408,9 +408,14 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
Parameter #1 [ <optional> $type ]
}
}
+ Function [ <internal:swoole> function swoole_call_user_shutdown_begin ] {
+
+ - Parameters [0] {
+ }
+ }
}
- - Classes [46] {
+ - Classes [48] {
Class [ <internal:swoole> class Swoole\Server ] {
- Constants [0] {
@@ -2691,7 +2696,7 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
Property [ <default> public $errno ]
}
- - Methods [4] {
+ - Methods [7] {
Method [ <internal:swoole> public method execute ] {
- Parameters [2] {
@@ -2700,6 +2705,24 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
}
}
+ Method [ <internal:swoole> public method fetch ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:swoole> public method fetchAll ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:swoole> public method nextResult ] {
+
+ - Parameters [0] {
+ }
+ }
+
Method [ <internal:swoole, dtor> public method __destruct ] {
- Parameters [0] {
@@ -2960,7 +2983,7 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
- Static properties [0] {
}
- - Static methods [17] {
+ - Static methods [14] {
Method [ <internal:swoole> static public method create ] {
- Parameters [1] {
@@ -2982,16 +3005,9 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
}
}
- Method [ <internal:swoole> static public method cli_wait ] {
-
- - Parameters [0] {
- }
- }
-
Method [ <internal:swoole> static public method suspend ] {
- - Parameters [1] {
- Parameter #0 [ <required> $uid ]
+ - Parameters [0] {
}
}
@@ -3073,21 +3089,6 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
Parameter #4 [ <optional> $service ]
}
}
-
- Method [ <internal:swoole> static public method call_user_func ] {
-
- - Parameters [1] {
- Parameter #0 [ <required> $func ]
- }
- }
-
- Method [ <internal:swoole> static public method call_user_func_array ] {
-
- - Parameters [2] {
- Parameter #0 [ <required> $func ]
- Parameter #1 [ <required> array $params ]
- }
- }
}
- Properties [0] {
@@ -5230,7 +5231,7 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
- Properties [0] {
}
- - Methods [5] {
+ - Methods [6] {
Method [ <internal:swoole, ctor> public method __construct ] {
- Parameters [1] {
@@ -5257,6 +5258,12 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
}
}
+ Method [ <internal:swoole> public method peek ] {
+
+ - Parameters [0] {
+ }
+ }
+
Method [ <internal:swoole> public method stats ] {
- Parameters [0] {
@@ -5858,6 +5865,90 @@ Extension [ <persistent> extension #147 swoole version 2.2.0 ] {
}
}
+ Class [ <internal:swoole> class Swoole\Memory\Pool ] {
+
+ - Constants [5] {
+ Constant [ public integer TYPE_RING ] { 1 }
+ Constant [ public integer TYPE_GLOBAL ] { 2 }
+ Constant [ public integer TYPE_FIXED ] { 0 }
+ Constant [ public integer TYPE_MALLOC ] { 3 }
+ Constant [ public integer TYPE_EMALLOC ] { 4 }
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [3] {
+ Method [ <internal:swoole, ctor> public method __construct ] {
+
+ - Parameters [4] {
+ Parameter #0 [ <required> $size ]
+ Parameter #1 [ <required> $type ]
+ Parameter #2 [ <optional> $slice_size ]
+ Parameter #3 [ <optional> $shared ]
+ }
+ }
+
+ Method [ <internal:swoole, dtor> public method __destruct ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:swoole> public method alloc ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <optional> $size ]
+ }
+ }
+ }
+ }
+
+ Class [ <internal:swoole> class Swoole\Memory\Pool\Slice ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [3] {
+ Method [ <internal:swoole> public method read ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <optional> $size ]
+ Parameter #1 [ <optional> $offset ]
+ }
+ }
+
+ Method [ <internal:swoole> public method write ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> $data ]
+ Parameter #1 [ <optional> $offset ]
+ }
+ }
+
+ Method [ <internal:swoole, dtor> public method __destruct ] {
+
+ - Parameters [0] {
+ }
+ }
+ }
+ }
+
Class [ <internal:swoole> class Swoole\Redis ] {
- Constants [5] {
diff --git a/php-pecl-swoole4.spec b/php-pecl-swoole4.spec
index e132e14..aae12ca 100644
--- a/php-pecl-swoole4.spec
+++ b/php-pecl-swoole4.spec
@@ -1,4 +1,4 @@
-# remirepo spec file for php-pecl-swoole2
+# remirepo spec file for php-pecl-swoole4
#
# Copyright (c) 2013-2018 Remi Collet
# License: CC-BY-SA
@@ -40,15 +40,18 @@
%global with_hiredis 1
Summary: PHP's asynchronous concurrent distributed networking framework
-Name: %{?sub_prefix}php-pecl-%{pecl_name}2
-Version: 2.2.0
+Name: %{?sub_prefix}php-pecl-%{pecl_name}4
+Version: 4.0.0
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/swoole/swoole-src/pull/1717.patch
+
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?dtsprefix}gcc-c++
+BuildRequires: %{?scl_prefix}php-devel > 7.1
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-sockets
BuildRequires: %{?scl_prefix}php-mysqlnd
@@ -75,27 +78,22 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}2 = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}2%{?_isa} = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}4 = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}4%{?_isa} = %{version}-%{release}
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 2
+Conflicts: %{?scl_prefix}php-pecl-%{pecl_name}2 < 4
%endif
# Single version can be installed
-Conflicts: %{?sub_prefix}php-pecl-%{pecl_name} < 2
-Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 2
+Conflicts: %{?sub_prefix}php-pecl-%{pecl_name} < 2
+Conflicts: %{?sub_prefix}php-pecl-%{pecl_name}2 < 4
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-Obsoletes: php56u-pecl-%{pecl_name}2 <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name}2 <= %{version}
-Obsoletes: php70u-pecl-%{pecl_name}2 <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name}2 <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name}2 <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name}2 <= %{version}
-%endif
+Obsoletes: php71u-pecl-%{pecl_name}4 <= %{version}
+Obsoletes: php71w-pecl-%{pecl_name}4 <= %{version}
%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name}2 <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name}2 <= %{version}
+Obsoletes: php72u-pecl-%{pecl_name}4 <= %{version}
+Obsoletes: php72w-pecl-%{pecl_name}4 <= %{version}
%endif
%endif
@@ -154,6 +152,8 @@ sed -e '/examples/s/role="src"/role="doc"/' \
cd NTS
+%patch0 -p1 -b .pr1717
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_SWOOLE_VERSION/{s/.* "//;s/".*$//;p}' php_swoole.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
@@ -315,6 +315,13 @@ cd ../ZTS
%changelog
+* Thu Jun 14 2018 Remi Collet <remi@remirepo.net> - 4.0.0-1
+- update to 4.0.0
+- rename to php-pecl-swoole4
+- raise dependency on PHP 7.1
+- add patch to ensure g++ is used a linktime from
+ https://github.com/swoole/swoole-src/pull/1717
+
* Wed May 23 2018 Remi Collet <remi@remirepo.net> - 2.2.0-1
- update to 2.2.0