1 |
commit: cf53f5aa1a5a02a75847a6389a97b2f51c191519 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 21 15:53:48 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 27 15:19:19 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf53f5aa |
7 |
|
8 |
app-vim/colorv: Port to python-single-r1 |
9 |
|
10 |
Use the python-single-r1 eclass to handle the Python dependency |
11 |
gracefully. Enforce PYTHON_USEDEP on vim. |
12 |
|
13 |
app-vim/colorv/colorv-3.0.2-r1.ebuild | 34 ++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 34 insertions(+) |
15 |
|
16 |
diff --git a/app-vim/colorv/colorv-3.0.2-r1.ebuild b/app-vim/colorv/colorv-3.0.2-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..05ba503efb1 |
19 |
--- /dev/null |
20 |
+++ b/app-vim/colorv/colorv-3.0.2-r1.ebuild |
21 |
@@ -0,0 +1,34 @@ |
22 |
+# Copyright 1999-2017 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+# TODO: supposedly supports python3... but that conflicts with pygtk |
28 |
+PYTHON_COMPAT=( python2_7 ) |
29 |
+ |
30 |
+inherit python-single-r1 vim-plugin |
31 |
+ |
32 |
+DESCRIPTION="vim plugin: a color tool for vim" |
33 |
+HOMEPAGE="http://www.vim.org/scripts/script.php?script_id=3597 https://github.com/Rykka/colorv.vim/" |
34 |
+LICENSE="MIT" |
35 |
+KEYWORDS="~amd64 ~x86" |
36 |
+IUSE="" |
37 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
38 |
+ |
39 |
+VIM_PLUGIN_HELPFILES="${PN}.txt" |
40 |
+ |
41 |
+RDEPEND=" |
42 |
+ ${PYTHON_DEPS} |
43 |
+ || ( |
44 |
+ app-editors/vim[python,${PYTHON_USEDEP}] |
45 |
+ ( app-editors/gvim[python,${PYTHON_USEDEP}] dev-python/pygtk:2[${PYTHON_USEDEP}] ) |
46 |
+ )" |
47 |
+ |
48 |
+src_prepare() { |
49 |
+ eapply_user |
50 |
+ |
51 |
+ # fix shebangs in Python files (note: one of them is python3...) |
52 |
+ sed -i -e "1s:python[23]:${EPYTHON}:" autoload/colorv/*.py || die |
53 |
+ # use python colorpicker instead of C-based picker |
54 |
+ rm autoload/colorv/{colorpicker.c,Makefile} || die |
55 |
+} |