[146368] trunk/dports/graphics
mojca at macports.org
mojca at macports.org
Sun Mar 6 08:27:05 PST 2016
Revision: 146368
https://trac.macports.org/changeset/146368
Author: mojca at macports.org
Date: 2016-03-06 08:27:05 -0800 (Sun, 06 Mar 2016)
Log Message:
-----------
wxWidgets-3.2: new wxWidgets 3.1.0
Added Paths:
-----------
trunk/dports/graphics/wxWidgets-3.2/
trunk/dports/graphics/wxWidgets-3.2/Portfile
trunk/dports/graphics/wxWidgets-3.2/files/
trunk/dports/graphics/wxWidgets-3.2/files/patch-configure.diff
trunk/dports/graphics/wxWidgets-3.2/files/patch-include-wx-defs.h.diff
trunk/dports/graphics/wxWidgets-3.2/files/patch-upstream.diff
Added: trunk/dports/graphics/wxWidgets-3.2/Portfile
===================================================================
--- trunk/dports/graphics/wxWidgets-3.2/Portfile (rev 0)
+++ trunk/dports/graphics/wxWidgets-3.2/Portfile 2016-03-06 16:27:05 UTC (rev 146368)
@@ -0,0 +1,115 @@
+# -*- 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
+# $Id$
+
+PortSystem 1.0
+PortGroup github 1.0
+PortGroup select 1.0
+PortGroup wxWidgets 1.0
+
+github.setup wxWidgets wxWidgets 3.1.0 v
+name wxWidgets-3.2
+
+set wxtype osx_cocoa
+
+if {${subport} eq ${name}} {
+ wxWidgets.use wxWidgets-3.2
+}
+set branch [join [lrange [split ${version} .] 0 1] .]
+
+categories graphics devel
+platforms darwin
+license wxwidgets-3.1
+maintainers mojca jwa openmaintainer
+
+description C++ framework for cross-platform GUI development
+long_description wxWidgets ${branch} is an open-source cross-platform C++ \
+ GUI framework for Mac OS, Unix, Linux, Windows.
+
+homepage http://www.wxwidgets.org/
+
+checksums rmd160 843b4b0b7d18b2a6ff7c7dd1c68ebd425e7318ef \
+ sha256 c2ad6b8f36be70b609f53dc29fdd8899f19c9ad4e963386cedc4a3396bb3e130
+
+dist_subdir wxWidgets/${version}
+worksrcdir ${distname}/build
+patch.dir ${worksrcpath}/..
+
+set selectdir ${workpath}/select
+select.group wxWidgets
+select.file ${selectdir}/${subport}
+
+depends_lib-append port:jpeg \
+ port:tiff \
+ port:libpng \
+ port:zlib \
+ port:libiconv \
+ port:expat
+
+depends_run port:wxWidgets-common \
+ port:wxWidgets_select
+
+patchfiles patch-configure.diff \
+ patch-include-wx-defs.h.diff \
+ patch-upstream.diff
+
+post-patch {
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${patch.dir}/configure
+
+ file mkdir ${selectdir}
+ system "echo \"${wxWidgets.wxdir}/wx-config\n${wxWidgets.wxdir}/wxrc-${branch}\" > ${select.file}"
+}
+
+configure.cmd ../configure
+configure.args --prefix=${wxWidgets.prefix} \
+ --with-libiconv-prefix=${prefix} \
+ --with-libjpeg \
+ --with-libtiff \
+ --with-libpng \
+ --with-zlib \
+ --with-opengl \
+ --with-cocoa \
+ --without-sdl \
+ --enable-aui \
+ --disable-sdltest \
+ --enable-display \
+ --enable-xrc \
+ --enable-graphics_ctx \
+ --with-macosx-sdk=no \
+ --with-macosx-version-min=no \
+ --disable-compat30
+# during the test period we could afford to disable compatibility to 3.0
+# to detect the problems earlier
+
+# notes:
+# --enable-unicode (already default)
+# --enable-cxx11 (figure out how to use this switch)
+
+if {[string match *clang* ${configure.cxx}]} {
+ configure.ldflags-append \
+ -stdlib=${configure.cxx_stdlib}
+}
+
+post-destroot {
+ set confscript ${wxWidgets.prefix}/lib/wx/config/${wxtype}-unicode-${branch}
+ ln -sf ${confscript} ${destroot}${wxWidgets.prefix}/bin/wx-config
+}
+
+variant universal {
+ set archs [join ${configure.universal_archs} ,]
+ # --disable-precomp-headers is automatically selected with cocoa, but not with gtk
+ # http://trac.wxwidgets.org/ticket/15454
+ configure.args-append --enable-universal_binary=${archs} \
+ --disable-precomp-headers
+}
+
+variant debug description {add debug info to libraries} {
+ configure.args-append --enable-debug
+}
+
+variant stdlib description {add support for various standard library features} {
+ configure.args-append --enable-stl \
+ --enable-std_containers \
+ --enable-std_iostreams \
+ --enable-std_string \
+ --enable-std_string_conv_in_wxstring
+}
Property changes on: trunk/dports/graphics/wxWidgets-3.2/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/graphics/wxWidgets-3.2/files/patch-configure.diff
===================================================================
--- trunk/dports/graphics/wxWidgets-3.2/files/patch-configure.diff (rev 0)
+++ trunk/dports/graphics/wxWidgets-3.2/files/patch-configure.diff 2016-03-06 16:27:05 UTC (rev 146368)
@@ -0,0 +1,53 @@
+This patch is needed for GTK to make sure that the port finds the right OpenGL library
+--- configure.orig
++++ configure
+@@ -20792,48 +20792,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+-SEARCH_INCLUDE="\
+- /usr/local/include \
+- /usr/local/X11/include \
+- /usr/local/include/X11 \
+- /usr/local/X11R7/include \
+- /usr/local/X11R6/include \
+- /usr/local/include/X11R7 \
+- /usr/local/include/X11R6 \
+- \
+- /usr/Motif-2.1/include \
+- /usr/Motif-1.2/include \
+- /usr/include/Motif1.2 \
+- \
+- /usr/dt/include \
+- /usr/openwin/include \
+- \
+- /usr/include/Xm \
+- \
+- /usr/X11R7/include \
+- /usr/X11R6/include \
+- /usr/X11R6.4/include \
+- \
+- /usr/include/X11R7 \
+- /usr/include/X11R6 \
+- \
+- /usr/X11/include \
+- /usr/include/X11 \
+- \
+- /usr/XFree86/include/X11 \
+- /usr/pkg/include \
+- \
+- /usr/local/X1R5/include \
+- /usr/local/include/X11R5 \
+- /usr/X11R5/include \
+- /usr/include/X11R5 \
+- \
+- /usr/local/X11R4/include \
+- /usr/local/include/X11R4 \
+- /usr/X11R4/include \
+- /usr/include/X11R4 \
+- \
+- /usr/openwin/share/include"
++SEARCH_INCLUDE="@@PREFIX@@/include"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libraries directories" >&5
+ $as_echo_n "checking for libraries directories... " >&6; }
Added: trunk/dports/graphics/wxWidgets-3.2/files/patch-include-wx-defs.h.diff
===================================================================
--- trunk/dports/graphics/wxWidgets-3.2/files/patch-include-wx-defs.h.diff (rev 0)
+++ trunk/dports/graphics/wxWidgets-3.2/files/patch-include-wx-defs.h.diff 2016-03-06 16:27:05 UTC (rev 146368)
@@ -0,0 +1,63 @@
+--- include/wx/defs.h.orig
++++ include/wx/defs.h
+@@ -392,36 +392,36 @@ typedef short int WXTYPE;
+ Since 4.9.2, g++ provides __has_include() but, unlike clang, refuses to
+ compile the C++11 headers in C++98 mode (and we are sure we use the
+ latter because we explicitly checked for C++11 above).
+- */
+- #if defined(__GNUC__) && !defined(__clang__)
+- #define wx_has_cpp11_include(h) 0
+- #else
+- #define wx_has_cpp11_include(h) __has_include(h)
+- #endif
+
+- #if !defined(HAVE_TYPE_TRAITS) && !defined(HAVE_TR1_TYPE_TRAITS)
+- #if wx_has_cpp11_include(<type_traits>)
+- #define HAVE_TYPE_TRAITS
+- #elif __has_include(<tr1/type_traits>)
+- #define HAVE_TR1_TYPE_TRAITS
++ Note that clang < 3.3 does not support the following syntax:
++ #define foo(h) __has_include(h)
++ #foo(<bar>)
++ */
++ #if defined(__GNUC__)
++ #if !defined(HAVE_TYPE_TRAITS) && !defined(HAVE_TR1_TYPE_TRAITS)
++ #if defined(__clang__) && __has_include(<type_traits>)
++ #define HAVE_TYPE_TRAITS
++ #elif __has_include(<tr1/type_traits>)
++ #define HAVE_TR1_TYPE_TRAITS
++ #endif
+ #endif
+- #endif
+
+- #if !defined(HAVE_STD_UNORDERED_MAP) && !defined(HAVE_TR1_UNORDERED_MAP)
+- #if wx_has_cpp11_include(<unordered_map>)
+- #define HAVE_STD_UNORDERED_MAP
+- #elif __has_include(<tr1/unordered_map>)
+- #define HAVE_TR1_UNORDERED_MAP
++ #if !defined(HAVE_STD_UNORDERED_MAP) && !defined(HAVE_TR1_UNORDERED_MAP)
++ #if defined(__clang__) && __has_include(<unordered_map>)
++ #define HAVE_STD_UNORDERED_MAP
++ #elif __has_include(<tr1/unordered_map>)
++ #define HAVE_TR1_UNORDERED_MAP
++ #endif
+ #endif
+- #endif
+
+- #if !defined(HAVE_STD_UNORDERED_SET) && !defined(HAVE_TR1_UNORDERED_SET)
+- #if wx_has_cpp11_include(<unordered_set>)
+- #define HAVE_STD_UNORDERED_SET
+- #elif __has_include(<tr1/unordered_set>)
+- #define HAVE_TR1_UNORDERED_SET
++ #if !defined(HAVE_STD_UNORDERED_SET) && !defined(HAVE_TR1_UNORDERED_SET)
++ #if defined(__clang__) && __has_include(<unordered_set>)
++ #define HAVE_STD_UNORDERED_SET
++ #elif __has_include(<tr1/unordered_set>)
++ #define HAVE_TR1_UNORDERED_SET
++ #endif
+ #endif
+- #endif
++ #endif /* defined(__GNUC__) */
+ #endif /* defined(__has_include) */
+
+ #endif /* __cplusplus */
Added: trunk/dports/graphics/wxWidgets-3.2/files/patch-upstream.diff
===================================================================
--- trunk/dports/graphics/wxWidgets-3.2/files/patch-upstream.diff (rev 0)
+++ trunk/dports/graphics/wxWidgets-3.2/files/patch-upstream.diff 2016-03-06 16:27:05 UTC (rev 146368)
@@ -0,0 +1,78 @@
+From cee3188c1abaa5b222c57b87cc94064e56921db8 Mon Sep 17 00:00:00 2001
+From: Vadim Zeitlin <vadim wxwidgets.org>
+Date: Mon, 29 Feb 2016 18:47:30 +0100
+Subject: [PATCH] Don't connect handler for wxEVT_TEXT_ENTER in wxComboCtrl
+ unnecessarily
+
+Connecting to wxEVT_TEXT_ENTER is not necessary if wxTE_PROCESS_ENTER style is
+not used was always useless and is actively harmful since the changes of
+5591a2009394c9bae43bcd2fa08f2fb51391cbc1 as it results in an assert failure
+now.
+
+Just don't do it unless we really want, and will get, these events.
+---
+diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp
+index 4ab9431..d451d68 100644
+--- src/common/combocmn.cpp.orig
++++ src/common/combocmn.cpp
+@@ -1100,9 +1100,12 @@ wxComboCtrlBase::CreateTextCtrl(int style)
+ m_text->Connect(id, wxEVT_TEXT,
+ wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
+ NULL, this);
+- m_text->Connect(id, wxEVT_TEXT_ENTER,
+- wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
+- NULL, this);
++ if ( style & wxTE_PROCESS_ENTER )
++ {
++ m_text->Connect(id, wxEVT_TEXT_ENTER,
++ wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent),
++ NULL, this);
++ }
+
+ m_text->SetHint(m_hintText);
+ }
+
+From ee486dba32d02c744ae4007940f41a5b24b8c574 Mon Sep 17 00:00:00 2001
+From: Vadim Zeitlin <vadim wxwidgets.org>
+Date: Mon, 29 Feb 2016 18:05:02 +0100
+Subject: [PATCH] Fix build error in wxOSX clang C++11 build for i386
+
+When building for i386 in C++11 mode clang warns about narrowing conversion
+from double to CGFloat (== float) in the initialization.
+
+Fix it by using explicit suffixes for the float literals.
+---
+diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp
+index 091c2c2..2d9cb96 100644
+--- src/osx/carbon/graphics.cpp.orig
++++ src/osx/carbon/graphics.cpp
+@@ -2276,7 +2276,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
+ {
+ CGFloat width = CTLineGetTypographicBounds(line, NULL, NULL, NULL);
+ CGFloat height = CTFontGetXHeight( font );
+- CGPoint points[] = { {0.0, height * 0.6}, {width, height * 0.6} };
++ CGPoint points[] = { {0.0, height * 0.6f}, {width, height * 0.6f} };
+ CGContextSetStrokeColorWithColor(m_cgContext, col);
+ CGContextSetShouldAntialias(m_cgContext, false);
+ CGContextSetLineWidth(m_cgContext, 1.0);
+
+From 173ecd77c4280e48541c33bdfe499985852935ba Mon Sep 17 00:00:00 2001
+From: Vadim Zeitlin <vadim wxwidgets.org>
+Date: Mon, 29 Feb 2016 16:12:53 +0100
+Subject: [PATCH] Fix clang -Winconsistent-missing-override in wxTextCtrl
+
+Add missing wxOVERRIDE for OnDynamicBind().
+---
+diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h
+index cd7a815..3414095 100644
+--- include/wx/textctrl.h.orig
++++ include/wx/textctrl.h
+@@ -746,7 +746,7 @@ class WXDLLIMPEXP_CORE wxTextCtrlBase : public wxControl,
+ // Override wxEvtHandler method to check for a common problem of binding
+ // wxEVT_TEXT_ENTER to a control without wxTE_PROCESS_ENTER style, which is
+ // never going to work.
+- virtual bool OnDynamicBind(wxDynamicEventTableEntry& entry);
++ virtual bool OnDynamicBind(wxDynamicEventTableEntry& entry) wxOVERRIDE;
+
+ // override streambuf method
+ #if wxHAS_TEXT_WINDOW_STREAM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160306/2798b5e1/attachment.html>
More information about the macports-changes
mailing list