git: ab225f8dfb71 - main - devel/pecl-zookeeper: Update to 1.0.0
Po-Chuan Hsieh
sunpoet at FreeBSD.org
Tue Jul 6 15:05:08 UTC 2021
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=ab225f8dfb717e9cac512f9a90b84910259c394c
commit ab225f8dfb717e9cac512f9a90b84910259c394c
Author: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-07-06 14:56:20 +0000
Commit: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
CommitDate: 2021-07-06 14:56:20 +0000
devel/pecl-zookeeper: Update to 1.0.0
Changes: https://pecl.php.net/package-changelog.php?package=zookeeper
---
devel/pecl-zookeeper/Makefile | 2 +-
devel/pecl-zookeeper/distinfo | 6 +-
devel/pecl-zookeeper/files/patch-php_zookeeper.c | 86 -------------------
.../files/patch-php_zookeeper_callback.c | 13 ---
.../files/patch-php_zookeeper_callback.h | 14 ----
.../files/patch-php_zookeeper_config_class.c | 13 ---
.../files/patch-php_zookeeper_config_class.h | 15 ----
.../files/patch-php_zookeeper_exceptions.c | 16 ----
.../files/patch-php_zookeeper_exceptions.h | 24 ------
.../pecl-zookeeper/files/patch-php_zookeeper_log.c | 20 -----
.../files/patch-php_zookeeper_session.c | 15 ----
devel/pecl-zookeeper/files/patch-zoo_lock.c | 98 ----------------------
12 files changed, 4 insertions(+), 318 deletions(-)
diff --git a/devel/pecl-zookeeper/Makefile b/devel/pecl-zookeeper/Makefile
index fdc7e3a9a296..a51ef7ae3a4c 100644
--- a/devel/pecl-zookeeper/Makefile
+++ b/devel/pecl-zookeeper/Makefile
@@ -1,7 +1,7 @@
# Created by: Gea-Suan Lin <gslin at gslin.org>
PORTNAME= zookeeper
-PORTVERSION= 0.7.2
+PORTVERSION= 1.0.0
CATEGORIES= devel
MAINTAINER= sunpoet at FreeBSD.org
diff --git a/devel/pecl-zookeeper/distinfo b/devel/pecl-zookeeper/distinfo
index a04b6fadbed7..d7338807decc 100644
--- a/devel/pecl-zookeeper/distinfo
+++ b/devel/pecl-zookeeper/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1576073105
-SHA256 (PECL/zookeeper-0.7.2.tgz) = c69d47a7474b71a2415b5d7604a5acbddcdc154f03aef211d7620bdf8698bf2f
-SIZE (PECL/zookeeper-0.7.2.tgz) = 29873
+TIMESTAMP = 1625323555
+SHA256 (PECL/zookeeper-1.0.0.tgz) = aa171ed8d42c6ef566680af4931753ae9bc3fc962a3cd9f64fe863772e67282a
+SIZE (PECL/zookeeper-1.0.0.tgz) = 30286
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper.c b/devel/pecl-zookeeper/files/patch-php_zookeeper.c
deleted file mode 100644
index 46686029826e..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper.c
+++ /dev/null
@@ -1,86 +0,0 @@
---- php_zookeeper.c.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper.c
-@@ -51,6 +51,13 @@
- #include "php_zookeeper_callback.h"
- #include "php_zookeeper_log.h"
-
-+#if PHP_MAJOR_VERSION >= 8
-+#define TSRMLS_C
-+#define TSRMLS_CC
-+#define TSRMLS_DC
-+#define TSRMLS_FETCH()
-+#endif
-+
- /****************************************
- Helper macros
- ****************************************/
-@@ -772,7 +779,6 @@ static PHP_METHOD(Zookeeper, dispatch)
- }
- /* }}} */
-
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- /* {{{ Zookeeper::getConfig( .. )
- */
- static PHP_METHOD(Zookeeper, getConfig)
-@@ -788,7 +794,6 @@ static PHP_METHOD(Zookeeper, getConfig)
- RETURN_OBJ(php_zk_config_new_from_zk(php_zk_config_ce, i_obj));
- }
- /* }}} */
--#endif
-
- PHP_FUNCTION(zookeeper_dispatch)
- {
-@@ -1250,10 +1255,8 @@ ZEND_END_ARG_INFO()
- ZEND_BEGIN_ARG_INFO(arginfo_dispatch, 0)
- ZEND_END_ARG_INFO()
-
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- ZEND_BEGIN_ARG_INFO(arginfo_getConfig, 0)
- ZEND_END_ARG_INFO()
--#endif
- /* }}} */
-
- /* {{{ zookeeper_class_methods */
-@@ -1290,9 +1293,7 @@ static zend_function_entry zookeeper_class_methods[] =
-
- ZK_ME_STATIC(dispatch, arginfo_dispatch)
-
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- ZK_ME(getConfig, arginfo_getConfig)
--#endif
-
- PHP_FE_END
- };
-@@ -1381,10 +1382,8 @@ static void php_zk_register_constants(INIT_FUNC_ARGS)
- ZK_CLASS_CONST_LONG2(OPERATIONTIMEOUT);
- ZK_CLASS_CONST_LONG2(BADARGUMENTS);
- ZK_CLASS_CONST_LONG2(INVALIDSTATE);
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- ZK_CLASS_CONST_LONG2(NEWCONFIGNOQUORUM);
- ZK_CLASS_CONST_LONG2(RECONFIGINPROGRESS);
--#endif
-
- ZK_CLASS_CONST_LONG2(OK);
- ZK_CLASS_CONST_LONG2(APIERROR);
-@@ -1463,9 +1462,7 @@ PHP_MINIT_FUNCTION(zookeeper)
-
- php_zk_register_exceptions(TSRMLS_C);
-
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- php_zk_config_register(TSRMLS_C);
--#endif
-
- #if PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1
- orig_interrupt_function = zend_interrupt_function;
-@@ -1537,7 +1534,11 @@ PHP_MINFO_FUNCTION(zookeeper)
- php_info_print_table_header(2, "zookeeper support", "enabled");
- php_info_print_table_row(2, "version", PHP_ZOOKEEPER_VERSION);
-
-+#if defined(ZOO_VERSION)
-+ snprintf(buf, sizeof(buf), "%s", ZOO_VERSION);
-+#else
- snprintf(buf, sizeof(buf), "%ld.%ld.%ld", ZOO_MAJOR_VERSION, ZOO_MINOR_VERSION, ZOO_PATCH_VERSION);
-+#endif
- php_info_print_table_row(2, "libzookeeper version", buf);
-
- php_info_print_table_end();
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_callback.c b/devel/pecl-zookeeper/files/patch-php_zookeeper_callback.c
deleted file mode 100644
index 825c1e529bfa..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_callback.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- php_zookeeper_callback.c.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_callback.c
-@@ -19,6 +19,10 @@
-
- #include "php_zookeeper_callback.h"
-
-+#if PHP_MAJOR_VERSION >= 8
-+#define TSRMLS_DC
-+#endif
-+
- php_cb_data_t* php_cb_data_new(HashTable *ht, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_bool oneshot TSRMLS_DC)
- {
- php_cb_data_t *cbd = ecalloc(1, sizeof(php_cb_data_t));
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_callback.h b/devel/pecl-zookeeper/files/patch-php_zookeeper_callback.h
deleted file mode 100644
index 9aa0afc6d912..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_callback.h
+++ /dev/null
@@ -1,14 +0,0 @@
---- php_zookeeper_callback.h.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_callback.h
-@@ -31,7 +31,11 @@ typedef struct _php_cb_data_t {
- #endif
- } php_cb_data_t;
-
-+#if PHP_MAJOR_VERSION >= 8
-+php_cb_data_t* php_cb_data_new(HashTable *ht, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_bool oneshot);
-+#else
- php_cb_data_t* php_cb_data_new(HashTable *ht, zend_fcall_info *fci, zend_fcall_info_cache *fcc, zend_bool oneshot TSRMLS_DC);
-+#endif
- void php_cb_data_destroy(php_cb_data_t *cbd);
- void php_cb_data_remove(php_cb_data_t *cb_data);
-
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_config_class.c b/devel/pecl-zookeeper/files/patch-php_zookeeper_config_class.c
deleted file mode 100644
index e66979db7439..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_config_class.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- php_zookeeper_config_class.c.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_config_class.c
-@@ -25,6 +25,10 @@
- #include "php_zookeeper_config_class.h"
- #include "php_zookeeper_stat.h"
-
-+#if PHP_MAJOR_VERSION >= 8
-+#define TSRMLS_CC
-+#endif
-+
- typedef struct {
- php_zk_t *php_zk;
- zend_object zo;
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_config_class.h b/devel/pecl-zookeeper/files/patch-php_zookeeper_config_class.h
deleted file mode 100644
index 79b832b0b865..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_config_class.h
+++ /dev/null
@@ -1,15 +0,0 @@
---- php_zookeeper_config_class.h.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_config_class.h
-@@ -19,7 +19,12 @@
-
- extern zend_class_entry *php_zk_config_ce;
-
-+#if PHP_MAJOR_VERSION >= 8
-+void php_zk_config_register(void);
-+zend_object* php_zk_config_new_from_zk(zend_class_entry *ce, php_zk_t *php_zk);
-+#else
- void php_zk_config_register(TSRMLS_D);
- zend_object* php_zk_config_new_from_zk(zend_class_entry *ce, php_zk_t *php_zk TSRMLS_DC);
-+#endif
-
- #endif /* PHP_ZOOKEEPER_CONFIG_CLASS */
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_exceptions.c b/devel/pecl-zookeeper/files/patch-php_zookeeper_exceptions.c
deleted file mode 100644
index 00acbcaad437..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_exceptions.c
+++ /dev/null
@@ -1,16 +0,0 @@
---- php_zookeeper_exceptions.c.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_exceptions.c
-@@ -26,6 +26,13 @@
-
- #include <Zend/zend_exceptions.h>
-
-+#if PHP_MAJOR_VERSION >= 8
-+#define TSRMLS_C
-+#define TSRMLS_CC
-+#define TSRMLS_D void
-+#define TSRMLS_DC
-+#endif
-+
- static zend_class_entry *zk_base_exception;
- static zend_class_entry *zk_optimeout_exception;
- static zend_class_entry *zk_connection_exception;
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_exceptions.h b/devel/pecl-zookeeper/files/patch-php_zookeeper_exceptions.h
deleted file mode 100644
index d46ed5353965..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_exceptions.h
+++ /dev/null
@@ -1,24 +0,0 @@
---- php_zookeeper_exceptions.h.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_exceptions.h
-@@ -21,12 +21,21 @@
- /**
- * register exceptions
- */
-+#if PHP_MAJOR_VERSION >= 8
-+void php_zk_register_exceptions(void);
-+zend_class_entry * php_zk_get_exception_with_message(zend_class_entry *ce, char *message);
-+#else
- void php_zk_register_exceptions(TSRMLS_D);
- zend_class_entry * php_zk_get_exception_with_message(zend_class_entry *ce, char *message TSRMLS_DC);
-+#endif
- /**
- * throw exception according to status
- */
-+#if PHP_MAJOR_VERSION >= 8
-+void php_zk_throw_exception(int zk_status);
-+#else
- void php_zk_throw_exception(int zk_status TSRMLS_DC);
-+#endif
-
- #define PHPZK_INITIALIZATION_FAILURE 5999
- #define PHPZK_CONNECT_NOT_CALLED 5998
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_log.c b/devel/pecl-zookeeper/files/patch-php_zookeeper_log.c
deleted file mode 100644
index e4e7eb700cb0..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_log.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- php_zookeeper_log.c.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_log.c
-@@ -19,17 +19,10 @@
- #include <zookeeper_log.h> /* Symbol LOG_INFO defined in this file conflicts with the symbol defined in syslog.h */
- #include "php_zookeeper_log.h"
-
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- #define PHP_ZK_LOG_ERROR(_zh, ...) LOG_ERROR(LOGCALLBACK(_zh), __VA_ARGS__)
- #define PHP_ZK_LOG_WARN(_zh, ...) LOG_WARN(LOGCALLBACK(_zh), __VA_ARGS__)
- #define PHP_ZK_LOG_INFO(_zh, ...) LOG_INFO(LOGCALLBACK(_zh), __VA_ARGS__)
- #define PHP_ZK_LOG_DEBUG(_zh, ...) LOG_DEBUG(LOGCALLBACK(_zh), __VA_ARGS__)
--#else
--#define PHP_ZK_LOG_ERROR(_zh, ...) LOG_ERROR((__VA_ARGS__))
--#define PHP_ZK_LOG_WARN(_zh, ...) LOG_WARN((__VA_ARGS__))
--#define PHP_ZK_LOG_INFO(_zh, ...) LOG_INFO((__VA_ARGS__))
--#define PHP_ZK_LOG_DEBUG(_zh, ...) LOG_DEBUG((__VA_ARGS__))
--#endif
-
- #define PHP_ZK_LOG_FUNC(func, FUNC) \
- void php_zk_log_##func(zhandle_t *zh, ...) \
diff --git a/devel/pecl-zookeeper/files/patch-php_zookeeper_session.c b/devel/pecl-zookeeper/files/patch-php_zookeeper_session.c
deleted file mode 100644
index e0389da4dc44..000000000000
--- a/devel/pecl-zookeeper/files/patch-php_zookeeper_session.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- php_zookeeper_session.c.orig 2019-12-11 01:31:04 UTC
-+++ php_zookeeper_session.c
-@@ -25,6 +25,12 @@
- #include "php_zookeeper_private.h"
- #include "php_zookeeper_session.h"
-
-+#if PHP_MAJOR_VERSION >= 8
-+#define TSRMLS_D void
-+#define TSRMLS_DC
-+#define TSRMLS_CC
-+#endif
-+
- #ifdef HAVE_ZOOKEEPER_SESSION
-
- #define ZK_SESS_DATA php_zookeeper_session *session = PS_GET_MOD_DATA();
diff --git a/devel/pecl-zookeeper/files/patch-zoo_lock.c b/devel/pecl-zookeeper/files/patch-zoo_lock.c
deleted file mode 100644
index e76df2fe791a..000000000000
--- a/devel/pecl-zookeeper/files/patch-zoo_lock.c
+++ /dev/null
@@ -1,98 +0,0 @@
---- zoo_lock.c.orig 2019-12-11 01:31:04 UTC
-+++ zoo_lock.c
-@@ -97,11 +97,7 @@ ZOOAPI int zkr_lock_unlock(zkr_lock_mutex_t *mutex) {
- while (ret == ZCONNECTIONLOSS && (count < 3)) {
- ret = zoo_delete(zh, buf, -1);
- if (ret == ZCONNECTIONLOSS) {
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_DEBUG(LOGCALLBACK(zh), ("connectionloss while deleting the node"));
--#else
-- LOG_DEBUG(("connectionloss while deleting the node"));
--#endif
- nanosleep(&ts, 0);
- count++;
- }
-@@ -117,11 +113,7 @@ ZOOAPI int zkr_lock_unlock(zkr_lock_mutex_t *mutex) {
- pthread_mutex_unlock(&(mutex->pmutex));
- return 0;
- }
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_WARN(LOGCALLBACK(zh), ("not able to connect to server - giving up"));
--#else
-- LOG_WARN(("not able to connect to server - giving up"));
--#endif
- pthread_mutex_unlock(&(mutex->pmutex));
- return ZCONNECTIONLOSS;
- }
-@@ -188,11 +180,7 @@ static int retry_getchildren(zhandle_t *zh, char* path
- while (ret == ZCONNECTIONLOSS && count < retry) {
- ret = zoo_get_children(zh, path, 0, vector);
- if (ret == ZCONNECTIONLOSS) {
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_DEBUG(LOGCALLBACK(zh), ("connection loss to the server"));
--#else
-- LOG_DEBUG(("connection loss to the server"));
--#endif
- nanosleep(ts, 0);
- count++;
- }
-@@ -228,11 +216,7 @@ static int retry_zoowexists(zhandle_t *zh, char* path,
- while (ret == ZCONNECTIONLOSS && count < retry) {
- ret = zoo_wexists(zh, path, watcher, ctx, stat);
- if (ret == ZCONNECTIONLOSS) {
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_DEBUG(LOGCALLBACK(zh), ("connectionloss while setting watch on my predecessor"));
--#else
-- LOG_DEBUG(("connectionloss while setting watch on my predecessor"));
--#endif
- nanosleep(ts, 0);
- count++;
- }
-@@ -287,11 +271,7 @@ static int zkr_lock_operation(zkr_lock_mutex_t *mutex,
- // do not want to retry the create since
- // we would end up creating more than one child
- if (ret != ZOK) {
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_WARN(LOGCALLBACK(zh), ("could not create zoo node %s", buf));
--#else
-- LOG_WARN(("could not create zoo node %s", buf));
--#endif
- return ret;
- }
- mutex->id = getName(retbuf);
-@@ -301,11 +281,7 @@ static int zkr_lock_operation(zkr_lock_mutex_t *mutex,
- ret = ZCONNECTIONLOSS;
- ret = retry_getchildren(zh, path, vector, ts, retry);
- if (ret != ZOK) {
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_WARN(LOGCALLBACK(zh), ("could not connect to server"));
--#else
-- LOG_WARN(("could not connect to server"));
--#endif
- return ret;
- }
- //sort this list
-@@ -327,11 +303,7 @@ static int zkr_lock_operation(zkr_lock_mutex_t *mutex,
- // will keep waiting
- if (ret != ZOK) {
- free_String_vector(vector);
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_WARN(LOGCALLBACK(zh), ("unable to watch my predecessor"));
--#else
-- LOG_WARN(("unable to watch my predecessor"));
--#endif
- ret = zkr_lock_unlock(mutex);
- while (ret == 0) {
- //we have to give up our leadership
-@@ -347,11 +319,7 @@ static int zkr_lock_operation(zkr_lock_mutex_t *mutex,
- // this is the case when we are the owner
- // of the lock
- if (strcmp(mutex->id, owner_id) == 0) {
--#if ZOO_MAJOR_VERSION>=3 && ZOO_MINOR_VERSION>=5
- LOG_DEBUG(LOGCALLBACK(zh), ("got the zoo lock owner - %s", mutex->id));
--#else
-- LOG_DEBUG(("got the zoo lock owner - %s", mutex->id));
--#endif
- mutex->isOwner = 1;
- if (mutex->completion != NULL) {
- mutex->completion(0, mutex->cbdata);
More information about the dev-commits-ports-all
mailing list