pecl-mailparse-3.0.2.ebuild 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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="mailparse"
  5. PHP_EXT_INI="yes"
  6. PHP_EXT_ZENDEXT="no"
  7. PHP_EXT_ECONF_ARGS=""
  8. DOCS=( README )
  9. USE_PHP="php7-0 php7-1 php5-6"
  10. inherit php-ext-pecl-r3
  11. # Only build for 7.x
  12. USE_PHP="php7-0 php7-1"
  13. KEYWORDS="amd64 ppc ppc64 x86"
  14. DESCRIPTION="PHP extension for parsing and working with RFC822 and MIME compliant messages"
  15. LICENSE="PHP-3.01"
  16. SLOT="7"
  17. IUSE=""
  18. for target in ${USE_PHP}; do
  19. phpslot=${target/php}
  20. phpslot=${phpslot/-/.}
  21. PHPUSEDEPEND="${PHPUSEDEPEND}
  22. php_targets_${target}? ( dev-lang/php:${phpslot}[unicode] )"
  23. done
  24. unset target phpslot
  25. DEPEND="${PHPUSEDEPEND}
  26. dev-util/re2c"
  27. RDEPEND="${PHPUSEDEPEND} php_targets_php5-6? ( dev-php/pecl-mailparse:0[php_targets_php5-6] )"
  28. src_prepare() {
  29. if use php_targets_php7-0 || use php_targets_php7-1 ; then
  30. php-ext-source-r3_src_prepare
  31. else
  32. default_src_prepare
  33. fi
  34. }
  35. src_install() {
  36. if use php_targets_php7-0 || use php_targets_php7-1 ; then
  37. php-ext-pecl-r3_src_install
  38. fi
  39. }