source: trunk/dports/lang/lua/Portfile @ 32257

Last change on this file since 32257 was 32257, checked in by ryandesign@…, 13 years ago

All openmaintainer ports: ${prefix} already begins with a slash,
so there's no reason to put a slash before the ${prefix} variable
when using it.

See r32256 for the equivalent change for nomaintainer ports.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.5 KB
Line 
1# $Id: Portfile 32257 2007-12-23 09:39:21Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    lua
6version                 5.1.2
7categories              lang
8platforms               darwin
9maintainers             pmq@macports.org openmaintainer
10
11description             powerful, lightweight programming language
12long_description        Lua is a powerful, light-weight programming language \
13                        designed for extending applications. Lua is also frequently \
14                        used as a general-purpose, standalone language.
15
16homepage                http://www.lua.org
17master_sites            ${homepage}/ftp/
18checksums               sha1 8a460d2d7e70e93cb72bf3d584405464763cb5f0 \
19                        rmd160 01350549b3a05838925dae1a666700bb9f1bc01a
20
21depends_lib             port:readline
22
23patchfiles              patch-use_readline.diff
24build.target            macosx
25
26test.run                yes
27test.env                DYLD_LIBRARY_PATH=./lib
28
29post-patch {
30        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile
31        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/src/luaconf.h
32        reinplace "s|/man/man1|/share/man/man1|g" ${worksrcpath}/Makefile
33
34        # to complement the use_readline patch 
35        reinplace "s|MYLDFLAGS=|MYLDFLAGS=-L${prefix}/lib|" ${worksrcpath}/src/Makefile
36        # for the pkgconfig file
37        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/etc/lua.pc
38}
39
40# "use_configure no" nullifies the configure.universal_* hooks
41configure {
42        if {[variant_isset universal]} {
43                reinplace "s|MYCFLAGS=|MYCFLAGS=\"${configure.universal_cflags} \"|g" ${worksrcpath}/src/Makefile
44                reinplace "s|MYLDFLAGS=|MYLDFLAGS=${configure.universal_ldflags} |g" ${worksrcpath}/src/Makefile
45        }
46}
47
48destroot.target install INSTALL_TOP=${destroot}${prefix}
49post-destroot {
50        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
51        xinstall -m 0644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
52        xinstall -m 0644 ${worksrcpath}/COPYRIGHT ${destroot}${prefix}/share/doc/${name}
53        xinstall -m 0644 ${worksrcpath}/HISTORY ${destroot}${prefix}/share/doc/${name}
54        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/html
55        foreach html [glob ${worksrcpath}/doc/*.html ${worksrcpath}/doc/*.gif] {
56                xinstall -m 0644 ${html} ${destroot}${prefix}/share/doc/${name}/html
57        }
58        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/test
59        foreach test [glob ${worksrcpath}/test/README ${worksrcpath}/test/*.lua] {
60                xinstall -m 0644 ${test} ${destroot}${prefix}/share/doc/${name}/test
61        }
62        xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig
63        xinstall -m 0644 ${worksrcpath}/etc/lua.pc ${destroot}${prefix}/lib/pkgconfig/lua.pc
64}
65
66platform darwin 7 {
67        depends_lib-delete port:readline
68        patchfiles-delete  patch-use_readline.diff
69}
Note: See TracBrowser for help on using the repository browser.