aboutsummaryrefslogtreecommitdiff
blob: 72b915005494e9a0a87273f624b1bd570a637544 (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
60
61
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
PYTHON_DEPEND="*"
SUPPORT_PYTHON_ABIS=1
RESTRICT_PYTHON_ABIS="3.*"    # Does support and work with pypy
inherit distutils

MY_PN="ReviewBoard"
DESCRIPTION="A web-based code review tool that offers developers an easy way to handle code reviews"
HOMEPAGE="http://www.reviewboard.org/"
SRC_URI="http://downloads.reviewboard.org/releases/${MY_PN}/1.6/${MY_PN}-${PV}.tar.gz"
KEYWORDS="~amd64"
IUSE="test doc"
# code man rnotes"

LICENSE="MIT"
SLOT="0"
S=${WORKDIR}/${MY_PN}-${PV}

RDEPEND=""
DEPEND="${RDEPEND} >=dev-python/django-1.0
	>=dev-python/django-evolution-0.6.5
	dev-python/Djblets
	>=dev-python/pygments-1.4
	dev-python/flup
	>=dev-python/paramiko-1.7.6
	dev-python/python-dateutil
	dev-python/python-memcached
	dev-python/pytz
	dev-python/recaptcha-client"
#	code? ( dev-python/sphinx )"

# code is a use flag I was to make for generating the extra docs. 
#NONE of the doc generation works out of the box
#src_compile() {
#	if use code; then
#		emake -C docs/releasenotes  latex
#		PYTHONPATH=. emake -C docs/codebase html
#	fi
#}

src_test() {
	export DJANGO_SETTINGS_MODULE="django.conf"
	testing() {
		PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib*)" "$(PYTHON)" webtests/tests.py
		einfo "All test completed with success"
	}

	python_execute_function testing
}

src_install() {
	if use doc; then
		dohtml -r reviewboard/htdocs
	fi

	distutils_src_install
}