From f5f0ab094f42565a65d8aec6fb631c657eda92f5 Mon Sep 17 00:00:00 2001 From: Collin Anderson Date: Sat, 17 Sep 2016 13:10:47 -0400 Subject: [PATCH] wxWidgets OSX Sierra 10.12 SDK patch. OSX Sierra has removed QuickTime entirely (because Apple needs to break at least one thing every major OS revision). This prevents wxWidgets from compiling at all, and as of right now, there is only a workaround, but a true upstream fix will require rewriting portions of wx to use AVKit, which is more or less the replacement for QuickTime, instead. KiCad doesn't use any parts of wx involved, so the work around seems to be fine for us. I am using the latest commit of KiCad on 10.12 as I write this, with this patch applied, and I'm not having any problems (at least new ones anyway). The workaround is this patch (which is not a direct copy of the upstream fix, which simply removes the include entirely. I made it where if this patch gets applied, it won't effect anything except when being built against the 10.12 SDK). Additionally, wxWidgets configure must be given the --disable-mediactrl flag. This is a temporary workaround, but as far as I know, KiCad doesn't use that control? --- patches/wxwidgets-3.0.2_macosx_sierra.patch | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 patches/wxwidgets-3.0.2_macosx_sierra.patch diff --git a/patches/wxwidgets-3.0.2_macosx_sierra.patch b/patches/wxwidgets-3.0.2_macosx_sierra.patch new file mode 100644 index 0000000000..be0ee7bb6e --- /dev/null +++ b/patches/wxwidgets-3.0.2_macosx_sierra.patch @@ -0,0 +1,30 @@ +diff --git src/osx/carbon/dataobj.cpp src/osx/carbon/dataobj.cpp +index c03c6a1..c40c1ce 100644 +--- src/osx/carbon/dataobj.cpp ++++ src/osx/carbon/dataobj.cpp +@@ -30,8 +30,10 @@ + #include "wx/osx/private.h" + + #if wxOSX_USE_COCOA_OR_CARBON ++#ifndef __MAC_10_12 + #include + #endif ++#endif + + // ---------------------------------------------------------------------------- + // wxDataFormat +diff --git src/osx/core/bitmap.cpp src/osx/core/bitmap.cpp +index 3c61c17..32cbdb7 100644 +--- src/osx/core/bitmap.cpp ++++ src/osx/core/bitmap.cpp +@@ -36,8 +36,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) + #endif + + #ifndef __WXOSX_IPHONE__ ++#ifndef __MAC_10_12 + #include + #endif ++#endif + + CGColorSpaceRef wxMacGetGenericRGBColorSpace(); + CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf );