Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 554456 | Differences between
and this patch

Collapse All | Expand All

(-)a/var/portage/dev-vcs/git-cola/git-cola-2.1.2.ebuild (-37 / +26 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2015 Gentoo Foundation
1
# Copyright 1999-2015 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git-cola/git-cola-2.1.2.ebuild,v 1.3 2015/05/27 11:10:32 ago Exp $
3
# $Header: $
4
4
5
EAPI=5
5
EAPI=5
6
6
Lines 10-89 DISTUTILS_SINGLE_IMPL=true Link Here
10
inherit distutils-r1 readme.gentoo virtualx
10
inherit distutils-r1 readme.gentoo virtualx
11
11
12
DESCRIPTION="The highly caffeinated git GUI"
12
DESCRIPTION="The highly caffeinated git GUI"
13
HOMEPAGE="http://git-cola.github.com/"
13
HOMEPAGE="https://git-cola.github.io/"
14
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
15
15
16
LICENSE="GPL-2"
16
LICENSE="GPL-2"
17
SLOT="0"
17
SLOT="0"
18
KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
18
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
19
IUSE="doc test"
19
IUSE="doc test"
20
20
21
REQUIRED_USE="doc? ( python_targets_python2_7 )"
22
23
RDEPEND="
21
RDEPEND="
24
	dev-python/jsonpickle[${PYTHON_USEDEP}]
25
	dev-python/pyinotify[${PYTHON_USEDEP}]
22
	dev-python/pyinotify[${PYTHON_USEDEP}]
23
	dev-python/send2trash[${PYTHON_USEDEP}]
26
	dev-python/PyQt4[${PYTHON_USEDEP}]
24
	dev-python/PyQt4[${PYTHON_USEDEP}]
27
	dev-vcs/git"
25
	dev-vcs/git"
28
DEPEND="${RDEPEND}
26
DEPEND="${RDEPEND}
29
	app-text/asciidoc
30
	app-text/xmlto
31
	sys-devel/gettext
27
	sys-devel/gettext
32
	doc? (
28
	doc? (
33
		dev-python/sphinx[${PYTHON_USEDEP}]
29
		dev-python/sphinx[${PYTHON_USEDEP}]
34
		dev-python/sphinxtogithub[$(python_gen_usedep 'python2*')]
30
		python_targets_python2_7? ( dev-python/sphinxtogithub[$(python_gen_usedep 'python2*')] )
35
		)
31
		)
36
	test? (
32
	test? ( dev-python/nose[${PYTHON_USEDEP}] )
37
		dev-python/nose[${PYTHON_USEDEP}]
33
"
38
		sys-apps/net-tools
39
		)"
40
34
41
PATCHES=(
35
PATCHES=(
42
	"${FILESDIR}"/${PN}-1.9.3-disable-tests.patch
36
	"${FILESDIR}"/${PN}-disable-live-tests.patch
43
	"${FILESDIR}"/${PN}-1.9.1-system-ssh-askpass.patch
37
	"${FILESDIR}"/${PN}-update-git-config-in-tests.patch
44
	)
38
)
45
46
pkg_pretend() {
47
	if use test && [[ -z "$(hostname -d)" ]] ; then
48
		die "Test will fail if no domain is set"
49
	fi
50
}
51
39
52
python_prepare_all() {
40
python_prepare_all() {
53
	rm share/git-cola/bin/*askpass* || die
41
	rm share/git-cola/bin/*askpass* || die
54
42
55
	# unfinished translate framework
43
	# remove broken tests
56
	rm test/i18n_test.py || die
44
	rm test/i18n_test.py || die
57
45
58
	# don't install docs into wrong location
46
	# don't install docs into wrong location
59
	sed -i \
47
	sed -i -e '/doc/d' setup.py || die
60
		-e '/doc/d' \
61
		setup.py || die "sed failed"
62
48
49
	# fix doc directory reference
63
	sed -i \
50
	sed -i \
64
		-e  "s|'doc', 'git-cola'|'doc', '${PF}'|" \
51
		-e "s/'doc', 'git-cola'/'doc', '${PF}'/" \
65
		cola/resources.py || die "sed failed"
52
		cola/resources.py || die
53
54
	# fix ssh-askpass directory reference
55
	sed -i -e 's/resources\.share/resources\.prefix/' cola/app.py || die
66
56
67
	distutils-r1_python_prepare_all
57
	distutils-r1_python_prepare_all
68
}
58
}
69
59
70
python_compile_all() {
60
python_compile_all() {
71
	cd share/doc/${PN}/
61
	cd share/doc/${PN}/ || die
72
	if use doc ; then
62
	if use doc; then
73
		emake all
63
		emake all
74
	else
64
	else
75
		sed \
65
		sed -i \
76
			-e '/^install:/s:install-html::g' \
66
			-e '/^install:/s:install-html::g' \
77
			-e '/^install:/s:install-man::g' \
67
			-e '/^install:/s:install-man::g' \
78
			-i Makefile || die
68
			Makefile || die
79
	fi
69
	fi
80
}
70
}
81
71
82
python_test() {
72
python_test() {
83
	PYTHONPATH="${S}:${S}/build/lib:${PYTHONPATH}" LC_ALL="C" \
73
	PYTHONPATH="${S}:${S}/build/lib:${PYTHONPATH}" LC_ALL="C" \
84
		VIRTUALX_COMMAND="nosetests --verbose \
74
	VIRTUALX_COMMAND="nosetests --verbose --with-id --with-doctest \
85
		--with-id --with-doctest --exclude=sphinxtogithub" \
75
		--exclude=sphinxtogithub" \
86
		virtualmake
76
	virtualmake
87
}
77
}
88
78
89
src_install() {
79
src_install() {
Lines 101-111 python_install_all() { Link Here
101
	python_fix_shebang "${ED}/usr/share/git-cola/bin/git-xbase"
91
	python_fix_shebang "${ED}/usr/share/git-cola/bin/git-xbase"
102
	python_optimize "${ED}/usr/share/git-cola/lib/cola"
92
	python_optimize "${ED}/usr/share/git-cola/lib/cola"
103
93
104
	if ! use doc ; then
94
	if ! use doc; then
105
		HTML_DOCS=( "${FILESDIR}"/index.html )
95
		HTML_DOCS=( "${FILESDIR}"/index.html )
106
	fi
96
	fi
107
97
108
	distutils-r1_python_install_all
98
	distutils-r1_python_install_all
109
	readme.gentoo_create_doc
99
	readme.gentoo_create_doc
110
	docompress /usr/share/doc/${PF}/git-cola.txt
111
}
100
}

Return to bug 554456