# $Id$

PortSystem 1.0

name                lua-coxpcall
version             1.13.0
revision            1
categories          devel
license             MIT
platforms           darwin
supported_archs     noarch
maintainers         nomaintainer
description         Coroutine-safe xpcall and pcall versions
long_description    Coxpcall encapsulates the protected calls with a coroutine based loop, \
                    so errors can be dealed without the usual pcall/xpcall issues with \
                    coroutines.
homepage            http://coxpcall.luaforge.net
master_sites        http://luaforge.net/frs/download.php/3406/
checksums           md5     d3e0554dc426a7a24e372780b3dd5fe6 \
                    sha1    8b3321a9b74305b1347ce2543e998a118ca82701 \
                    rmd160  1f47691efa233d6f584c1072647fb1330a999c4a
distname            coxpcall-${version}
depends_lib         port:lua
patchfiles          patch-Makefile.diff
post-patch {
   reinplace "s|%%PREFIX%%|${prefix}|g" ${worksrcpath}/Makefile
}
configure.pre_args  lua
build               {}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    
    xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
    eval xinstall -m 644 [glob ${worksrcpath}/doc/us/*] ${destroot}${prefix}/share/doc/${name}
}