pecl-memcached-2.2.0-r2.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PHP_EXT_NAME="memcached"
  5. PHP_EXT_INI="yes"
  6. PHP_EXT_ZENDEXT="no"
  7. DOCS=( ChangeLog README.markdown )
  8. USE_PHP="php5-6 php7-0"
  9. inherit php-ext-pecl-r3
  10. USE_PHP="php5-6"
  11. KEYWORDS="amd64 x86"
  12. DESCRIPTION="Interface PHP with memcached via libmemcached library"
  13. LICENSE="PHP-3"
  14. SLOT="0"
  15. IUSE="+session igbinary json sasl"
  16. DEPEND="php_targets_php5-6? (
  17. >=dev-libs/libmemcached-1.0[sasl?]
  18. sys-libs/zlib
  19. dev-lang/php:5.6[session?,json?]
  20. igbinary? ( dev-php/igbinary[php_targets_php5-6?] )
  21. )"
  22. RDEPEND="${DEPEND}"
  23. PDEPEND="php_targets_php7-0? ( dev-php/pecl-memcached:7[php_targets_php7-0] )"
  24. src_prepare(){
  25. if use php_targets_php5-6 ; then
  26. php-ext-source-r3_src_prepare
  27. else
  28. default_src_prepare
  29. fi
  30. }
  31. src_configure() {
  32. local PHP_EXT_ECONF_ARGS="--enable-memcached
  33. $(use_enable session memcached-session)
  34. $(use_enable sasl memcached-sasl)
  35. $(use_enable json memcached-json)
  36. $(use_enable igbinary memcached-igbinary)"
  37. php-ext-source-r3_src_configure
  38. }
  39. src_install() {
  40. if use php_targets_php5-6 ; then
  41. php-ext-pecl-r3_src_install
  42. fi
  43. }