summaryrefslogtreecommitdiff
blob: f5ab86bdfd8291043acbf92c88eb8a1719a6a1d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PHP_LIB_NAME="PHPTAL"

DESCRIPTION="A templating engine for PHP5 that implements Zope Page Templates syntax"
HOMEPAGE="https://phptal.org/"
SRC_URI="https://github.com/${PN}/${PHP_LIB_NAME}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"

RDEPEND="dev-lang/php:*"
DEPEND="test? ( ${RDEPEND} dev-php/phpunit )"

S="${WORKDIR}/${PHP_LIB_NAME}-${PV}"

src_compile() { :; }

src_install() {
	insinto /usr/share/php/${PN}
	doins -r "classes/${PHP_LIB_NAME}"
	doins classes/PHPTAL.php tools/phptal_lint.php

	dodoc README.md
}

src_test() {
	[[ -z $(locale -a |grep en_GB) ]] && ewarn "Tests require en_GB locale to complete"
	phpunit || die
}