From 0e32369a264f1fdf5656ec24b188c77c699f51a7 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac Date: Tue, 4 Apr 2017 12:55:02 +0100 Subject: [PATCH] Cppcheck (#3684) * Adds cppcheck version 1.72 * cppcheck installation requires cfg files Without these files, cppcheck does not work correctly --- var/spack/repos/builtin/packages/cppcheck/package.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cppcheck/package.py b/var/spack/repos/builtin/packages/cppcheck/package.py index fd48fcb7e3..254674c7bf 100644 --- a/var/spack/repos/builtin/packages/cppcheck/package.py +++ b/var/spack/repos/builtin/packages/cppcheck/package.py @@ -23,6 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * +import os +import shutil class Cppcheck(Package): @@ -30,11 +32,13 @@ class Cppcheck(Package): homepage = "http://cppcheck.sourceforge.net/" url = "http://downloads.sourceforge.net/project/cppcheck/cppcheck/1.68/cppcheck-1.68.tar.bz2" + version('1.72', '2bd36f91ae0191ef5273bb7f6dc0d72e') version('1.68', 'c015195f5d61a542f350269030150708') def install(self, spec, prefix): # cppcheck does not have a configure script - make() + make("CFGDIR=%s" % os.path.join(prefix, 'cfg')) # manually install the final cppcheck binary mkdirp(prefix.bin) install('cppcheck', prefix.bin) + shutil.copytree('cfg', os.path.join(prefix, 'cfg'))