summaryrefslogtreecommitdiff
blob: f123654af292be37234ce4814cfa45233135e6f6 (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit php-pear-r1

DESCRIPTION="A shell for PHP with history and tab-completion"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="auto-completion"

RDEPEND=">=dev-lang/php-5.3[tokenizer]
	auto-completion? ( dev-lang/php[readline] )"

src_prepare() {
	# Fill in Gentoo values for placeholders
	sed -i  -e "s~@php_bin@~${EPREFIX}/usr/bin/php~" \
		-e "s~@php_dir@~${EPREFIX}/usr/share/php/scripts~" "${S}/scripts/php-shell.sh" || die
	# Fix version value.  Upstream forgot to update in code but made a release anyway
	sed -i "s/$version = '0.3.1'/$version = '0.3.2'/" "${S}/PHP/Shell.php" || die
}

src_install() {
	php-pear-r1_src_install
	dobin scripts/php-shell.sh
	dosym php-shell.sh /usr/bin/php-shell
}