mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
- Fix build with lang/php5 (PHP 5.4)
- Convert to new options framework - Cosmetic change - Take maintainership Obtained from: http://svn.php.net/viewvc?view=revision&revision=319585
This commit is contained in:
parent
d2bda62e51
commit
07e43b3858
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300782
@ -13,23 +13,24 @@ PKGNAMEPREFIX= pecl-
|
||||
EXTRACT_SUFX= .tgz
|
||||
DIST_SUBDIR= PECL
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= sunpoet@FreeBSD.org
|
||||
COMMENT= Memcached extension
|
||||
|
||||
USE_PHP= zlib session
|
||||
USE_PHP_BUILD= yes
|
||||
USE_PHPIZE= yes
|
||||
USE_PHPEXT= yes
|
||||
PHP_MODNAME= memcache
|
||||
|
||||
USE_DOS2UNIX= yes
|
||||
OPTIONS_DEFINE= EXAMPLES
|
||||
|
||||
CONFIGURE_ARGS= --with-zlib-dir=/usr
|
||||
USE_DOS2UNIX= yes
|
||||
USE_PHP= zlib session
|
||||
USE_PHP_BUILD= yes
|
||||
USE_PHPEXT= yes
|
||||
USE_PHPIZE= yes
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if !defined(NOPORTEXAMPLES)
|
||||
post-install:
|
||||
@${MKDIR} ${EXAMPLESDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/example.php ${EXAMPLESDIR}
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
${MKDIR} ${EXAMPLESDIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/example.php ${EXAMPLESDIR}/
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
74
databases/pecl-memcache/files/patch-memcache.c
Normal file
74
databases/pecl-memcache/files/patch-memcache.c
Normal file
@ -0,0 +1,74 @@
|
||||
--- memcache.c.orig 2011-04-11 12:56:53.000000000 +0800
|
||||
+++ memcache.c 2012-05-17 02:00:58.108724781 +0800
|
||||
@@ -718,7 +718,7 @@
|
||||
mmc_server_free(mmc TSRMLS_CC);
|
||||
mmc = NULL;
|
||||
} else {
|
||||
- zend_list_insert(mmc, le_memcache_server);
|
||||
+ MEMCACHE_LIST_INSERT(mmc, le_memcache_server);
|
||||
}
|
||||
}
|
||||
else if (le->type != le_memcache_server || le->ptr == NULL) {
|
||||
@@ -735,7 +735,7 @@
|
||||
mmc = NULL;
|
||||
}
|
||||
else {
|
||||
- zend_list_insert(mmc, le_memcache_server);
|
||||
+ MEMCACHE_LIST_INSERT(mmc, le_memcache_server);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -775,7 +775,7 @@
|
||||
if (zend_hash_find(Z_OBJPROP_P(mmc_object), "connection", sizeof("connection"), (void **)&connection) == FAILURE) {
|
||||
pool = mmc_pool_new(TSRMLS_C);
|
||||
pool->failure_callback = &php_mmc_failure_callback;
|
||||
- list_id = zend_list_insert(pool, le_memcache_pool);
|
||||
+ list_id = MEMCACHE_LIST_INSERT(pool, le_memcache_pool);
|
||||
add_property_resource(mmc_object, "connection", list_id);
|
||||
}
|
||||
else {
|
||||
@@ -836,7 +836,7 @@
|
||||
int list_id;
|
||||
mmc_pool_t *pool = mmc_pool_new(TSRMLS_C);
|
||||
pool->failure_callback = &php_mmc_failure_callback;
|
||||
- list_id = zend_list_insert(pool, le_memcache_pool);
|
||||
+ list_id = MEMCACHE_LIST_INSERT(pool, le_memcache_pool);
|
||||
mmc_object = return_value;
|
||||
object_init_ex(mmc_object, memcache_ce);
|
||||
add_property_resource(mmc_object, "connection", list_id);
|
||||
@@ -986,7 +986,7 @@
|
||||
|
||||
/* check for userspace callback */
|
||||
if (param != NULL && zend_hash_find(Z_OBJPROP_P((zval *)param), "_failureCallback", sizeof("_failureCallback"), (void **)&callback) == SUCCESS && Z_TYPE_PP(callback) != IS_NULL) {
|
||||
- if (IS_CALLABLE(*callback, 0, NULL)) {
|
||||
+ if (MEMCACHE_IS_CALLABLE(*callback, 0, NULL)) {
|
||||
zval *retval = NULL;
|
||||
zval *host, *tcp_port, *udp_port, *error, *errnum;
|
||||
zval **params[5];
|
||||
@@ -1213,7 +1213,7 @@
|
||||
}
|
||||
|
||||
if (failure_callback != NULL && Z_TYPE_P(failure_callback) != IS_NULL) {
|
||||
- if (!IS_CALLABLE(failure_callback, 0, NULL)) {
|
||||
+ if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -1275,7 +1275,7 @@
|
||||
}
|
||||
|
||||
if (failure_callback != NULL && Z_TYPE_P(failure_callback) != IS_NULL) {
|
||||
- if (!IS_CALLABLE(failure_callback, 0, NULL)) {
|
||||
+ if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
@@ -1340,7 +1340,7 @@
|
||||
}
|
||||
|
||||
if (Z_TYPE_P(failure_callback) != IS_NULL) {
|
||||
- if (!IS_CALLABLE(failure_callback, 0, NULL)) {
|
||||
+ if (!MEMCACHE_IS_CALLABLE(failure_callback, 0, NULL)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid failure callback");
|
||||
RETURN_FALSE;
|
||||
}
|
20
databases/pecl-memcache/files/patch-php_memcache.h
Normal file
20
databases/pecl-memcache/files/patch-php_memcache.h
Normal file
@ -0,0 +1,20 @@
|
||||
--- php_memcache.h.orig 2012-05-17 02:01:32.293725097 +0800
|
||||
+++ php_memcache.h 2012-05-17 02:03:47.294725872 +0800
|
||||
@@ -72,9 +72,15 @@
|
||||
#define MMC_DEFAULT_CACHEDUMP_LIMIT 100 /* number of entries */
|
||||
|
||||
#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION >= 3)
|
||||
-# define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC)
|
||||
+# define MEMCACHE_IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC)
|
||||
#else
|
||||
-# define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp))
|
||||
+# define MEMCACHE_IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp))
|
||||
+#endif
|
||||
+
|
||||
+#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION >= 4)
|
||||
+# define MEMCACHE_LIST_INSERT(item, list) zend_list_insert(item, list TSRMLS_CC);
|
||||
+#else
|
||||
+# define MEMCACHE_LIST_INSERT(item, list) zend_list_insert(item, list);
|
||||
#endif
|
||||
|
||||
/* internal functions */
|
Loading…
Reference in New Issue
Block a user