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

EAPI=4
inherit vim-plugin
MY_PN="cscope_maps.vim"

DESCRIPTION="vim plugin: cscope settings"
HOMEPAGE="http://cscope.sourceforge.net/cscope_vim_tutorial.html"
SRC_URI="http://cscope.sourceforge.net/${MY_PN}"
LICENSE="as-is"
KEYWORDS="~amd64 ~x86"
IUSE="swap-meta"
RDEPEND="app-editors/vim[cscope]"

VIM_PLUGIN_HELPTEXT=\
"This plugin provides C-\ and C-@ shortcuts for :[s]cs f commands and
simplifies cscope DB loading."

src_unpack() {
	mkdir -p "${S}/plugin"
	cp "${DISTDIR}/${A}" "${S}/plugin/"
}

src_prepare() {
	if use swap-meta; then
		sed -i 's%C-\\%C-X%g' "plugin/${MY_PN}" || die "sed failed"
		sed -i 's%C-@%C-\\%g' "plugin/${MY_PN}" || die "sed failed"
		sed -i 's%C-X%C-@%g' "plugin/${MY_PN}" || die "sed failed"
	fi
}