summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-03-15 10:42:45 +0100
committerRemi Collet <remi@remirepo.net>2019-03-15 10:42:45 +0100
commit39d398fdea2e3aebcf62aefd6047579d5e8caa82 (patch)
tree5a7deeb3271e66c4b29fb6c38a73b5179807a42e
parentc4e942953e32789edb2d2d978b1dc663a45ca1ce (diff)
update to 0.0.5
drop patches merged upstream
-rw-r--r--17.patch52
-rw-r--r--18.patch53
-rw-r--r--5687f6975d8c18223f114d0d0f1246c505b6f101.patch25
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-ahocorasick.spec20
6 files changed, 8 insertions, 146 deletions
diff --git a/17.patch b/17.patch
deleted file mode 100644
index e1a769f..0000000
--- a/17.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From c14164b2789c6b01212243a152035db9a5452688 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 15 Mar 2019 08:29:32 +0100
-Subject: [PATCH] fix reported version in phpinfo / reflection
-
----
- src/php_ahocorasick.c | 6 +-----
- src/php_ahocorasick.h | 2 +-
- 2 files changed, 2 insertions(+), 6 deletions(-)
-
-diff --git a/src/php_ahocorasick.c b/src/php_ahocorasick.c
-index 5387fef..0ba9c48 100644
---- a/src/php_ahocorasick.c
-+++ b/src/php_ahocorasick.c
-@@ -63,13 +63,11 @@ static zend_function_entry ahocorasick_functions[] = {
- PHP_FE(ahocorasick_isValid, NULL)
- PHP_FE(ahocorasick_finalize, NULL)
- PHP_FE(ahocorasick_add_patterns, NULL)
-- {NULL, NULL, NULL}
-+ PHP_FE_END
- };
-
- zend_module_entry ahocorasick_module_entry = {
--#if ZEND_MODULE_API_NO >= 20010901
- STANDARD_MODULE_HEADER,
--#endif
- PHP_AHOCORASICK_EXTNAME,
- ahocorasick_functions,
- PHP_MINIT(ahocorasick),
-@@ -77,9 +75,7 @@ zend_module_entry ahocorasick_module_entry = {
- PHP_RINIT(ahocorasick),
- NULL,
- NULL,
--#if ZEND_MODULE_API_NO >= 20010901
- PHP_AHOCORASICK_VERSION,
--#endif
- STANDARD_MODULE_PROPERTIES
- };
-
-diff --git a/src/php_ahocorasick.h b/src/php_ahocorasick.h
-index cab825c..99301ff 100644
---- a/src/php_ahocorasick.h
-+++ b/src/php_ahocorasick.h
-@@ -122,7 +122,7 @@ ZEND_END_MODULE_GLOBALS(ahocorasick)
- #define AHOCORASICK_G(v) (ahocorasick_globals.v)
- #endif
-
--#define PHP_AHOCORASICK_VERSION "2.0"
-+#define PHP_AHOCORASICK_VERSION "0.0.4"
- #define PHP_AHOCORASICK_EXTNAME "ahocorasick"
-
- /**
diff --git a/18.patch b/18.patch
deleted file mode 100644
index 59e3d97..0000000
--- a/18.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From b70b6a92c72e053c9ad6ffe25a3e73849ff46379 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Fri, 15 Mar 2019 08:45:22 +0100
-Subject: [PATCH] add arginfo to all functions for reflection
-
----
- src/php_ahocorasick.c | 32 ++++++++++++++++++++++++++------
- 1 file changed, 26 insertions(+), 6 deletions(-)
-
-diff --git a/src/php_ahocorasick.c b/src/php_ahocorasick.c
-index 0ba9c48..f825c4b 100644
---- a/src/php_ahocorasick.c
-+++ b/src/php_ahocorasick.c
-@@ -56,13 +56,33 @@ static char exception_buffer[8192];
-
- ZEND_DECLARE_MODULE_GLOBALS(ahocorasick)
-
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_ahocorasick_match, 0, 0, 2)
-+ ZEND_ARG_INFO(0, needle)
-+ ZEND_ARG_INFO(0, id)
-+ ZEND_ARG_INFO(0, findAll)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_ahocorasick_id, 0, 0, 1)
-+ ZEND_ARG_INFO(0, id)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_ahocorasick_init, 0, 0, 1)
-+ ZEND_ARG_INFO(0, data)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_ahocorasick_add_patterns, 0, 0, 2)
-+ ZEND_ARG_INFO(0, id)
-+ ZEND_ARG_INFO(0, patterns)
-+ZEND_END_ARG_INFO()
-+
-+
- static zend_function_entry ahocorasick_functions[] = {
-- PHP_FE(ahocorasick_match, NULL)
-- PHP_FE(ahocorasick_init, NULL)
-- PHP_FE(ahocorasick_deinit, NULL)
-- PHP_FE(ahocorasick_isValid, NULL)
-- PHP_FE(ahocorasick_finalize, NULL)
-- PHP_FE(ahocorasick_add_patterns, NULL)
-+ PHP_FE(ahocorasick_match, arginfo_ahocorasick_match)
-+ PHP_FE(ahocorasick_init, arginfo_ahocorasick_init)
-+ PHP_FE(ahocorasick_deinit, arginfo_ahocorasick_id)
-+ PHP_FE(ahocorasick_isValid, arginfo_ahocorasick_id)
-+ PHP_FE(ahocorasick_finalize, arginfo_ahocorasick_id)
-+ PHP_FE(ahocorasick_add_patterns, arginfo_ahocorasick_add_patterns)
- PHP_FE_END
- };
-
diff --git a/5687f6975d8c18223f114d0d0f1246c505b6f101.patch b/5687f6975d8c18223f114d0d0f1246c505b6f101.patch
deleted file mode 100644
index d8276cf..0000000
--- a/5687f6975d8c18223f114d0d0f1246c505b6f101.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 5687f6975d8c18223f114d0d0f1246c505b6f101 Mon Sep 17 00:00:00 2001
-From: Dusan Klinec <dusan.klinec@gmail.com>
-Date: Fri, 15 Mar 2019 08:55:50 +0100
-Subject: [PATCH] zstr fix
-
----
- src/php_ahocorasick.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/php_ahocorasick.c b/src/php_ahocorasick.c
-index f825c4b..950d3b5 100644
---- a/src/php_ahocorasick.c
-+++ b/src/php_ahocorasick.c
-@@ -254,9 +254,9 @@ static inline int php_ahocorasick_process_pattern(zend_long pidx, ahocorasick_pa
- keyFound|=0x10;
- } else {
- php_error_docref(NULL TSRMLS_CC, E_WARNING,
-- "Invalid structure (unrecognized sub-array key: [%s])! "
-+ "Invalid structure (unrecognized sub-array key)! "
- "Only allowed are: {key, id, value, aux, ignoreCase}. Cannot initialize. "
-- "Pattern index: %ld", key, (long)pidx);
-+ "Pattern index: %ld", (long)pidx);
- returnCode = -2;
- break;
- }
diff --git a/PHPINFO b/PHPINFO
index 9e07551..d120923 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -1,4 +1,4 @@
ahocorasick
-Version => 0.0.4
+Version => 0.0.5
diff --git a/REFLECTION b/REFLECTION
index 9883167..430e851 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #73 ahocorasick version 0.0.4 ] {
+Extension [ <persistent> extension #73 ahocorasick version 0.0.5 ] {
- Functions {
Function [ <internal:ahocorasick> function ahocorasick_match ] {
diff --git a/php-pecl-ahocorasick.spec b/php-pecl-ahocorasick.spec
index ec1e7ee..c80ef84 100644
--- a/php-pecl-ahocorasick.spec
+++ b/php-pecl-ahocorasick.spec
@@ -23,16 +23,12 @@
Summary: Effective Aho-Corasick string pattern matching algorithm
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 0.0.4
+Version: 0.0.5
Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP and LGPLv3
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-Patch0: https://github.com/ph4r05/php_aho_corasick/pull/17.patch
-Patch1: https://github.com/ph4r05/php_aho_corasick/pull/18.patch
-Patch2: https://github.com/ph4r05/php_aho_corasick/commit/5687f6975d8c18223f114d0d0f1246c505b6f101.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -98,9 +94,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1 -b .pr17
-%patch1 -p1 -b .pr18
-%patch2 -p1 -b .up
+sed -e 's/0.0.4/%{version}/' -i src/php_ahocorasick.h
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_AHOCORASICK_VERSION/{s/.* "//;s/".*$//;p}' src/php_ahocorasick.h)
@@ -186,12 +180,6 @@ fi
%check
-%if "%{php_version}" > "7.3"
-# See https://github.com/ph4r05/php_aho_corasick/pull/16
-rm ?TS/tests/test1.phpt
-rm ?TS/tests/test3.phpt
-%endif
-
cd NTS
: Minimal load test for NTS extension
%{__php} --no-php-ini \
@@ -240,6 +228,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Mar 15 2019 Remi Collet <remi@remirepo.net> - 0.0.5-1
+- update to 0.0.5
+- drop patches merged upstream
+
* Fri Mar 15 2019 Remi Collet <remi@remirepo.net> - 0.0.4-1
- update to 0.0.4
- drop patch merged upstream