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

PortSystem                  1.0
PortGroup                   github 1.0
PortGroup                   makefile 1.0

github.setup                termbox termbox 1.1.4 v
revision                    0
categories                  devel
maintainers                 {@barracuda156 macos-powerpc.org:barracuda} openmaintainer
license                     MIT
description                 Library for writing text-based user interfaces
long_description            {*}${description}.
checksums                   rmd160  c6054bb0bf80bb847ecea41e84e145c4a7fe13fb \
                            sha256  402fa1b353882d18e8ddd48f9f37346bbb6f5277993d3b36f1fc7a8d6097ee8a \
                            size    22726
github.tarball_from         archive

post-patch {
    reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/Makefile
    if {[string match *gcc-4.* ${configure.compiler}]} {
        reinplace "s|-Wno-unused-result||" ${worksrcpath}/Makefile
    }
}

platform darwin {
    post-destroot {
        set dylib_path ${prefix}/lib/libtermbox.dylib
        system -W ${workpath} "install_name_tool -id ${dylib_path} ${destroot}${dylib_path}"
    }
}
