From f47a1efa49aebcbd619979ac12904b18c926ef98 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 29 May 2018 15:36:48 +0200 Subject: update to 2.4.0 drop patches merged upstream --- 19.patch | 44 -------------------------------------------- 21.patch | 36 ------------------------------------ REFLECTION | 9 ++++++++- php-pecl-nsq.spec | 15 +++++---------- 4 files changed, 13 insertions(+), 91 deletions(-) delete mode 100644 19.patch delete mode 100644 21.patch diff --git a/19.patch b/19.patch deleted file mode 100644 index 8173a74..0000000 --- a/19.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 72f8c65cb52859762d792eb80bde32129011bc09 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 22 Mar 2018 13:16:14 +0100 -Subject: [PATCH] add dependency on json extension - ---- - .gitignore | 1 + - config.m4 | 1 + - nsq.c | 9 ++++++++- - 3 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/config.m4 b/config.m4 -index 9af9b72..c9227a9 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -112,4 +112,5 @@ echo "libevent-path:$LIBEVENT_DIR"; - PHP_SUBST(NSQ_SHARED_LIBADD) - - PHP_NEW_EXTENSION(nsq, nsq.c pub.c nsq_lookupd.c message.c sub.c command.c common.c, $ext_shared) -+ PHP_ADD_EXTENSION_DEP(nsq, json, true) - fi -diff --git a/nsq.c b/nsq.c -index df15306..1b43bae 100644 ---- a/nsq.c -+++ b/nsq.c -@@ -493,10 +493,17 @@ PHP_MINFO_FUNCTION (nsq) - } - /* }}} */ - -+static const zend_module_dep nsq_deps[] = { -+ ZEND_MOD_REQUIRED("json") -+ ZEND_MOD_END -+}; -+ - /* {{{ nsq_module_entry - */ - zend_module_entry nsq_module_entry = { -- STANDARD_MODULE_HEADER, -+ STANDARD_MODULE_HEADER_EX, -+ NULL, -+ nsq_deps, - "nsq", - NULL, //nsq_functions, - PHP_MINIT(nsq), diff --git a/21.patch b/21.patch deleted file mode 100644 index c5b6154..0000000 --- a/21.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 6bbad6ea8b3c0d2a75dfc8af983d217fd30f71c1 Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Thu, 22 Mar 2018 13:53:35 +0100 -Subject: [PATCH] fix buld warning [-Wimplicit-function-declaration] - ---- - config.m4 | 1 + - nsq.c | 3 +++ - 2 files changed, 4 insertions(+) - -diff --git a/config.m4 b/config.m4 -index 9af9b72..0366929 100644 ---- a/config.m4 -+++ b/config.m4 -@@ -66,6 +66,7 @@ echo "libevent-path:$LIBEVENT_DIR"; - -l$LIBNAME - ]) - -+ AC_CHECK_HEADERS([sys/wait.h]) - - - dnl PHP_ADD_EXTENSION_DEP(libevent, sockets, true) -diff --git a/nsq.c b/nsq.c -index df15306..ef0af68 100644 ---- a/nsq.c -+++ b/nsq.c -@@ -37,6 +37,9 @@ - #include "nsq_lookupd.h" - #include "zend_exceptions.h" - -+#ifdef HAVE_SYS_WAIT_H -+#include "sys/wait.h" -+#endif - - /* If you declare any globals in php_nsq.h uncomment this: - ZEND_DECLARE_MODULE_GLOBALS(nsq) diff --git a/REFLECTION b/REFLECTION index 97df2b1..cf68d1c 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,8 @@ -Extension [ extension #117 nsq version 2.3.2 ] { +Extension [ extension #118 nsq version 2.4.0 ] { + + - Dependencies { + Dependency [ json (Required) ] + } - Classes [3] { Class [ class Nsq ] { @@ -25,6 +29,9 @@ Extension [ extension #117 nsq version 2.3.2 ] { } Method [ public method closeNsqdConnection ] { + + - Parameters [0] { + } } Method [ public method publish ] { diff --git a/php-pecl-nsq.spec b/php-pecl-nsq.spec index 1069fd5..0fcdc1c 100644 --- a/php-pecl-nsq.spec +++ b/php-pecl-nsq.spec @@ -23,15 +23,12 @@ Summary: PHP extension for NSQ client Name: %{?sub_prefix}php-pecl-nsq -Version: 2.3.2 +Version: 2.4.0 Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz License: PHP URL: http://pecl.php.net/package/nsq -Patch0: https://patch-diff.githubusercontent.com/raw/yunnian/php-nsq/pull/19.patch -Patch1: https://patch-diff.githubusercontent.com/raw/yunnian/php-nsq/pull/21.patch - BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7 BuildRequires: %{?scl_prefix}php-json @@ -89,12 +86,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .pr19 -%patch1 -p1 -b .pr21 - -# bad permission in generated archive -find . -type f -exec chmod -x {} \; - # Sanity check, really often broken extver=$(sed -n '/#define PHP_NSQ_VERSION/{s/.* "//;s/".*$//;p}' php_nsq.h ) if test "x${extver}" != "x%{version}"; then @@ -229,6 +220,10 @@ fi %changelog +* Tue May 29 2018 Remi Collet - 2.4.0-1 +- update to 2.4.0 +- drop patches merged upstream + * Thu Mar 22 2018 Remi Collet - 2.3.2-1 - initial package, version 2.3.2 (stable) - open https://github.com/yunnian/php-nsq/pull/19 - json dependency -- cgit