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) |
---|
-
Portfile
6 6 7 7 name wxWidgets-devel 8 8 conflicts wxgtk wxWidgets 9 version 2.9.4 10 epoch 20120709 11 revision 4 9 version 2.9.5 12 10 13 11 license wxwidgets-3.1 14 12 categories graphics devel … … 32 30 distfiles ${distname}-${version}${extract.suffix} 33 31 dist_subdir ${distname}/${version} 34 32 35 checksums rmd160 62301f8ce39a8aa96e65318f9d1e947c9dc09c50\36 sha256 6c530c35f40c3b1a5f9a4577c3ee8a9982e745081f23e3fbb9951d6d17514d1233 checksums rmd160 f5c91099b2cf3e39eadbcf99df0dd9a97017d47f \ 34 sha256 b74ba96ca537cc5d049d21ec9ab5eb2670406a4aa9f1ea4845ea84a9955a6e02 37 35 38 36 depends_lib port:jpeg \ 39 37 port:tiff \ … … 61 59 extract.only ${distname}-${version}${extract.suffix} 62 60 63 61 patch.dir ${worksrcpath}/.. 64 patchfiles patch-configure-change_install_names.diff \ 65 patch-src-osx-cocoa-window.mm.diff 62 patchfiles patch-configure-change_install_names.diff 66 63 64 67 65 configure.cmd ../configure 68 66 configure.ldflags -L${build.dir}/lib -L${prefix}/lib 69 67 -
files/patch-configure-change_install_names.diff
1 --- configure 2011-10-19 17:36:57.000000000 +02002 +++ configure 2011-10-19 18:01:41.000000000 +02003 @@ -19 176,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 4 4 fi 5 5 6 6 if test "x$wxUSE_UNIVERSAL_BINARY" != xyes; then … … 13 13 fi 14 14 fi 15 15 16 @@ -19 204,8 +19204,6 @@17 disable_macosx_deps=yes16 @@ -19466,8 +19466,6 @@ $as_echo "$as_me: WARNING: Disabling precompiled headers due to universal binary 17 bk_use_pch=no 18 18 fi 19 19 20 20 - OSX_ARCH_OPTS=`echo $OSX_ARCH_OPTS | sed -e 's/^/-arch /' -e 's/,/ -arch /g'` … … 22 22 CXXFLAGS="$OSX_ARCH_OPTS $CXXFLAGS" 23 23 CFLAGS="$OSX_ARCH_OPTS $CFLAGS" 24 24 OBJCXXFLAGS="$OSX_ARCH_OPTS $OBJCXXFLAGS" 25 @@ -29 071,16 +29069,18 @@25 @@ -29407,16 +29405,18 @@ rm -f core conftest.err conftest.$ac_objext \ 26 26 DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@" 27 27 cat <<EOF >change-install-names 28 28 #!/bin/sh … … 47 47 fi 48 48 49 49 HEADER_PAD_OPTION="-headerpad_max_install_names" 50 --- configure.in 2011-10-19 17:36:57.000000000 +020051 +++ configure.in 2011-10-19 17:38:38.000000000 +020052 @@ -38 47,16 +3847,18 @@50 --- configure.in.orig 51 +++ configure.in 52 @@ -3835,16 +3835,18 @@ if test "$wxUSE_SHARED" = "yes"; then 53 53 DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@" 54 54 cat <<EOF >change-install-names 55 55 #!/bin/sh … … 63 63 +changes='' 64 64 +for dep in \$libnames; do 65 65 + changes="\$changes -change \$4/\$dep \$3/\$dep" 66 66 +done 67 67 +for i in \$libnames; do 68 68 + ${HOST_PREFIX}install_name_tool \$changes -id \$3/\$i \$1/\$i 69 +done69 done 70 70 +${HOST_PREFIX}install_name_tool \$changes \$2/wxrc-2.9 71 71 EOF 72 72 chmod +x change-install-names -
files/patch-src-osx-cocoa-window.mm.diff
1 Upstream: http://trac.wxwidgets.org/changeset/721952 --- 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 @end13 14 @@ -610,21 +615,37 @@15 wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ;16 17 - // see http://developer.apple.com/qa/qa2005/qa1453.html18 - // for more details on why we have to look for the exact type19 -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 + else36 + {37 + deltaX = [nsEvent scrollingDeltaX] * 10;38 + deltaY = [nsEvent scrollingDeltaY] * 10;39 + }40 }41 else42 {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.html47 + // for more details on why we have to look for the exact type48 +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 + else59 + {60 + deltaX = ([nsEvent deltaX] * 10);61 + deltaY = ([nsEvent deltaY] * 10);62 + }63 }64