Ticket #11453: Portfile

File Portfile, 2.7 KB (added by afb@…, 17 years ago)

dports/graphics/wxlua/Portfile

Line 
1# $Id$
2
3PortSystem 1.0
4
5name                    wxlua
6version                 2.8.0.0
7categories              graphics devel
8platforms               darwin freebsd
9maintainers             nomaintainer@macports.org
10description             Lua bindings for wxWidgets
11long_description        wxLua is a lua scripting language wrapper around the \
12                                wxWidgets cross-platform GUI library. It consists of an \
13                                executable for running standalone wxLua scripts and a \
14                                library for extending C++ programs with a fast, small, \
15                                fully embeddable scripting language.
16
17homepage                http://wxlua.sourceforge.net/
18master_sites            sourceforge:wxlua
19use_bzip2               yes
20
21checksums               ${name}-${version}${extract.suffix} \
22                                        md5 f086c00f001ecf18f7a03cbb1a8023db \
23                                ${name}-${version}${extract.suffix} \
24                                        sha1 617fd810bfe7ad3400c3d90264dc31af5312f144 \
25                                ${name}-${version}${extract.suffix} \
26                                        rmd160 135013b055dcd89a2da62d74836a6a415136734f
27
28depends_lib             port:wxstedit \
29                                port:lua
30
31worksrcdir              wxLua
32
33patchfiles              patch-setfile-path \
34                                patch-use-joystick \
35                                patch-locale-h
36post-patch              { copy "${filespath}/wxlua.r" "${worksrcpath}/art/wxlua.r" }
37
38configure.args          --mandir=${prefix}/share/man \
39                                --with-wx-prefix=${prefix} --with-lua-prefix=${prefix} \
40                                --enable-wxbindstc --enable-luamodule
41
42post-destroot {
43        # this bin conflicts with the "lua" port:
44        delete "${destroot}${prefix}/bin/lua"
45}
46
47default_variants        +aqua
48
49variant aqua description "Use the wxMac port of wxWidgets" {
50
51depends_lib-append      port:wxWidgets
52
53post-destroot {
54        set appPath /Applications/MacPorts/wxLua
55        xinstall -d -m 0755 ${destroot}${appPath}
56
57        # for wxMac, we delete the programs and use bundles
58        delete "${destroot}${prefix}/bin/wxlua"
59        delete "${destroot}${prefix}/bin/wxluacan"
60        delete "${destroot}${prefix}/bin/wxluaedit"
61        delete "${destroot}${prefix}/bin/wxluafreeze"
62        copy "${worksrcpath}/apps/wxLua.app" "${destroot}${appPath}"
63        copy "${worksrcpath}/apps/wxLuaCan.app" "${destroot}${appPath}"
64        copy "${worksrcpath}/apps/wxLuaEdit.app" "${destroot}${appPath}"
65        copy "${worksrcpath}/apps/wxLuaFreeze.app" "${destroot}${appPath}"
66
67        # provide a symbolic link to the wxLua sample programs
68        ln -sf "${prefix}/share/wxlua/samples" "${destroot}${appPath}/Samples"
69
70        # set up a wrapper so that you can call "wxlua *.wx.lua"
71        xinstall -m 0755 "${filespath}/wxlua.sh" "${destroot}${prefix}/bin/wxlua"
72        # set up a wrapper so that you can call "wxluaedit" too
73        xinstall -m 0755 "${filespath}/wxluaedit.sh" "${destroot}${prefix}/bin/wxluaedit"
74
75        # remove some stuff that is unused with wxMac port
76        delete "${destroot}/${prefix}/share/applications/wxlua.desktop"
77        delete "${destroot}/${prefix}/share/mime/packages/wxlua.xml"
78        delete "${destroot}/${prefix}/share/pixmaps/wxlualogo.xpm"
79}
80
81}
82
83variant x11 description "Use the wxGTK port of wxWidgets" {
84
85depends_lib-append      port:wxgtk
86
87}