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 | PortSystem 1.0 |
---|
4 | |
---|
5 | name lua |
---|
6 | conflicts lua50, lua51 |
---|
7 | set compat_version 5.2 |
---|
8 | version ${compat_version}.0 |
---|
9 | revision 0 |
---|
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 ${distfiles} \ |
---|
24 | md5 f1ea831f397214bae8a265995ab1a93e \ |
---|
25 | sha1 08f84c355cdd646f617f09cebea48bd832415829 \ |
---|
26 | rmd160 6153bddd57493490b72e700cc99135432bf653f0 |
---|
27 | |
---|
28 | depends_lib port:readline |
---|
29 | build.target macosx |
---|
30 | |
---|
31 | test.run yes |
---|
32 | test.env DYLD_LIBRARY_PATH=./lib |
---|
33 | |
---|
34 | patchfiles patch-Makefile.diff \ |
---|
35 | patch-src_Makefile.diff |
---|
36 | |
---|
37 | 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% |
---|
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 | |
---|
49 | configure { |
---|
50 | reinplace -E "/^MYLDFLAGS=/s|\$| ${configure.ldflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile |
---|
51 | reinplace -E "/^CFLAGS=/s|\$| ${configure.cflags} ${configure.cppflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile |
---|
52 | reinplace "s|CC= .*\$|CC= ${configure.cc}|" ${worksrcpath}/src/Makefile |
---|
53 | } |
---|
54 | |
---|
55 | use_parallel_build no |
---|
56 | |
---|
57 | destroot.target install INSTALL_TOP=${destroot}${prefix} |
---|
58 | post-destroot { |
---|
59 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} |
---|
60 | xinstall -m 0644 -W ${worksrcpath} README ${destroot}${prefix}/share/doc/${name} |
---|
61 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/html |
---|
62 | foreach html [glob ${worksrcpath}/doc/*.html ${worksrcpath}/doc/*.gif] { |
---|
63 | xinstall -m 0644 ${html} ${destroot}${prefix}/share/doc/${name}/html |
---|
64 | } |
---|
65 | xinstall -m 0644 ${filespath}/lua.pc ${destroot}${prefix}/lib/pkgconfig |
---|
66 | } |
---|
67 | |
---|
68 | livecheck.type regex |
---|
69 | livecheck.url ${master_sites} |
---|
70 | livecheck.regex {lua-(\d+(?:\.\d+)*)} |
---|