* Adds cppcheck version 1.72

* cppcheck installation requires cfg files

Without these files, cppcheck does not work correctly
This commit is contained in:
Mayeul d'Avezac 2017-04-04 12:55:02 +01:00 committed by Adam J. Stewart
parent 8276bd75fc
commit 0e32369a26

View file

@ -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'))