# -*- 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 # $Id: Portfile 149098 2016-05-30 08:18:08Z jeremyhu@macports.org $ PortSystem 1.0 PortGroup github 1.0 github.setup diegonehab luasocket 4110e4125d name lua-luasocket version 3.0-rc1 revision 2 categories devel license MIT platforms darwin maintainers nomaintainer 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_lib port:lua 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.type regex #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 \ patch-src-udp.c.diff use_configure no post-patch { 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 } build { set lua_version "[exec -- ${prefix}/bin/pkg-config --variable V lua]" system "cd ${worksrcpath} && make DEBUG=DEBUG macosx LUAV=${lua_version}" } destroot { 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" } post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name} eval 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} file copy ${worksrcpath}/etc ${worksrcpath}/samples ${worksrcpath}/test \ ${destroot}${prefix}/share/examples/${name} }