1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup github 1.0 |
---|
5 | PortGroup select 1.0 |
---|
6 | PortGroup wxWidgets 1.0 |
---|
7 | |
---|
8 | # Instead of backports a huge number of patches to support the newer macOS versions, |
---|
9 | # simply fetch a newer version from git (master) until 3.1.1 comes out. |
---|
10 | # This is a development port anyway and generally not used as dependency. |
---|
11 | |
---|
12 | #github.setup wxWidgets wxWidgets 3.1.0 v |
---|
13 | github.setup wxWidgets wxWidgets c70abf2 |
---|
14 | version 3.1.0-git-20161212 |
---|
15 | livecheck.version v3.1.0 |
---|
16 | name wxWidgets-3.2 |
---|
17 | wxWidgets.use wxWidgets-3.2 |
---|
18 | |
---|
19 | set wxtype osx_cocoa |
---|
20 | |
---|
21 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
22 | |
---|
23 | categories graphics devel |
---|
24 | platforms darwin |
---|
25 | license wxwidgets-3.1 |
---|
26 | maintainers mojca jwa openmaintainer |
---|
27 | |
---|
28 | description C++ framework for cross-platform GUI development |
---|
29 | long_description wxWidgets ${branch} is an open-source cross-platform C++ \ |
---|
30 | GUI framework for Mac OS, Unix, Linux, Windows. |
---|
31 | |
---|
32 | homepage http://www.wxwidgets.org/ |
---|
33 | |
---|
34 | checksums rmd160 5e4c71d92ad991386259458f8b10589fb8c12643 \ |
---|
35 | sha256 e5d95b11467a41ca3e2e51e77ebc5ab63741aa29bbf76e60772a58069a36a92f |
---|
36 | |
---|
37 | dist_subdir wxWidgets/${version} |
---|
38 | worksrcdir ${distname}/build |
---|
39 | patch.dir ${worksrcpath}/.. |
---|
40 | |
---|
41 | set selectdir ${workpath}/select |
---|
42 | select.group wxWidgets |
---|
43 | select.file ${selectdir}/${subport} |
---|
44 | |
---|
45 | depends_lib-append port:jpeg \ |
---|
46 | port:tiff \ |
---|
47 | port:libpng \ |
---|
48 | port:zlib \ |
---|
49 | port:libiconv \ |
---|
50 | port:expat |
---|
51 | |
---|
52 | depends_run port:wxWidgets-common \ |
---|
53 | port:wxWidgets_select |
---|
54 | |
---|
55 | patchfiles patch-configure.diff |
---|
56 | |
---|
57 | post-patch { |
---|
58 | reinplace "s|@@PREFIX@@|${prefix}|g" ${patch.dir}/configure |
---|
59 | |
---|
60 | file mkdir ${selectdir} |
---|
61 | system "echo \"${wxWidgets.wxdir}/wx-config\n${wxWidgets.wxdir}/wxrc-${branch}\" > ${select.file}" |
---|
62 | } |
---|
63 | |
---|
64 | configure.cmd ../configure |
---|
65 | configure.args --prefix=${wxWidgets.prefix} \ |
---|
66 | --with-libiconv-prefix=${prefix} \ |
---|
67 | --with-libjpeg \ |
---|
68 | --with-libtiff \ |
---|
69 | --with-libpng \ |
---|
70 | --with-zlib \ |
---|
71 | --with-opengl \ |
---|
72 | --with-cocoa \ |
---|
73 | --without-sdl \ |
---|
74 | --enable-aui \ |
---|
75 | --disable-sdltest \ |
---|
76 | --enable-display \ |
---|
77 | --enable-xrc \ |
---|
78 | --enable-graphics_ctx \ |
---|
79 | --with-macosx-sdk=no \ |
---|
80 | --with-macosx-version-min=no \ |
---|
81 | --disable-compat30 |
---|
82 | # during the test period we could afford to disable compatibility to 3.0 |
---|
83 | # to detect the problems earlier |
---|
84 | |
---|
85 | # notes: |
---|
86 | # --enable-unicode (already default) |
---|
87 | # --enable-cxx11 (figure out how to use this switch) |
---|
88 | |
---|
89 | if {[string match *clang* ${configure.cxx}]} { |
---|
90 | configure.ldflags-append \ |
---|
91 | -stdlib=${configure.cxx_stdlib} |
---|
92 | } |
---|
93 | |
---|
94 | post-destroot { |
---|
95 | set confscript ${wxWidgets.prefix}/lib/wx/config/${wxtype}-unicode-${branch} |
---|
96 | ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config |
---|
97 | } |
---|
98 | |
---|
99 | variant universal { |
---|
100 | set archs [join ${configure.universal_archs} ,] |
---|
101 | # --disable-precomp-headers is automatically selected with cocoa, but not with gtk |
---|
102 | # http://trac.wxwidgets.org/ticket/15454 |
---|
103 | configure.args-append --enable-universal_binary=${archs} \ |
---|
104 | --disable-precomp-headers |
---|
105 | } |
---|
106 | |
---|
107 | variant debug description {add debug info to libraries} { |
---|
108 | configure.args-append --enable-debug |
---|
109 | } |
---|
110 | |
---|
111 | variant stdlib description {add support for various standard library features} { |
---|
112 | configure.args-append --enable-stl \ |
---|
113 | --enable-std_containers \ |
---|
114 | --enable-std_iostreams \ |
---|
115 | --enable-std_string \ |
---|
116 | --enable-std_string_conv_in_wxstring |
---|
117 | } |
---|