# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=portfile:et:sw=4:ts=4:sts=4
# $Id: Portfile 109810 2013-08-20 13:18:37Z g5pw@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        dbridges cocoa-tlassemble 1.0 v
maintainers         g5pw openmaintainer

categories          sysutils
description         tlassemble is a simple Mac OS X command line utility \
                    that combines a sequence of images into a movie.
long_description    ${description}

checksums           rmd160  7e88fc766401a3dc415e8b8780932828c6e3293e \
                    sha256  bbc263cd66665d388825b665b5c6990121de69cabbc62a586e63c4d852d96927

platforms           macosx
license             BSD

variant universal   {}

patch {
    reinplace "s/clang/\$(CC)/g" ${worksrcpath}/makefile
}

build.env-append    CC="${configure.cc} [get_canonical_archflags cc]"

use_configure       no

if {${os.major} < 10} {
    pre-fetch {
        return -code error "${name} only works on Mac OS X 10.6 and newer."
    }
}

destroot {
    xinstall -m 775 ${worksrcpath}/tlassemble ${destroot}${prefix}/bin
    xinstall -d ${destroot}${prefix}/share/${name}/doc
    xinstall -m 664 ${worksrcpath}/README.md ${destroot}${prefix}/share/${name}/doc
}
