# $Id$ PortSystem 1.0 name lua50 version 5.0.3 categories lang maintainers simon openmaintainer description powerful, light-weight 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, stand-alone language. platforms darwin homepage http://www.lua.org master_sites ${homepage}/ftp/ checksums md5 feee27132056de2949ce499b0ef4c480 distname lua-${version} depends_lib port:readline pre-fetch { ui_msg "****************************************************************" ui_msg "* *" ui_msg "* Notice: You can't install both lua and lua50! If you already *" ui_msg "* have lua installed, please deactivate it first. *" ui_msg "* *" ui_msg "****************************************************************" } patchfiles patch-config \ patch-Makefile post-patch { reinplace s|@PREFIX@|${prefix}| ${worksrcpath}/config reinplace s|@DESTROOT@|${destroot}| ${worksrcpath}/config } build.target all dylib dylibbin destroot.target install dylibinstall post-destroot { xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} xinstall -W ${worksrcpath} -m 0644 README ${destroot}${prefix}/share/doc/${name} xinstall -W ${worksrcpath} -m 0644 COPYRIGHT ${destroot}${prefix}/share/doc/${name} xinstall -W ${worksrcpath} -m 0644 HISTORY ${destroot}${prefix}/share/doc/${name} xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/html foreach html [glob doc/*.html doc/*.gif] { xinstall -W ${worksrcpath} -m 0644 ${html} ${destroot}${prefix}/share/doc/${name}/html } xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/test foreach test [glob test/README test/*.lua] { xinstall -W ${worksrcpath} -m 0644 ${test} ${destroot}${prefix}/share/doc/${name}/test } } test.run yes test.env DYLD_LIBRARY_PATH=./lib livecheck.check regex livecheck.url ${master_sites} livecheck.regex "lua-(5.0(?:\\.\\d+)*)${extract.suffix}" use_parallel_build no