Ticket #11472: Portfile

File Portfile, 2.0 KB (added by afb@…, 18 years ago)

dports/cross/wxmsw/Portfile

Line 
1# $Id: Portfile $
2
3PortSystem              1.0
4name                    wxmsw
5version                 2.8.0
6categories              cross
7maintainers             nomaintainer@macports.org
8description             The wxWidgets GUI toolkit with Win32 bindings
9long_description        \
10        A C++ package for platform independent software development
11
12homepage                http://wxwidgets.org/
13platforms               darwin
14master_sites    sourceforge:wxwindows
15distname                wxMSW-${version}
16checksums               md5 3909971f3a8e86bf4a1a796a7e461357
17use_bzip2               yes
18
19# Parameters for this port.
20set crossgcc-target i386-mingw32
21
22depends_lib             port:i386-mingw32-gcc port:i386-mingw32-w32api port:dos2unix
23
24configure.env   LDFLAGS="-L${prefix}/${crossgcc-target}/lib" \
25                                CPPFLAGS="-I${prefix}/${crossgcc-target}/include -D__WIN95__"
26configure.args  --host=i386-mingw32 --target=mingw32 \
27                                --bindir=${prefix}/${crossgcc-target}/bin \
28                                --libdir=${prefix}/${crossgcc-target}/lib \
29                                --includedir=${prefix}/${crossgcc-target}/include \
30                                --with-msw --with-libpng --with-libjpeg --with-libtiff \
31                                --with-zlib
32
33post-extract {
34        system "dos2unix ${worksrcpath}/configure"
35        system "chmod +x ${worksrcpath}/configure"
36        system "dos2unix ${worksrcpath}/config.sub"
37        system "dos2unix ${worksrcpath}/config.guess"
38        system "dos2unix ${worksrcpath}/src/expat/configure"
39        system "chmod +x ${worksrcpath}/src/expat/configure"
40        system "dos2unix ${worksrcpath}/src/expat/expat_config.h.in"
41        system "dos2unix ${worksrcpath}/src/expat/conftools/config.sub"
42        system "dos2unix ${worksrcpath}/src/expat/conftools/config.guess"
43}
44
45post-destroot {
46        xinstall -m 755 -d ${destroot}/${prefix}/share/doc/${name}
47        eval xinstall -m 644 [glob ${worksrcpath}/*.txt] \
48                ${destroot}/${prefix}/share/doc/${name}
49}
50
51variant opengl {
52        configure.args-append   --with-opengl
53}
54
55post-destroot {
56        system "dos2unix ${destroot}/${prefix}/${crossgcc-target}/lib/wx/config/*"
57        system "chmod +x ${destroot}/${prefix}/${crossgcc-target}/lib/wx/config/*"
58
59        xinstall -m 755 -d ${destroot}/${prefix}/bin
60        file rename ${destroot}/${prefix}/${crossgcc-target}/bin/wx-config \
61                    ${destroot}/${prefix}/bin/wx-config
62}
63