summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2012-07-25 01:51:51 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 10:48:12 +0200
commit1797c5f839694f32fd962f0b4594de230f8e1280 (patch)
treeea94a8473e313ce464674a381c7fb73779a9e9ac /dev-cpp/cpplint/cpplint-3.199.ebuild
parentBump less. Use l10n eclass. Update checksums (diff)
downloadmv-1797c5f839694f32fd962f0b4594de230f8e1280.tar.gz
mv-1797c5f839694f32fd962f0b4594de230f8e1280.tar.bz2
mv-1797c5f839694f32fd962f0b4594de230f8e1280.zip
Add cpplint. Install site file for mv_emcacs
Diffstat (limited to 'dev-cpp/cpplint/cpplint-3.199.ebuild')
-rw-r--r--dev-cpp/cpplint/cpplint-3.199.ebuild74
1 files changed, 74 insertions, 0 deletions
diff --git a/dev-cpp/cpplint/cpplint-3.199.ebuild b/dev-cpp/cpplint/cpplint-3.199.ebuild
new file mode 100644
index 00000000..2feb2f3e
--- /dev/null
+++ b/dev-cpp/cpplint/cpplint-3.199.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit elisp-common eutils
+
+DESCRIPTION="The google styleguide for C++ together with a verifyer and an emacs file"
+HOMEPAGE="http://code.google.com/p/google-styleguide/"
+SRC_URI="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml -> cpplint-${PV}.xml
+ http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py -> cpplint-${PV}.py
+ http://google-styleguide.googlecode.com/svn/trunk/cpplint/README -> cpplint-${PV}.txt
+ emacs? ( http://google-styleguide.googlecode.com/svn/trunk/google-c-style.el -> cpplint-${PV}.el )"
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="emacs"
+
+EMACSNAME="google-c-style"
+COMMON="emacs? ( virtual/emacs )"
+DEPEND="${COMMON}"
+RDEPEND="dev-lang/python
+ ${COMMON}"
+
+S="${WORKDIR}"
+
+src_unpack() {
+ cp -- "${DISTDIR}/cpplint-${PV}.xml" cppguide.xml || die
+ cp -- "${DISTDIR}/cpplint-${PV}.py" cpplint.py || die
+ cp -- "${DISTDIR}/cpplint-${PV}.txt" README || die
+ if use emacs
+ then cp -- "${DISTDIR}/cpplint-${PV}.el" "${EMACSNAME}.el" || die
+ 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
+}
+
+src_prepare() {
+ epatch_user
+}
+
+src_compile() {
+ if use emacs
+ then elisp-compile *.el || die
+ fi
+}
+
+src_install() {
+ dobin cpplint.py
+ dodoc README cppguide.xml
+ if use emacs
+ then elisp-install "${EMACSNAME}" "${EMACSNAME}".{el,elc} || die
+ elisp-site-file-install "sitefile/50${EMACSNAME}-gentoo.el" "${EMACSNAME}" || die
+ fi
+}
+
+pkg_postinst() {
+ elisp-site-regen
+}
+
+pkg_postrm() {
+ elisp-site-regen
+}