Ticket #46621: Portfile-lua.diff

File Portfile-lua.diff, 2.7 KB (added by Schamschula (Marius Schamschula), 10 years ago)
  • Portfile

    old new  
    22# $Id: Portfile 118805 2014-04-11 07:02:47Z ryandesign@macports.org $
    33
    44PortSystem          1.0
     5replaced_by         lua53
     6PortGroup           obsolete 1.0
    57
    68name                lua
    7 conflicts           lua50
    8 version             5.2.3
    9 set branch          [join [lrange [split ${version} .] 0 1] .]
    10 categories          lang
    11 license             MIT
    12 platforms           darwin
    13 maintainers         nomaintainer
    14 description         powerful, lightweight programming language
    15 long_description    \
    16     Lua is a powerful, light-weight programming language designed for \
    17     extending applications. Lua is also frequently used as a general-purpose, \
    18     standalone language.
    19 
    20 homepage            http://www.lua.org/
    21 master_sites        ${homepage}ftp/
    22 
    23 checksums           rmd160  b8714669c8c0f8272104effd8a9675921ddb2fa5 \
    24                     sha256  13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d
    25 
    26 depends_lib         port:readline
    27 build.target        macosx
    28 
    29 test.run            yes
    30 test.env            DYLD_LIBRARY_PATH=./lib
    31 
    32 post-extract {
    33     xinstall -m 0644 -W ${filespath} COPYRIGHT lua.pc ${worksrcpath}
    34 }
    35 
    36 patchfiles          patch-Makefile.diff \
    37                     patch-src-Makefile.diff \
    38                     patch-src-luaconf.h.diff
    39 
    40 post-patch {
    41     reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile ${worksrcpath}/src/luaconf.h
    42     reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/Makefile ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile
    43     reinplace "s|@BRANCH@|${branch}|g" ${worksrcpath}/Makefile ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile
    44 }
    45 
    46 configure {
    47     reinplace -E "/^MYLDFLAGS=/s|\$| ${configure.ldflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile
    48     reinplace -E "/^CFLAGS=/s|\$| ${configure.cflags} ${configure.cppflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile
    49     reinplace "s|CC= .*\$|CC= ${configure.cc}|" ${worksrcpath}/src/Makefile
    50 }
    51 
    52 use_parallel_build  no
    53 
    54 destroot.target install INSTALL_TOP=${destroot}${prefix}
    55 post-destroot {
    56     set docdir ${prefix}/share/doc/${subport}
    57     xinstall -d -m 0755 ${destroot}${docdir}/html
    58     xinstall -m 0644 -W ${worksrcpath} COPYRIGHT README ${destroot}${docdir}
    59     foreach html [glob ${worksrcpath}/doc/*.html ${worksrcpath}/doc/*.gif] {
    60         xinstall -m 0644 ${html} ${destroot}${docdir}/html
    61     }
    62     xinstall -W ${worksrcpath} -m 0644 lua.pc ${destroot}${prefix}/lib/pkgconfig/
    63 }
    64 
    65 livecheck.type  regex
    66 livecheck.url   ${master_sites}
    67 livecheck.regex {lua-(\d+(?:\.\d+)*)}
     9version             5.3.0