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

github.setup    julienXX terminal-notifier 3.1.0
github.tarball_from archive
categories      aqua
license         MIT
maintainers     nomaintainer

description     A command line tool to send Mac OS X user notifications
long_description \
                ${name} is able to send notifications to the macOS \
                Notification Center.

minimum_xcodeversions {12 5.0}

platforms       {darwin >= 14}

checksums       rmd160  ccab0c7fd8ff9382b88fd16f4c94cdff23dc8c5c \
                sha256  7dac44a563f00c10d49aa2da4cde9d1fecdb12b36ed57fe7fdff789c3578421e \
                size    606194

xcode.destroot.path ${prefix}/libexec/terminal-notifier

post-destroot {
    xinstall -m 0755 ${filespath}/terminal-notifier ${destroot}${prefix}/bin/terminal-notifier
    reinplace "s:@@PREFIX@@:${prefix}:" ${destroot}${prefix}/bin/terminal-notifier
}

# this port does not build with the new xcode build system at present
if {[vercmp ${xcodeversion} 10.0] >= 0} {
    build.pre_args      -UseNewBuildSystem=NO
    destroot.pre_args   -UseNewBuildSystem=NO
}
