From 16269001f6e11e002be17a0575432b862d48d515 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 1 Feb 2016 08:45:59 +0100 Subject: php-pecl-zmq: 1.1.3 (beta) --- REFLECTION | 48 ++++++++++++++++++++++++++++++++++++++++-------- php-pecl-zmq.spec | 33 ++++++++++++++++++++++++++++----- zmq-build.patch | 31 +++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 13 deletions(-) create mode 100644 zmq-build.patch diff --git a/REFLECTION b/REFLECTION index 9478141..68cb732 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,9 +1,9 @@ -Extension [ extension #152 zmq version 1.1.2 ] { +Extension [ extension #193 zmq version 1.1.3 ] { - Classes [10] { Class [ class ZMQ ] { - - Constants [61] { + - Constants [78] { Constant [ integer SOCKET_PAIR ] { 0 } Constant [ integer SOCKET_PUB ] { 1 } Constant [ integer SOCKET_SUB ] { 2 } @@ -17,6 +17,7 @@ Extension [ extension #152 zmq version 1.1.2 ] { Constant [ integer SOCKET_PULL ] { 7 } Constant [ integer SOCKET_DEALER ] { 5 } Constant [ integer SOCKET_ROUTER ] { 6 } + Constant [ integer SOCKET_STREAM ] { 11 } Constant [ integer SOCKET_UPSTREAM ] { 7 } Constant [ integer SOCKET_DOWNSTREAM ] { 8 } Constant [ integer POLL_IN ] { 1 } @@ -32,7 +33,7 @@ Extension [ extension #152 zmq version 1.1.2 ] { Constant [ integer ERR_ENOTSUP ] { 95 } Constant [ integer ERR_EFSM ] { 156384763 } Constant [ integer ERR_ETERM ] { 156384765 } - Constant [ string LIBZMQ_VER ] { 3.2.4 } + Constant [ string LIBZMQ_VER ] { 4.1.2 } Constant [ integer SOCKOPT_HWM ] { 201 } Constant [ integer SOCKOPT_SNDHWM ] { 23 } Constant [ integer SOCKOPT_RCVHWM ] { 24 } @@ -64,7 +65,23 @@ Extension [ extension #152 zmq version 1.1.2 ] { Constant [ integer SOCKOPT_TCP_ACCEPT_FILTER ] { 38 } Constant [ integer SOCKOPT_DELAY_ATTACH_ON_CONNECT ] { 39 } Constant [ integer SOCKOPT_XPUB_VERBOSE ] { 40 } + Constant [ integer SOCKOPT_ROUTER_MANDATORY ] { 33 } + Constant [ integer SOCKOPT_ROUTER_RAW ] { 41 } + Constant [ integer SOCKOPT_IPV6 ] { 42 } + Constant [ integer SOCKOPT_PLAIN_SERVER ] { 44 } + Constant [ integer SOCKOPT_PLAIN_USERNAME ] { 45 } + Constant [ integer SOCKOPT_PLAIN_PASSWORD ] { 46 } + Constant [ integer SOCKOPT_CURVE_SERVER ] { 47 } + Constant [ integer SOCKOPT_CURVE_PUBLICKEY ] { 48 } + Constant [ integer SOCKOPT_CURVE_SECRETKEY ] { 49 } + Constant [ integer SOCKOPT_CURVE_SERVERKEY ] { 50 } + Constant [ integer SOCKOPT_PROBE_ROUTER ] { 51 } + Constant [ integer SOCKOPT_REQ_CORRELATE ] { 52 } + Constant [ integer SOCKOPT_REQ_RELAXED ] { 53 } + Constant [ integer SOCKOPT_CONFLATE ] { 54 } + Constant [ integer SOCKOPT_ZAP_DOMAIN ] { 55 } Constant [ integer CTXOPT_MAX_SOCKETS ] { 2 } + Constant [ integer CTXOPT_MAX_SOCKETS_DEFAULT ] { 1023 } } - Static properties [0] { @@ -463,7 +480,7 @@ Extension [ extension #152 zmq version 1.1.2 ] { Property [ protected $line ] } - - Methods [9] { + - Methods [10] { Method [ method __construct ] { - Parameters [3] { @@ -473,6 +490,9 @@ Extension [ extension #152 zmq version 1.1.2 ] { } } + Method [ public method __wakeup ] { + } + Method [ final public method getMessage ] { } @@ -517,7 +537,7 @@ Extension [ extension #152 zmq version 1.1.2 ] { Property [ protected $line ] } - - Methods [9] { + - Methods [10] { Method [ method __construct ] { - Parameters [3] { @@ -527,6 +547,9 @@ Extension [ extension #152 zmq version 1.1.2 ] { } } + Method [ public method __wakeup ] { + } + Method [ final public method getMessage ] { } @@ -571,7 +594,7 @@ Extension [ extension #152 zmq version 1.1.2 ] { Property [ protected $line ] } - - Methods [9] { + - Methods [10] { Method [ method __construct ] { - Parameters [3] { @@ -581,6 +604,9 @@ Extension [ extension #152 zmq version 1.1.2 ] { } } + Method [ public method __wakeup ] { + } + Method [ final public method getMessage ] { } @@ -625,7 +651,7 @@ Extension [ extension #152 zmq version 1.1.2 ] { Property [ protected $line ] } - - Methods [9] { + - Methods [10] { Method [ method __construct ] { - Parameters [3] { @@ -635,6 +661,9 @@ Extension [ extension #152 zmq version 1.1.2 ] { } } + Method [ public method __wakeup ] { + } + Method [ final public method getMessage ] { } @@ -679,7 +708,7 @@ Extension [ extension #152 zmq version 1.1.2 ] { Property [ protected $line ] } - - Methods [9] { + - Methods [10] { Method [ method __construct ] { - Parameters [3] { @@ -689,6 +718,9 @@ Extension [ extension #152 zmq version 1.1.2 ] { } } + Method [ public method __wakeup ] { + } + Method [ final public method getMessage ] { } diff --git a/php-pecl-zmq.spec b/php-pecl-zmq.spec index bb81264..d68f994 100644 --- a/php-pecl-zmq.spec +++ b/php-pecl-zmq.spec @@ -22,7 +22,7 @@ %{!?__pecl: %global __pecl %{_bindir}/pecl} %{!?__php: %global __php %{_bindir}/php} -%global with_zts 0%{?__ztsphp:1} +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name zmq %global with_tests %{?_without_tests:0}%{!?_without_tests:1} %if "%{php_version}" < "5.6" @@ -33,15 +33,18 @@ Summary: ZeroMQ messaging Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.1.2 -Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 1.1.3 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +# https://github.com/mkoppanen/php-zmq/pull/170 +Patch0: %{pecl_name}-build.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: %{?scl_prefix}php-devel > 5.2 +BuildRequires: %{?scl_prefix}php-devel > 5.3 BuildRequires: %{?scl_prefix}php-pear %if 0%{?fedora} >= 22 || 0%{?rhel} == 5 || 0%{?rhel} == 7 # v4 in Fedora22+, EPEL-7 @@ -80,6 +83,10 @@ Obsoletes: php55w-pecl-%{pecl_name} <= %{version} Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php56w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "7.0" +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -106,14 +113,25 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{version} NTS +cd NTS +%patch0 -p1 -b .build + if pkg-config libzmq --atleast-version=4 then # fix new default of MAX_SOCKETS # Using current version, so this can be checked in next version and removed # if appropriate. (still not fixed in 1.1.2, maybe later) -sed -i "s/int(1024)/int(1023)/g" NTS/tests/032-contextopt.phpt +sed -i "s/int(1024)/int(1023)/g" tests/032-contextopt.phpt fi +# Check reported version (phpinfo), as this is often broken +extver=$(sed -n '/#define PHP_ZMQ_VERSION/{s/.* "//;s/".*$//;p}' php_zmq.h) +if test "x${extver}" != "x%{version}"; then + : Error: Upstream version is ${extver}, expecting %{version}. + exit 1 +fi +cd .. + %if %{with_zts} # Duplicate source tree for NTS / ZTS build cp -pr NTS ZTS @@ -241,6 +259,11 @@ rm -rf %{buildroot} %changelog +* Mon Feb 01 2016 Remi Collet - 1.1.3-1 +- Update to 1.1.3 (beta) +- add patch to fix build with old GCC (EL-6) + open https://github.com/mkoppanen/php-zmq/pull/170 + * Sun Jan 24 2016 Remi Collet - 1.1.2-7 - rebuild against zeromq 4 available in EPEL-7 diff --git a/zmq-build.patch b/zmq-build.patch new file mode 100644 index 0000000..45cde0b --- /dev/null +++ b/zmq-build.patch @@ -0,0 +1,31 @@ +From 7c961507e24435680e445b90af0a465c98246d4d Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 1 Feb 2016 08:09:46 +0100 +Subject: [PATCH] Fix build with old GCC + +--- + zmq_pollset.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/zmq_pollset.c b/zmq_pollset.c +index 16dbdec..59f8c09 100644 +--- a/zmq_pollset.c ++++ b/zmq_pollset.c +@@ -38,7 +38,7 @@ + + /* {{{ typedef struct _php_zmq_pollset + */ +-typedef struct _php_zmq_pollset { ++struct _php_zmq_pollset { + + zmq_pollitem_t *items; + zend_string **keys; +@@ -49,7 +49,7 @@ typedef struct _php_zmq_pollset { + size_t alloc_size; + + zval errors; +-} php_zmq_pollset; ++}; + /* }}} */ + + static -- cgit