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

github.setup                toy blueutil 2.13.0 v
revision                    0
github.tarball_from         archive
checksums                   rmd160  1f39947293e0f47aec9984c32aad8f2fb82a2fbd \
                            sha256  d6beba603ab6638f72d9966aed33343f35cac441fc48a81c04fd532c844f170d \
                            size    21767

categories                  sysutils
platforms                   {darwin >= 13}
maintainers                 {dons.net.au:darius @DanielO} openmaintainer
license                     BSD

description                 CLI for Bluetooth on macOS

long_description            Command line interface for Bluetooth on macOS, \
                            control power, discoverable state, list paired \
                            devices, pair new devices, connect and disconnect \
                            devices, and check if a device is connected.

patchfiles                  blueutil-Makefile.diff

# error: use of undeclared identifier '_errorCode'
supported_archs             arm64 x86_64

configure.cppflags-delete   -I${prefix}/include
configure.ldflags-delete    -L${prefix}/lib

makefile.prefix_name        prefix
makefile.override-append    PREFIX

post-destroot {
    xinstall -d ${destroot}${prefix}/share/${name}
    xinstall -m 0644 -W ${worksrcpath} README.md LICENSE.txt CHANGELOG.md \
        ${destroot}${prefix}/share/${name}/
}

test.run                    yes
test.args
test.cmd                    echo y | ./test
