summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2015-05-24 14:06:28 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 10:49:22 +0200
commitf55a4c30a2d10f692c92b3f06a550d2b2c7fbf23 (patch)
tree1f0168bf482563ee8a7fa65a90067938b2b9fff6 /dev-cpp/cpplint/cpplint-99999999.ebuild
parentBump squashmount (diff)
downloadmv-f55a4c30a2d10f692c92b3f06a550d2b2c7fbf23.tar.gz
mv-f55a4c30a2d10f692c92b3f06a550d2b2c7fbf23.tar.bz2
mv-f55a4c30a2d10f692c92b3f06a550d2b2c7fbf23.zip
Bump squashmount, cpplint, noscript
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..641dcef1
--- /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
+# $Header: $
+
+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
+}