Ticket #30450: Portfile.2

File Portfile.2, 4.3 KB (added by jjstickel@…, 13 years ago)

portfile for wxwidgets-python-devel

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
2# $Id: Portfile 75159 2011-01-17 02:00:53Z rmstonecipher@macports.org $
3
4PortSystem      1.0
5PortGroup       archcheck 1.0
6
7name            wxWidgets-python-devel
8conflicts       wxgtk wxWidgets wxWidgets-python
9version         2.9.2.4
10categories      graphics devel
11platforms       darwin
12maintainers     nomaintainer
13
14description     mature cross-platform C++ GUI framework
15long_description    wxWidgets is a mature open-source cross-platform C++ \
16    GUI framework for Mac OS, Unix, Linux, Windows. It can \
17    make use of a variety of native widget sets as well as \
18    its own widget set: Mac OS, GTK+, Motif, WIN32. \
19    wxWidgets will even run on embedded systems using \
20    Linux and X11.  This port version is meant to be in sync with py*-wxpython.
21
22homepage        http://www.wxwidgets.org/
23distname        wxWidgets
24master_sites    sourceforge:wxpython
25
26use_bzip2       yes
27
28distname        wxPython-src
29distfiles       ${distname}-${version}${extract.suffix}
30
31checksums           md5     8dae829b3bb3ccfe279d5d3948562c5f \
32                    sha1    de0c9f68feaf8ed6f2e1fd8f9015a15440b7665b \
33                    rmd160  e2e73bf382bc6408164343b40f59e1afdd40ff32
34
35depends_lib     port:jpeg \
36                port:tiff \
37                port:libpng \
38                port:zlib \
39                port:libiconv \
40                port:expat
41
42archcheck.files lib/libjpeg.dylib \
43                lib/libtiff.dylib \
44                lib/libpng.dylib \
45                lib/libz.dylib \
46                lib/libiconv.dylib \
47                lib/libexpat.dylib
48
49set worksrcdir  ${distname}-${version}/build
50
51extract.only    ${distname}-${version}${extract.suffix}
52
53patch.dir   ${worksrcpath}/..
54patchfiles  patch-configure-change_install_names.diff
55post-patch {
56    reinplace "s|@@MP_ARCH_FLAGS@@|[get_canonical_archflags]|g" ${worksrcpath}/../configure
57}
58
59configure.cmd       ../configure
60configure.ldflags   -L${build.dir}/lib -L${prefix}/lib
61configure.env-append CPP=${configure.cpp}
62configure.env-append CXXCPP=${configure.cpp}
63
64configure.args  --mandir=${prefix}/share/man \
65                --with-libiconv-prefix=${prefix} \
66                --with-libjpeg \
67                --with-libtiff \
68                --with-libpng \
69                --with-zlib \
70                --with-opengl \
71                --with-cocoa \
72                --without-sdl \
73                --disable-sdltest \
74                --enable-unicode \
75                --enable-display
76
77configure.ccache    no
78
79build.target
80use_parallel_build  yes
81
82platform darwin 11 {
83    # 'InsetRect' was not declared in this scope
84    macosx_deployment_target 10.6
85}
86
87#default_variants    +sdl
88
89variant universal {
90    configure.args-append   --enable-universal_binary \
91        --with-macosx-sdk=${configure.sdkroot}/ \
92        --with-macosx-version-min=${macosx_deployment_target}
93}
94
95variant monolithic description {build only one library} {
96    configure.args-append   --enable-monolithic
97}
98
99variant debug description {add debug info to libraries} {
100    configure.args-append   --enable-debug
101}
102
103variant sdl description {Use SDL for audio on Unix} { 
104    depends_lib-append          path:lib/pkgconfig/sdl.pc:libsdl
105    depends_lib-append          port:libsdl_mixer
106    configure.args-delete       --without-sdl
107    configure.args-append       --with-sdl
108} 
109     
110variant stdlib description {add support for various standard library features} { 
111    configure.args-append       --enable-stl \
112    --enable-std_containers \
113    --enable-std_iostreams \
114    --enable-std_string \
115    --enable-std_string_conv_in_wxstring
116} 
117
118post-destroot {
119    # this stuff not in wxwidgets-devel... will delete if no problems, JJS 10/27/11
120    #foreach c { ${contrib} } {
121    #    system "cd ${build.dir} && make -C contrib/src/${c} install ${destroot.destdir}"
122    #}
123    #xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
124    #reinplace "s|-L${build.dir}/lib||" ${destroot}${confscript}
125   
126    set confscript ${prefix}/lib/wx/config/osx_cocoa-unicode-2.9
127    ln -sf ${confscript} ${destroot}${prefix}/bin/wx-config
128}
129
130livecheck.type      regex
131livecheck.url       ${homepage}/downloads/
132livecheck.regex     Current Stable Release.*(2\\.\[0-9\]\\.\[0-9\]+)