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

name                fsevents-tools
version             1.0.0
categories          sysutils
maintainers         nomaintainer
platforms           darwin
license             Apache-2
description         tools for acting on changes in a directory structure
long_description    Provides three tools, notifywait, notifyloop, and autorsync \
                    that watch for changes in a directory structure, and either notify, \
                    run a script, or trigger an rsync if changes occur.

homepage            https://geoff.greer.fm/fsevents
master_sites        ${homepage}/releases

checksums           rmd160  c1b9078dc34dd5294d676fd9ad9bf25872e0ed63 \
                    sha256  498528e1794fa2b0cf920bd96abaf7ced15df31c104d1a3650e06fa3f95ec628 \
                    size    86355

# 10.7 SDK is not compatible with PowerPC
supported_archs     i386 x86_64

# build succeeds on 10.5 and 10.6 Intel, but only with a clang compiler
compiler.blacklist-append *gcc*

# uses kFSEventStreamCreateFlagFileEvents which is in SDK 10.7+
platform macosx {
    if {${os.major} <= 10} {
        # Build requires at least 10.7.3 SDK
        set lion_sdkpath ${developer_dir}/SDKs/MacOSX10.7.sdk
        if {[file exists $lion_sdkpath]} {
            configure.sdkroot $lion_sdkpath
        } else {
            pre-fetch {
                error "Building $name @${version} on Mac OS X 10.6 or less requires the MacOSX10.7.sdk to be present in ${developer_dir}/SDKs/"
            }
        }
    }
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     ${name}-(\\d+(?:\\.\\d+)*)
