blob: d0b637865113a5c66e9b1355f608672421cb0c52 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-client/phantomjs/phantomjs-1.4.1.ebuild,v 1.3 2013/03/02 23:40:56 hwoarang Exp $
EAPI="2"
PYTHON_DEPEND="python? 2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
inherit distutils qt4-r2
DESCRIPTION="headless WebKit with JavaScript API"
HOMEPAGE="http://www.phantomjs.org/"
SRC_URI="http://phantomjs.googlecode.com/files/${P}-source.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples python"
RDEPEND="dev-qt/qtwebkit:4
python? ( dev-python/PyQt4 )"
DEPEND="${RDEPEND}"
# Call all the parent eclasses without having to worry
# about what funcs they actually export.
maybe() { set -- $(declare -F $1); $1; }
multi_eclass() {
maybe qt4-r2_$1
if use python ; then
[[ -d python ]] && cd python
maybe distutils_$1
fi
}
pkg_setup() { multi_eclass ${FUNCNAME} ; }
pkg_preinst() { multi_eclass ${FUNCNAME} ; }
pkg_postinst() { multi_eclass ${FUNCNAME} ; }
pkg_prerm() { multi_eclass ${FUNCNAME} ; }
pkg_postrm() { multi_eclass ${FUNCNAME} ; }
src_prepare() { multi_eclass ${FUNCNAME} ; }
src_configure() { multi_eclass ${FUNCNAME} ; }
src_compile() { multi_eclass ${FUNCNAME} ; }
src_test() {
./bin/phantomjs test/run-tests.js || die
}
src_install() {
dobin bin/phantomjs || die
dodoc ChangeLog README.md
if use examples ; then
docinto examples
dodoc examples/* || die
fi
multi_eclass ${FUNCNAME}
}
|