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