diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-12-16 08:12:13 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-12-16 08:12:13 +0000 |
commit | c1e6f7eae3af0522b5fe65c8bde0c3c78efc09c9 (patch) | |
tree | 83d5a4b6b24f149d4bdca3713283b0bb5acf9fb1 /dev-php/pecl-memcached | |
parent | Version bump. (diff) | |
download | gentoo-2-c1e6f7eae3af0522b5fe65c8bde0c3c78efc09c9.tar.gz gentoo-2-c1e6f7eae3af0522b5fe65c8bde0c3c78efc09c9.tar.bz2 gentoo-2-c1e6f7eae3af0522b5fe65c8bde0c3c78efc09c9.zip |
Fix to compile with newer libmemcached per patch by Allen Parker <infowolfe@gmail.com>
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'dev-php/pecl-memcached')
-rw-r--r-- | dev-php/pecl-memcached/ChangeLog | 9 | ||||
-rw-r--r-- | dev-php/pecl-memcached/files/libmc-1.09-fix.diff | 71 | ||||
-rw-r--r-- | dev-php/pecl-memcached/pecl-memcached-2.1.0-r3.ebuild | 49 |
3 files changed, 128 insertions, 1 deletions
diff --git a/dev-php/pecl-memcached/ChangeLog b/dev-php/pecl-memcached/ChangeLog index 9c0370485e2e..7ba4794006a9 100644 --- a/dev-php/pecl-memcached/ChangeLog +++ b/dev-php/pecl-memcached/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-php/pecl-memcached # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-php/pecl-memcached/ChangeLog,v 1.13 2013/08/13 21:55:59 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-php/pecl-memcached/ChangeLog,v 1.14 2013/12/16 08:12:13 robbat2 Exp $ + +*pecl-memcached-2.1.0-r3 (16 Dec 2013) + + 16 Dec 2013; Robin H. Johnson <robbat2@gentoo.org> +files/libmc-1.09-fix.diff, + +pecl-memcached-2.1.0-r3.ebuild: + Fix to compile with newer libmemcached per patch by Allen Parker + <infowolfe@gmail.com> 13 Aug 2013; Agostino Sarubbo <ago@gentoo.org> pecl-memcached-2.1.0-r2.ebuild: Stable for x86, wrt bug #480460 diff --git a/dev-php/pecl-memcached/files/libmc-1.09-fix.diff b/dev-php/pecl-memcached/files/libmc-1.09-fix.diff new file mode 100644 index 000000000000..1b014dfd6422 --- /dev/null +++ b/dev-php/pecl-memcached/files/libmc-1.09-fix.diff @@ -0,0 +1,71 @@ +This patch is fixes to compile with newer versions of libmemcached ported from the fork at: +https://github.com/paravoid/php-memcached/commit/37069e18ad399a8cc03d5fe9757e1481814ecb44 + +X-Ported-By: Allen Parker <infowolfe@gmail.com> +Signed-off-by: Allen Parker <infowolfe@gmail.com> +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nurw memcached-2.1.0/php_memcached.c memcached-2.1.0-fixed/php_memcached.c +--- memcached-2.1.0-broken/php_memcached.c 2012-08-07 05:02:46.000000000 +0000 ++++ memcached-2.1.0/php_memcached.c 2013-12-16 06:14:17.420837278 +0000 +@@ -315,9 +315,15 @@ + static void php_memc_getDelayed_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool by_key); + static memcached_return php_memc_do_cache_callback(zval *memc_obj, zend_fcall_info *fci, zend_fcall_info_cache *fcc, char *key, size_t key_len, zval *value TSRMLS_DC); + static int php_memc_do_result_callback(zval *memc_obj, zend_fcall_info *fci, zend_fcall_info_cache *fcc, memcached_result_st *result TSRMLS_DC); ++#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000009 ++static memcached_return php_memc_do_serverlist_callback(const memcached_st *ptr, const memcached_instance_st *instance, void *in_context); ++static memcached_return php_memc_do_stats_callback(const memcached_st *ptr, const memcached_instance_st *instance, void *in_context); ++static memcached_return php_memc_do_version_callback(const memcached_st *ptr, const memcached_instance_st *instance, void *in_context); ++#else + static memcached_return php_memc_do_serverlist_callback(const memcached_st *ptr, memcached_server_instance_st instance, void *in_context); + static memcached_return php_memc_do_stats_callback(const memcached_st *ptr, memcached_server_instance_st instance, void *in_context); + static memcached_return php_memc_do_version_callback(const memcached_st *ptr, memcached_server_instance_st instance, void *in_context); ++#endif + static void php_memc_destroy(struct memc_obj *m_obj, zend_bool persistent TSRMLS_DC); + + /**************************************** +@@ -1855,7 +1861,7 @@ + zval **z_host, **z_port, **z_weight = NULL; + uint32_t weight = 0; + int entry_size, i = 0; +- memcached_server_st *list = NULL; ++ memcached_server_list_st list = NULL; + memcached_return status; + MEMC_METHOD_INIT_VARS; + +@@ -2573,7 +2579,11 @@ + /* }}} */ + + /* {{{ internal API functions */ ++#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000009 ++static memcached_return php_memc_do_serverlist_callback(const memcached_st *ptr, const memcached_instance_st *instance, void *in_context) ++#else + static memcached_return php_memc_do_serverlist_callback(const memcached_st *ptr, memcached_server_instance_st instance, void *in_context) ++#endif + { + struct callbackContext* context = (struct callbackContext*) in_context; + zval *array; +@@ -2590,7 +2600,11 @@ + return MEMCACHED_SUCCESS; + } + ++#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000009 ++static memcached_return php_memc_do_stats_callback(const memcached_st *ptr, const memcached_instance_st *instance, void *in_context) ++#else + static memcached_return php_memc_do_stats_callback(const memcached_st *ptr, memcached_server_instance_st instance, void *in_context) ++#endif + { + char *hostport = NULL; + int hostport_len; +@@ -2634,7 +2648,11 @@ + return MEMCACHED_SUCCESS; + } + ++#if defined(LIBMEMCACHED_VERSION_HEX) && LIBMEMCACHED_VERSION_HEX >= 0x01000009 ++static memcached_return php_memc_do_version_callback(const memcached_st *ptr, const memcached_instance_st *instance, void *in_context) ++#else + static memcached_return php_memc_do_version_callback(const memcached_st *ptr, memcached_server_instance_st instance, void *in_context) ++#endif + { + char *hostport = NULL; + char version[16]; diff --git a/dev-php/pecl-memcached/pecl-memcached-2.1.0-r3.ebuild b/dev-php/pecl-memcached/pecl-memcached-2.1.0-r3.ebuild new file mode 100644 index 000000000000..930d02c6e075 --- /dev/null +++ b/dev-php/pecl-memcached/pecl-memcached-2.1.0-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-php/pecl-memcached/pecl-memcached-2.1.0-r3.ebuild,v 1.1 2013/12/16 08:12:13 robbat2 Exp $ + +EAPI="4" +PHP_EXT_NAME="memcached" +PHP_EXT_INI="yes" +PHP_EXT_ZENDEXT="no" +DOCS="README" + +USE_PHP="php5-5 php5-3 php5-4" + +inherit base php-ext-pecl-r2 + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="PHP extension for interfacing with memcached via libmemcached library" +LICENSE="PHP-3" +SLOT="0" +IUSE="+session igbinary json sasl" + +DEPEND="|| ( >=dev-libs/libmemcached-1.0.14 >=dev-libs/libmemcached-1.0[sasl?] ) + sys-libs/zlib + dev-lang/php[session?,json?] + igbinary? ( dev-php/igbinary[php_targets_php5-5?,php_targets_php5-4?,php_targets_php5-3?] )" +RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/libmc-1.09-fix.diff" ) + +src_prepare() { + local slot orig_s="${S}" + for slot in $(php_get_slots); do + export S="${WORKDIR}/${slot}" + cd "${S}" + base_src_prepare + done + export S="${orig_s}" + cd "${S}" + php-ext-source-r2_src_prepare +} + +src_configure() { + my_conf="--enable-memcached + $(use_enable session memcached-session) + $(use_enable sasl memcached-sasl) + $(use_enable json memcached-json) + $(use_enable igbinary memcached-igbinary)" + + php-ext-source-r2_src_configure +} |