# -*- 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
github.setup diegonehab luasocket 4110e4125d
description The luasocket library extends lua with TCP, UDP, and DNS support
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://w3.impa.br/~diego/software/luasocket/
checksums rmd160 56ea9c789fcac0c8bc1665f0f7258d7ea9dfa98e \
sha256 caee7e37107df53e917105c7e6b73438e9337ab2b309a3790edfc022d881748f
depends_build path:bin/pkg-config:pkgconfig
# Old luaforge livecheck. For now, use github-livecheck, but maybe luaforge
# will be more up to date some day or other.
#livecheck.url http://luaforge.net/frs/?group_id=23
#livecheck.regex {luasocket-([0-9.]+)\.tar\.gz}
patchfiles patch-Makefiles.diff \
patch-src-usocket.c.diff \
reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/makefile
reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/src/makefile
reinplace "s|@CFLAGS@|${configure.cppflags} ${configure.cflags}|g" ${worksrcpath}/src/makefile
set lua_version "[exec -- ${prefix}/bin/pkg-config --variable V lua]"
system "cd ${worksrcpath} && make DEBUG=DEBUG macosx LUAV=${lua_version}"
set lua_version "[exec -- ${prefix}/bin/pkg-config --variable V lua]"
system "cd ${worksrcpath} && make DEBUG=DEBUG LUAV=${lua_version} DESTDIR=${destroot} PREFIX=${prefix} PLAT=macosx install-unix"
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
xinstall -m 644 {*}[glob ${worksrcpath}/doc/*] ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 ${worksrcpath}/LICENSE ${worksrcpath}/NEW \
${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}