aboutsummaryrefslogtreecommitdiff
path: root/devel/google-styleguide
diff options
context:
space:
mode:
authorJoseph Mingrone <jrm@FreeBSD.org>2017-03-26 21:08:35 +0000
committerJoseph Mingrone <jrm@FreeBSD.org>2017-03-26 21:08:35 +0000
commit4b471b71a1157c20e32c00173e7bee90e54693d9 (patch)
tree4262448b9457150729fed4df645e71c53d0a1eb3 /devel/google-styleguide
parent69a617f7b1d8c15ff0c0bc99a164f05714eeb3b1 (diff)
downloadports-4b471b71a1157c20e32c00173e7bee90e54693d9.tar.gz
ports-4b471b71a1157c20e32c00173e7bee90e54693d9.zip
devel/google-styleguide: Save from expiration
- switch to GitHub - use date-based version numbers - set licenses - install xml descriptions of style guides - install files for editor integration - install optional documentation - add pkg-plist Reviewed by: mat Approved by: swills (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D10141
Notes
Notes: svn path=/head/; revision=436990
Diffstat (limited to 'devel/google-styleguide')
-rw-r--r--devel/google-styleguide/Makefile53
-rw-r--r--devel/google-styleguide/distinfo9
-rw-r--r--devel/google-styleguide/pkg-descr28
-rw-r--r--devel/google-styleguide/pkg-plist36
4 files changed, 84 insertions, 42 deletions
diff --git a/devel/google-styleguide/Makefile b/devel/google-styleguide/Makefile
index d1ae4bc8b2a2..5ad24a6a91dd 100644
--- a/devel/google-styleguide/Makefile
+++ b/devel/google-styleguide/Makefile
@@ -1,39 +1,48 @@
# Created by: Yen-Ming Lee <leeym@FreeBSD.org>
# $FreeBSD$
-PORTNAME= google-styleguide
-PORTVERSION= 66
+PORTNAME= styleguide
+PORTVERSION= 20170302
CATEGORIES= devel
-MASTER_SITES= http://google-styleguide.googlecode.com/svn/trunk/cpplint/
-DISTFILES= cpplint.py cpplint_unittest.py README
-DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
+PKGNAMEPREFIX= google-
MAINTAINER= ports@FreeBSD.org
COMMENT= Tool to assist with Google style guide compliance
-BROKEN= Unfetchable (google code has gone away)
-DEPRECATED= Unfetchable for more than six months (google code has gone away)
-EXPIRATION_DATE= 2017-04-30
+# cpplint.py and cpplint_unittest.py under BSD3CLAUSE
+# style guides under CC-BY-3.0
+# google-c-style.el under GPLv1+
+LICENSE= BSD3CLAUSE CC-BY-3.0 GPLv1+
+LICENSE_COMB= multi
-USES= python
-NO_BUILD= yes
-NO_WRKSUBDIR= yes
-
-PLIST_FILES= bin/cpplint.py
-PORTDOCS= README
+USES= python shebangfix
-OPTIONS_DEFINE= DOCS
+USE_GITHUB= yes
+GH_ACCOUNT= google
+GH_TAGNAME= 15f2836
-do-extract:
- @${MKDIR} ${WRKSRC}
- @cd ${DISTDIR}/${DIST_SUBDIR} && ${CP} ${DISTFILES} ${WRKSRC}
+NO_ARCH= yes
+NO_BUILD= yes
+SHEBANG_FILES= cpplint/cpplint.py cpplint/cpplint_unittest.py
-post-patch:
- @${REINPLACE_CMD} -Ee "s,#!.*,#!${PYTHON_CMD}," ${WRKSRC}/*.py
+OPTIONS_DEFINE= DOCS
do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/cpplint.py ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/cpplint/cpplint.py ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/cpplint/cpplint_unittest.py ${STAGEDIR}${PREFIX}/bin
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.xml ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/google_python_style.vim ${STAGEDIR}${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/google-c-style.el ${STAGEDIR}${DATADIR}
+
+do-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.css ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/*.html ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}/cpplint
+ ${INSTALL_DATA} ${WRKSRC}/cpplint/README ${STAGEDIR}${DOCSDIR}/cpplint
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}/docguide
+ (cd ${WRKSRC}/docguide && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/docguide)
.include <bsd.port.mk>
diff --git a/devel/google-styleguide/distinfo b/devel/google-styleguide/distinfo
index 321889979ec0..ddaf70a96877 100644
--- a/devel/google-styleguide/distinfo
+++ b/devel/google-styleguide/distinfo
@@ -1,6 +1,3 @@
-SHA256 (google-styleguide-66/cpplint.py) = 573f92ea3572a1b052281eedb2b45c489649f5619854ba6e349554e654f77210
-SIZE (google-styleguide-66/cpplint.py) = 123503
-SHA256 (google-styleguide-66/cpplint_unittest.py) = 1fc17c263fc4176932540dbc3b2e1d8581d448c741ff6750ae93fb3e31f9faf2
-SIZE (google-styleguide-66/cpplint_unittest.py) = 116012
-SHA256 (google-styleguide-66/README) = 1c0500c633b2161633abffccc942f8b18dddb04a9b099d40db09b959078044c8
-SIZE (google-styleguide-66/README) = 2228
+TIMESTAMP = 1490527488
+SHA256 (google-styleguide-20170302-15f2836_GH0.tar.gz) = 591f3662221f3147bd91961fbe2dec2a4154ba69b3ec9a114dab668c78863751
+SIZE (google-styleguide-20170302-15f2836_GH0.tar.gz) = 1012477
diff --git a/devel/google-styleguide/pkg-descr b/devel/google-styleguide/pkg-descr
index 63444a260ebb..b153aefb92da 100644
--- a/devel/google-styleguide/pkg-descr
+++ b/devel/google-styleguide/pkg-descr
@@ -1,17 +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.
+This project contains coding style guides used at Google. There are style
+guides for AngularJS, C++, Common Lisp, HTML/CSS, Java, JavaScript, Objective-C,
+Python, R, Shell, and Vimscript. Also included is:
-The linting tool takes a list of files as input. For full usage instructions,
-please see the output of:
+- cpplint, an automated checker to make sure a C++ file follows Google's C++
+ style guide
+- google-c-style.el, an Emacs minor mode to provide Google's C/C++ coding style
+ within Emacs
+- google_python_style.vim, which indents Python code in the Google way when
+ using Vim.
- ./cpplint.py --help
+If your project requires that you create a new XML document format, the included
+"XML Document Format Style Guide" may be helpful. In addition to actual style
+rules, it also contains advice on designing your own versus adapting an existing
+format, on XML instance document formatting, and on elements versus attributes.
-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/
+WWW: https://github.com/google/styleguide/
diff --git a/devel/google-styleguide/pkg-plist b/devel/google-styleguide/pkg-plist
new file mode 100644
index 000000000000..6898991acb2f
--- /dev/null
+++ b/devel/google-styleguide/pkg-plist
@@ -0,0 +1,36 @@
+bin/cpplint.py
+bin/cpplint_unittest.py
+%%PORTDOCS%%%%DOCSDIR%%/README.md
+%%PORTDOCS%%%%DOCSDIR%%/angularjs-google-style.html
+%%PORTDOCS%%%%DOCSDIR%%/cppguide.html
+%%PORTDOCS%%%%DOCSDIR%%/cpplint/README
+%%PORTDOCS%%%%DOCSDIR%%/docguide/README.md
+%%PORTDOCS%%%%DOCSDIR%%/docguide/READMEs.md
+%%PORTDOCS%%%%DOCSDIR%%/docguide/VERSION
+%%PORTDOCS%%%%DOCSDIR%%/docguide/best_practices.md
+%%PORTDOCS%%%%DOCSDIR%%/docguide/philosophy.md
+%%PORTDOCS%%%%DOCSDIR%%/docguide/style.md
+%%PORTDOCS%%%%DOCSDIR%%/google-r-style.html
+%%PORTDOCS%%%%DOCSDIR%%/htmlcssguide.html
+%%PORTDOCS%%%%DOCSDIR%%/javaguide.css
+%%PORTDOCS%%%%DOCSDIR%%/javaguide.html
+%%PORTDOCS%%%%DOCSDIR%%/jsguide.html
+%%PORTDOCS%%%%DOCSDIR%%/jsoncstyleguide.html
+%%PORTDOCS%%%%DOCSDIR%%/pyguide.html
+%%PORTDOCS%%%%DOCSDIR%%/styleguide.css
+%%PORTDOCS%%%%DOCSDIR%%/xmlstyle.html
+%%DATADIR%%/Rguide.xml
+%%DATADIR%%/cppguide.xml
+%%DATADIR%%/eclipse-cpp-google-style.xml
+%%DATADIR%%/eclipse-java-google-style.xml
+%%DATADIR%%/google-c-style.el
+%%DATADIR%%/google_python_style.vim
+%%DATADIR%%/htmlcssguide.xml
+%%DATADIR%%/intellij-java-google-style.xml
+%%DATADIR%%/javascriptguide.xml
+%%DATADIR%%/jsoncstyleguide.xml
+%%DATADIR%%/lispguide.xml
+%%DATADIR%%/objcguide.xml
+%%DATADIR%%/shell.xml
+%%DATADIR%%/vimscriptfull.xml
+%%DATADIR%%/vimscriptguide.xml