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?
This commit is contained in:
Collin Anderson 2016-09-17 13:10:47 -04:00 committed by Wayne Stambaugh
parent 0719f8d214
commit f5f0ab094f
1 changed files with 30 additions and 0 deletions

View File

@ -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 <QuickTime/QuickTime.h>
#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 <QuickTime/QuickTime.h>
#endif
+#endif
CGColorSpaceRef wxMacGetGenericRGBColorSpace();
CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf );