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

categories              graphics devel
license                 MIT
maintainers             nomantainer

description             OpenGL API inspector
long_description        apitrace is a free program with tools to inspect and trace OpenGL api calls.

github.setup            apitrace apitrace 13.0
github.tarball_from     tarball
revision                0
fetch.type              git

supported_archs         x86_64 i386

configure.args-append   -DENABLE_X11=OFF \
                        -DBUILD_TESTING=OFF \
                        -DENABLE_GUI=OFF

checksums               rmd160  81cf9940f583cfcb07e98c55ca3a3e841045feab \
                        sha256  f885916d94d896cd67795e5e5c871c3b3d04b5fbfae2ff8450daac6db2f5aa7f \
                        size    2274896

depends_lib-append      port:brotli \
                        port:libpng \
                        port:python313 \
                        port:py313-Pillow \
                        port:zlib

patchfiles-append       do-not-fail-submodules.diff \
                        patch-CMakeLists.diff

post-fetch {
    system -W ${worksrcpath} "git submodule update --init --remote thirdparty/snappy"
}

variant qtgui description {Build qt5 GUI} {
    PortGroup               qt5 1.0

    configure.args-replace -DENABLE_GUI=OFF -DENABLE_GUI=ON
}

variant tests description {Build tests} {
    test.run                    yes
    depends_build-append        port:gtest
    configure.args-replace      -DBUILD_TESTING=OFF -DBUILD_TESTING=ON
}

default_variants +qtgui
