dev-php/PEAR-Auth_HTTP: Remove last-rited pkg
[gentoo.git] / dev-php / json-schema / json-schema-4.1.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 DESCRIPTION="PHP implementation of JSON schema"
7 HOMEPAGE="https://github.com/justinrainbow/json-schema"
8 SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz"
9
10 LICENSE="MIT"
11 SLOT="0"
12 KEYWORDS="~amd64 ~x86"
13 IUSE="test"
14 # Tests are not in the release tarball
15 RESTRICT="test"
16
17 RDEPEND="
18         dev-lang/php:*
19         dev-php/fedora-autoloader"
20 DEPEND="
21         test? (
22                 ${RDEPEND}
23                 dev-php/phpunit )"
24
25 src_prepare() {
26         default
27         if use test; then
28                 cp "${FILESDIR}"/autoload.php "${S}"/autoload-test.php || die
29         fi
30 }
31
32 src_install() {
33         insinto "/usr/share/php/JsonSchema"
34         doins -r src/JsonSchema/. "${FILESDIR}"/autoload.php
35         dodoc README.md
36 }
37
38 src_test() {
39         phpunit --bootstrap "${S}"/autoload-test.php || die "test suite failed"
40 }