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

github.setup        pyusb pyusb 1.1.0 v
name                py-${name}
categories-append   devel
platforms           darwin
license             BSD
maintainers         nomaintainer
description         Python library to provide easy USB device access
long_description    The PyUSB module provides Python with easy access to \
                    the host machine's Universal Serial Bus (USB) system

homepage            https://pyusb.github.io/pyusb/

dist_subdir         ${name}/${version}_1

fetch.type          git

python.versions     27 35 36 37 38 39

if {${name} ne ${subport}} {
    depends_build-append \
        port:py${python.version}-setuptools \
        port:py${python.version}-setuptools_scm

    depends_run-append  path:lib/pkgconfig/libusb-1.0.pc:libusb

    post-destroot {
        xinstall -m 0755 -d ${destroot}${prefix}/share/doc/${subport}
        xinstall -m 0644 -W ${worksrcpath} README.rst LICENSE \
                                           docs/tutorial.rst \
                                           docs/faq.rst \
            ${destroot}${prefix}/share/doc/${subport}
    }

    livecheck.type none
}
