summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-04-21 17:53:48 +0200
committerMichał Górny <mgorny@gentoo.org>2017-05-27 17:19:19 +0200
commitcf53f5aa1a5a02a75847a6389a97b2f51c191519 (patch)
tree7c25be0521441b0fdbbba25142d1c275e93affb4 /app-vim/colorv
parentapp-vim/pyclewn: Drop unnecessary PYTHON_USEDEP on *vim (diff)
downloadgentoo-cf53f5aa1a5a02a75847a6389a97b2f51c191519.tar.gz
gentoo-cf53f5aa1a5a02a75847a6389a97b2f51c191519.tar.bz2
gentoo-cf53f5aa1a5a02a75847a6389a97b2f51c191519.zip
app-vim/colorv: Port to python-single-r1
Use the python-single-r1 eclass to handle the Python dependency gracefully. Enforce PYTHON_USEDEP on vim.
Diffstat (limited to 'app-vim/colorv')
-rw-r--r--app-vim/colorv/colorv-3.0.2-r1.ebuild34
1 files changed, 34 insertions, 0 deletions
diff --git a/app-vim/colorv/colorv-3.0.2-r1.ebuild b/app-vim/colorv/colorv-3.0.2-r1.ebuild
new file mode 100644
index 000000000000..05ba503efb19
--- /dev/null
+++ b/app-vim/colorv/colorv-3.0.2-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# TODO: supposedly supports python3... but that conflicts with pygtk
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 vim-plugin
+
+DESCRIPTION="vim plugin: a color tool for vim"
+HOMEPAGE="http://www.vim.org/scripts/script.php?script_id=3597 https://github.com/Rykka/colorv.vim/"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+VIM_PLUGIN_HELPFILES="${PN}.txt"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ || (
+ app-editors/vim[python,${PYTHON_USEDEP}]
+ ( app-editors/gvim[python,${PYTHON_USEDEP}] dev-python/pygtk:2[${PYTHON_USEDEP}] )
+ )"
+
+src_prepare() {
+ eapply_user
+
+ # fix shebangs in Python files (note: one of them is python3...)
+ sed -i -e "1s:python[23]:${EPYTHON}:" autoload/colorv/*.py || die
+ # use python colorpicker instead of C-based picker
+ rm autoload/colorv/{colorpicker.c,Makefile} || die
+}