Ticket #52951: wxWidgets-3.2.Portfile

File wxWidgets-3.2.Portfile, 4.1 KB (added by mojca (Mojca Miklavec), 7 years ago)

A Portfile for wxWidgets 3.1.0 from the latest git master, should hopefully work on 10.12

Line 
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
3PortSystem          1.0
4PortGroup           github          1.0
5PortGroup           select          1.0
6PortGroup           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
13github.setup        wxWidgets wxWidgets c70abf2
14version             3.1.0-git-20161212
15livecheck.version   v3.1.0
16name                wxWidgets-3.2
17wxWidgets.use       wxWidgets-3.2
18
19set wxtype          osx_cocoa
20
21set branch          [join [lrange [split ${version} .] 0 1] .]
22
23categories          graphics devel
24platforms           darwin
25license             wxwidgets-3.1
26maintainers         mojca jwa openmaintainer
27
28description         C++ framework for cross-platform GUI development
29long_description    wxWidgets ${branch} is an open-source cross-platform C++ \
30                    GUI framework for Mac OS, Unix, Linux, Windows.
31
32homepage            http://www.wxwidgets.org/
33
34checksums           rmd160  5e4c71d92ad991386259458f8b10589fb8c12643 \
35                    sha256  e5d95b11467a41ca3e2e51e77ebc5ab63741aa29bbf76e60772a58069a36a92f
36
37dist_subdir         wxWidgets/${version}
38worksrcdir          ${distname}/build
39patch.dir           ${worksrcpath}/..
40
41set selectdir       ${workpath}/select
42select.group        wxWidgets
43select.file         ${selectdir}/${subport}
44
45depends_lib-append  port:jpeg \
46                    port:tiff \
47                    port:libpng \
48                    port:zlib \
49                    port:libiconv \
50                    port:expat
51
52depends_run         port:wxWidgets-common \
53                    port:wxWidgets_select
54
55patchfiles          patch-configure.diff
56
57post-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
64configure.cmd       ../configure
65configure.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
89if {[string match *clang* ${configure.cxx}]} {
90    configure.ldflags-append \
91                    -stdlib=${configure.cxx_stdlib}
92}
93
94post-destroot {
95    set confscript ${wxWidgets.prefix}/lib/wx/config/${wxtype}-unicode-${branch}
96    ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config
97}
98
99variant 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
107variant debug description {add debug info to libraries} {
108    configure.args-append   --enable-debug
109}
110
111variant 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}