From bb412f79aeed54890226cffd325569a184e89a67 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 6 May 2009 01:34:30 +0000 Subject: [PATCH] wxWidgets build script patches wxMac-2.8.10/src/mac/carbon/thread.cpp to fix a problem. svn path=/trunk/boinc/; revision=18021 --- checkin_notes | 10 ++++++++++ mac_build/buildWxMac.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/checkin_notes b/checkin_notes index 99d59ecf42..ae68496013 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4319,3 +4319,13 @@ Rom 5 May 2009 doc/ build_po.php + +Charlie 5 May 2009 + Mac: Modify wxWidgets build script to fix a problem in wxMac-2.8.10 + which made the Manager extremely slow to update or respond to + user input, by patching wxMac-2.8.10/src/mac/carbon/thread.cpp. + wxMac developer Stefan Csomor has checked my change into the + wxWidgets 2.8 branch, so this should be fixed in wxMac-2.8.11. + + mac_build/ + buildWxMac.sh diff --git a/mac_build/buildWxMac.sh b/mac_build/buildWxMac.sh index 79dbcff309..bf2ce19bc0 100644 --- a/mac_build/buildWxMac.sh +++ b/mac_build/buildWxMac.sh @@ -51,6 +51,32 @@ if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk/ ]; then return 1 fi +## Fix a bug in wxMutex. This patch should not be needed for wxMac-2.8.11 and later +if [ ! -f src/mac/carbon/thread.cpp.orig ]; then + +cat >> /tmp/wxmutex_diff << ENDOFFILE +--- src/mac/carbon/thread-old.cpp 2009-03-06 04:23:14.000000000 -0800 ++++ src/mac/carbon/thread.cpp 2009-05-05 04:34:41.000000000 -0700 +@@ -138,8 +138,8 @@ + + #if TARGET_API_MAC_OSX + #define wxUSE_MAC_SEMAPHORE_MUTEX 0 +-#define wxUSE_MAC_CRITICAL_REGION_MUTEX 1 +-#define wxUSE_MAC_PTHREADS_MUTEX 0 ++#define wxUSE_MAC_CRITICAL_REGION_MUTEX 0 ++#define wxUSE_MAC_PTHREADS_MUTEX 1 + #else + #define wxUSE_MAC_SEMAPHORE_MUTEX 0 + #define wxUSE_MAC_CRITICAL_REGION_MUTEX 1 +ENDOFFILE + +patch -bfi /tmp/wxmutex_diff src/mac/carbon/thread.cpp + +rm -f /tmp/wxmutex_diff +else + echo "thread.cpp already patched" +fi + if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_static.a ]; then echo "Deployment libwx_mac_static.a already built" else