# -*- 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           github 1.0
PortGroup           qt6 1.0

github.setup        radareorg iaito 5.9.9
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            1

categories          devel aqua
license             GPL-3
maintainers         {i0ntempest @i0ntempest} openmaintainer

description         Fork of Cutter from the last working commit with radare2
long_description    iaito (formerly Cutter) is a free and open-source reverse engineering framework\
                    powered by radare2. Its goal is making an advanced, customizable\
                    and FOSS reverse-engineering platform while keeping the user\
                    experience at mind. Cutter is created by reverse engineers for\
                    reverse engineers.

homepage            https://www.radare.org/n/iaito.html

checksums           rmd160  3d66d86f0e48c51edb4258cef1154fd82c232481 \
                    sha256  443e2c18c1ec4b13834c688d4c4d1618db044f4f12b067174fc5248c2d6e2b63 \
                    size    2866498
# port prone to stealth upgrade after release, consider waiting for a few days before updating to a new version

depends_build-append \
                    port:pkgconfig
depends_lib-append  port:radare2 \
                    port:capstone
depends_run-append  path:bin/dot:graphviz

qt6.depends_build   qttools
qt6.depends_lib     qtsvg

compiler.cxx_standard \
                    2017

# https://github.com/radareorg/iaito/commit/14d843c138defd36b8550c37f067e64d6b8316fb
patchfiles-append   patch-14d843c138defd36b8550c37f067e64d6b8316fb.diff
patch.args          -p1

post-patch {
    reinplace "s|/Applications|${applications_dir}|g" Makefile
}

configure.args-append \
                    --with-qmake6 \
                    QMAKE6=${qt6.dir}/bin/qmake6
