aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleeym <leeym@FreeBSD.org>2010-07-31 11:08:34 +0800
committerleeym <leeym@FreeBSD.org>2010-07-31 11:08:34 +0800
commit35deb2c7d59edd0e94d40719f44d9d9091b22a01 (patch)
tree326f2cc165aed8f72bf9afdace159fe797d0c701
parent3f0fa81bb7e4b39abafe1eb75e12da3a812113ea (diff)
downloadfreebsd-ports-gnome-35deb2c7d59edd0e94d40719f44d9d9091b22a01.tar.gz
freebsd-ports-gnome-35deb2c7d59edd0e94d40719f44d9d9091b22a01.tar.zst
freebsd-ports-gnome-35deb2c7d59edd0e94d40719f44d9d9091b22a01.zip
- add google-styleguide 52
This is automated checker to make sure a C++ file follows Google's C++ style guide (http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml). As it heavily relies on regular expressions, cpplint.py won't catch all violations of the style guide and will very occasionally report a false positive. There is a list of things we currently don't handle very well at the top of cpplint.py, and we welcome patches to improve it. WWW: http://code.google.com/p/google-styleguide/
-rw-r--r--devel/Makefile1
-rw-r--r--devel/google-styleguide/Makefile38
-rw-r--r--devel/google-styleguide/distinfo9
-rw-r--r--devel/google-styleguide/pkg-descr17
4 files changed, 65 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index a487f121eb7b..77b08d18f794 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -511,6 +511,7 @@
SUBDIR += google-gdata
SUBDIR += google-perftools
SUBDIR += google-sparsehash
+ SUBDIR += google-styleguide
SUBDIR += googlemock
SUBDIR += googletest
SUBDIR += gorm
diff --git a/devel/google-styleguide/Makefile b/devel/google-styleguide/Makefile
new file mode 100644
index 000000000000..d5993eb4c44e
--- /dev/null
+++ b/devel/google-styleguide/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: google-styleguide
+# Date created: 2010-07-28
+# Whom: Yen-Ming Lee <leeym@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= google-styleguide
+PORTVERSION= 52
+CATEGORIES= devel
+MASTER_SITES= http://google-styleguide.googlecode.com/svn/trunk/cpplint/
+DISTFILES= cpplint.py cpplint_unittest.py README
+
+MAINTAINER= leeym@FreeBSD.org
+COMMENT= A tool to assist with Google style guide compliance
+
+USE_PYTHON?= yes
+NO_BUILD= yes
+NO_WRKSUBDIR= yes
+
+PLIST_FILES= bin/cpplint.py
+PORTDOCS= README
+
+do-extract:
+ @${MKDIR} ${WRKSRC}
+ @cd ${DISTDIR} && ${CP} ${DISTFILES} ${WRKSRC}
+
+post-patch:
+ @${REINPLACE_CMD} -Ee "s,#!.*,#!${PYTHON_CMD}," ${WRKSRC}/*.py
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/cpplint.py ${PREFIX}/bin
+.ifndef NOPORTDOCS
+ ${MKDIR} ${DOCSDIR}
+ cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/google-styleguide/distinfo b/devel/google-styleguide/distinfo
new file mode 100644
index 000000000000..88ae5ef0b8b8
--- /dev/null
+++ b/devel/google-styleguide/distinfo
@@ -0,0 +1,9 @@
+MD5 (cpplint.py) = f1208cd61378e2d6b90e4363bd6a9171
+SHA256 (cpplint.py) = b1d2a2892a89a604de366c5ec99e2ee2451b8beccd82f15c5c3e12cc5aeeec76
+SIZE (cpplint.py) = 123383
+MD5 (cpplint_unittest.py) = ebae6b5119e47739fd2b3d9e5a71d9f2
+SHA256 (cpplint_unittest.py) = 42fa7e93716d01d63346d8e02d6a83a8ea52b0dbec37685b90643c57a3487e69
+SIZE (cpplint_unittest.py) = 115959
+MD5 (README) = 123f0d842ad9d9c925e6fe4a37ab0bc3
+SHA256 (README) = 1c0500c633b2161633abffccc942f8b18dddb04a9b099d40db09b959078044c8
+SIZE (README) = 2228
diff --git a/devel/google-styleguide/pkg-descr b/devel/google-styleguide/pkg-descr
new file mode 100644
index 000000000000..63444a260ebb
--- /dev/null
+++ b/devel/google-styleguide/pkg-descr
@@ -0,0 +1,17 @@
+This is automated checker to make sure a C++ file follows Google's C++ style
+guide (http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml). As it
+heavily relies on regular expressions, cpplint.py won't catch all violations of
+the style guide and will very occasionally report a false positive. There is a
+list of things we currently don't handle very well at the top of cpplint.py,
+and we welcome patches to improve it.
+
+The linting tool takes a list of files as input. For full usage instructions,
+please see the output of:
+
+ ./cpplint.py --help
+
+Unit tests are provided in cpplint_unittest.py. This file can safely be ignored
+by end users who have downloaded this package and only want to run the lint
+tool.
+
+WWW: http://code.google.com/p/google-styleguide/