# -*- 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.10.0 v
revision                    0
github.tarball_from         archive
checksums                   sha1    23352498aa3cfc312a9b2bcaa99ecda6c1570925 \
                            rmd160  22420d091da944cf47ba6b34e9d625e0f98fdb2b \
                            sha256  1558977dd4095ff89768a2f7eaff765e760b56c736a9cd5956b1227ebfee8f2b \
                            size    19057

categories                  sysutils
platforms                   {darwin >= 13}
maintainers                 {dons.net.au:darius @DanielO}
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           PREFIX

post-destroot {
    xinstall -d -m 0755 ${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
