symfony-event-dispatcher-2.1.0-r1.ebuild 900 B

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