wxmac: backport upstream fixes for 10.10
This includes all of the change sets from the upstream wxwidgets project that correctly build for 10.10, as well as 10.9 (and earlier.) These changes are currently accepted in the upstream trunk, but will not be available until the next release is cut (which will probably be a non-trivial amount of time after 10.10 releases.) References: http://trac.wxwidgets.org/ticket/16329 http://trac.wxwidgets.org/changeset/76744 http://trac.wxwidgets.org/changeset/76743 (Note - The original patch attached to ticket 16329 above should be ignored.) Closes Homebrew/homebrew#31531. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
e792431788
commit
fab5713ef1
1 changed files with 143 additions and 0 deletions
143
Formula/wxmac.rb
143
Formula/wxmac.rb
|
@ -17,6 +17,32 @@ class Wxmac < Formula
|
|||
depends_on "libpng"
|
||||
depends_on "libtiff"
|
||||
|
||||
# Patches for 3.0.1 source release to reference the correct dispatch types
|
||||
# regardless of whether built for OS X 10.10 or 10.9 (and earlier...)
|
||||
#
|
||||
# Patch derived from ticket comments and final changesets below:
|
||||
#
|
||||
# http://trac.wxwidgets.org/ticket/16329
|
||||
# http://trac.wxwidgets.org/changeset/76744
|
||||
# http://trac.wxwidgets.org/changeset/76743
|
||||
#
|
||||
# NOTE: Revisit with next upstream release; changes already in upstream trunk
|
||||
|
||||
# Patch Changeset 76744
|
||||
# http://trac.wxwidgets.org/changeset/76744
|
||||
patch :p3 do
|
||||
url "http://trac.wxwidgets.org/changeset/76744?format=diff&new=7674"
|
||||
sha1 "5cd1536d2494ef0b4d21f03799b0ac024572ae31"
|
||||
end
|
||||
|
||||
# Patch Changeset 76743
|
||||
#
|
||||
# This is embedded because all but the last file is patchable with the changeset
|
||||
# checked into the upstream trunk (webview_webkit.mm). The version of that file
|
||||
# in trunk had changed enough that the patch cannot match any of the hunks to
|
||||
# their corresponding line numbers in the 3.0.2 release train source distribution.
|
||||
patch :DATA
|
||||
|
||||
def install
|
||||
# need to set with-macosx-version-min to avoid configure defaulting to 10.5
|
||||
# need to enable universal binary build in order to build all x86_64
|
||||
|
@ -63,3 +89,120 @@ class Wxmac < Formula
|
|||
system "make install"
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
|
||||
diff -ur a/include/wx/defs.h b/include/wx/defs.h
|
||||
--- a/include/wx/defs.h
|
||||
+++ b/include/wx/defs.h
|
||||
@@ -3169,13 +3169,20 @@
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(UIEvent);
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(NSSet);
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(EAGLContext);
|
||||
+DECLARE_WXCOCOA_OBJC_CLASS(UIWebView);
|
||||
|
||||
typedef WX_UIWindow WXWindow;
|
||||
typedef WX_UIView WXWidget;
|
||||
typedef WX_EAGLContext WXGLContext;
|
||||
typedef WX_NSString* WXGLPixelFormat;
|
||||
+typedef WX_UIWebView OSXWebViewPtr;
|
||||
|
||||
-#endif
|
||||
+#endif
|
||||
+
|
||||
+#if wxOSX_USE_COCOA_OR_CARBON
|
||||
+DECLARE_WXCOCOA_OBJC_CLASS(WebView);
|
||||
+typedef WX_WebView OSXWebViewPtr;
|
||||
+#endif
|
||||
|
||||
#endif /* __WXMAC__ */
|
||||
|
||||
diff -ur a/include/wx/html/webkit.h b/include/wx/html/webkit.h
|
||||
--- a/include/wx/html/webkit.h
|
||||
+++ b/include/wx/html/webkit.h
|
||||
@@ -18,7 +18,6 @@
|
||||
#endif
|
||||
|
||||
#include "wx/control.h"
|
||||
-DECLARE_WXCOCOA_OBJC_CLASS(WebView);
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Web Kit Control
|
||||
@@ -107,7 +106,7 @@
|
||||
wxString m_currentURL;
|
||||
wxString m_pageTitle;
|
||||
|
||||
- WX_WebView m_webView;
|
||||
+ OSXWebViewPtr m_webView;
|
||||
|
||||
// we may use this later to setup our own mouse events,
|
||||
// so leave it in for now.
|
||||
diff -ur a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h
|
||||
--- a/include/wx/osx/webview_webkit.h
|
||||
+++ b/include/wx/osx/webview_webkit.h
|
||||
@@ -158,7 +158,7 @@
|
||||
wxWindowID m_windowID;
|
||||
wxString m_pageTitle;
|
||||
|
||||
- wxObjCID m_webView;
|
||||
+ OSXWebViewPtr m_webView;
|
||||
|
||||
// we may use this later to setup our own mouse events,
|
||||
// so leave it in for now.
|
||||
diff -ur a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm
|
||||
--- a/src/osx/webview_webkit.mm
|
||||
+++ b/src/osx/webview_webkit.mm
|
||||
@@ -442,7 +442,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView goBack];
|
||||
+ [m_webView goBack];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::GoForward()
|
||||
@@ -450,7 +450,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView goForward];
|
||||
+ [m_webView goForward];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Reload(wxWebViewReloadFlags flags)
|
||||
@@ -849,7 +849,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView cut:m_webView];
|
||||
+ [m_webView cut:m_webView];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Copy()
|
||||
@@ -857,7 +857,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView copy:m_webView];
|
||||
+ [m_webView copy:m_webView];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::Paste()
|
||||
@@ -865,7 +865,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView paste:m_webView];
|
||||
+ [m_webView paste:m_webView];
|
||||
}
|
||||
|
||||
void wxWebViewWebKit::DeleteSelection()
|
||||
@@ -873,7 +873,7 @@
|
||||
if ( !m_webView )
|
||||
return;
|
||||
|
||||
- [(WebView*)m_webView deleteSelection];
|
||||
+ [m_webView deleteSelection];
|
||||
}
|
||||
|
||||
bool wxWebViewWebKit::HasSelection() const
|
||||
|
|
Loading…
Reference in a new issue