source: trunk/dports/graphics/wxWidgets-python/Portfile

Last change on this file was 134561, checked in by jeremyhu@…, 2 years ago

misc: Revbump dependents of freeglut

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 KB
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 134561 2015-03-30 08:46:40Z ryandesign@macports.org $
3
4PortSystem      1.0
5
6name            wxWidgets-python
7conflicts       wxgtk wxWidgets
8version         2.8.12.0
9revision        4
10categories      graphics devel
11license         wxwidgets
12platforms       darwin
13maintainers     nomaintainer
14
15description     mature cross-platform C++ GUI framework
16long_description    wxWidgets is a mature open-source cross-platform C++ \
17    GUI framework for Mac OS, Unix, Linux, Windows. It can \
18    make use of a variety of native widget sets as well as \
19    its own widget set: Mac OS, GTK+, Motif, WIN32. \
20    wxWidgets will even run on embedded systems using \
21    Linux and X11.  This port version is meant to be in sync with py*-wxpython.
22
23homepage        http://www.wxwidgets.org/
24distname        wxWidgets
25master_sites    sourceforge:wxpython
26
27use_bzip2       yes
28
29distname        wxPython-src
30distfiles       ${distname}-${version}${extract.suffix}
31checksums       md5     402e0b81e06f596d849e221a7a76acc6 \
32                sha1    f9ce806dcb5517beb6e3d2ee0ecbf8e569b7f8e4 \
33                rmd160  6420a8e6e59386b344ac058435a4ae6693c2c04b
34
35depends_build \
36    port:pkgconfig
37depends_lib \
38    port:jpeg \
39    port:tiff \
40    port:libpng \
41    port:zlib \
42    port:libiconv \
43    port:expat \
44    port:libsdl \
45    port:libsdl_mixer
46
47set worksrcdir  ${distname}-${version}/build
48
49extract.only    ${distname}-${version}${extract.suffix}
50
51configure.cmd       ../configure
52configure.ldflags   -L${build.dir}/lib -L${prefix}/lib
53configure.args      --mandir=${prefix}/share/man \
54                    --with-libiconv-prefix=${prefix} \
55                    --with-libjpeg \
56                    --with-libtiff \
57                    --with-libpng \
58                    --with-zlib \
59                    --with-sdl \
60                    --with-opengl \
61                    --disable-sdltest \
62                    --enable-unicode \
63                    --enable-display \
64                    --enable-monolithic
65
66set contrib         "gizmos stc ogl"
67set installtype     release
68
69build.target
70
71universal_variant   no
72use_parallel_build  no
73
74variant carbon conflicts gtk description {use carbon} {
75    supported_archs i386 ppc
76    configure.args-append --with-mac
77    configure.cflags-append -arch ${configure.build_arch}
78    configure.ldflags-append -arch ${configure.build_arch}
79    configure.cxxflags-append -arch ${configure.build_arch}
80    configure.cppflags-append -arch ${configure.build_arch}
81    configure.objcflags-append -arch ${configure.build_arch}
82}
83variant gtk conflicts carbon description {use gtk} {
84    depends_lib-append    port:gtk2 \
85                          port:mesa \
86                          port:libGLU \
87                          port:freeglut
88    depends_lib-delete    port:libsdl \
89                          port:libsdl_mixer
90    configure.args-delete --with-sdl
91    configure.args-append --with-gtk
92}
93variant nonmonolithic description {build libraries separately} {
94    configure.args-delete   --enable-monolithic
95}
96variant debug description {add debug info to libraries} {
97    configure.args-append   --enable-debug
98    set installtype debug
99}
100if {![variant_isset carbon]} {
101    default_variants-append +gtk
102}
103
104post-configure {
105    if {[variant_isset gtk]} {
106        # for some reason, 'configure --with-gtk' does not specify to link the X11 opengl libs
107        # not sure what happens if quartz variant of gtk2 is used
108        reinplace "s|EXTRALIBS_OPENGL = |EXTRALIBS_OPENGL = -lGL -lGLU -lglut|g" ${worksrcpath}/Makefile
109    }
110}
111post-build {
112    foreach c { ${contrib} } {
113        system "cd ${build.dir} && make -C contrib/src/${c}"
114    }
115}
116post-destroot {
117    foreach c { ${contrib} } {
118        system "cd ${build.dir} && make -C contrib/src/${c} install ${destroot.destdir}"
119    }
120    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
121    #xinstall -m 644 -W ${workpath}/${distname}-${version} \
122    #    install-mac.txt install-mgl.txt install-motif.txt \
123    #    INSTALL-OS2.txt install-x11.txt readme-cocoa.txt \
124    #    readme-gtk.txt readme-mac.txt \
125    #    readme-mgl.txt readme-motif.txt readme-x11.txt \
126    #    ${destroot}${prefix}/share/doc/${name}
127    if {[variant_isset carbon]} {
128        set confscript ${prefix}/lib/wx/config/mac-unicode-${installtype}-2.8
129    }
130    if {[variant_isset gtk]} {
131        set confscript ${prefix}/lib/wx/config/gtk2-unicode-${installtype}-2.8
132    }
133    reinplace "s|-L${build.dir}/lib||" ${destroot}${confscript}
134    ln -sf ${confscript} ${destroot}${prefix}/bin/wx-config
135}
136
137livecheck.type      regex
138livecheck.url       ${homepage}/downloads/
139livecheck.regex     Current Stable Release.*(2\\.\[0-9\]\\.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.