2006-02-18 05:49:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-04-17 21:34:28 +00:00
|
|
|
# This file is part of BOINC.
|
2006-02-18 05:49:24 +00:00
|
|
|
# http://boinc.berkeley.edu
|
2009-04-17 21:34:28 +00:00
|
|
|
# Copyright (C) 2008 University of California
|
2006-02-18 05:49:24 +00:00
|
|
|
#
|
2009-04-17 21:34:28 +00:00
|
|
|
# BOINC is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU Lesser General Public License
|
|
|
|
# as published by the Free Software Foundation,
|
|
|
|
# either version 3 of the License, or (at your option) any later version.
|
2005-12-22 02:33:59 +00:00
|
|
|
#
|
2009-04-17 21:34:28 +00:00
|
|
|
# BOINC is distributed in the hope that it will be useful,
|
2006-02-18 05:49:24 +00:00
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the GNU Lesser General Public License for more details.
|
2005-12-22 02:33:59 +00:00
|
|
|
#
|
2009-04-17 21:34:28 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
# along with BOINC. If not, see <http://www.gnu.org/licenses/>.
|
2005-12-22 02:33:59 +00:00
|
|
|
#
|
2006-01-31 12:21:34 +00:00
|
|
|
#
|
2009-04-17 11:28:27 +00:00
|
|
|
# Script to build the wxMac-2.8.10 library for BOINC as a Universal Binary
|
2007-05-02 10:09:47 +00:00
|
|
|
#
|
2007-12-17 13:20:03 +00:00
|
|
|
# by Charlie Fenton 7/21/06
|
2009-04-17 11:28:27 +00:00
|
|
|
# Updated for wx-Mac 2.8.10 and Unicode 4/17/09
|
2007-12-17 13:20:03 +00:00
|
|
|
|
2007-05-02 10:09:47 +00:00
|
|
|
#
|
2009-04-17 11:28:27 +00:00
|
|
|
## In Terminal, CD to the wxMac-2.8.10 directory.
|
|
|
|
## cd [path]/wxMac-2.8.10/
|
2006-02-18 05:49:24 +00:00
|
|
|
## then run this script:
|
|
|
|
## source [ path_to_this_script ] [ -clean ]
|
|
|
|
##
|
|
|
|
## the -clean argument will force a full rebuild.
|
|
|
|
#
|
|
|
|
|
2005-12-22 02:33:59 +00:00
|
|
|
|
|
|
|
if [ "$1" = "-clean" ]; then
|
|
|
|
doclean="clean "
|
|
|
|
else
|
|
|
|
doclean=""
|
|
|
|
fi
|
|
|
|
|
2009-12-04 14:39:35 +00:00
|
|
|
if [ ! -d /Developer/SDKs/MacOSX10.4u.sdk/ ]; then
|
|
|
|
echo "ERROR: System 10.4u SDK is missing. For details, see build instructions at"
|
2008-02-27 12:01:55 +00:00
|
|
|
echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
2009-12-04 14:39:35 +00:00
|
|
|
if [ ! -d /Developer/SDKs/MacOSX10.5.sdk/ ]; then
|
|
|
|
echo "ERROR: System 10.5 SDK is missing. For details, see build instructions at"
|
2008-02-27 12:01:55 +00:00
|
|
|
echo "boinc/mac_build/HowToBuildBOINC_XCode.rtf or http://boinc.berkeley.edu/trac/wiki/MacBuild"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
2009-05-06 01:34:30 +00:00
|
|
|
## 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
|
|
|
|
|
2007-12-17 13:20:03 +00:00
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Deployment/libwx_mac_static.a ]; then
|
|
|
|
echo "Deployment libwx_mac_static.a already built"
|
2007-05-23 01:29:11 +00:00
|
|
|
else
|
2007-12-20 00:19:59 +00:00
|
|
|
export DEVELOPER_SDK_DIR="/Developer/SDKs"
|
2009-12-04 14:39:35 +00:00
|
|
|
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Deployment $doclean build GCC_VERSION=4.0 GCC_VERSION_ppc=4.0 MACOSX_DEPLOYMENT_TARGET=10.4 MACOSX_DEPLOYMENT_TARGET_ppc=10.4 SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk SDKROOT_ppc=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386 ppc" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
|
2007-05-23 01:29:11 +00:00
|
|
|
|
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
|
|
|
fi
|
|
|
|
|
2007-12-17 13:20:03 +00:00
|
|
|
if [ "$1" != "-clean" ] && [ -f src/build/Development/libwx_mac_static.a ]; then
|
|
|
|
echo "Development libwx_mac_static.a already built"
|
2007-05-23 01:29:11 +00:00
|
|
|
else
|
2007-12-20 00:19:59 +00:00
|
|
|
export DEVELOPER_SDK_DIR="/Developer/SDKs"
|
2009-12-04 14:39:35 +00:00
|
|
|
xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Development $doclean build GCC_VERSION=4.0 GCC_VERSION_ppc=4.0 MACOSX_DEPLOYMENT_TARGET=10.4 MACOSX_DEPLOYMENT_TARGET_ppc=10.4 SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk SDKROOT_ppc=/Developer/SDKs/MacOSX10.4u.sdk OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DwxUSE_UNICODE=1 -fvisibility=hidden -fvisibility-inlines-hidden"
|
2007-12-17 13:20:03 +00:00
|
|
|
## The above line does Development build for only the native architecture.
|
|
|
|
## Use line below instead for Universal Binary Development build
|
2009-12-04 14:39:35 +00:00
|
|
|
## xcodebuild -project src/wxWindows.xcodeproj -target static -configuration Development $doclean build MACOSX_DEPLOYMENT_TARGET=10.4 SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk ARCHS="i386 ppc" OTHER_CPLUSPLUSFLAGS="-DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -fvisibility=hidden -fvisibility-inlines-hidden"
|
2005-12-22 11:37:36 +00:00
|
|
|
|
2006-07-22 03:35:48 +00:00
|
|
|
if [ $? -ne 0 ]; then return 1; fi
|
2005-12-22 11:37:36 +00:00
|
|
|
fi
|
2005-12-22 02:33:59 +00:00
|
|
|
|
|
|
|
return 0
|
2005-12-22 11:37:36 +00:00
|
|
|
|