source: trunk/dports/devel/lua-luasocket/Portfile

Last change on this file was 149098, checked in by jeremyhu@…, 18 months ago

lua-luasocket: Leopard build fix (#51519)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1# -*- 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
2# $Id: Portfile 149098 2016-05-30 08:18:08Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        diegonehab luasocket 4110e4125d
8name                lua-luasocket
9version             3.0-rc1
10revision            2
11categories          devel
12license             MIT
13platforms           darwin
14maintainers         nomaintainer
15
16description         The luasocket library extends lua with TCP, UDP, and DNS support
17long_description    LuaSocket is a Lua extension library that is composed by two parts: \
18                    a C core that provides support for the TCP and UDP transport layers, \
19                    and a set of Lua modules that add support for functionality commonly \
20                    needed by applications that deal with the Internet.
21
22homepage            http://w3.impa.br/~diego/software/luasocket/
23
24checksums           rmd160  56ea9c789fcac0c8bc1665f0f7258d7ea9dfa98e \
25                    sha256  caee7e37107df53e917105c7e6b73438e9337ab2b309a3790edfc022d881748f
26
27depends_lib         port:lua
28depends_build       path:bin/pkg-config:pkgconfig
29
30# Old luaforge livecheck. For now, use github-livecheck, but maybe luaforge
31# will be more up to date some day or other.
32#livecheck.type      regex
33#livecheck.url       http://luaforge.net/frs/?group_id=23
34#livecheck.regex     {luasocket-([0-9.]+)\.tar\.gz}
35
36patchfiles          patch-Makefiles.diff \
37                    patch-src-usocket.c.diff \
38                    patch-src-udp.c.diff
39
40use_configure       no
41
42post-patch {
43    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/makefile
44    reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/src/makefile
45    reinplace "s|@CFLAGS@|${configure.cppflags} ${configure.cflags}|g" ${worksrcpath}/src/makefile
46}
47
48build {
49    set lua_version "[exec -- ${prefix}/bin/pkg-config --variable V lua]"
50    system "cd ${worksrcpath} && make DEBUG=DEBUG macosx LUAV=${lua_version}"
51}
52
53destroot {
54    set lua_version "[exec -- ${prefix}/bin/pkg-config --variable V lua]"
55    system "cd ${worksrcpath} && make DEBUG=DEBUG LUAV=${lua_version} DESTDIR=${destroot} PREFIX=${prefix} PLAT=macosx install-unix"
56}
57
58post-destroot {
59    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
60    xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
61
62    eval xinstall -m 644 [glob ${worksrcpath}/doc/*] ${destroot}${prefix}/share/doc/${name}
63    xinstall -m 644 ${worksrcpath}/LICENSE ${worksrcpath}/NEW \
64        ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
65    file copy ${worksrcpath}/etc ${worksrcpath}/samples ${worksrcpath}/test \
66        ${destroot}${prefix}/share/examples/${name}
67}
Note: See TracBrowser for help on using the repository browser.