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

name                py-libdnet
# libdnet should be updated at the same time as py-libdnet.
github.setup        ofalk libdnet 1.18.0 libdnet-

categories-append   net
license             BSD
maintainers         nomaintainer

description         A python module for the libdnet low-level networking library.
long_description    Libdnet provides a simplified, portable interface to several low-level \
                    networking routines, including: network address manipulation, kernel \
                    arp(4) cache and route(4) table lookup and manipulation, network \
                    firewalling (IP filter, ipfw, ipchains, pf, ...), network interface \
                    lookup and manipulation, raw IP packet and Ethernet frame transmission.

dist_subdir         libdnet
github.tarball_from archive
checksums           rmd160 2fdbe25cffb4339c85d88b5bb9282ba666eeafbe \
                    sha256 a4a82275c7d83b85b1daac6ebac9461352731922161f1dcdcccd46c318f583c9 \
                    size   740145

python.versions     27 310 311 312 313

if {$subport ne $name} {
    depends_build-append    port:py${python.version}-cython
    depends_lib-append  port:libdnet

    patchfiles      setup.py.in.patch \
                    dnet.pyx.patch

    use_configure   yes
    configure.args  --with-check=no
    build.dir       ${worksrcpath}/python
    destroot.dir    ${worksrcpath}/python

    livecheck.type  none
}
