Opened 9 years ago

#50547 new submission

port suggestion : clazy

Reported by: RJVB (René Bertin) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia)
Port: clazy

Description

This is a prototype port for clazy, a plugin and wrapper for clang that implements a static analyser with a number of predefined checks for typical coding errors. The provided checks are oriented to development using Qt (and KDE); some of them are actually able to correct the source code.

I've run into an issue writing the Portfile (again, in fact). The code below creates a reinplace command in which ${lv}=3.8 (i.e. the last value of the loop variable) for all subports. Is that a bug in "base", or simply an inevitable shortcoming?

foreach lv {3.6 3.7 3.8} {
    subport ${name}-${lv} {
        # snip
        post-patch {
            reinplace "s|@LLVM_INSTALL_PREFIX@|${prefix}/libexec/llvm-${lv}/lib|g" ${worksrcpath}/CMakeLists.txt
        }
    }
}

Attachments (3)

Portfile (3.9 KB) - added by RJVB (René Bertin) 9 years ago.
patch-CMakeLists.diff (2.3 KB) - added by RJVB (René Bertin) 9 years ago.
patch-wrapper.diff (325 bytes) - added by RJVB (René Bertin) 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by RJVB (René Bertin)

Attachment: Portfile added

Changed 9 years ago by RJVB (René Bertin)

Attachment: patch-CMakeLists.diff added

Changed 9 years ago by RJVB (René Bertin)

Attachment: patch-wrapper.diff added
Note: See TracTickets for help on using tickets.