symfony-dependency-injection-2.8.15.ebuild 953 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. DESCRIPTION="Symfony DependencyInjection Component"
  5. HOMEPAGE="https://github.com/symfony/dependency-injection"
  6. SRC_URI="https://github.com/symfony/dependency-injection/archive/v${PV}.tar.gz
  7. -> ${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="test"
  12. RESTRICT="test"
  13. RDEPEND="
  14. dev-lang/php:*
  15. dev-php/fedora-autoloader
  16. >=dev-php/symfony-config-2.1.0
  17. >=dev-php/symfony-yaml-2.1.0"
  18. DEPEND="
  19. test? (
  20. ${RDEPEND}
  21. dev-php/phpunit )"
  22. S="${WORKDIR}/dependency-injection-${PV}"
  23. src_prepare() {
  24. default
  25. if use test; then
  26. cp "${FILESDIR}"/autoload.php "${S}"/autoload-test.php || die
  27. fi
  28. }
  29. src_install() {
  30. insinto "/usr/share/php/Symfony/Component/DependencyInjection"
  31. doins -r . "${FILESDIR}"/autoload.php
  32. dodoc README.md
  33. }
  34. src_test() {
  35. phpunit --bootstrap "${S}"/autoload-test.php || die "test suite failed"
  36. }