# $Id: Portfile 57947 2009-09-19 15:47:43Z and.damore@macports.org $

PortSystem 1.0

name                lua-luasocket
version             2.0.2
categories          devel
platforms           darwin
maintainers         gmail.com:emmett.shear

description         The luasocket library extends lua with tcp, udp, and dns
long_description    LuaSocket is a Lua extension library that is composed by two parts: \
                    a C core that provides support for the TCP and UDP transport layers, \
                    and a set of Lua modules that add support for functionality commonly \
                    needed by applications that deal with the Internet.

homepage            http://www.cs.princeton.edu/~diego/professional/luasocket/

master_sites        http://luaforge.net/frs/download.php/2664/
checksums           md5     41445b138deb7bcfe97bff957503da8e \
                    sha1    5ce521fc5c6efb7c1eba7f36dfeafa9e4d745464 \
                    rmd160  24d7e4fb1c9cf0c3d94f8b36e82d494ae922e268
distname            luasocket-${version}

depends_lib         port:lua

livecheck.type      regex
livecheck.url       http://luaforge.net/frs/?group_id=23
livecheck.regex     {luasocket-([0-9.]+)\.tar\.gz}

patchfiles          patch-config.diff

use_configure       no

post-patch {
    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/config
}
