# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8::et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           xcode 1.0

github.setup        tomaz appledoc 2.2.1
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
maintainers         nomaintainer
categories          devel
description         ${name} is a documentation generator for Xcode
long_description    ${name} is command line tool that helps Objective-C \
                    developers generate Apple-like source code documentation \
                    from specially formatted source code comments. It\'s designed \
                    to take as readable source code comments as possible for the \
                    input and use comments as well as surrounding source code to \
                    generate visually appealing documentation in the form of \
                    HTML as well as fully indexed and browsable Xcode \
                    documentation set.
homepage            http://gentlebytes.com/${name}/
license             BSD

checksums           rmd160  cb9b0d31660246899edaddabd7b4f5dd9d093d99 \
                    sha256  e3112b23fd409824069a3a49c6dd753f9fbc2dd1c06ff2bef8d86649941cd1db

xcode.target        appledoc
xcode.configuration Release
xcode.destroot.path ${prefix}/bin

xcode.destroot.settings \
                    OTHER_CFLAGS='-DCOMPILE_TIME_DEFAULT_TEMPLATE_PATH=@\"${destroot}${prefix}/share/${name}/Templates\"'

if {${os.platform} eq "darwin" && ${os.major} < 11} {
    known_fail      yes
    pre-fetch {
        ui_error "${name} is only supported on OS X 10.7 Lion or later."
        return -code error "unsupported platform version"
    }
}

post-destroot {
    xinstall -d ${destroot}${prefix}/share/${name}
    copy ${worksrcpath}/Templates ${destroot}${prefix}/share/${name}/
}
