Ticket #34830: Portfile.diff
File Portfile.diff, 4.6 KB (added by slewsys (Andrew L. Moore), 12 years ago) |
---|
-
Portfile
old new 1 # $Id: Portfile 82708 2011-08-18 20:17:40Z ryandesign@macports.org $ 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 3 # $Id: Portfile 82709 2011-08-18 20:19:13Z ryandesign@macports.org $ 2 4 3 5 PortSystem 1.0 4 6 5 name lua 6 conflicts lua50 7 set compat_version 5.1 8 version ${compat_version}.5 7 name lua52 8 conflicts lua lua50 9 version 5.2.1 9 10 revision 0 10 11 categories lang 11 12 license MIT … … 19 20 20 21 homepage http://www.lua.org 21 22 master_sites ${homepage}/ftp/ 23 distname lua-${version} 22 24 23 checksums ${distfiles}\24 sha1 2b11c8e60306efb7f0734b747588f57995493db7\25 rmd160 c867c8364295d3e4fb4e4d8ebb27fa2b2312cdef25 checksums md5 ae08f641b45d737d12d30291a5e5f6e3 \ 26 sha1 6bb1b0a39b6a5484b71a83323c690154f86b2021 \ 27 rmd160 365eb77561b1f4f92c29f6d7f455f41e2b8393e0 26 28 27 29 depends_lib port:readline 28 30 build.target macosx … … 30 32 test.run yes 31 33 test.env DYLD_LIBRARY_PATH=./lib 32 34 33 patchfiles patch-lua-5.1.4-3 \ 34 patch-Makefile.diff \ 35 patch-src_Makefile.diff 35 patchfiles patch-Makefile.diff \ 36 patch-src_Makefile.diff \ 37 patch-lua-${version}.pc.diff 38 patch.args -f 36 39 37 40 post-patch { 38 reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/luaconf.h 39 reinplace "s|/man/man1|/share/man/man1|g" ${worksrcpath}/Makefile 40 41 # reinplace %VERSION% and %COMPAT_VERSION% after applying patch-dlopen.diff 42 reinplace "s|%VERSION%|${version}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile 43 reinplace "s|%COMPAT_VERSION%|${compat_version}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile 44 45 # reinplace %PREFIX% to fix @executable_path, cf. ticket no. 28726 46 reinplace "s|%PREFIX%|${prefix}|g" ${worksrcpath}/src/Makefile 47 48 # for the pkgconfig file 49 reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/etc/lua.pc 50 } 51 52 configure { 53 reinplace -E "/^MYLDFLAGS=/s|\$| ${configure.ldflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile 54 reinplace -E "/^CFLAGS=/s|\$| ${configure.cflags} ${configure.cppflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile 55 reinplace "s|CC= .*\$|CC= ${configure.cc}|" ${worksrcpath}/src/Makefile 41 reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/lua-${version}.pc 42 reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/Makefile 43 reinplace "s|@CC@|${configure.cc}|" ${worksrcpath}/src/Makefile 44 reinplace "s|@CFLAGS@|${configure.cflags} [get_canonical_archflags]|" \ 45 ${worksrcpath}/src/Makefile 46 reinplace "s|@LDFLAGS@|[get_canonical_archflags]|" \ 47 ${worksrcpath}/src/Makefile 56 48 } 57 49 58 50 use_parallel_build no 51 use_configure no 52 build.target macosx 59 53 60 destroot.target install INSTALL_TOP=${destroot}${prefix}61 54 post-destroot { 55 xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig 56 xinstall -W ${worksrcpath} -m 0644 lua-${version}.pc \ 57 ${destroot}${prefix}/lib/pkgconfig/lua-${version}.pc 62 58 xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} 63 xinstall -m 0644 -W ${worksrcpath} COPYRIGHT HISTORY README ${destroot}${prefix}/share/doc/${name} 59 xinstall -W ${worksrcpath} -m 0644 README \ 60 ${destroot}${prefix}/share/doc/${name} 64 61 xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/html 65 foreach html [glob ${worksrcpath}/doc/*.html ${worksrcpath}/doc/*.gif] { 66 xinstall -m 0644 ${html} ${destroot}${prefix}/share/doc/${name}/html 62 foreach html [glob doc/*.html doc/*.gif] { 63 xinstall -W ${worksrcpath} -m 0644 ${html} \ 64 ${destroot}${prefix}/share/doc/${name}/html 67 65 } 68 xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/test69 foreach test [glob ${worksrcpath}/test/README ${worksrcpath}/test/*.lua] {70 xinstall -m 0644 ${test} ${destroot}${prefix}/share/doc/${name}/test71 }72 xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig73 xinstall -m 0644 ${worksrcpath}/etc/lua.pc ${destroot}${prefix}/lib/pkgconfig/lua.pc74 66 } 75 67 76 68 livecheck.type regex 77 69 livecheck.url ${master_sites} 78 livecheck.regex {lua-(\d+(?:\.\d+)*)}70 livecheck.regex "lua-(5.2(?:\\.\\d+)*)${extract.suffix}"