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

name                py-pyshark
version             0.6
revision            0

categories-append   net
platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         nomaintainer

description         Python wrapper for tshark
long_description    {*}${description}, allowing python packet parsing \
                    using wireshark dissectors

homepage            https://github.com/KimiNewt/pyshark

checksums           rmd160  bd77c3b60631ce9c5679dbd5c6ec9992979e97d7 \
                    sha256  a424d83e0ca6224a96bbe30cd3f89d5491654d783faaaf90adaf45867a0bcb17 \
                    size    27053

python.versions     313

if {${name} ne ${subport}} {
    patchfiles      patch-config-ini.diff

    post-patch {
        reinplace s|@PREFIX@|${prefix}|g ${worksrcpath}/pyshark/config.ini
    }

    depends_run-append \
                    port:py${python.version}-lxml \
                    path:bin/dumpcap:wireshark4 \
                    path:bin/tshark:wireshark4
}
