# -*- 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
PortGroup           luarocks_org 1.0

name                lua-lunit
version             0.5
revision            0
luarocks.rock       lunit-${version}-2.src.rock
license             MIT
maintainers         nomaintainer

description         a unit testing framework for Lua
long_description    Lunit is {*}${description}, written in Lua.

checksums           rmd160  19e15ef90d331cacb4305a090fff107e334ae6f7 \
                    sha256  b19854c685337ddcec2fe9c22113d2cd14715d52ccd2676abe2fa49b61a2ec4d \
                    size    14310

# see rockspec files
# see also CHANGEs, which says version 0.4 is "Lua-5.1 only."
# Lua 5.2 is build with `LUA_COMPAT_ALL`, so it should be compatible with Lua 5.1
luarocks.branches   5.1 5.2

luarocks.pure_lua   yes
luarocks.worksrcdir lunit-${version}

post-patch {
    reinplace       "s|interpreter=\"lua\"|interpreter=\"${prefix}/bin/lua${lua.version}\"|" \
                    ${worksrcpath}/lunit
}

luarocks.uploader   luarocks
