# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

PortSystem      1.0
PortGroup       github 1.0
PortGroup       makefile 1.0

github.setup    mvp uhubctl 2.6.0 v
revision        0
categories      sysutils
maintainers     {i0ntempest @i0ntempest} openmaintainer
license         GPL-2

description     USB hub per-port power control
long_description \
                ${name} is utility to control USB power per-port on smart USB hubs. \
                Smart hub is defined as one that implements per-port power switching.

checksums       rmd160  e9a96ba9eee85460ef777a27aaaa63229ab8d2b2 \
                sha256  56ca15ddf96d39ab0bf8ee12d3daca13cea45af01bcd5a9732ffcc01664fdfa2 \
                size    29255
github.tarball_from \
                archive

# https://trac.macports.org/ticket/72610
# The source in fact sets everything wrong to break the build on macOS.

patchfiles      patch-fix-apple.diff

depends_build-append \
                path:bin/pkg-config:pkgconfig

depends_lib-append \
                path:lib/pkgconfig/libusb-1.0.pc:libusb

# uhubctl.c:39: error: expected declaration specifiers or ‘...’ before numeric constant
compiler.blacklist-append \
                *gcc-4.0 *gcc-4.2

build.target    uhubctl

makefile.prefix_name \
                prefix
makefile.override-append \
                PREFIX
