1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit elisp-common python
9 DESCRIPTION="A simple but powerful template language for C++"
10 HOMEPAGE="https://github.com/olafvdspek/ctemplate"
11 SRC_URI="https://ctemplate.googlecode.com/files/${P}.tar.gz"
15 KEYWORDS="amd64 arm ppc x86 ~amd64-linux ~x86-linux"
16 IUSE="doc emacs vim-syntax static-libs test"
18 DEPEND="test? ( =dev-lang/python-2* )"
19 RDEPEND="vim-syntax? ( >=app-editors/vim-core-7 )
20 emacs? ( virtual/emacs )"
22 SITEFILE="70ctemplate-gentoo.el"
26 python_set_active_version 2
34 $(use_enable static-libs static)
41 elisp-compile contrib/tpl-mode.el || die "elisp-compile failed"
46 emake DESTDIR="${D}" install
48 # Installs just every piece
49 rm -rf "${ED}/usr/share/doc"
51 dodoc AUTHORS ChangeLog NEWS README
52 use doc && dohtml doc/*
54 if use vim-syntax ; then
56 sh highlighting.vim || die "unpacking vim scripts failed"
57 insinto /usr/share/vim/vimfiles
63 elisp-install ${PN} tpl-mode.el tpl-mode.elc || die "elisp-install failed"
64 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
67 find "${ED}" -name '*.la' -exec rm -f {} +
71 use emacs && elisp-site-regen
75 use emacs && elisp-site-regen