summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2015-10-11 11:26:48 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 11:32:18 +0200
commit109d6b4f673a249aea4deeb0cdb5b54a21592410 (patch)
treeec3589a50dac5be54ef6248d1e0ff3a9fd3b41b4 /dev-cpp/cpplint/cpplint-99999999.ebuild
downloadmv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.gz
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.bz2
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.zip
Clear history for egencache --repo=mv --update-changelogs
Diffstat (limited to 'dev-cpp/cpplint/cpplint-99999999.ebuild')
-rw-r--r--dev-cpp/cpplint/cpplint-99999999.ebuild75
1 files changed, 75 insertions, 0 deletions
diff --git a/dev-cpp/cpplint/cpplint-99999999.ebuild b/dev-cpp/cpplint/cpplint-99999999.ebuild
new file mode 100644
index 00000000..127d6581
--- /dev/null
+++ b/dev-cpp/cpplint/cpplint-99999999.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( jython2_7 pypy python2_7 )
+EGIT_REPO_URI="git://github.com/google/styleguide.git"
+inherit elisp-common eutils git-r3 python-single-r1
+RESTRICT="mirror"
+
+DESCRIPTION="The google styleguide together with cpplint and an emacs file"
+HOMEPAGE="https://github.com/google/styleguide"
+SRC_URI=""
+LICENSE="CC-BY-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs"
+
+EMACSNAME="google-c-style"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+COMMON="emacs? ( virtual/emacs )"
+DEPEND="${COMMON}"
+RDEPEND="dev-lang/python
+ ${PYTHON_DEPS}
+ ${COMMON}"
+
+src_prepare() {
+ if use emacs
+ then mkdir sitefile
+ cat >"sitefile/50${EMACSNAME}-gentoo.el" <<EOF
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'google-set-c-style "${EMACSNAME}"
+ "Set the current buffer's c-style to Google C/C++ Programming
+ Style. Meant to be added to \`c-mode-common-hook'." t)
+(add-hook 'c-mode-common-hook 'google-set-c-style)
+
+; If you want the RETURN key to go to the next line and space over
+; to the right place, uncomment the following line
+;(add-hook 'c-mode-common-hook 'google-make-newline-indent)
+EOF
+ fi
+ use prefix || sed -i \
+ -e '1s"^#!/usr/bin/env python$"#!'"${EPREFIX}/usr/bin/python"'"' \
+ -- "${S}/${PN}/${PN}.py" || die
+ python_fix_shebang "${S}"
+ epatch_user
+}
+
+src_compile() {
+ if use emacs
+ then elisp-compile *.el || die
+ fi
+}
+
+src_install() {
+ dobin ${PN}/cpplint.py
+ dodoc ${PN}/README README.md
+ if use emacs
+ then elisp-install "${EMACSNAME}" "${EMACSNAME}".{el,elc} || die
+ elisp-site-file-install "sitefile/50${EMACSNAME}-gentoo.el" "${EMACSNAME}" || die
+ fi
+ insinto /usr/share/vim/vimfiles/syntax
+ doins *.vim
+ insinto /usr/share/doc/${PF}/html
+ doins -r *.css *.html *.png *.xsl include
+}
+
+pkg_postinst() {
+ elisp-site-regen
+}
+
+pkg_postrm() {
+ elisp-site-regen
+}