|
| 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 active_variants 1.1 |
| 5 | +PortGroup cmake 1.1 |
| 6 | +PortGroup github 1.0 |
| 7 | +PortGroup legacysupport 1.1 |
| 8 | +PortGroup select 1.0 |
| 9 | +PortGroup wxWidgets 1.0 |
| 10 | + |
| 11 | +# strnlen |
| 12 | +legacysupport.newest_darwin_requires_legacy 10 |
| 13 | + |
| 14 | +# remember to bump version of wxWidgets-common |
| 15 | +github.setup wxWidgets wxWidgets 3.2.6 v |
| 16 | +github.tarball_from releases |
| 17 | +revision 0 |
| 18 | + |
| 19 | +name wxgtk-3.2 |
| 20 | + |
| 21 | +set installname wxGTK |
| 22 | +set wxtype gtk3 |
| 23 | +wxWidgets.use wxGTK-3.2 |
| 24 | + |
| 25 | +set branch [join [lrange [split ${version} .] 0 1] .] |
| 26 | + |
| 27 | +categories graphics devel |
| 28 | +license wxwidgets-3.1 |
| 29 | +maintainers {@barracuda156 gmail.com:vital.had} openmaintainer |
| 30 | + |
| 31 | +description C++ framework for cross-platform GUI development |
| 32 | +long_description wxWidgets ${branch} is an open-source cross-platform C++ \ |
| 33 | + GUI framework for Mac OS, Unix, Linux, Windows. |
| 34 | + |
| 35 | +homepage https://www.wxwidgets.org |
| 36 | + |
| 37 | +distname wxWidgets-${version} |
| 38 | +use_bzip2 yes |
| 39 | + |
| 40 | +checksums rmd160 d3563f36e842053eb1611e9bf532c3d6833bc0e8 \ |
| 41 | + sha256 939e5b77ddc5b6092d1d7d29491fe67010a2433cf9b9c0d841ee4d04acb9dce7 \ |
| 42 | + size 27528560 |
| 43 | + |
| 44 | +dist_subdir wxWidgets/${version} |
| 45 | + |
| 46 | +set selectdir ${workpath}/select |
| 47 | +select.group wxWidgets |
| 48 | +select.file ${selectdir}/${subport} |
| 49 | + |
| 50 | +compiler.c_standard 2011 |
| 51 | +compiler.cxx_standard 2011 |
| 52 | +compiler.thread_local_storage yes |
| 53 | + |
| 54 | +depends_build-append \ |
| 55 | + path:bin/pkg-config:pkgconfig |
| 56 | + |
| 57 | +depends_lib-append path:lib/pkgconfig/cairo.pc:cairo \ |
| 58 | + port:curl \ |
| 59 | + port:expat \ |
| 60 | + path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \ |
| 61 | + port:jbigkit \ |
| 62 | + port:libGLU \ |
| 63 | + port:libiconv \ |
| 64 | + path:include/turbojpeg.h:libjpeg-turbo \ |
| 65 | + port:libpng \ |
| 66 | + port:libsdl2 \ |
| 67 | + port:libsdl2_mixer \ |
| 68 | + port:mesa \ |
| 69 | + port:pcre2 \ |
| 70 | + port:tiff \ |
| 71 | + port:zlib |
| 72 | + |
| 73 | +require_active_variants path:lib/pkgconfig/cairo.pc:cairo x11 |
| 74 | +require_active_variants gtk3 x11 |
| 75 | + |
| 76 | +depends_run port:wxWidgets-common \ |
| 77 | + port:wxWidgets_select |
| 78 | + |
| 79 | +post-patch { |
| 80 | + file mkdir ${selectdir} |
| 81 | + system "echo \"${wxWidgets.wxdir}/wx-config\n${wxWidgets.wxdir}/wxrc-${branch}\" > ${select.file}" |
| 82 | +} |
| 83 | + |
| 84 | +configure.args-append \ |
| 85 | + -DCMAKE_INSTALL_PREFIX=${wxWidgets.prefix} \ |
| 86 | + -DwxBUILD_COMPATIBILITY=3.0 \ |
| 87 | + -DwxBUILD_MONOLITHIC=OFF \ |
| 88 | + -DwxBUILD_OPTIMISE=ON \ |
| 89 | + -DwxBUILD_SHARED=ON \ |
| 90 | + -DwxBUILD_TESTS=OFF \ |
| 91 | + -DwxCXX_STANDARD_DEFAULT=11 \ |
| 92 | + -DwxBUILD_TOOLKIT=gtk3 \ |
| 93 | + -DwxUSE_AUI=ON \ |
| 94 | + -DwxUSE_CAIRO_DEFAULT=ON \ |
| 95 | + -DwxUSE_COMPILER_TLS=ON \ |
| 96 | + -DwxUSE_DEBUGREPORT=OFF \ |
| 97 | + -DwxUSE_DISPLAY=ON \ |
| 98 | + -DwxUSE_EXPAT=sys \ |
| 99 | + -DwxUSE_GEOMETRY=ON \ |
| 100 | + -DwxUSE_GLCANVAS_EGL=OFF \ |
| 101 | + -DwxUSE_GUI=ON \ |
| 102 | + -DwxUSE_HTML=ON \ |
| 103 | + -DwxUSE_JOYSTICK=OFF \ |
| 104 | + -DwxUSE_LIBICONV=sys \ |
| 105 | + -DwxUSE_LIBJPEG=sys \ |
| 106 | + -DwxUSE_LIBLZMA=OFF \ |
| 107 | + -DwxUSE_LIBNOTIFY=OFF \ |
| 108 | + -DwxUSE_LIBPNG=sys \ |
| 109 | + -DwxUSE_LIBSDL=OFF \ |
| 110 | + -DwxUSE_LIBTIFF=sys \ |
| 111 | + -DwxUSE_MIMETYPE=ON \ |
| 112 | + -DwxUSE_OPENGL=ON \ |
| 113 | + -DwxUSE_POSTSCRIPT=ON \ |
| 114 | + -DwxUSE_PRINTF_POS_PARAMS=ON \ |
| 115 | + -DwxUSE_REGEX=sys \ |
| 116 | + -DwxUSE_REPRODUCIBLE_BUILD=OFF \ |
| 117 | + -DwxUSE_RICHTEXT=ON \ |
| 118 | + -DwxUSE_SECRETSTORE=ON \ |
| 119 | + -DwxUSE_SOCKETS=ON \ |
| 120 | + -DwxUSE_SPELLCHECK=OFF \ |
| 121 | + -DwxUSE_STC=OFF \ |
| 122 | + -DwxUSE_STDPATHS=ON \ |
| 123 | + -DwxUSE_THREADS=ON \ |
| 124 | + -DwxUSE_UNICODE=ON \ |
| 125 | + -DwxUSE_UNSAFE_WXSTRING_CONV=OFF \ |
| 126 | + -DwxUSE_WEBREQUEST=ON \ |
| 127 | + -DwxUSE_WEBREQUEST_CURL_DEFAULT=OFF \ |
| 128 | + -DwxUSE_WEBREQUEST_URLSESSION=ON \ |
| 129 | + -DwxUSE_WEBVIEW=OFF \ |
| 130 | + -DwxUSE_XLOCALE=ON \ |
| 131 | + -DwxUSE_XRC=ON \ |
| 132 | + -DwxUSE_ZLIB=sys |
| 133 | + |
| 134 | +# https://github.com/wxWidgets/wxWidgets/issues/23475 |
| 135 | +platform darwin { |
| 136 | + patchfiles-append \ |
| 137 | + 0001-cfstring-fix.patch \ |
| 138 | + 0002-dirctrlg.cpp-fix.patch \ |
| 139 | + 0003-display-fix.patch \ |
| 140 | + 0004-mimetype-fix.patch \ |
| 141 | + 0005-evtloop_cf-fix.patch \ |
| 142 | + 0006-defs.h-fix.patch \ |
| 143 | + 0007-intl.cpp-fix.patch \ |
| 144 | + 0008-webrequest_urlsession.h-fix.patch \ |
| 145 | + 0009-utils_base.mm-fix.patch \ |
| 146 | + 0010-toolkit.cmake-fix-options.patch |
| 147 | + |
| 148 | + if {${os.platform} < 16} { |
| 149 | + patchfiles-append \ |
| 150 | + 1001-Revert-Replace-deprecated-LSGetApplicationForInfo.patch \ |
| 151 | + 1002-Revert-Remove-Cocoa-type-declarations-from-wx-defs.h.patch \ |
| 152 | + 1003-Revert-some-breakages.patch \ |
| 153 | + 1004-utilsunx-no-memset_s.patch |
| 154 | + |
| 155 | + configure.args-replace \ |
| 156 | + -DwxBUILD_OPTIMISE=ON -DwxBUILD_OPTIMISE=OFF \ |
| 157 | + -DwxUSE_STDPATHS=ON -DwxUSE_STDPATHS=OFF \ |
| 158 | + -DwxUSE_WEBREQUEST_CURL_DEFAULT=OFF -DwxUSE_WEBREQUEST_CURL_DEFAULT=ON \ |
| 159 | + -DwxUSE_WEBREQUEST_URLSESSION=ON -DwxUSE_WEBREQUEST_URLSESSION=OFF \ |
| 160 | + -DwxUSE_XLOCALE=ON -DwxUSE_XLOCALE=OFF |
| 161 | + } |
| 162 | + |
| 163 | + configure.ldflags-append \ |
| 164 | + -undefined dynamic_lookup |
| 165 | +} |
| 166 | + |
| 167 | +post-destroot { |
| 168 | + foreach dylib [ exec find ${destroot}${wxWidgets.prefix}/lib -name "\*.dylib" ] { |
| 169 | + regsub ":$" ${dylib} "" destroot_dylib_path |
| 170 | + regsub ${destroot} ${destroot_dylib_path} "" dylib_path |
| 171 | + system "install_name_tool -id ${dylib_path} ${destroot_dylib_path}" |
| 172 | + |
| 173 | + system "install_name_tool -change ${prefix}/lib/libwx_baseu-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_baseu-3.2.0.dylib \ |
| 174 | + ${destroot_dylib_path}" |
| 175 | + system "install_name_tool -change ${prefix}/lib/libwx_baseu_net-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_baseu_net-3.2.0.dylib \ |
| 176 | + ${destroot_dylib_path}" |
| 177 | + system "install_name_tool -change ${prefix}/lib/libwx_baseu_xml-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_baseu_xml-3.2.0.dylib \ |
| 178 | + ${destroot_dylib_path}" |
| 179 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_adv-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_adv-3.2.0.dylib \ |
| 180 | + ${destroot_dylib_path}" |
| 181 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_aui-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_aui-3.2.0.dylib \ |
| 182 | + ${destroot_dylib_path}" |
| 183 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_core-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_core-3.2.0.dylib \ |
| 184 | + ${destroot_dylib_path}" |
| 185 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_gl-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_gl-3.2.0.dylib \ |
| 186 | + ${destroot_dylib_path}" |
| 187 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_html-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_html-3.2.0.dylib \ |
| 188 | + ${destroot_dylib_path}" |
| 189 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_media-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_media-3.2.0.dylib \ |
| 190 | + ${destroot_dylib_path}" |
| 191 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_propgrid-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_propgrid-3.2.0.dylib \ |
| 192 | + ${destroot_dylib_path}" |
| 193 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_ribbon-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_ribbon-3.2.0.dylib \ |
| 194 | + ${destroot_dylib_path}" |
| 195 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_richtext-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_richtext-3.2.0.dylib \ |
| 196 | + ${destroot_dylib_path}" |
| 197 | + system "install_name_tool -change ${prefix}/lib/libwx_gtk3u_xrc-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_gtk3u_xrc-3.2.0.dylib \ |
| 198 | + ${destroot_dylib_path}" |
| 199 | + |
| 200 | + system "install_name_tool -change ${prefix}/lib/libwx_baseu-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_baseu-3.2.0.dylib \ |
| 201 | + ${destroot}${wxWidgets.prefix}/bin/wxrc-3.2" |
| 202 | + system "install_name_tool -change ${prefix}/lib/libwx_baseu_xml-3.2.0.dylib ${wxWidgets.prefix}/lib/libwx_baseu_xml-3.2.0.dylib \ |
| 203 | + ${destroot}${wxWidgets.prefix}/bin/wxrc-3.2" |
| 204 | + } |
| 205 | + |
| 206 | + set confscript ${wxWidgets.prefix}/lib/wx/config/${wxtype}-unicode-${branch} |
| 207 | + ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config |
| 208 | +} |
| 209 | + |
| 210 | +github.livecheck.regex {([0-9.]+)} |
0 commit comments