You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
1.6 KiB
73 lines
1.6 KiB
13 years ago
|
# Copyright 1999-2011 Gentoo Foundation
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
# $Header: /var/cvsroot/gentoo-x86/dev-cpp/ctemplate/ctemplate-0.99.ebuild,v 1.3 2011/04/29 09:53:34 radhermit Exp $
|
||
|
|
||
|
EAPI="3"
|
||
|
|
||
|
inherit elisp-common eutils
|
||
|
|
||
|
DESCRIPTION="A simple but powerful template language for C++"
|
||
|
HOMEPAGE="http://code.google.com/p/google-ctemplate/"
|
||
|
SRC_URI="http://google-ctemplate.googlecode.com/files/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="BSD"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
|
||
|
IUSE="doc emacs vim-syntax static-libs"
|
||
|
|
||
|
DEPEND=""
|
||
|
RDEPEND="vim-syntax? ( >=app-editors/vim-core-7 )
|
||
|
emacs? ( virtual/emacs )"
|
||
|
|
||
|
SITEFILE="70ctemplate-gentoo.el"
|
||
|
|
||
|
src_prepare() {
|
||
|
epatch "${FILESDIR}"/${P}-gcc-4.6.patch
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
econf \
|
||
|
--disable-dependency-tracking \
|
||
|
--enable-shared \
|
||
|
$(use_enable static-libs static)
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake || die "emake failed"
|
||
|
|
||
|
if use emacs ; then
|
||
|
elisp-compile contrib/tpl-mode.el || die "elisp-compile failed"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
emake DESTDIR="${D}" install || die "emake install failed"
|
||
|
|
||
|
# Installs just every piece
|
||
|
rm -rf "${ED}/usr/share/doc"
|
||
|
|
||
|
dodoc AUTHORS ChangeLog NEWS README
|
||
|
use doc && dohtml doc/*
|
||
|
|
||
|
if use vim-syntax ; then
|
||
|
cd "${S}/contrib"
|
||
|
sh highlighting.vim || die "unpacking vim scripts failed"
|
||
|
insinto /usr/share/vim/vimfiles
|
||
|
doins -r .vim/*
|
||
|
fi
|
||
|
|
||
|
if use emacs ; then
|
||
|
cd "${S}/contrib"
|
||
|
elisp-install ${PN} tpl-mode.el tpl-mode.elc || die "elisp-install failed"
|
||
|
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
use emacs && elisp-site-regen
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
use emacs && elisp-site-regen
|
||
|
}
|