# $Id: Portfile 36854 2008-05-16 21:12:25Z nox@macports.org $ PortSystem 1.0 name lua version 5.1.3 revision 3 categories lang platforms darwin maintainers pmq openmaintainer description powerful, lightweight programming language long_description Lua is a powerful, light-weight programming language \ designed for extending applications. Lua is also frequently \ used as a general-purpose, standalone language. homepage http://www.lua.org master_sites ${homepage}/ftp/ checksums sha1 89bc9f5a351402565b8077e8123327e7cd15f004 \ rmd160 1c5979dd4986057fef325aa2af0c872bbecab92e depends_lib port:readline build.target macosx test.run yes test.env DYLD_LIBRARY_PATH=./lib patchfiles patch-lua-5.1.3.diff post-patch { reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/src/luaconf.h reinplace "s|/man/man1|/share/man/man1|g" ${worksrcpath}/Makefile # for the pkgconfig file reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/etc/lua.pc } configure { reinplace -E "/^MYLDFLAGS=/s|\$| ${configure.ldflags}|" ${worksrcpath}/src/Makefile reinplace -E "/^CFLAGS=/s|\$| ${configure.cflags} ${configure.cppflags}|" ${worksrcpath}/src/Makefile } use_parallel_build yes destroot.target install INSTALL_TOP=${destroot}${prefix} post-destroot { xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} xinstall -m 0644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name} xinstall -m 0644 ${worksrcpath}/COPYRIGHT ${destroot}${prefix}/share/doc/${name} xinstall -m 0644 ${worksrcpath}/HISTORY ${destroot}${prefix}/share/doc/${name} xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/html foreach html [glob ${worksrcpath}/doc/*.html ${worksrcpath}/doc/*.gif] { xinstall -m 0644 ${html} ${destroot}${prefix}/share/doc/${name}/html } xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/test foreach test [glob ${worksrcpath}/test/README ${worksrcpath}/test/*.lua] { xinstall -m 0644 ${test} ${destroot}${prefix}/share/doc/${name}/test } xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig xinstall -m 0644 ${worksrcpath}/etc/lua.pc ${destroot}${prefix}/lib/pkgconfig/lua.pc } platform darwin 7 { depends_lib-delete port:readline patchfiles-append patch-readline_darwin7.diff }