summaryrefslogtreecommitdiff
path: root/devel/cppcheck
diff options
context:
space:
mode:
authorwiz <wiz>2014-08-07 11:35:10 +0000
committerwiz <wiz>2014-08-07 11:35:10 +0000
commitf7a4a9dfd589c9efbec19d80cd7cd6b316e880d2 (patch)
tree436629a0ad63b5fabf5618201dc26b9d88207aed /devel/cppcheck
parentedfe291f241fe749645c02cc1cd64dc2a1b89b37 (diff)
downloadpkgsrc-f7a4a9dfd589c9efbec19d80cd7cd6b316e880d2.tar.gz
Update to 1.66:
Cppcheck-1.66 has been released. New checks: - Compare pointer with '\0' - Assigning boolean expression to floating point variables Improvements: - Much improved AST - Much improved ValueFlow analysis - ValueFlow and AST now used by much more checks, improving checking accuracy and performance - Checking for self assignment now supports more complex expressions - Returning references to literals or references to calculation results is detected - Enhanced support for commutative operators in duplicate expression checking - Improved template/enum parsing - Much improved htmlreport - Definition of POD types in .cfg files - Definition of minsize for buffer arguments in .cfg files for buffer overflow checking - Fixed handling of #error: Do not report them if -f and -D are used together - New .cfg file for AVR platform - Generate xml dump of AST/ValueFlow/SymbolDatabase/TokenList if --dump is given - Improved performance in several cases - Windows Builds: Now compiled with VS2013, linked against Qt 5.3.1 GUI: - Platform settings are being saved now - Improved handling of (invalid) .cfg files - Use Win32W as default platform on Windows Additionally, a large number of false positives and crashs has been fixed. Cppcheck-1.65 has been released. General changes: Cppcheck requires a C++11 compiler supporting the common subset of features supported by GCC 4.4, Visual Studio 2010 and Clang 2.9 Problems with packaging and windows installer introduced in last release were fixed Improvements: Much improved support of complex combinations of function pointers, arrays and references Better handling of syntax errors Better detection of stack variables passed to free() Much improved value flow analysis More robust error detection in several checks due to usage of AST Better handling of unknown Macros in function declarations Allocation/Deallocation functions can be extend across different .cfg files Better handling of some C++11 language features like enum class, in-class member initializers Detect calling (std::)abs() with bool argument New checks: Check for noexcept and __attribute__((nothrow)) correctness Check for unhandled exceptions when exception specifiers are used Access to empty STL containers Repositioning operation on a file opened in append mode Find nested redundant if-statements (was experimental before) Additionally, a large number of false positives and crashs has been fixed. cppcheck-1.64 has been released. Value Flow A new value flow analysis has been added. It is generic so the same analysis can be reused by various checkers - previously many checkers have had their own value flow and control flow analysis. The new value flow analysis performs context sensitive cross-function analysis. All checkers that uses this will automatically have cross-function context sensitive value flow analysis. The new analysis is gradually introduced in the checkers - the old analysis in a checker is kept until it is redundant. The new value flow analysis is so far used to detect: division by zero null pointer dereference array index out of bounds invalid function argument Other Improvements Improved configurations for gtk, posix, sdl, std, windows Warn when using negative allocation size Check 2nd parameter for memset Cppcheck-1.63 has been released. Maintainers: The .cfg files are needed by cppcheck. Either put them in a subfolder cfg where the binary is. Otherwise compile cppcheck with CFGDIR to specify an arbitrary path where you put the .cfg files. New check: * Using pointer addition result in condition 'if (p+1)' - either a dereference is forgotten or it depends on UB (the result is only 0 if there is overflow, which is UB). Improved checks: * Leaks - ignoring return value of allocation function * Uninitialized vars - check how uninitialized malloc data is used * Rewritten 'calculation in sizeof' using syntax tree * Rewritten 'clarify calculation' using syntax tree * Rewritten 'logical disjunction' using syntax tree * Rewritten 'duplicate expressions' using syntax tree * Rewritten 'invalidFunctionUsage' that uses the *.cfg files GUI: * Library files can be enabled in the project dialog * Suppressions can be specified in the project dialog Other: * Cppcheck is now continuosly scanning all the source code in the debian archive. Results: http://cppcheck.sourceforge.net/devinfo/daca2-report/daca2.html * Fixes of templates handling, hangs, crashes and false positives cppcheck-1.62 New checks * Divide with variable and then compare to see if variable is 0 * Duplicated inherited member Improved checking: * handling of >> in templates * format string checking * comparing bool result with integer * standard isgreater()/islower() functions * standard math functions * reassigning struct members Htmlreport xml-version 2 is now handled New checks: * arithmetical usage of inf/nan result * suspicious usage of comma in return statement * sizeof(void) Improved checking: * better simplification of strlen * improved handling of array member variables 'x[y].z..' * Specific improvements in checks for buffer overruns, format strings, uninitialized variables Command line: * Using both --max-configs and -D. Normally when -D is used, Cppcheck will only check the given configuration. By using --max-configs also, you can tell Cppcheck to check more configurations. * Added --library and --check-library. Graphical user interface: * Somewhat improved response when stopping checking Cppcheck core: * Extending checking with configuration files. Cppcheck has internal knowledge for standard C/C++ functions. Knowledge for libraries and environments can be specified using configuration files. * Rules: added <tokenlist> that allow you to check 'raw' code and 'normal' code. In the 'raw' code, the comments and #include are already taken care of, but the #define statements can be analysed.
Diffstat (limited to 'devel/cppcheck')
-rw-r--r--devel/cppcheck/Makefile29
-rw-r--r--devel/cppcheck/PLIST10
-rw-r--r--devel/cppcheck/distinfo9
-rw-r--r--devel/cppcheck/patches/patch-Makefile17
4 files changed, 57 insertions, 8 deletions
diff --git a/devel/cppcheck/Makefile b/devel/cppcheck/Makefile
index 74833190d23..2759ea9507a 100644
--- a/devel/cppcheck/Makefile
+++ b/devel/cppcheck/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.29 2014/02/12 23:17:45 tron Exp $
+# $NetBSD: Makefile,v 1.30 2014/08/07 11:35:10 wiz Exp $
-DISTNAME= cppcheck-1.60.1
-PKGREVISION= 1
+DISTNAME= cppcheck-1.66
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=cppcheck/}
EXTRACT_SUFX= .tar.bz2
@@ -13,6 +12,7 @@ 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
FIND_PREFIX:= DBXSLDIR=docbook-xsl
.include "../../mk/find-prefix.mk"
@@ -21,8 +21,29 @@ USE_LANGUAGES= c c++
USE_TOOLS+= gmake
BUILD_TARGET= all man
BUILD_MAKE_FLAGS+= DB2MAN=${DBXSLDIR}/share/xsl/docbook/manpages/docbook.xsl
+# tell cppcheck where its config is
+MAKE_FLAGS+= CFGDIR=${PREFIX}/share/cppcheck/cfg
+# rules support (needs pcre)
+MAKE_FLAGS+= HAVE_RULES=yes
+
+# use pkgsrc tinyxml2 instead of included copy
+MAKE_FLAGS+= TINYXML=
+CPPFLAGS+= -I${BUILDLINK_PREFIX.tinyxml2}/include
+LDFLAGS+= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.tinyxml2}/lib -L${BUILDLINK_PREFIX.tinyxml2}/lib -ltinyxml2
+
+# http://5.150.254.56:443/trac-cppcheck/ticket/6026#ticket
+.include "../../mk/bsd.fast.prefs.mk"
+.if !empty(MACHINE_PLATFORM:MNetBSD-[0-6].*-*) || empty(MACHINE_PLATFORM:MNetBSD-*)
+# no backtrace() on NetBSD<7 (6.99.8 actually); add other systems with backtrace() when you find them
+CPPFLAGS+= -DNO_UNIX_BACKTRACE_SUPPORT=1
+.else
+LDFLAGS+= -lexecinfo
+.endif
+
INSTALLATION_DIRS= ${PKGMANDIR}/man1
+REPLACE_PYTHON+= htmlreport/cppcheck-htmlreport
+
.include "options.mk"
post-install:
@@ -33,5 +54,7 @@ post-install:
${DESTDIR}${PREFIX}/bin
.endif
+.include "../../lang/python/application.mk"
.include "../../devel/pcre/buildlink3.mk"
+.include "../../textproc/tinyxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/cppcheck/PLIST b/devel/cppcheck/PLIST
index 39db7233c6d..9807a7856d0 100644
--- a/devel/cppcheck/PLIST
+++ b/devel/cppcheck/PLIST
@@ -1,4 +1,12 @@
-@comment $NetBSD: PLIST,v 1.3 2013/04/05 15:14:03 adam Exp $
+@comment $NetBSD: PLIST,v 1.4 2014/08/07 11:35:10 wiz Exp $
bin/cppcheck
${PLIST.qt}bin/cppcheck-gui
+bin/cppcheck-htmlreport
man/man1/cppcheck.1
+share/cppcheck/cfg/avr.cfg
+share/cppcheck/cfg/gtk.cfg
+share/cppcheck/cfg/posix.cfg
+share/cppcheck/cfg/qt.cfg
+share/cppcheck/cfg/sdl.cfg
+share/cppcheck/cfg/std.cfg
+share/cppcheck/cfg/windows.cfg
diff --git a/devel/cppcheck/distinfo b/devel/cppcheck/distinfo
index 6268054ca6d..32bc761b614 100644
--- a/devel/cppcheck/distinfo
+++ b/devel/cppcheck/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.7 2013/07/14 17:33:59 wiz Exp $
+$NetBSD: distinfo,v 1.8 2014/08/07 11:35:10 wiz Exp $
-SHA1 (cppcheck-1.60.1.tar.bz2) = 282e74459747d6c940fa65376049cb642cd32e6a
-RMD160 (cppcheck-1.60.1.tar.bz2) = a779f601834b13ee45b17e0ea1f4eddc03812034
-Size (cppcheck-1.60.1.tar.bz2) = 1255595 bytes
+SHA1 (cppcheck-1.66.tar.bz2) = 2b24bc35b113ece52be277a8800dd9685ecb7fc7
+RMD160 (cppcheck-1.66.tar.bz2) = 09786b4b8f379ec099674fc6cb863a438fe31c02
+Size (cppcheck-1.66.tar.bz2) = 1064369 bytes
+SHA1 (patch-Makefile) = d09f5f13bc4a4edf6171d6a008afd1c672005c06
diff --git a/devel/cppcheck/patches/patch-Makefile b/devel/cppcheck/patches/patch-Makefile
new file mode 100644
index 00000000000..5f90b2fba9a
--- /dev/null
+++ b/devel/cppcheck/patches/patch-Makefile
@@ -0,0 +1,17 @@
+$NetBSD: patch-Makefile,v 1.1 2014/08/07 11:35:11 wiz Exp $
+
+Fix DESTDIR installation of config files.
+
+--- Makefile.orig 2014-08-02 10:39:20.000000000 +0000
++++ Makefile
+@@ -263,8 +263,8 @@ install: cppcheck
+ install cppcheck ${BIN}
+ install htmlreport/cppcheck-htmlreport ${BIN}
+ ifdef CFGDIR
+- install -d ${CFGDIR}
+- install -m 644 cfg/* ${CFGDIR}
++ install -d ${DESTDIR}${CFGDIR}
++ install -m 644 cfg/* ${DESTDIR}${CFGDIR}
+ endif
+
+