summaryrefslogtreecommitdiff
path: root/app-vim/pyclewn/pyclewn-2.1-r2.ebuild
blob: ac33eb0aeb32e64d252bbac3c02748473506fdf0 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7,8,9} )

inherit vim-plugin distutils-r1 optfeature

SRC_URI="mirror://pypi/p/${PN}/${P}.tar.gz"

DESCRIPTION="Pyclewn allows using vim as a front end to a debugger (pdb or gdb)"
HOMEPAGE="http://pyclewn.sourceforge.net/"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

CDEPEND="|| (
	app-editors/vim
	app-editors/gvim[netbeans]
)"

DEPEND="
	${CDEPEND}
	app-arch/vimball"

RDEPEND="${DEPEND}"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

src_prepare() {
	default

	# async in a now a reserved keyword.
	sed -e 's#async#_async#g;' \
		-i lib/clewn/gdb.py || die "can't patch gdb.py"
}

python_install_all() {
	distutils-r1_python_install_all
	python_optimize

	vimball -x -C "${ED}"/usr/share/vim/vimfiles lib/clewn/runtime/${P}.vmb || die "Extracting vimball failed"
}

pkg_postinst() {
	vim-plugin_pkg_postinst

	optfeature "C/C++ debugging" sys-devel/gdb
	optfeature "Python debugging" dev-python/pdb-clone
}