Merge remote-tracking branch 'RobinDX/qbit'
[gentoo.git] / app-emacs / yasnippet / yasnippet-0.5.10.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 inherit elisp
6
7 DESCRIPTION="Yet another snippet extension for Emacs"
8 HOMEPAGE="https://github.com/capitaomorte/yasnippet"
9 SRC_URI="https://yasnippet.googlecode.com/files/${P}.tar.bz2
10         doc? ( https://yasnippet.googlecode.com/files/${PN}-doc-${PV}.tar.bz2 )"
11
12 # Homepage says MIT licence, source contains GPL-2 copyright notice
13 LICENSE="MIT GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="doc"
17
18 DEPEND=">=app-emacs/dropdown-list-20080316"
19 RDEPEND="${DEPEND}"
20
21 SITEFILE="50${PN}-gentoo.el"
22
23 src_unpack() {
24         elisp_src_unpack
25
26         cd "${S}"
27         # remove inlined copy of dropdown-list
28         sed -i -e '/^;;/N;/Contents of dropdown-list\.el/,$d' yasnippet.el || die
29 }
30
31 src_install() {
32         elisp_src_install
33
34         insinto "${SITEETC}/${PN}"
35         doins -r snippets || die "doins failed"
36
37         if use doc; then
38                 dohtml -r "${WORKDIR}"/doc/* || die "dohtml failed"
39         fi
40 }
41
42 pkg_postinst() {
43         elisp-site-regen
44
45         elog "Please add the following code into your .emacs to use yasnippet:"
46         elog "(yas/initialize)"
47         elog "(yas/load-directory \"${SITEETC}/${PN}/snippets\")"
48 }