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$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup archcheck 1.0 |
---|
6 | |
---|
7 | name wxWidgets-python |
---|
8 | conflicts wxgtk wxWidgets |
---|
9 | version 2.8.10.1 |
---|
10 | revision 2 |
---|
11 | categories graphics devel |
---|
12 | platforms darwin |
---|
13 | maintainers nomaintainer |
---|
14 | |
---|
15 | description mature cross-platform C++ GUI framework |
---|
16 | long_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 | |
---|
23 | homepage http://www.wxwidgets.org/ |
---|
24 | distname wxWidgets |
---|
25 | master_sites sourceforge:wxpython |
---|
26 | |
---|
27 | use_bzip2 yes |
---|
28 | |
---|
29 | distname wxPython-src |
---|
30 | distfiles ${distname}-${version}${extract.suffix} |
---|
31 | checksums md5 65d5ef166f23fe8b4c67f58df164f93e \ |
---|
32 | sha1 6598fbafd979a91f20100171fa23a91779f6dc62 \ |
---|
33 | rmd160 bb606046d140623041b988e64ab268ced9aa958f |
---|
34 | |
---|
35 | depends_lib \ |
---|
36 | port:jpeg \ |
---|
37 | port:tiff \ |
---|
38 | port:libpng \ |
---|
39 | port:zlib \ |
---|
40 | port:libiconv \ |
---|
41 | port:expat \ |
---|
42 | path:lib/pkgconfig/sdl.pc:libsdl \ |
---|
43 | port:libsdl_mixer |
---|
44 | |
---|
45 | archcheck.files lib/libjpeg.dylib \ |
---|
46 | lib/libtiff.dylib \ |
---|
47 | lib/libpng.dylib \ |
---|
48 | lib/libz.dylib \ |
---|
49 | lib/libiconv.dylib \ |
---|
50 | lib/libexpat.dylib \ |
---|
51 | lib/libSDL.dylib \ |
---|
52 | lib/libSDL_mixer.dylib |
---|
53 | |
---|
54 | set worksrcdir ${distname}-${version}/build |
---|
55 | |
---|
56 | extract.only ${distname}-${version}${extract.suffix} |
---|
57 | |
---|
58 | patchfiles changeset_r61009.diff |
---|
59 | patch.dir ${workpath}/${distname}-${version} |
---|
60 | patch.pre_args -p4 |
---|
61 | |
---|
62 | configure.cmd ../configure |
---|
63 | configure.ldflags -L${build.dir}/lib -L${prefix}/lib |
---|
64 | configure.args --mandir=${prefix}/share/man \ |
---|
65 | --with-libiconv-prefix=${prefix} \ |
---|
66 | --with-libjpeg \ |
---|
67 | --with-libtiff \ |
---|
68 | --with-libpng \ |
---|
69 | --with-zlib \ |
---|
70 | --with-sdl \ |
---|
71 | --with-opengl \ |
---|
72 | --disable-sdltest \ |
---|
73 | --enable-unicode \ |
---|
74 | --enable-display \ |
---|
75 | --enable-monolithic \ |
---|
76 | --enable-graphics_ctx |
---|
77 | |
---|
78 | set contrib "gizmos stc ogl" |
---|
79 | set installtype release |
---|
80 | |
---|
81 | build.target |
---|
82 | |
---|
83 | universal_variant no |
---|
84 | use_parallel_build no |
---|
85 | |
---|
86 | variant carbon conflicts gtk description {use carbon} { |
---|
87 | supported_archs i386 ppc |
---|
88 | configure.args-append --with-mac |
---|
89 | configure.cflags-append -arch ${configure.build_arch} |
---|
90 | configure.ldflags-append -arch ${configure.build_arch} |
---|
91 | configure.cxxflags-append -arch ${configure.build_arch} |
---|
92 | configure.cppflags-append -arch ${configure.build_arch} |
---|
93 | configure.objcflags-append -arch ${configure.build_arch} |
---|
94 | } |
---|
95 | variant gtk conflicts carbon description {use gtk} { |
---|
96 | depends_lib-append port:gtk2 |
---|
97 | depends_lib-append port:mesa |
---|
98 | depends_lib-delete path:lib/pkgconfig/sdl.pc:libsdl |
---|
99 | depends_lib-delete port:libsdl_mixer |
---|
100 | archcheck.files-delete lib/libSDL.dylib \ |
---|
101 | lib/libSDL_mixer.dylib |
---|
102 | configure.args-delete --with-sdl |
---|
103 | configure.args-append --with-gtk |
---|
104 | } |
---|
105 | variant nonmonolithic description {build libraries separately} { |
---|
106 | configure.args-delete --enable-monolithic |
---|
107 | } |
---|
108 | variant debug description {add debug info to libraries} { |
---|
109 | configure.args-append --enable-debug |
---|
110 | set installtype debug |
---|
111 | } |
---|
112 | if {![variant_isset carbon]} { |
---|
113 | default_variants-append +gtk |
---|
114 | } |
---|
115 | |
---|
116 | post-configure { |
---|
117 | if {[variant_isset gtk]} { |
---|
118 | # for some reason, 'configure --with-gtk' does not specify to link the X11 opengl libs |
---|
119 | # not sure what happens if quartz variant of gtk2 is used |
---|
120 | reinplace "s|EXTRALIBS_OPENGL = |EXTRALIBS_OPENGL = -lGL -lGLU -lglut|g" ${worksrcpath}/Makefile |
---|
121 | } |
---|
122 | } |
---|
123 | post-build { |
---|
124 | foreach c { ${contrib} } { |
---|
125 | system "cd ${build.dir} && make -C contrib/src/${c}" |
---|
126 | } |
---|
127 | } |
---|
128 | post-destroot { |
---|
129 | foreach c { ${contrib} } { |
---|
130 | system "cd ${build.dir} && make -C contrib/src/${c} install ${destroot.destdir}" |
---|
131 | } |
---|
132 | xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} |
---|
133 | #xinstall -m 644 -W ${workpath}/${distname}-${version} \ |
---|
134 | # install-mac.txt install-mgl.txt install-motif.txt \ |
---|
135 | # INSTALL-OS2.txt install-x11.txt readme-cocoa.txt \ |
---|
136 | # readme-gtk.txt readme-mac.txt \ |
---|
137 | # readme-mgl.txt readme-motif.txt readme-x11.txt \ |
---|
138 | # ${destroot}${prefix}/share/doc/${name} |
---|
139 | if {[variant_isset carbon]} { |
---|
140 | set confscript ${prefix}/lib/wx/config/mac-unicode-${installtype}-2.8 |
---|
141 | } |
---|
142 | if {[variant_isset gtk]} { |
---|
143 | set confscript ${prefix}/lib/wx/config/gtk2-unicode-${installtype}-2.8 |
---|
144 | } |
---|
145 | reinplace "s|-L${build.dir}/lib||" ${destroot}${confscript} |
---|
146 | ln -sf ${confscript} ${destroot}${prefix}/bin/wx-config |
---|
147 | } |
---|
148 | |
---|
149 | livecheck.type regex |
---|
150 | livecheck.url ${homepage}/downloads/ |
---|
151 | livecheck.regex Current Stable Release.*(2\\.\[0-9\]\\.\[0-9\]+) |
---|