Ticket #43462: luasocket-Portfile.diff

File luasocket-Portfile.diff, 2.5 KB (added by Ionic (Mihai Moldovan), 10 years ago)

Patch for updating lua-luasocket to version 3.0-rc1.

  • Portfile

    old new  
    44PortSystem 1.0
    55
    66name                lua-luasocket
    7 version             2.0.2
    8 revision            1
     7version             3.0_rc1
     8revision            0
    99categories          devel
    1010license             MIT
    1111platforms           darwin
     
    1919
    2020homepage            http://www.cs.princeton.edu/~diego/professional/luasocket/
    2121
    22 master_sites        http://luaforge.net/frs/download.php/2664/
    23 checksums           md5     41445b138deb7bcfe97bff957503da8e \
    24                     sha1    5ce521fc5c6efb7c1eba7f36dfeafa9e4d745464 \
    25                     rmd160  24d7e4fb1c9cf0c3d94f8b36e82d494ae922e268
    26 distname            luasocket-${version}
     22master_sites        https://github.com/diegonehab/luasocket/archive/
     23checksums           md5     08bd2f265b244eb4bf5c2c36bf89b759 \
     24                    sha1    aff9122b26c01487c06a32133df78c1506af350f \
     25                    rmd160  27357eee7e52f091609f45a0b0fb7e04e9ea2bd8
     26distname            "v[regsub {_} $version {-}]"
     27worksrcdir          "luasocket-[regsub {_} $version {-}]"
    2728
    2829depends_lib         port:lua
     30depends_build       path:bin/pkg-config:pkgconfig
    2931
    3032livecheck.type      regex
    3133livecheck.url       http://luaforge.net/frs/?group_id=23
    3234livecheck.regex     {luasocket-([0-9.]+)\.tar\.gz}
    3335
    34 patchfiles          patch-config.diff
     36patchfiles          patch-Makefiles.diff
    3537
    3638use_configure       no
    3739
    3840post-patch {
    39     reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/config
     41    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/src/makefile
     42    reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/src/makefile
     43    reinplace "s|@CFLAGS@|${configure.cppflags} ${configure.cflags}|g" ${worksrcpath}/src/makefile
     44}
     45
     46build {
     47    set lua_version "[exec -- ${prefix}/bin/pkg-config --variable V lua]"
     48    system "cd ${worksrcpath} && make DEBUG=DEBUG macosx LUAV=${lua_version}"
     49}
     50
     51destroot {
     52    set lua_version "[exec -- ${prefix}/bin/pkg-config --variable V lua]"
     53    system "cd ${worksrcpath} && make DEBUG=DEBUG LUAV=${lua_version} DESTDIR=${destroot} PREFIX=${prefix} PLAT=macosx install-unix"
    4054}
    4155
    4256post-destroot {
    4357    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
    4458    xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
    45    
     59
    4660    eval xinstall -m 644 [glob ${worksrcpath}/doc/*] ${destroot}${prefix}/share/doc/${name}
    4761    xinstall -m 644 ${worksrcpath}/LICENSE ${worksrcpath}/NEW \
    4862        ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}