source: trunk/dports/devel/cppcheck/Portfile

Last change on this file was 144475, checked in by khindenburg@…, 21 months ago

cppcheck: update to 1.72 maintainer #50267

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 144475 2016-01-09 22:14:55Z ryandesign@macports.org $
3
4PortSystem                  1.0
5PortGroup                   cxx11 1.0
6
7name                        cppcheck
8version                     1.72
9categories                  devel
10license                     GPL-3
11platforms                   darwin
12maintainers                 xythobuz.de:xythobuz
13
14description                 Static analysis of C and C++ code.
15
16long_description            Cppcheck is an analysis tool for C and C++ code. Unlike \
17                            compilers and many other analysis tools, we do not detect \
18                            syntax errors. Cppcheck only detects the types of bugs that \
19                            the compilers normally fail to detect. The goal is no false \
20                            positives.
21
22homepage                    http://cppcheck.sourceforge.net/
23master_sites                sourceforge:project/cppcheck/cppcheck/${version}
24
25checksums                   rmd160  62444a704fc0f6a7301aad3c763c297a3d727788 \
26                            sha256  459108c81ea607c8bd3da842d83990d6555e0351d0fe4bb21c2c72110274f393
27
28depends_build               port:libxslt \
29                            port:docbook-xsl
30
31depends_lib                 port:pcre
32
33use_configure               no
34
35variant universal {}
36
37build.args                  CXX="${configure.cxx} [get_canonical_archflags cxx]" \
38                            HAVE_RULES=yes CFGDIR=${prefix}/share/cppcheck \
39                            DB2MAN=${prefix}/share/xsl/docbook-xsl/manpages/docbook.xsl
40build.target                all man
41
42test.run                    yes
43test.target                 test
44
45destroot.args               PREFIX=${prefix}
46
47notes                       "If you've updated cppcheck from a previous version," \
48                            "you may want to replace the included config files:" \
49                            "sudo find ${prefix}/share/cppcheck -type f -name \"*.dist\" -exec bash -c 'f=\"\{\}\"; cp \"\$f\" \"\$\{f%.dist\}\"' \\;"
50
51post-destroot {
52    xinstall -m 444 ${worksrcpath}/cppcheck.1 ${destroot}${prefix}/share/man/man1
53    xinstall -d ${destroot}${prefix}/share/cppcheck
54    copy ${worksrcpath}/cfg/avr.cfg ${destroot}${prefix}/share/cppcheck/avr.cfg.dist
55    copy ${worksrcpath}/cfg/cppcheck-cfg.rng ${destroot}${prefix}/share/cppcheck/cppcheck-cfg.rng.dist
56    copy ${worksrcpath}/cfg/gnu.cfg ${destroot}${prefix}/share/cppcheck/gnu.cfg.dist
57    copy ${worksrcpath}/cfg/gtk.cfg ${destroot}${prefix}/share/cppcheck/gtk.cfg.dist
58    copy ${worksrcpath}/cfg/microsoft_sal.cfg ${destroot}${prefix}/share/cppcheck/microsoft_sal.cfg.dist
59    copy ${worksrcpath}/cfg/posix.cfg ${destroot}${prefix}/share/cppcheck/posix.cfg.dist
60    copy ${worksrcpath}/cfg/qt.cfg ${destroot}${prefix}/share/cppcheck/qt.cfg.dist
61    copy ${worksrcpath}/cfg/sdl.cfg ${destroot}${prefix}/share/cppcheck/sdl.cfg.dist
62    copy ${worksrcpath}/cfg/std.cfg ${destroot}${prefix}/share/cppcheck/std.cfg.dist
63    copy ${worksrcpath}/cfg/windows.cfg ${destroot}${prefix}/share/cppcheck/windows.cfg.dist
64}
65
66post-activate {
67    if {![file exists ${prefix}/share/cppcheck/avr.cfg]} {
68        copy ${prefix}/share/cppcheck/avr.cfg.dist ${prefix}/share/cppcheck/avr.cfg
69    }
70
71    if {![file exists ${prefix}/share/cppcheck/cppcheck-cfg.rng]} {
72        copy ${prefix}/share/cppcheck/cppcheck-cfg.rng.dist ${prefix}/share/cppcheck/cppcheck-cfg.rng
73    }
74
75    if {![file exists ${prefix}/share/cppcheck/gnu.cfg]} {
76        copy ${prefix}/share/cppcheck/gnu.cfg.dist ${prefix}/share/cppcheck/gnu.cfg
77    }
78
79    if {![file exists ${prefix}/share/cppcheck/gtk.cfg]} {
80        copy ${prefix}/share/cppcheck/gtk.cfg.dist ${prefix}/share/cppcheck/gtk.cfg
81    }
82
83    if {![file exists ${prefix}/share/cppcheck/microsoft_sal.cfg]} {
84        copy ${prefix}/share/cppcheck/microsoft_sal.cfg.dist ${prefix}/share/cppcheck/microsoft_sal.cfg
85    }
86
87    if {![file exists ${prefix}/share/cppcheck/posix.cfg]} {
88        copy ${prefix}/share/cppcheck/posix.cfg.dist ${prefix}/share/cppcheck/posix.cfg
89    }
90
91    if {![file exists ${prefix}/share/cppcheck/qt.cfg]} {
92        copy ${prefix}/share/cppcheck/qt.cfg.dist ${prefix}/share/cppcheck/qt.cfg
93    }
94
95    if {![file exists ${prefix}/share/cppcheck/sdl.cfg]} {
96        copy ${prefix}/share/cppcheck/sdl.cfg.dist ${prefix}/share/cppcheck/sdl.cfg
97    }
98
99    if {![file exists ${prefix}/share/cppcheck/std.cfg]} {
100        copy ${prefix}/share/cppcheck/std.cfg.dist ${prefix}/share/cppcheck/std.cfg
101    }
102
103    if {![file exists ${prefix}/share/cppcheck/windows.cfg]} {
104        copy ${prefix}/share/cppcheck/windows.cfg.dist ${prefix}/share/cppcheck/windows.cfg
105    }
106}
Note: See TracBrowser for help on using the repository browser.