aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2021-05-30 15:31:32 +0000
committerThierry Thomas <thierry@FreeBSD.org>2021-05-30 15:33:07 +0000
commit36063d2e7bd511d34034dbfe34230af3a0b08f82 (patch)
tree97aaf0d74042163afe74e9a6a70faaf409440b05
parent563d5929d5f28631999a32d2aab4e72e1bf2c323 (diff)
downloadports-36063d2e7bd511d34034dbfe34230af3a0b08f82.tar.gz
ports-36063d2e7bd511d34034dbfe34230af3a0b08f82.zip
devel/cpplint: addinf cpplint, a static code checker for C++
-rw-r--r--devel/Makefile1
-rw-r--r--devel/cpplint/Makefile29
-rw-r--r--devel/cpplint/distinfo3
-rw-r--r--devel/cpplint/files/patch-setup.py12
-rw-r--r--devel/cpplint/pkg-descr10
-rw-r--r--devel/cpplint/pkg-plist4
6 files changed, 59 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 2d1f38207da1..5389ef0d005a 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -396,6 +396,7 @@
SUBDIR += cppcheck
SUBDIR += cppcheck-gui
SUBDIR += cppi
+ SUBDIR += cpplint
SUBDIR += cpprestsdk
SUBDIR += cpptest
SUBDIR += cppunit
diff --git a/devel/cpplint/Makefile b/devel/cpplint/Makefile
new file mode 100644
index 000000000000..2596a590a09c
--- /dev/null
+++ b/devel/cpplint/Makefile
@@ -0,0 +1,29 @@
+# Created by: thierry@pompo.net
+
+PORTNAME= cpplint
+PORTVERSION= 1.5.5
+CATEGORIES= devel
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= Static code checker for C++
+
+LICENSE= BSD3CLAUSE
+
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}zipp>0:devel/py-zipp@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pyparsing>0:devel/py-pyparsing@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}configparser>0:devel/py-configparser@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}testfixtures>0:devel/py-testfixtures@${PY_FLAVOR}
+
+USE_GITHUB= yes
+
+USES= python:3.6+
+USE_PYTHON= distutils noflavors
+
+NO_ARCH= yes
+
+do-test:
+ (cd ${WRKSRC} && py.test)
+
+.include <bsd.port.mk>
diff --git a/devel/cpplint/distinfo b/devel/cpplint/distinfo
new file mode 100644
index 000000000000..6426d6089991
--- /dev/null
+++ b/devel/cpplint/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1622299602
+SHA256 (cpplint-cpplint-1.5.5_GH0.tar.gz) = 6abc3acd7b0a3d51d8dcaff0a8cb66c772dea73dd45099cba2d0960ec90e8de4
+SIZE (cpplint-cpplint-1.5.5_GH0.tar.gz) = 369078
diff --git a/devel/cpplint/files/patch-setup.py b/devel/cpplint/files/patch-setup.py
new file mode 100644
index 000000000000..6dd502a42560
--- /dev/null
+++ b/devel/cpplint/files/patch-setup.py
@@ -0,0 +1,12 @@
+--- setup.py.orig 2021-05-20 10:29:07 UTC
++++ setup.py
+@@ -72,9 +72,6 @@ setup(name='cpplint',
+ description='Automated checker to ensure C++ files follow Google\'s style guide',
+ long_description=open('README.rst').read(),
+ license='BSD-3-Clause',
+- setup_requires=[
+- "pytest-runner==5.2"
+- ],
+ tests_require=test_required,
+ # extras_require allow pip install .[dev]
+ extras_require={
diff --git a/devel/cpplint/pkg-descr b/devel/cpplint/pkg-descr
new file mode 100644
index 000000000000..42c82adfe467
--- /dev/null
+++ b/devel/cpplint/pkg-descr
@@ -0,0 +1,10 @@
+Cpplint is a command-line tool to check C/C++ files for style issues following
+Google's C++ style guide. Cpplint is developed and maintained by Google Inc. at
+google/styleguide <https://github.com/google/styleguide>, also see the wikipedia
+entry <http://en.wikipedia.org/wiki/Cpplint>.
+
+While Google maintains cpplint, Google is not (very) responsive to issues and
+pull requests, this fork aims to be (somewhat) more open to add fixes to cpplint
+to enable fixes, when those fixes make cpplint usable in wider contexts.
+
+WWW: https://github.com/cpplint/cpplint
diff --git a/devel/cpplint/pkg-plist b/devel/cpplint/pkg-plist
new file mode 100644
index 000000000000..2651341013b3
--- /dev/null
+++ b/devel/cpplint/pkg-plist
@@ -0,0 +1,4 @@
+bin/cpplint
+%%PYTHON_SITELIBDIR%%/__pycache__/cpplint%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
+%%PYTHON_SITELIBDIR%%/__pycache__/cpplint%%PYTHON_EXT_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/cpplint.py