a project to simplify installation of open source software
on Mac OS X and Darwin
# $Id: Portfile 23008 2007-03-21 20:30:54Z pmq@macports.org $
PortSystem 1.0
name lua
version 5.1.1
revision 2
categories lang
platforms darwin
maintainers anselmg@t-online.de pmq@macports.org
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 be13878ceef8e1ee7a4201261f0adf09f89f1005 \
rmd160 0b9cc31cca1a0f4c2ebb62f177dc157677953a4c
depends_lib port:readline
patchfiles patch-use_readline.diff
use_configure no
build.target macosx
test.run yes
test.env DYLD_LIBRARY_PATH=./lib
post-patch {
reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile
reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/src/luaconf.h
# to complement the use_readline patch
reinplace "s|MYLDFLAGS=|MYLDFLAGS=-L${prefix}/lib|" ${worksrcpath}/src/Makefile
}
destroot.target install INSTALL_TOP=${destroot}/${prefix}
post-destroot {
cd ${worksrcpath}
xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
xinstall -m 0644 README ${destroot}${prefix}/share/doc/${name}
xinstall -m 0644 COPYRIGHT ${destroot}${prefix}/share/doc/${name}
xinstall -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 -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 -m 0644 ${test} ${destroot}${prefix}/share/doc/${name}/test
}
}
variant static {
build.target all
destroot.target install INSTALL_TOP=${destroot}/${prefix}
test.env
}
platform darwin 7 {
depends_lib.delete port:readline
patchfiles.delete patch-use_readline.diff
}