DIST memcached-2.2.0.tgz 70449 BLAKE2B dca76bfb993c647860ae2ce648580e6131c6df30d30def9a1f907fce06621f3d5a21b93605da9fc50bda542fd950317a5a398d6bf0db85f61469cfb5e9757566 SHA512 61207d3f8c11b0620dbcb20fb2ebb6d1fc10159a7e879ee91556a303c3dcdf3d2571e8dda5efcbed77ff779f5c9b226aa48800630b9e7781cd964126b848c356
DIST memcached-3.0.3.tgz 77310 BLAKE2B 9756878087594f1bf13b1edaa38dd18f7cd4d6a61618444f2c2a32972acb67e3aee66b2083b7303d50f53cfd7902374fed49db68a2780e0d824d90f4289ecb54 SHA512 cb24d76f82ce8c1fdd8877bbb46131545bba5011cfff965e3c190b7c0f71f754b47ded6289d3125724d9de781b916971aaadfa0b247c6fe2f51aab77dce61b61
DIST memcached-3.0.4.tgz 78776 BLAKE2B ce2539e2e4960217d9ee3b50ed5625214d4b22c4d7e64595fdbfa2d130bce0402a67561f76a50690991996d84f16f926f27a057722bfab66ba3c388772ed77a8 SHA512 d0a0f9e99cbcc6829528554551dfacf0d943d54d4be60c9da708de82913a2a0bed7c51d594ae3ecf0c13b56064739f074ce6ada5d7433bdc7e26e8caf9cf5ca2
+DIST memcached-3.1.3.tgz 82673 BLAKE2B ccb9267cbd974337b7cd8836ab6e35c4fd9398d731dcd333bcb664b91037d1775651e6bb5d00b602767834681289064ede678ea2e6e3641631bba4990a380dee SHA512 9c09648c26011c5e749bee1a556c976e6e5e648dc65580e7caa296dab79e3764edf1408f96edcaca5efb0229320c86fcfa0422e55d486beb6466892f7e08c4a3
DIST pecl-memcached-3.0.0.tar.gz 83732 BLAKE2B 0e38d34b6ccd72f1e58305c3b4fbb3437d53ba93bb00a610bf4e91701e2bee6acb20667f3a74b2f2aa8d09dfcd1475e82808aeade6b22364aea0a359edf1e889 SHA512 ddc6b6fbdd55c6cdf64b9a7833142ea43eb974ecaae3437b30ed731f0ddbf4108b46ea5eb01a197788978273bdff31da6a0c0fb0354335b85618d98ba070bfec
--- /dev/null
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PHP_EXT_NAME="memcached"
+DOCS=( ChangeLog README.markdown )
+
+USE_PHP="php5-6 php7-0 php7-1 php7-2 php7-3" # Pretend to support all four targets...
+inherit php-ext-pecl-r3
+USE_PHP="php7-0 php7-1 php7-2 php7-3" # But only truly build for these three.
+
+DESCRIPTION="Interface PHP with memcached via libmemcached library"
+LICENSE="PHP-3"
+SLOT="7"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples igbinary json sasl +session test"
+
+COMMON_DEPEND=">=dev-libs/libmemcached-1.0.14[sasl?]
+ sys-libs/zlib
+ igbinary? ( dev-php/igbinary[php_targets_php7-0?,php_targets_php7-1?,php_targets_php7-2?,php_targets_php7-3?] )
+"
+
+DEPEND="
+ php_targets_php7-0? (
+ ${COMMON_DEPEND} dev-lang/php:7.0[session?,json?]
+ )
+ php_targets_php7-1? (
+ ${COMMON_DEPEND} dev-lang/php:7.1[session?,json?]
+ )
+ php_targets_php7-2? (
+ ${COMMON_DEPEND} dev-lang/php:7.2[session?,json?]
+ )
+ php_targets_php7-3? (
+ ${COMMON_DEPEND} dev-lang/php:7.3[session?,json?]
+ )
+ test? ( net-misc/memcached )"
+RDEPEND="
+ php_targets_php7-0? (
+ ${COMMON_DEPEND} dev-lang/php:7.0[session?,json?]
+ )
+ php_targets_php7-1? (
+ ${COMMON_DEPEND} dev-lang/php:7.1[session?,json?]
+ )
+ php_targets_php7-2? (
+ ${COMMON_DEPEND} dev-lang/php:7.2[session?,json?]
+ )
+ php_targets_php7-3? (
+ ${COMMON_DEPEND} dev-lang/php:7.3[session?,json?]
+ )"
+
+src_prepare(){
+ if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 || use php_targets_php7-3 ; then
+ php-ext-source-r3_src_prepare
+ else
+ default_src_prepare
+ fi
+}
+
+src_configure() {
+ local PHP_EXT_ECONF_ARGS="--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-r3_src_configure
+}
+
+src_test() {
+ local memcached_opts=( -d -P "${T}/memcached.pid" -p 11211 -l 127.0.0.1 )
+ [[ ${EUID} == 0 ]] && memcached_opts+=( -u portage )
+ memcached "${memcached_opts[@]}" || die "Can't start memcached test server"
+
+ local exit_status
+ php-ext-source-r3_src_test
+ exit_status=$?
+
+ kill "$(<"${T}/memcached.pid")"
+ return ${exit_status}
+}
+
+src_install(){
+ use examples && dodoc -r server-example
+
+ if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 || use php_targets_php7-3 ; then
+ php-ext-source-r3_src_install
+ fi
+}