From 2725a191a355244f2875c72caeb78a22aa1d73b5 Mon Sep 17 00:00:00 2001 From: Eric Shienbrood Date: Mon, 13 Feb 2012 16:23:25 +0000 Subject: [PATCH] Imported dev-cpp/ctemplate-1.0 ebuild from portage. BUG=chromium-os:24140 TEST=sudo emerge hard-host-depends and see that ctemplate gets built and installed. Change-Id: Ie77a197c35ffc134f30ee43835e6c98ddfe4fb27 Reviewed-on: https://gerrit.chromium.org/gerrit/15755 Reviewed-by: Mike Frysinger Commit-Ready: Eric Shienbrood Reviewed-by: Eric Shienbrood Tested-by: Eric Shienbrood --- .../portage-stable/dev-cpp/ctemplate/Manifest | 1 + .../dev-cpp/ctemplate/ctemplate-1.0.ebuild | 76 +++++++++++++++++++ .../ctemplate/files/70ctemplate-gentoo.el | 7 ++ 3 files changed, 84 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/Manifest create mode 100644 sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/ctemplate-1.0.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/files/70ctemplate-gentoo.el diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/Manifest b/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/Manifest new file mode 100644 index 0000000000..afa8666710 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/Manifest @@ -0,0 +1 @@ +DIST ctemplate-1.0.tar.gz 837995 RMD160 ca1fdc571a869280d0395f919191a0773505c9d0 SHA1 313e3ee7f9e28adb537c08212eb509bdb848de56 SHA256 731279f1717527cf85ff79ed19b8674f91c3768d8bc20b09440e8dd1ca1b5bf8 diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/ctemplate-1.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/ctemplate-1.0.ebuild new file mode 100644 index 0000000000..fca558dfff --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/ctemplate-1.0.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-cpp/ctemplate/ctemplate-1.0.ebuild,v 1.5 2012/02/11 05:11:44 vapier Exp $ + +EAPI="4" + +inherit elisp-common python + +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 arm ~ppc x86 ~amd64-linux ~x86-linux" +IUSE="doc emacs vim-syntax static-libs test" + +DEPEND="test? ( =dev-lang/python-2* )" +RDEPEND="vim-syntax? ( >=app-editors/vim-core-7 ) + emacs? ( virtual/emacs )" + +SITEFILE="70ctemplate-gentoo.el" + +pkg_setup() { + if use test ; then + python_set_active_version 2 + python_pkg_setup + fi +} + +src_configure() { + econf \ + --enable-shared \ + $(use_enable static-libs static) +} + +src_compile() { + default + + if use emacs ; then + elisp-compile contrib/tpl-mode.el || die "elisp-compile failed" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # 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 + + find "${ED}" -name '*.la' -exec rm -f {} + +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/files/70ctemplate-gentoo.el b/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/files/70ctemplate-gentoo.el new file mode 100644 index 0000000000..a7fce964c3 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/ctemplate/files/70ctemplate-gentoo.el @@ -0,0 +1,7 @@ +;;; ctemplate site-lisp configuration + +(add-to-list 'load-path "@SITELISP@") + +(setq auto-mode-alist (cons '("\\.tpl$" . tpl-mode) auto-mode-alist)) +(autoload 'tpl-mode "tpl-mode" "Major mode for editing CTemplate files." t) +(add-hook 'tpl-mode-hook '(lambda () (font-lock-mode 1)))