2017-01-06 13:27:39 +03:00
|
|
|
# Copyright 1999-2017 Gentoo Foundation
|
2016-12-19 08:53:35 +03:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
|
|
|
EAPI=6
|
|
|
|
|
2017-04-26 10:34:21 +03:00
|
|
|
DESCRIPTION="Symfony Filesystem Component"
|
|
|
|
HOMEPAGE="https://github.com/symfony/filesystem"
|
|
|
|
SRC_URI="${HOMEPAGE}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
2016-12-19 08:53:35 +03:00
|
|
|
|
|
|
|
LICENSE="MIT"
|
|
|
|
SLOT="0"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
IUSE="test"
|
|
|
|
|
2017-05-05 15:42:57 +03:00
|
|
|
RDEPEND="dev-lang/php:*
|
2017-04-26 10:34:21 +03:00
|
|
|
dev-php/fedora-autoloader"
|
2017-05-05 15:42:57 +03:00
|
|
|
DEPEND="test? ( ${RDEPEND} >=dev-php/phpunit-5.7.15 )"
|
2016-12-19 08:53:35 +03:00
|
|
|
|
2017-04-26 10:34:21 +03:00
|
|
|
S="${WORKDIR}/filesystem-${PV}"
|
2016-12-19 08:53:35 +03:00
|
|
|
|
2017-05-05 15:42:57 +03:00
|
|
|
# This patch is https://github.com/symfony/symfony/pull/22630
|
|
|
|
PATCHES=( "${FILESDIR}/annotate-network-tests.patch" )
|
|
|
|
|
2016-12-19 08:53:35 +03:00
|
|
|
src_prepare() {
|
|
|
|
default
|
|
|
|
if use test; then
|
2017-05-05 15:42:57 +03:00
|
|
|
cp "${FILESDIR}/autoload.php" "${S}/autoload-test.php" || die
|
2016-12-19 08:53:35 +03:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
2017-04-26 10:34:21 +03:00
|
|
|
insinto "/usr/share/php/Symfony/Component/Filesystem"
|
2017-05-05 15:42:57 +03:00
|
|
|
doins -r Exception
|
|
|
|
doins *.php "${FILESDIR}/autoload.php"
|
|
|
|
dodoc CHANGELOG.md README.md
|
2016-12-19 08:53:35 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
src_test() {
|
2017-05-05 15:42:57 +03:00
|
|
|
phpunit --bootstrap "${S}/autoload-test.php" \
|
|
|
|
--exclude-group network || die 'test suite failed'
|
2016-12-19 08:53:35 +03:00
|
|
|
}
|