Index: graphics/wxWidgets-3.0/Portfile
===================================================================
--- graphics/wxWidgets-3.0/Portfile	(revision 112047)
+++ graphics/wxWidgets-3.0/Portfile	(working copy)
@@ -10,7 +10,7 @@
 subport             wxPython-3.0 {}
 subport             wxgtk-3.0 {}
 version             2.9.5
-revision            1
+revision            2
 
 set installname     wxWidgets
 set wxtype          osx_cocoa
@@ -19,7 +19,7 @@
     wxWidgets.use   wxWidgets-3.0
 } elseif {$subport == "wxPython-3.0"} {
     wxWidgets.use   wxPython-3.0
-    version         2.9.4
+    revision        0
 } elseif {$subport == "wxgtk-3.0"} {
     # with satisfactory Cocoa support there is no real need for GTK-based wxWidgets any more
     # wxgtk-3.0 is here mainly for testing purposes
@@ -52,7 +52,8 @@
 distfiles           ${distname}-${version}${extract.suffix}
 dist_subdir         ${distname}/${version}
 
-checksums           rmd160  f5c91099b2cf3e39eadbcf99df0dd9a97017d47f \
+checksums           ${distname}-${version}${extract.suffix} \
+                    rmd160  f5c91099b2cf3e39eadbcf99df0dd9a97017d47f \
                     sha256  b74ba96ca537cc5d049d21ec9ab5eb2670406a4aa9f1ea4845ea84a9955a6e02
 
 depends_lib         port:jpeg \
@@ -71,9 +72,10 @@
 
 patch.dir           ${worksrcpath}/..
 
-# without (the second part of) this patch wxrc-2.9 ends up linking to libraries in workdir
-# http://trac.wxwidgets.org/ticket/15452
-patchfiles-append   patch-configure.diff
+# patch-configure.diff:                        http://trac.wxwidgets.org/ticket/15452
+# patch-upstream-src-osx-cocoa-window.mm.diff: http://trac.wxwidgets.org/ticket/15345
+patchfiles-append   patch-configure.diff \
+                    patch-upstream-src-osx-cocoa-window.mm.diff
 
 post-patch {
     reinplace "s|@@PREFIX@@|${prefix}|g" ${patch.dir}/configure
@@ -98,25 +100,17 @@
                     --with-macosx-version-min=no
 
 if {$subport == "wxPython-3.0"} {
-    set wxpythonsubset      wxPython-2.9.4.0-MacPorts-subset
+    set wxpythonsubset      wxPython-2.9.5.0-MacPorts-subset
     distfiles-append        ${wxpythonsubset}${extract.suffix}:trac
 
-    # patch-src-osx-cocoa-window.mm.diff: http://trac.wxwidgets.org/changeset/72195 (only needed for 2.9.4)
-    # patch-include-wx-math.h.diff:       http://trac.wxwidgets.org/changeset/74456 (only needed for 2.9.4)
-    patchfiles-append       patch-src-osx-cocoa-window.mm.diff \
-                            patch-include-wx-math.h.diff
-
     description             wxWidgets ${branch} for the wxPython distribution
     long_description        The port installs wxWidgets ${branch} for wxPython \
                             to guarantee compatibility even when the upstream versions \
                             of wxWidgets and wxPython differ.
 
-    checksums               ${distname}-${version}${extract.suffix} \
-                            rmd160  62301f8ce39a8aa96e65318f9d1e947c9dc09c50 \
-                            sha256  6c530c35f40c3b1a5f9a4577c3ee8a9982e745081f23e3fbb9951d6d17514d12 \
-                            ${wxpythonsubset}${extract.suffix} \
-                            rmd160  7831cee8185c521d8b565b56555b3005dee1d53d \
-                            sha256  971b644768d4010b38acf7232deb8cf3c91921ca8b09dec82c1616b93c751f4c
+    checksums-append        ${wxpythonsubset}${extract.suffix} \
+                            rmd160  936858d5856adde043d107164b1b53d3209eb76d \
+                            sha256  c892f257b151726a70886c7cffda51554b48b8e9cc7cfcc962d6988c5fe81856
 
     post-destroot {
         # copy a subset of wxPython to wxWidgets to prevent a conflict
@@ -127,7 +121,6 @@
     livecheck.type          none
 } elseif {$subport == "wxgtk-3.0"} {
     # both patches could be added to wxWidgets-3.0, but they are not needed for Cocoa
-    # and might need changes for wxWidgets 2.9.4
     #
     # patch-sdl.diff: the patch allows using --wxth-sdl
     # patch-upstream-psn.diff: http://trac.wxwidgets.org/changeset/74703
Index: graphics/wxWidgets-3.0/files/patch-configure.diff
===================================================================
--- graphics/wxWidgets-3.0/files/patch-configure.diff	(revision 112047)
+++ graphics/wxWidgets-3.0/files/patch-configure.diff	(working copy)
@@ -1,5 +1,5 @@
 The first part is for GTK and makes sure that the port finds the right OpenGL library
-The second part makes sure that install_name_tool doesn't break library names and links (http://trac.wxwidgets.org/ticket/15452)
+The second part is an upstream patch (see http://trac.wxwidgets.org/ticket/15452)
 --- configure.orig
 +++ configure
 @@ -22038,48 +22038,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
@@ -52,28 +52,28 @@
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libraries directories" >&5
  $as_echo_n "checking for libraries directories... " >&6; }
-@@ -29402,24 +29361,6 @@ rm -f core conftest.err conftest.$ac_objext \
-       ;;
- 
-       *-*-darwin* )
--        install_name_tool=`which ${HOST_PREFIX}install_name_tool`
--        if test "$install_name_tool" -a -x "$install_name_tool"; then
--            DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
--            cat <<EOF >change-install-names
--#!/bin/sh
+@@ -29407,16 +29366,18 @@ rm -f core conftest.err conftest.$ac_objext \
+             DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
+             cat <<EOF >change-install-names
+ #!/bin/sh
 -libnames=\`cd \${2} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\`
--for i in \${libnames} ; do
++libnames=\`cd \${1} ; ls -1 | grep '\.[0-9][0-9]*\.dylib\$'\`
++changes=''
++for dep in \${libnames} ; do
++    changes="\${changes} -change \${4}/\${dep} \${3}/\${dep}"
++done
+ for i in \${libnames} ; do
 -    ${HOST_PREFIX}install_name_tool -id \${3}/\${i} \${1}/\${i}
 -    for dep in \${libnames} ; do
 -        ${HOST_PREFIX}install_name_tool -change \${2}/\${dep} \${3}/\${dep} \${1}/\${i}
 -    done
--done
--EOF
--            chmod +x change-install-names
++    ${HOST_PREFIX}install_name_tool \${changes} -id \${3}/\${i} \${1}/\${i}
+ done
++${HOST_PREFIX}install_name_tool \${changes} \${2}/wxrc-${WX_RELEASE}
+ EOF
+             chmod +x change-install-names
 -            DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \$(wx_top_builddir)/lib \${libdir}"
--        fi
--
--                                        HEADER_PAD_OPTION="-headerpad_max_install_names"
-       ;;
++            DYLIB_RPATH_INSTALL="\$(wx_top_builddir)/change-install-names \${DESTDIR}\${libdir} \${DESTDIR}\${bindir} \${libdir} \$(wx_top_builddir)/lib"
+         fi
  
-       *-*-cygwin* | *-*-mingw32* )
+                                         HEADER_PAD_OPTION="-headerpad_max_install_names"
Index: graphics/wxWidgets-3.0/files/patch-include-wx-math.h.diff
===================================================================
--- graphics/wxWidgets-3.0/files/patch-include-wx-math.h.diff	(revision 112047)
+++ graphics/wxWidgets-3.0/files/patch-include-wx-math.h.diff	(working copy)
@@ -1,17 +0,0 @@
-Upstream: http://trac.wxwidgets.org/changeset/74456
---- include/wx/math.h (revision 73280)
-+++ include/wx/math.h (revision 74456)
-@@ -62,7 +62,12 @@
-         add more compilers with C99 support here: using C99 isfinite() is
-         preferable to using BSD-ish finite()
-      */
--    #define wxFinite(x) isfinite(x)
-+    #if defined(_GLIBCXX_CMATH) || defined(_LIBCPP_CMATH)
-+        // these <cmath> headers #undef isfinite
-+        #define wxFinite(x) std::isfinite(x)
-+    #else
-+        #define wxFinite(x) isfinite(x)
-+    #endif
- #elif ( defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
-       defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
-       defined(__HPUX__) ) && ( !defined(wxOSX_USE_IPHONE) || wxOSX_USE_IPHONE == 0 )
Index: graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff
===================================================================
--- graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff	(revision 112047)
+++ graphics/wxWidgets-3.0/files/patch-src-osx-cocoa-window.mm.diff	(working copy)
@@ -1,64 +0,0 @@
-Upstream: http://trac.wxwidgets.org/changeset/72195
---- src/osx/cocoa/window.mm (revision 72169)
-+++ src/osx/cocoa/window.mm (revision 72195)
-@@ -456,4 +456,9 @@
- - (CGFloat)deviceDeltaX;
- - (CGFloat)deviceDeltaY;
-+
-+// 10.7+
-+- (BOOL)hasPreciseScrollingDeltas;
-+- (CGFloat)scrollingDeltaX;
-+- (CGFloat)scrollingDeltaY;
- @end
- 
-@@ -610,21 +615,37 @@
-             wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ;
- 
--            // see http://developer.apple.com/qa/qa2005/qa1453.html
--            // for more details on why we have to look for the exact type
--            
--            const EventRef cEvent = (EventRef) [nsEvent eventRef];
--            bool isMouseScrollEvent = false;
--            if ( cEvent )
--                isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
--                
--            if ( isMouseScrollEvent )
-+            if ( UMAGetSystemVersion() >= 0x1070 )
-             {
--                deltaX = [nsEvent deviceDeltaX];
--                deltaY = [nsEvent deviceDeltaY];
-+                if ( [nsEvent hasPreciseScrollingDeltas] )
-+                {
-+                    deltaX = [nsEvent scrollingDeltaX];
-+                    deltaY = [nsEvent scrollingDeltaY];
-+                }
-+                else
-+                {
-+                    deltaX = [nsEvent scrollingDeltaX] * 10;
-+                    deltaY = [nsEvent scrollingDeltaY] * 10;
-+                }
-             }
-             else
-             {
--                deltaX = ([nsEvent deltaX] * 10);
--                deltaY = ([nsEvent deltaY] * 10);
-+                const EventRef cEvent = (EventRef) [nsEvent eventRef];
-+                // see http://developer.apple.com/qa/qa2005/qa1453.html
-+                // for more details on why we have to look for the exact type
-+
-+                bool isMouseScrollEvent = false;
-+                if ( cEvent )
-+                    isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
-+
-+                if ( isMouseScrollEvent )
-+                {
-+                    deltaX = [nsEvent deviceDeltaX];
-+                    deltaY = [nsEvent deviceDeltaY];
-+                }
-+                else
-+                {
-+                    deltaX = ([nsEvent deltaX] * 10);
-+                    deltaY = ([nsEvent deltaY] * 10);
-+                }
-             }
-             
Index: graphics/wxWidgets-3.0/files/patch-upstream-src-osx-cocoa-window.mm.diff
===================================================================
--- graphics/wxWidgets-3.0/files/patch-upstream-src-osx-cocoa-window.mm.diff	(revision 0)
+++ graphics/wxWidgets-3.0/files/patch-upstream-src-osx-cocoa-window.mm.diff	(working copy)
@@ -0,0 +1,280 @@
+http://trac.wxwidgets.org/ticket/15345
+http://trac.wxwidgets.org/changeset/74613
+http://trac.wxwidgets.org/changeset/74945
+
+--- include/wx/osx/cocoa/private.h.orig
++++ include/wx/osx/cocoa/private.h
+@@ -161,6 +161,7 @@ public :
+     virtual void                cursorUpdate(WX_NSEvent event, WXWidget slf, void* _cmd);
+     virtual void                keyEvent(WX_NSEvent event, WXWidget slf, void* _cmd);
+     virtual void                insertText(NSString* text, WXWidget slf, void* _cmd);
++    virtual void                doCommandBySelector(void* sel, WXWidget slf, void* _cmd);
+     virtual bool                performKeyEquivalent(WX_NSEvent event, WXWidget slf, void* _cmd);
+     virtual bool                acceptsFirstResponder(WXWidget slf, void* _cmd);
+     virtual bool                becomeFirstResponder(WXWidget slf, void* _cmd);
+--- src/osx/cocoa/window.mm.orig
++++ src/osx/cocoa/window.mm
+@@ -110,6 +110,22 @@ NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const
+ 
+ @end // wxNSView
+ 
++@interface wxNSView(TextInput) <NSTextInputClient>
++
++- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange;
++- (void)doCommandBySelector:(SEL)aSelector;
++- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange;
++- (void)unmarkText;
++- (NSRange)selectedRange;
++- (NSRange)markedRange;
++- (BOOL)hasMarkedText;
++- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange;
++- (NSArray*)validAttributesForMarkedText;
++- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange;
++- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint;
++
++@end
++
+ @interface NSView(PossibleMethods)
+ - (void)setTitle:(NSString *)aString;
+ - (void)setStringValue:(NSString *)aString;
+@@ -837,6 +853,73 @@ void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEve
+ 
+ @end // wxNSView
+ 
++// We need to adopt NSTextInputClient protocol in order to interpretKeyEvents: to work.
++// Currently, only insertText:(replacementRange:) is
++// implemented here, and the rest of the methods are stubs.
++// It is hoped that someday IME-related functionality is implemented in
++// wxWidgets and the methods of this protocol are fully working.
++
++@implementation wxNSView(TextInput)
++
++void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text);
++
++- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange
++{
++    wxOSX_insertText(self, @selector(insertText:), aString);
++}
++
++- (void)doCommandBySelector:(SEL)aSelector
++{
++    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
++    if (impl)
++        impl->doCommandBySelector(aSelector, self, _cmd);
++}
++
++- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange
++{
++}
++
++- (void)unmarkText
++{
++}
++
++- (NSRange)selectedRange
++{    
++    return NSMakeRange(NSNotFound, 0);
++}
++
++- (NSRange)markedRange
++{
++    return NSMakeRange(NSNotFound, 0);
++}
++
++- (BOOL)hasMarkedText
++{
++    return NO;
++}
++
++- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
++{
++    return nil;
++}
++
++- (NSArray*)validAttributesForMarkedText
++{
++    return nil;
++}
++
++- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange
++{
++    return NSMakeRect(0, 0, 0, 0);
++}
++- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint
++{
++    return NSNotFound;
++}
++
++@end // wxNSView(TextInput)
++
++
+ //
+ // event handlers
+ //
+@@ -1286,13 +1369,80 @@ void wxWidgetCocoaImpl::keyEvent(WX_NSEvent event, WXWidget slf, void *_cmd)
+ 
+ void wxWidgetCocoaImpl::insertText(NSString* text, WXWidget slf, void *_cmd)
+ {
+-    if ( m_lastKeyDownEvent==NULL || m_hasEditor || !DoHandleCharEvent(m_lastKeyDownEvent, text) )
++    bool result = false;
++    if ( IsUserPane() && !m_hasEditor && [text length] > 0)
++    {
++        if ( m_lastKeyDownEvent!=NULL && [text isEqualToString:[m_lastKeyDownEvent characters]])
++        {
++            // If we have a corresponding key event, send wxEVT_KEY_DOWN now.
++            // (see also: wxWidgetCocoaImpl::DoHandleKeyEvent)
++            {
++                wxKeyEvent wxevent(wxEVT_KEY_DOWN);
++                SetupKeyEvent( wxevent, m_lastKeyDownEvent );
++                result = GetWXPeer()->OSXHandleKeyEvent(wxevent);
++            }
++
++            // ...and wxEVT_CHAR.
++            result = result || DoHandleCharEvent(m_lastKeyDownEvent, text);
++        }
++        else
++        {
++            // If we don't have a corresponding key event (e.g. IME-composed
++            // characters), send wxEVT_CHAR without sending wxEVT_KEY_DOWN.
++            for (NSUInteger i = 0; i < [text length]; ++i)
++            {
++                wxKeyEvent wxevent(wxEVT_CHAR);
++                wxevent.m_shiftDown = wxevent.m_controlDown = wxevent.m_altDown = wxevent.m_metaDown = false;
++                wxevent.m_rawCode = 0;
++                wxevent.m_rawFlags = 0;
++                wxevent.SetTimestamp();
++                unichar aunichar = [text characterAtIndex:i];
++                wxevent.m_uniChar = aunichar;
++                wxevent.m_keyCode = aunichar < 0x80 ? aunichar : WXK_NONE;
++                wxWindowMac* peer = GetWXPeer();
++                if ( peer )
++                {
++                    wxevent.SetEventObject(peer);
++                    wxevent.SetId(peer->GetId());
++                }
++                result = GetWXPeer()->OSXHandleKeyEvent(wxevent) || result;
++            }
++        }
++    }
++    if ( !result )
+     {
+         wxOSX_TextEventHandlerPtr superimpl = (wxOSX_TextEventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd];
+         superimpl(slf, (SEL)_cmd, text);
+     }
+ }
+ 
++void wxWidgetCocoaImpl::doCommandBySelector(void* sel, WXWidget slf, void* _cmd)
++{
++    if ( m_lastKeyDownEvent!=NULL )
++    {
++        // If we have a corresponding key event, send wxEVT_KEY_DOWN now.
++        // (see also: wxWidgetCocoaImpl::DoHandleKeyEvent)
++        wxKeyEvent wxevent(wxEVT_KEY_DOWN);
++        SetupKeyEvent( wxevent, m_lastKeyDownEvent );
++        bool result = GetWXPeer()->OSXHandleKeyEvent(wxevent);
++
++        if (!result)
++        {
++            // Generate wxEVT_CHAR if wxEVT_KEY_DOWN is not handled.
++
++            long keycode = wxOSXTranslateCocoaKey( m_lastKeyDownEvent, wxEVT_CHAR );
++
++            wxKeyEvent wxevent2(wxevent) ;
++            wxevent2.SetEventType(wxEVT_CHAR);
++            SetupKeyEvent( wxevent2, m_lastKeyDownEvent );
++            if ( (keycode > 0 && keycode < WXK_SPACE) || keycode == WXK_DELETE || keycode >= WXK_START )
++            {
++                wxevent2.m_keyCode = keycode;
++            }
++            GetWXPeer()->OSXHandleKeyEvent(wxevent2);
++        }
++    }
++}
+ 
+ bool wxWidgetCocoaImpl::performKeyEquivalent(WX_NSEvent event, WXWidget slf, void *_cmd)
+ {
+@@ -2555,10 +2705,18 @@ void wxWidgetCocoaImpl::InstallEventHandler( WXWidget control )
+ 
+ bool wxWidgetCocoaImpl::DoHandleCharEvent(NSEvent *event, NSString *text)
+ {
+-    wxKeyEvent wxevent(wxEVT_CHAR);
+-    SetupKeyEvent( wxevent, event, text );
++    bool result = false;
++    
++    for (NSUInteger i = 0; i < [text length]; ++i)
++    {
++        wxKeyEvent wxevent(wxEVT_CHAR);
++        unichar c = [text characterAtIndex:i];
++        SetupKeyEvent( wxevent, event, [NSString stringWithCharacters:&c length:1]);
+ 
+-    return GetWXPeer()->OSXHandleKeyEvent(wxevent);
++        result = GetWXPeer()->OSXHandleKeyEvent(wxevent) || result;
++    }
++    
++    return result;
+ }
+ 
+ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
+@@ -2577,48 +2735,23 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
+             return true;
+     }
+ 
+-    bool result = GetWXPeer()->OSXHandleKeyEvent(wxevent);
+-
+-    // this will fire higher level events, like insertText, to help
+-    // us handle EVT_CHAR, etc.
++    if ( IsUserPane() && [event type] == NSKeyDown)
++    {
++        // Don't fire wxEVT_KEY_DOWN here in order to allow IME to intercept
++        // some key events. If the event is not handled by IME, either
++        // insertText: or doCommandBySelector: is called, so we send
++        // wxEVT_KEY_DOWN and wxEVT_CHAR there.
+ 
+-    if ( !result )
++        if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
++            [[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
++        else
++            [m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
++        return true;
++    }
++    else
+     {
+-        if ( [event type] == NSKeyDown)
+-        {
+-            long keycode = wxOSXTranslateCocoaKey( event, wxEVT_CHAR );
+-            
+-            if ( (keycode > 0 && keycode < WXK_SPACE) || keycode == WXK_DELETE || keycode >= WXK_START )
+-            {
+-                // eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars
+-                wxKeyEvent wxevent2(wxevent) ;
+-                wxevent2.SetEventType(wxEVT_CHAR);
+-                SetupKeyEvent( wxevent2, event );
+-                wxevent2.m_keyCode = keycode;
+-                result = GetWXPeer()->OSXHandleKeyEvent(wxevent2);
+-            }
+-            else if (wxevent.CmdDown())
+-            {
+-                wxKeyEvent wxevent2(wxevent) ;
+-                wxevent2.SetEventType(wxEVT_CHAR);
+-                SetupKeyEvent( wxevent2, event );
+-                result = GetWXPeer()->OSXHandleKeyEvent(wxevent2);
+-            }
+-            else
+-            {
+-                if ( IsUserPane() && !wxevent.CmdDown() )
+-                {
+-                    if ( [m_osxView isKindOfClass:[NSScrollView class] ] )
+-                        [[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]];
+-                    else
+-                        [m_osxView interpretKeyEvents:[NSArray arrayWithObject:event]];
+-                    result = true;
+-                }
+-            }
+-        }
++        return GetWXPeer()->OSXHandleKeyEvent(wxevent);
+     }
+-
+-    return result;
+ }
+ 
+ bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event)
Index: python/py-wxpython-3.0/Portfile
===================================================================
--- python/py-wxpython-3.0/Portfile	(revision 112047)
+++ python/py-wxpython-3.0/Portfile	(working copy)
@@ -6,7 +6,8 @@
 PortGroup           wxWidgets   1.0
 
 name                py-wxpython-3.0
-version             2.9.4.0
+version             2.9.5.0
+set wx_version      [join [lrange [split ${version} .] 0 2] .]
 set branch          [join [lrange [split ${version} .] 0 1] .]
 categories-append   graphics devel
 license             wxwidgets-3.1
@@ -27,15 +28,15 @@
 distname            wxPython
 use_bzip2           yes
 
-checksums           rmd160  35e823d9161dc99083f3025383567000680e012f \
-                    sha256  78c35c19e85a17cb9c730b86b49d6a479198d76d19e0b13e86db0b55707004be
+checksums           rmd160  4d54edc5437fbe14e552bfc6feeeb4fb74d10cd0 \
+                    sha256  1a5b7e771eff467538d0834136188e8a7506a4fe6e85d0a46c40158cdbd4c48c
 
 python.versions     27
 python.default_version 27
 
 distfiles           ${distname}-src-${version}${extract.suffix}
-dist_subdir         ${distname}/${version}
 worksrcdir          ${distname}-src-${version}/wxPython
+dist_subdir         wxWidgets/${wx_version}
 
 # extract just the docs and wxPython subdir
 extract.post_args   "| tar -xf - ${worksrcdir} ${distname}-src-${version}/docs"
@@ -42,6 +43,9 @@
 
 if {$subport != $name} {
     conflicts           py${python.version}-wxpython-2.8
+    # As long as wxPython and wxWidgets are at the same version,
+    # this port could also depend on wxWidgets-3.0.
+    # A separate port is there just because wxPython usually lags behind.
     wxWidgets.use       wxPython-3.0
     depends_lib-append  port:${wxWidgets.port}
 
@@ -52,7 +56,11 @@
     destroot.cmd    ${python.bin} setup.py WX_CONFIG="${wxWidgets.wxconfig}"
 
     post-destroot {
-        # this has already been added by wxWidgets
+        # When a new release of wxPython comes out, the contents of
+        # ${destroot}${wxWidgets.prefix}/Versions/wxPython/${branch}/include/wx-${branch}/wx/wxPython
+        # should be stored separately into wxPython-${version}-MacPorts-subset.tar.bz2
+        # to be extracted/installed by wxPython-3.0 rather than this port.
+        # This allows parallel installation of several versions of py**-wxpython-3.0.
         delete      ${destroot}${wxWidgets.prefix}
     }
 
