Use https by default
[gentoo.git] / dev-cpp / ctemplate / ctemplate-2.2_p129.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 AM_OPTS="--force-missing"
8 AUTOTOOLS_AUTORECONF=1
9 AUTOTOOLS_IN_SOURCE_BUILD=1
10 PYTHON_COMPAT=( python2_7 )
11 inherit autotools-utils elisp-common python-any-r1
12
13 DESCRIPTION="A simple but powerful template language for C++"
14 HOMEPAGE="http://code.google.com/p/ctemplate/"
15 SRC_URI="https://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${P}.tar.bz2"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="amd64 arm ppc x86 ~amd64-linux ~x86-linux"
20 IUSE="doc emacs vim-syntax static-libs test"
21
22 DEPEND="test? ( ${PYTHON_DEPS} )"
23 RDEPEND="vim-syntax? ( >=app-editors/vim-core-7 )
24         emacs? ( virtual/emacs )"
25
26 DOCS=( AUTHORS ChangeLog NEWS README )
27
28 SITEFILE="70ctemplate-gentoo.el"
29
30 # Some tests are broken in 2.2_p129
31 RESTRICT="test"
32
33 src_compile() {
34         autotools-utils_src_compile
35
36         if use emacs ; then
37                 elisp-compile contrib/tpl-mode.el || die "elisp-compile failed"
38         fi
39 }
40
41 src_install() {
42         autotools-utils_src_install
43
44         # Installs just every piece
45         rm -rf "${ED}/usr/share/doc"
46
47         use doc && dohtml doc/*
48
49         if use vim-syntax ; then
50                 cd "${S}/contrib"
51                 sh highlighting.vim || die "unpacking vim scripts failed"
52                 insinto /usr/share/vim/vimfiles
53                 doins -r .vim/*
54         fi
55
56         if use emacs ; then
57                 cd "${S}/contrib"
58                 elisp-install ${PN} tpl-mode.el tpl-mode.elc || die "elisp-install failed"
59                 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
60         fi
61 }
62
63 pkg_postinst() {
64         use emacs && elisp-site-regen
65 }
66
67 pkg_postrm() {
68         use emacs && elisp-site-regen
69 }