Ticket #39806: wxWidgets-devel.2.9.5.patch

File wxWidgets-devel.2.9.5.patch, 6.0 KB (added by mojca (Mojca Miklavec), 11 years ago)

wxWidgets-devel: patch to update to 2.9.5

  • Portfile

     
    66
    77name            wxWidgets-devel
    88conflicts       wxgtk wxWidgets
    9 version         2.9.4
    10 epoch           20120709
    11 revision        4
     9version         2.9.5
    1210
    1311license         wxwidgets-3.1
    1412categories      graphics devel
     
    3230distfiles       ${distname}-${version}${extract.suffix}
    3331dist_subdir     ${distname}/${version}
    3432
    35 checksums           rmd160  62301f8ce39a8aa96e65318f9d1e947c9dc09c50 \
    36                     sha256  6c530c35f40c3b1a5f9a4577c3ee8a9982e745081f23e3fbb9951d6d17514d12
     33checksums           rmd160  f5c91099b2cf3e39eadbcf99df0dd9a97017d47f \
     34                    sha256  b74ba96ca537cc5d049d21ec9ab5eb2670406a4aa9f1ea4845ea84a9955a6e02
    3735                   
    3836depends_lib     port:jpeg \
    3937                port:tiff \
     
    6159extract.only    ${distname}-${version}${extract.suffix}
    6260
    6361patch.dir   ${worksrcpath}/..
    64 patchfiles  patch-configure-change_install_names.diff \
    65             patch-src-osx-cocoa-window.mm.diff
     62patchfiles  patch-configure-change_install_names.diff
    6663
     64
    6765configure.cmd   ../configure
    6866configure.ldflags   -L${build.dir}/lib -L${prefix}/lib
    6967
  • files/patch-configure-change_install_names.diff

     
    1 --- configure   2011-10-19 17:36:57.000000000 +0200
    2 +++ configure   2011-10-19 18:01:41.000000000 +0200
    3 @@ -19176,10 +19176,10 @@
     1--- configure.orig
     2+++ configure
     3@@ -19436,10 +19436,10 @@ $as_echo "$as_me: WARNING: --enable-macosx_arch is ignored when --enable-univers
    44     fi
    55 
    66     if test "x$wxUSE_UNIVERSAL_BINARY" != xyes; then
     
    1313         fi
    1414     fi
    1515 
    16 @@ -19204,8 +19204,6 @@
    17          disable_macosx_deps=yes
     16@@ -19466,8 +19466,6 @@ $as_echo "$as_me: WARNING: Disabling precompiled headers due to universal binary
     17         bk_use_pch=no
    1818     fi
    1919 
    2020-    OSX_ARCH_OPTS=`echo $OSX_ARCH_OPTS | sed -e 's/^/-arch /' -e 's/,/ -arch /g'`
     
    2222     CXXFLAGS="$OSX_ARCH_OPTS $CXXFLAGS"
    2323     CFLAGS="$OSX_ARCH_OPTS $CFLAGS"
    2424     OBJCXXFLAGS="$OSX_ARCH_OPTS $OBJCXXFLAGS"
    25 @@ -29071,16 +29069,18 @@
     25@@ -29407,16 +29405,18 @@ rm -f core conftest.err conftest.$ac_objext \
    2626             DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
    2727             cat <<EOF >change-install-names
    2828 #!/bin/sh
     
    4747         fi
    4848 
    4949                                         HEADER_PAD_OPTION="-headerpad_max_install_names"
    50 --- configure.in        2011-10-19 17:36:57.000000000 +0200
    51 +++ configure.in        2011-10-19 17:38:38.000000000 +0200
    52 @@ -3847,16 +3847,18 @@
     50--- configure.in.orig
     51+++ configure.in
     52@@ -3835,16 +3835,18 @@ if test "$wxUSE_SHARED" = "yes"; then
    5353             DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
    5454             cat <<EOF >change-install-names
    5555 #!/bin/sh
     
    6363+changes=''
    6464+for dep in \$libnames; do
    6565+    changes="\$changes -change \$4/\$dep \$3/\$dep"
    66  done
     66+done
    6767+for i in \$libnames; do
    6868+    ${HOST_PREFIX}install_name_tool \$changes -id \$3/\$i \$1/\$i
    69 +done
     69 done
    7070+${HOST_PREFIX}install_name_tool \$changes \$2/wxrc-2.9
    7171 EOF
    7272             chmod +x change-install-names
  • files/patch-src-osx-cocoa-window.mm.diff

     
    1 Upstream: http://trac.wxwidgets.org/changeset/72195
    2 --- src/osx/cocoa/window.mm (revision 72169)
    3 +++ src/osx/cocoa/window.mm (revision 72195)
    4 @@ -456,4 +456,9 @@
    5  - (CGFloat)deviceDeltaX;
    6  - (CGFloat)deviceDeltaY;
    7 +
    8 +// 10.7+
    9 +- (BOOL)hasPreciseScrollingDeltas;
    10 +- (CGFloat)scrollingDeltaX;
    11 +- (CGFloat)scrollingDeltaY;
    12  @end
    13  
    14 @@ -610,21 +615,37 @@
    15              wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ;
    16  
    17 -            // see http://developer.apple.com/qa/qa2005/qa1453.html
    18 -            // for more details on why we have to look for the exact type
    19 -           
    20 -            const EventRef cEvent = (EventRef) [nsEvent eventRef];
    21 -            bool isMouseScrollEvent = false;
    22 -            if ( cEvent )
    23 -                isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
    24 -               
    25 -            if ( isMouseScrollEvent )
    26 +            if ( UMAGetSystemVersion() >= 0x1070 )
    27              {
    28 -                deltaX = [nsEvent deviceDeltaX];
    29 -                deltaY = [nsEvent deviceDeltaY];
    30 +                if ( [nsEvent hasPreciseScrollingDeltas] )
    31 +                {
    32 +                    deltaX = [nsEvent scrollingDeltaX];
    33 +                    deltaY = [nsEvent scrollingDeltaY];
    34 +                }
    35 +                else
    36 +                {
    37 +                    deltaX = [nsEvent scrollingDeltaX] * 10;
    38 +                    deltaY = [nsEvent scrollingDeltaY] * 10;
    39 +                }
    40              }
    41              else
    42              {
    43 -                deltaX = ([nsEvent deltaX] * 10);
    44 -                deltaY = ([nsEvent deltaY] * 10);
    45 +                const EventRef cEvent = (EventRef) [nsEvent eventRef];
    46 +                // see http://developer.apple.com/qa/qa2005/qa1453.html
    47 +                // for more details on why we have to look for the exact type
    48 +
    49 +                bool isMouseScrollEvent = false;
    50 +                if ( cEvent )
    51 +                    isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll;
    52 +
    53 +                if ( isMouseScrollEvent )
    54 +                {
    55 +                    deltaX = [nsEvent deviceDeltaX];
    56 +                    deltaY = [nsEvent deviceDeltaY];
    57 +                }
    58 +                else
    59 +                {
    60 +                    deltaX = ([nsEvent deltaX] * 10);
    61 +                    deltaY = ([nsEvent deltaY] * 10);
    62 +                }
    63              }
    64