# -*- 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

PortSystem          1.0
PortGroup           qmake5 1.0
PortGroup           github 1.0

github.setup        KDE kcachegrind 21.08.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
name                qcachegrind
categories          devel
platforms           darwin
maintainers         m4x.org:frederic.devernay
license             GPL-2

description         Callgrind profile data visualization

long_description    ${description}

homepage            https://kcachegrind.github.io/html/Home.html

checksums \
    rmd160  554c527daacb533154b0f3992a55f6e08e9a7586 \
    sha256  1862bbc99343e97476c6b447c0494892f490ce56a1f23dd1cd527d7c008e9c46 \
    size    382599

depends_run         path:bin/dot:graphviz

patchfiles          0001-Fix-shell-invocations-for-MacPorts.patch
patch.pre_args-replace  -p0 -p1

post-patch {
    reinplace -W ${worksrcpath} "s|@@PREFIX@@|${prefix}|g" \
        libviews/callgraphview.cpp
}

destroot {
    copy ${worksrcpath}/qcachegrind/qcachegrind.app \
         ${destroot}${applications_dir}
}
