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

name            libusb-compat

description     library for USB device access
long_description \
    library for use by user level applications to \
    access USB devices regardless of OS

categories      devel
license         LGPL-2+
maintainers     {michaelld @michaelld} openmaintainer

github.setup    libusb libusb-compat-0.1 0.1.8 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
checksums       rmd160 9c35ca8292583a392701329a7316bfadd89df15a \
                sha256  d6b244be3736d6284bac49df2e06f8a0d3fad71f48e6fcd86c72cd868349861f \
                size    38087
revision        0

homepage        https://libusb.info/

depends_build-append \
    port:automake \
    port:autoconf \
    port:libtool \
    port:pkgconfig

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

# use autotools to get ready to configure

pre-configure {
    system -W ${worksrcpath} "${prefix}/bin/glibtoolize -v -i -W all && ${prefix}/bin/aclocal -I m4 && ${prefix}/bin/autoheader && ${prefix}/bin/autoconf && ${prefix}/bin/automake -a --gnu"
}

github.livecheck.regex  {([0-9.]+)}
