pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cppcheck: add version 2.1 of the package



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <tk%giga.or.at@localhost>
Pushed By:	wiz
Date:		Tue Jun 23 22:35:23 2020 +0200
Changeset:	207dfe833a58cebc9563368099ca8b27ec7dcb76

Added Files:
	cppcheck/DESCR
	cppcheck/Makefile
	cppcheck/PLIST
	cppcheck/distinfo
	cppcheck/log
	cppcheck/options.mk

Log Message:
cppcheck: add version 2.1 of the package

Update for devel/cppcheck, but neither works for me.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=207dfe833a58cebc9563368099ca8b27ec7dcb76

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cppcheck/DESCR      |  4 ++++
 cppcheck/Makefile   | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 cppcheck/PLIST      | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
 cppcheck/distinfo   |  6 +++++
 cppcheck/log        | 49 +++++++++++++++++++++++++++++++++++++++++
 cppcheck/options.mk | 25 +++++++++++++++++++++
 6 files changed, 206 insertions(+)

diffs:
diff --git a/cppcheck/DESCR b/cppcheck/DESCR
new file mode 100644
index 0000000000..10918f56f9
--- /dev/null
+++ b/cppcheck/DESCR
@@ -0,0 +1,4 @@
+cppcheck is a tool for static C/C++ code analysis intended to
+complement the checking of the compiler.  It checks for memory
+leaks, mismatching allocation-deallocation, buffer overrun, unused
+functions, coding style, and much more.
diff --git a/cppcheck/Makefile b/cppcheck/Makefile
new file mode 100644
index 0000000000..da3bb7731a
--- /dev/null
+++ b/cppcheck/Makefile
@@ -0,0 +1,63 @@
+# $NetBSD: Makefile,v 1.68 2020/06/02 08:23:34 adam Exp $
+
+DISTNAME=	cppcheck-2.1
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=cppcheck/}
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	reed%reedmedia.net@localhost
+HOMEPAGE=	http://cppcheck.sourceforge.net/
+COMMENT=	Tool for static C/C++ code analysis
+LICENSE=	gnu-gpl-v3
+
+BUILD_DEPENDS+=	libxslt-[0-9]*:../../textproc/libxslt
+BUILD_DEPENDS+=	docbook-xsl-[0-9]*:../../textproc/docbook-xsl
+DEPENDS+=	${PYPKGPREFIX}-pygments-[0-9]*:../../textproc/py-pygments
+
+USE_LANGUAGES=		c c++0x
+#USE_TOOLS+=		gmake
+USE_CMAKE=		yes
+
+#BUILD_TARGET=		all man
+#BUILD_MAKE_FLAGS+=	DB2MAN=${PREFIX}/share/xsl/docbook/manpages/docbook.xsl
+# tell cppcheck where its CPP files are
+#MAKE_FLAGS+=		FILESDIR=${PREFIX}/share/cppcheck
+# rules support (needs pcre)
+#MAKE_FLAGS+=		HAVE_RULES=yes
+#MAKE_FLAGS+=		USE_Z3=yes
+
+# use pkgsrc tinyxml2 instead of included copy
+#MAKE_FLAGS+=		TINYXML=
+#MAKE_FLAGS+=		INCLUDE_FOR_LIB="-Ilib -isystem externals -isystem externals/simplecpp"
+#MAKE_FLAGS+=		INCLUDE_FOR_CLI="-Ilib -isystem externals/simplecpp"
+#MAKE_FLAGS+=		INCLUDE_FOR_TEST="-Ilib -Icli -isystem externals/simplecpp"
+#CPPFLAGS+=		-I${BUILDLINK_PREFIX.tinyxml2}/include
+#LDFLAGS+=		${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinyxml2}/lib -L${BUILDLINK_PREFIX.tinyxml2}/lib -ltinyxml2
+CMAKE_ARGS+=		-DBUILD_TESTS=ON
+CMAKE_ARGS+=		-DHAVE_RULES=ON
+CMAKE_ARGS+=		-DUSE_Z3=ON
+
+.include "../../mk/compiler.mk"
+
+.if !empty(CC_VERSION:Mgcc-4.[0-5]*) || !empty(CC_VERSION:Mgcc-3.*)
+CXXFLAGS+= -include lib/cxx11emu.h
+.endif
+
+#INSTALLATION_DIRS+=	${PKGMANDIR}/man1
+
+REPLACE_PYTHON+=	htmlreport/cppcheck-htmlreport
+
+TEST_TARGET=		test
+
+.include "options.mk"
+
+#.PHONY: man-install
+#post-install: man-install
+#man-install:
+#	${INSTALL_DATA} ${WRKSRC}/cppcheck.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../lang/python/application.mk"
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../math/z3/buildlink3.mk"
+.include "../../textproc/tinyxml2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/cppcheck/PLIST b/cppcheck/PLIST
new file mode 100644
index 0000000000..9e0a5b0027
--- /dev/null
+++ b/cppcheck/PLIST
@@ -0,0 +1,59 @@
+@comment $NetBSD$
+bin/cppcheck
+share/Cppcheck/addons/__init__.py
+share/Cppcheck/addons/cert.py
+share/Cppcheck/addons/cppcheckdata.py
+share/Cppcheck/addons/findcasts.py
+share/Cppcheck/addons/misc.py
+share/Cppcheck/addons/misra.py
+share/Cppcheck/addons/naming.py
+share/Cppcheck/addons/namingng.py
+share/Cppcheck/addons/threadsafety.py
+share/Cppcheck/addons/y2038.py
+share/Cppcheck/cfg/avr.cfg
+share/Cppcheck/cfg/boost.cfg
+share/Cppcheck/cfg/bsd.cfg
+share/Cppcheck/cfg/cairo.cfg
+share/Cppcheck/cfg/cppcheck-lib.cfg
+share/Cppcheck/cfg/cppunit.cfg
+share/Cppcheck/cfg/daca.cfg
+share/Cppcheck/cfg/embedded_sql.cfg
+share/Cppcheck/cfg/gnu.cfg
+share/Cppcheck/cfg/googletest.cfg
+share/Cppcheck/cfg/gtk.cfg
+share/Cppcheck/cfg/kde.cfg
+share/Cppcheck/cfg/libcerror.cfg
+share/Cppcheck/cfg/libcurl.cfg
+share/Cppcheck/cfg/libsigc++.cfg
+share/Cppcheck/cfg/lua.cfg
+share/Cppcheck/cfg/mfc.cfg
+share/Cppcheck/cfg/microsoft_atl.cfg
+share/Cppcheck/cfg/microsoft_sal.cfg
+share/Cppcheck/cfg/motif.cfg
+share/Cppcheck/cfg/nspr.cfg
+share/Cppcheck/cfg/opencv2.cfg
+share/Cppcheck/cfg/opengl.cfg
+share/Cppcheck/cfg/openmp.cfg
+share/Cppcheck/cfg/openssl.cfg
+share/Cppcheck/cfg/posix.cfg
+share/Cppcheck/cfg/python.cfg
+share/Cppcheck/cfg/qt.cfg
+share/Cppcheck/cfg/ruby.cfg
+share/Cppcheck/cfg/sdl.cfg
+share/Cppcheck/cfg/sfml.cfg
+share/Cppcheck/cfg/sqlite3.cfg
+share/Cppcheck/cfg/std.cfg
+share/Cppcheck/cfg/tinyxml2.cfg
+share/Cppcheck/cfg/windows.cfg
+share/Cppcheck/cfg/wxwidgets.cfg
+share/Cppcheck/cfg/zlib.cfg
+share/Cppcheck/platforms/aix_ppc64.xml
+share/Cppcheck/platforms/arm32-wchar_t2.xml
+share/Cppcheck/platforms/arm32-wchar_t4.xml
+share/Cppcheck/platforms/arm64-wchar_t2.xml
+share/Cppcheck/platforms/arm64-wchar_t4.xml
+share/Cppcheck/platforms/avr8.xml
+share/Cppcheck/platforms/cray_sv1.xml
+share/Cppcheck/platforms/msp430_eabi_large_datamodel.xml
+share/Cppcheck/platforms/unix32-unsigned.xml
+share/Cppcheck/platforms/unix64-unsigned.xml
diff --git a/cppcheck/distinfo b/cppcheck/distinfo
new file mode 100644
index 0000000000..3321dae933
--- /dev/null
+++ b/cppcheck/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.15 2020/04/16 21:50:35 wiz Exp $
+
+SHA1 (cppcheck-2.1.tar.bz2) = 3cf4c1bc20d25f8876fdc78cdb19586561dda470
+RMD160 (cppcheck-2.1.tar.bz2) = b35d3e49ab0b833f7a7a5e6dba796702975c8866
+SHA512 (cppcheck-2.1.tar.bz2) = ddf10ea394fc7e862fefb4380e5aa4cdece4d9b135dc959c6e37c6dbdd85c77c4e3f4eac3af1b51415543eb16d3e225694963658530241250835586983dba4ae
+Size (cppcheck-2.1.tar.bz2) = 2480943 bytes
diff --git a/cppcheck/log b/cppcheck/log
new file mode 100644
index 0000000000..c8165c9f69
--- /dev/null
+++ b/cppcheck/log
@@ -0,0 +1,49 @@
+2.1
+
+This is a minor release.
+
+We have tweaked build scripts.
+* When you use USE_Z3=yes, we will handle new versions of z3 better. If you have an old z3 library and get compilation problems you will need to add a z3_version.h in externals.
+* The cmake scripts was updated.
+
+There was a couple of bug fixes.
+
+New check:
+* for "expression % 1" the result is always 0.
+
+2.0
+
+Overview
+
+The command line is not changed drastically. Your old cppcheck scripts should work as before.
+
+Compiling: There is a new dependency Z3. When compiling with the Makefile it is highly recommended to use "USE_Z3=yes".
+
+Improved clang-tidy integration
+
+Several fixes to;
+
+    improve parsing
+    detect more bugs with existing checks
+    fix false alarms
+
+Clang import
+
+Clang is a C/C++ compiler that has a very robust and well made parser.
+
+Cppcheck will always use its internal parser by default. However there is now an option to use the Clang parser instead.
+
+It is recommended that you use the default internal Cppcheck parser unless you notice that it fails to parse your code properly (syntax errors, strange false alarms).
+Bug hunting
+
+There is a new "soundy" analysis in Cppcheck that should detect most bugs. You should expect false alarms, however the false alarms will not be overwhelming.
+
+This new "soundy" analysis is not intended to replace normal Cppcheck analysis. There are use cases where false alarms can not be tolerated.
+
+We have added 1 checker and that checks for division by zero:
+
+    It detects all "integer division by zero" bugs in the Juliet test suite.
+    It detects all "division by zero" bugs in the ITC test suite.
+    There was 28 division by zero CVEs published in 2019 for C/C++ open source projects, and we could quickly see that 21 of the bugs are found by Cppcheck. There is no CVE bug that we know Cppcheck fails to diagnose. But there are 7 CVEs that would require additional investigation to establish if it is really detected or not.
+
+You can read more about this analysis in the "Bug hunting" chapter in the manual.
diff --git a/cppcheck/options.mk b/cppcheck/options.mk
new file mode 100644
index 0000000000..ef2de2d8f1
--- /dev/null
+++ b/cppcheck/options.mk
@@ -0,0 +1,25 @@
+# $NetBSD: options.mk,v 1.6 2016/09/19 11:05:53 wiz Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.cppcheck
+PKG_SUPPORTED_OPTIONS=	qt5
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=	qt5
+
+.if !empty(PKG_OPTIONS:Mqt5)
+PLIST.qt5=	yes
+USE_LIBTOOL=	yes
+
+.include "../../x11/qt5-qtbase/buildlink3.mk"
+.include "../../x11/qt5-qttools/buildlink3.mk"
+
+post-build:
+	cd ${WRKSRC}/gui && \
+		${CONFIGURE_ENV} QTDIR=${QTDIR} HAVE_RULES=yes ${QTDIR}/bin/qmake gui.pro && \
+		${MAKE_ENV} QTDIR=${QTDIR} make
+
+post-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/gui/cppcheck-gui ${DESTDIR}${PREFIX}/bin
+
+.endif


Home | Main Index | Thread Index | Old Index