[Adium-commits] adium 2047:699c59465ff3: Initial shot at 64 bit deps. Hooray for...
adium-commits at adiumx.com
adium-commits at adiumx.com
Fri May 1 05:11:11 UTC 2009
details: http://hg.adiumx.com/adium/rev/699c59465ff3
revision: 2047:699c59465ff3
author: David Smith <catfish.man at gmail.com>
date: Thu Apr 30 20:32:46 2009 -0700
Initial shot at 64 bit deps. Hooray for discovering --with-libiconv=native :)
Subject: adium 2048:88d7a58c12b8: Make AILog always be compiled in, enabled by default in debug builds and enableable with a hidden pref in Release builds. The overhead for calling AILog when it's off is increased from nothing to completely trivial (one global var access plus one hinted branch), but I'll eat my hat if that ever matters. Putting in some sort of UI for this would be nice, but that can wait for a followup commit
details: http://hg.adiumx.com/adium/rev/88d7a58c12b8
revision: 2048:88d7a58c12b8
author: David Smith <catfish.man at gmail.com>
date: Thu Apr 30 20:43:03 2009 -0700
Make AILog always be compiled in, enabled by default in debug builds and enableable with a hidden pref in Release builds. The overhead for calling AILog when it's off is increased from nothing to completely trivial (one global var access plus one hinted branch), but I'll eat my hat if that ever matters. Putting in some sort of UI for this would be nice, but that can wait for a followup commit
diffstat:
Frameworks/Adium Framework/Source/AIAbstractAccount.m | 1 -
Frameworks/Adium Framework/Source/AIAdiumProtocol.h | 4 -
Frameworks/Adium Framework/Source/AIDebugControllerProtocol.h | 2 -
Frameworks/Adium Framework/Source/ESDebugAILog.h | 24 ++---
Frameworks/Adium Framework/Source/ESDebugAILog.m | 43 ++++++----
Source/AIAdium.h | 3 -
Source/AIAdium.m | 28 +-----
Source/ESDebugController.h | 3 -
Source/ESDebugController.m | 46 +++++------
Source/ESDebugWindowController.h | 3 -
Source/ESDebugWindowController.m | 3 -
Utilities/dep-build-scripts/common.sh | 2 +
Utilities/dep-build-scripts/general_dependencies_make.sh | 16 ++-
Utilities/dep-build-scripts/glibconfig.h | 2 +
Utilities/dep-build-scripts/libgadu.h | 2 +
Utilities/dep-build-scripts/purple_dependencies_make.sh | 18 +++-
Utilities/dep-build-scripts/universalize.sh | 3 +
17 files changed, 94 insertions(+), 109 deletions(-)
diffs (628 lines):
diff -r 6bc140dd9efb -r 88d7a58c12b8 Frameworks/Adium Framework/Source/AIAbstractAccount.m
--- a/Frameworks/Adium Framework/Source/AIAbstractAccount.m Wed Apr 29 16:25:58 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIAbstractAccount.m Thu Apr 30 20:43:03 2009 -0700
@@ -1328,7 +1328,6 @@
// If we know this connection is waiting for the network to return, don't bother continuing to reconnect.
// Let it try for 2 times and then cancel and wait for the network to return.
[self cancelAutoReconnect];
-
AILog(@"%@: Disconnected (\"%@\"): Waiting until network returns.", self, lastDisconnectionError);
} else if ([self shouldBeOnline] && lastDisconnectionError) {
diff -r 6bc140dd9efb -r 88d7a58c12b8 Frameworks/Adium Framework/Source/AIAdiumProtocol.h
--- a/Frameworks/Adium Framework/Source/AIAdiumProtocol.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIAdiumProtocol.h Thu Apr 30 20:43:03 2009 -0700
@@ -42,11 +42,7 @@
@property (readonly, nonatomic) NSObject<AIToolbarController> *toolbarController;
@property (readonly, nonatomic) NSObject<AIContactAlertsController> *contactAlertsController;
@property (readonly, nonatomic) NSObject<AIFileTransferController> *fileTransferController;
-
-#ifdef DEBUG_BUILD
@property (readonly, nonatomic) NSObject<AIDebugController> *debugController;
-#endif
-
@property (readonly, nonatomic) NSObject<AIApplescriptabilityController> *applescriptabilityController;
@property (readonly, nonatomic) AICoreComponentLoader *componentLoader;
diff -r 6bc140dd9efb -r 88d7a58c12b8 Frameworks/Adium Framework/Source/AIDebugControllerProtocol.h
--- a/Frameworks/Adium Framework/Source/AIDebugControllerProtocol.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Frameworks/Adium Framework/Source/AIDebugControllerProtocol.h Thu Apr 30 20:43:03 2009 -0700
@@ -9,9 +9,7 @@
#import <Adium/AIControllerProtocol.h>
@protocol AIDebugController <AIController>
-#ifdef DEBUG_BUILD
- (void)addMessage:(NSString *)actualMessage;
@property (nonatomic, readonly) NSArray *debugLogArray;
- (void)clearDebugLogArray;
-#endif
@end
diff -r 6bc140dd9efb -r 88d7a58c12b8 Frameworks/Adium Framework/Source/ESDebugAILog.h
--- a/Frameworks/Adium Framework/Source/ESDebugAILog.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Frameworks/Adium Framework/Source/ESDebugAILog.h Thu Apr 30 20:43:03 2009 -0700
@@ -14,16 +14,14 @@
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef DEBUG_BUILD
-/* For a debug build, declare the AILog() function */
- void AILogWithPrefix (const char *signature, NSString *format, ...) __attribute__((format(__NSString__, 2, 3)));
- #define AILogWithSignature(fmt, args...) AILogWithPrefix(__PRETTY_FUNCTION__, fmt, ##args);
- void AILog (NSString *format, ...) __attribute__((format(__NSString__, 1, 2)));
- void AILogBacktrace();
-#else
-/* For a non-debug build, define it to be a comment so there is no overhead in using it liberally */
- #define AILog(fmt, ...) /**/
- #define AILogWithSignature(fmt, ...) /**/
- #define AILogWithPrefix(sig, fmt, ...) /**/
- #define AILogBacktrace() /**/
-#endif
+extern NSString *const AIDebugLoggingEnabledNotification;
+extern BOOL AIDebugLoggingEnabled;
+
+#define AILog(fmt, args...) do { if (__builtin_expect(AIDebugLoggingEnabled, 0)) AILog_impl(fmt, ##args); } while(0)
+#define AILogWithPrefix(sig, fmt, args...) do { if(__builtin_expect(AIDebugLoggingEnabled, 0)) AILogWithPrefix_impl(sig, fmt, ##args); } while(0)
+#define AILogBacktrace() do { if(__builtin_expect(AIDebugLoggingEnabled, 0)) AILogBacktrace_impl(); } while(0)
+#define AILogWithSignature(fmt, args...) AILogWithPrefix(__PRETTY_FUNCTION__, fmt, ##args);
+void AIEnableDebugLogging();
+void AILogWithPrefix_impl (const char *signature, NSString *format, ...) __attribute__((format(__NSString__, 2, 3)));
+void AILog_impl (NSString *format, ...) __attribute__((format(__NSString__, 1, 2)));
+void AILogBacktrace_impl();
diff -r 6bc140dd9efb -r 88d7a58c12b8 Frameworks/Adium Framework/Source/ESDebugAILog.m
--- a/Frameworks/Adium Framework/Source/ESDebugAILog.m Wed Apr 29 16:25:58 2009 -0700
+++ b/Frameworks/Adium Framework/Source/ESDebugAILog.m Thu Apr 30 20:43:03 2009 -0700
@@ -16,21 +16,30 @@
#import <Adium/AIDebugControllerProtocol.h>
#include <stdarg.h>
+#include <execinfo.h>
-extern CFRunLoopRef CFRunLoopGetMain(void);
+#ifdef DEBUG_BUILD
+BOOL AIDebugLoggingEnabled = YES;
+#else
+BOOL AIDebugLoggingEnabled = NO;
+#endif
+
+NSString *const AIDebugLoggingEnabledNotification = @"AIDebugLoggingEnabledNotification";
+
+void AIEnableDebugLogging()
+{
+ AIDebugLoggingEnabled = YES;
+ [[NSNotificationCenter defaultCenter] postNotificationName:AIDebugLoggingEnabledNotification object:nil];
+}
/*!
* @brief Adium debug log function
*
- * Prints a message to the Adium debug window, which is only enabled in Debug builds.
- * In Release builds, this function is replaced by a #define which is just a comment, so there is no cost to
- * Release to use it.
+ * Prints a message to the Adium debug window, which is only enabled in Debug builds or by a hidden preference.
*
* @param format A printf-style format string
* @param ... 0 or more arguments to the format string
*/
-#ifdef DEBUG_BUILD
-#include <execinfo.h>
void AIAddDebugMessage(NSString *debugMessage)
{
NSString *actualMessage = [[[NSDate date] descriptionWithCalendarFormat:@"%H:%M:%S: "
@@ -38,7 +47,7 @@
locale:nil] stringByAppendingString:debugMessage];
/* Be careful; we should only modify debugLogArray and the windowController's view on the main thread. */
- if (CFRunLoopGetCurrent() == CFRunLoopGetMain()) {
+ if ([NSRunLoop currentRunLoop] == [NSRunLoop mainRunLoop]) {
[adium.debugController addMessage:actualMessage];
} else {
@@ -48,7 +57,7 @@
}
}
-void AILog (NSString *format, ...) {
+void AILog_impl (NSString *format, ...) {
va_list ap; /* Points to each unamed argument in turn */
NSString *debugMessage;
@@ -62,7 +71,7 @@
va_end(ap); /* clean up when done */
}
-void AILogWithPrefix (const char *prefix, NSString *format, ...) {
+void AILogWithPrefix_impl (const char *prefix, NSString *format, ...) {
va_list ap; /* Points to each unamed argument in turn */
NSString *debugMessage, *actualMessage;
@@ -77,7 +86,7 @@
va_end(ap); /* clean up when done */
}
-void AILogBacktrace() {
+void AILogBacktrace_impl() {
void* callstack[128];
int i, frames = backtrace(callstack, 128);
char** strs = backtrace_symbols(callstack, frames);
@@ -86,15 +95,13 @@
[str appendFormat:@"%s\n", strs[i]];
}
free(strs);
- AILog(@"%@", str);
+ AILog_impl(@"%@", str);
};
-#else
-//Insert a fake symbol so that plugins using AILog() don't crash.
+//For compatibility with plugins that expect these symbols to exist
#undef AILog
-void AILog (NSString *format, ...) {};
#undef AILogWithPrefix
-void AILogWithPrefix (char *sig, NSString *format, ...) {};
-#undef AILogBacktrace
-void AILogBacktrace() {};
-#endif
+#undef AILogWithBacktrace
+void AILog(NSString *fmt, ...) {}
+void AILogWithPrefix(const char *signature, NSString *fmt, ...) {}
+void AILogWithBacktrace() {}
diff -r 6bc140dd9efb -r 88d7a58c12b8 Source/AIAdium.h
--- a/Source/AIAdium.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Source/AIAdium.h Thu Apr 30 20:43:03 2009 -0700
@@ -52,10 +52,7 @@
NSObject <AIContactAlertsController> *contactAlertsController;
NSObject <AIFileTransferController> *fileTransferController;
NSObject <AIApplescriptabilityController> *applescriptabilityController;
-
-#ifdef DEBUG_BUILD
NSObject <AIDebugController> *debugController;
-#endif
AICoreComponentLoader *componentLoader;
AICorePluginLoader *pluginLoader;
diff -r 6bc140dd9efb -r 88d7a58c12b8 Source/AIAdium.m
--- a/Source/AIAdium.m Wed Apr 29 16:25:58 2009 -0700
+++ b/Source/AIAdium.m Thu Apr 30 20:43:03 2009 -0700
@@ -53,10 +53,7 @@
#import "ESAddressBookIntegrationAdvancedPreferences.h"
#import <Adium/AdiumAuthorization.h>
#import <sys/sysctl.h>
-
-#ifdef DEBUG_BUILD
#import "ESDebugController.h"
-#endif
#define ADIUM_TRAC_PAGE @"http://trac.adiumx.com/"
#define ADIUM_REPORT_BUG_PAGE @"http://trac.adiumx.com/wiki/ReportingBugs"
@@ -90,11 +87,7 @@
//Core Controllers -----------------------------------------------------------------------------------------------------
#pragma mark Core Controllers
- at synthesize accountController, chatController, contactController, contentController, dockController, emoticonController, interfaceController, loginController, menuController, preferenceController, soundController, statusController, toolbarController, contactAlertsController, fileTransferController, applescriptabilityController;
-
-#ifdef DEBUG_BUILD
- at synthesize debugController;
-#endif
+ at synthesize accountController, chatController, contactController, contentController, dockController, emoticonController, interfaceController, loginController, menuController, preferenceController, soundController, statusController, toolbarController, contactAlertsController, fileTransferController, applescriptabilityController, debugController;
//Loaders --------------------------------------------------------------------------------------------------------
#pragma mark Loaders
@@ -167,20 +160,16 @@
//Called by the login controller when a user has been selected, continue logging in
- (void)completeLogin
{
- NSAutoreleasePool *pool;
-
- pool = [[NSAutoreleasePool alloc] init];
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
/* Init the controllers.
* Menu and interface controllers are created by MainMenu.nib when it loads.
*/
preferenceController = [[AIPreferenceController alloc] init];
toolbarController = [[AIToolbarController alloc] init];
-
-#ifdef DEBUG_BUILD
debugController = [[ESDebugController alloc] init];
-#endif
-
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"AIEnableDebugLogging"])
+ AIEnableDebugLogging();
contactAlertsController = [[ESContactAlertsController alloc] init];
soundController = [[AISoundController alloc] init];
emoticonController = [[AIEmoticonController alloc] init];
@@ -197,9 +186,7 @@
//Finish setting up the preference controller before the components and plugins load so they can read prefs
[preferenceController controllerDidLoad];
-#ifdef DEBUG_BUILD
[debugController controllerDidLoad];
-#endif
[pool release];
//Plugins and components should always init last, since they rely on everything else.
@@ -372,9 +359,7 @@
[soundController controllerWillClose];
[menuController controllerWillClose];
[applescriptabilityController controllerWillClose];
-#ifdef DEBUG_BUILD
[debugController controllerWillClose];
-#endif
[toolbarController controllerWillClose];
[AISharedWriterQueue waitUntilAllOperationsAreFinished];
@@ -390,10 +375,7 @@
movingToTrash:NO];
}
-- (BOOL)isQuitting
-{
- return isQuitting;
-}
+ at synthesize isQuitting;
//Menu Item Hooks ------------------------------------------------------------------------------------------------------
#pragma mark Menu Item Hooks
diff -r 6bc140dd9efb -r 88d7a58c12b8 Source/ESDebugController.h
--- a/Source/ESDebugController.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Source/ESDebugController.h Thu Apr 30 20:43:03 2009 -0700
@@ -13,7 +13,6 @@
* You should have received a copy of the GNU General Public License along with this program; if not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef DEBUG_BUILD
#import <Adium/AIDebugControllerProtocol.h>
#define KEY_DEBUG_WRITE_LOG @"Write Debug Log"
@@ -25,9 +24,7 @@
NSFileHandle *debugLogFile;
}
-+ (ESDebugController *)sharedDebugController;
- (NSFileHandle *)debugLogFile;
- (void)addMessage:(NSString *)actualMessage;
@end
-#endif
diff -r 6bc140dd9efb -r 88d7a58c12b8 Source/ESDebugController.m
--- a/Source/ESDebugController.m Wed Apr 29 16:25:58 2009 -0700
+++ b/Source/ESDebugController.m Thu Apr 30 20:43:03 2009 -0700
@@ -13,8 +13,6 @@
* You should have received a copy of the GNU General Public License along with this program; if not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifdef DEBUG_BUILD
-
#import "ESDebugController.h"
#import "ESDebugWindowController.h"
@@ -31,10 +29,12 @@
#define CACHED_DEBUG_LOGS 100 //Number of logs to keep at any given time
#define KEY_DEBUG_WINDOW_OPEN @"Debug Window Open"
+ at interface ESDebugController()
+- (void) start:(NSNotification *)dummy;
+ at end
+
@implementation ESDebugController
-static ESDebugController *sharedDebugController = nil;
-
//Throwing an exception isn't enough, we need to die completely.
void AIExplodeOnEnumerationMutation(id dummy) {
NSLog(@"Attempted to mutate collection %@ of class %@ while enumerating", dummy, [dummy class]);
@@ -43,33 +43,37 @@
- (id)init
{
- if (sharedDebugController)
- self = sharedDebugController;
- else {
- if ((self = [super init])) {
- objc_setEnumerationMutationHandler(AIExplodeOnEnumerationMutation);
+ if ((self = [super init])) {
+#ifdef DEBUG_BUILD
+ objc_setEnumerationMutationHandler(AIExplodeOnEnumerationMutation);
+#endif
- sharedDebugController = self;
-
- debugLogArray = [[NSMutableArray alloc] init];
- }
+ debugLogArray = [[NSMutableArray alloc] init];
}
return self;
}
- (void)controllerDidLoad
{
- //Contact list menu tem
+ if (AIDebugLoggingEnabled) {
+ [self start:nil];
+ } else {
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(start:) name:AIDebugLoggingEnabledNotification object:nil];
+ }
+}
+
+- (void) start:(NSNotification *)dummy {
+ //Contact list menu item
NSMenuItem *menuItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:AILocalizedString(@"Debug Window",nil)
target:self
action:@selector(showDebugWindow:)
keyEquivalent:@""];
[adium.menuController addMenuItem:menuItem toLocation:LOC_Adium_About];
[menuItem release];
-
+
//Restore the debug window if it was open when we quit last time
if ([[adium.preferenceController preferenceForKey:KEY_DEBUG_WINDOW_OPEN
- group:GROUP_DEBUG] boolValue]) {
+ group:GROUP_DEBUG] boolValue]) {
[ESDebugWindowController showDebugWindow];
}
@@ -78,6 +82,7 @@
- (void)controllerWillClose
{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
//Save the open state of the debug window
[adium.preferenceController setPreference:([ESDebugWindowController debugWindowIsOpen] ?
[NSNumber numberWithBool:YES] :
@@ -87,19 +92,12 @@
[ESDebugWindowController closeDebugWindow];
}
-+ (ESDebugController *)sharedDebugController
-{
- return sharedDebugController;
-}
-
- (void)dealloc
{
[debugLogArray release];
[debugLogFile closeFile];
[debugLogFile release];
- sharedDebugController = nil;
-
[super dealloc];
}
@@ -201,5 +199,3 @@
}
@end
-
-#endif
diff -r 6bc140dd9efb -r 88d7a58c12b8 Source/ESDebugWindowController.h
--- a/Source/ESDebugWindowController.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Source/ESDebugWindowController.h Thu Apr 30 20:43:03 2009 -0700
@@ -29,7 +29,6 @@
NSString *filter;
}
-#ifdef DEBUG_BUILD
+ (id)showDebugWindow;
+ (void)closeDebugWindow;
+ (BOOL)debugWindowIsOpen;
@@ -38,7 +37,5 @@
- (IBAction)clearLog:(id)sender;
- (void)setFilter:(NSString *)inFilter;
-#endif
-
@end
diff -r 6bc140dd9efb -r 88d7a58c12b8 Source/ESDebugWindowController.m
--- a/Source/ESDebugWindowController.m Wed Apr 29 16:25:58 2009 -0700
+++ b/Source/ESDebugWindowController.m Thu Apr 30 20:43:03 2009 -0700
@@ -22,7 +22,6 @@
#define DEBUG_WINDOW_NIB @"DebugWindow"
@implementation ESDebugWindowController
-#ifdef DEBUG_BUILD
static ESDebugWindowController *sharedDebugWindowInstance = nil;
@@ -177,6 +176,4 @@
}
}
-#endif
-
@end
diff -r 6bc140dd9efb -r 88d7a58c12b8 Utilities/dep-build-scripts/common.sh
--- a/Utilities/dep-build-scripts/common.sh Wed Apr 29 16:25:58 2009 -0700
+++ b/Utilities/dep-build-scripts/common.sh Thu Apr 30 20:43:03 2009 -0700
@@ -45,11 +45,13 @@
export CC=/usr/bin/gcc-4.2
TARGET_DIR_PPC="$BUILDDIR/root-ppc"
TARGET_DIR_I386="$BUILDDIR/root-i386"
+TARGET_DIR_X86_64="$BUILDDIR/root-x86_64"
TARGET_DIR_ARMV6="$BUILDDIR/root-armv6"
TARGET_DIR_BASE="$BUILDDIR/root"
export PATH_PPC="$TARGET_DIR_PPC/bin:$PATH"
export PATH_I386="$TARGET_DIR_I386/bin:$PATH"
+export PATH_X86_64="$TARGET_DIR_X86_64/root-x86_64:$PATH"
export PATH_ARMV6="$TARGET_DIR_ARMV6/bin:$PATH"
if [ "$1" = "-iphone" ]; then
diff -r 6bc140dd9efb -r 88d7a58c12b8 Utilities/dep-build-scripts/general_dependencies_make.sh
--- a/Utilities/dep-build-scripts/general_dependencies_make.sh Wed Apr 29 16:25:58 2009 -0700
+++ b/Utilities/dep-build-scripts/general_dependencies_make.sh Thu Apr 30 20:43:03 2009 -0700
@@ -11,12 +11,13 @@
# We only need a native pkg-config, it's not a runtime dependency,
# but we need a native one in both directories
#unset CFLAGS
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
echo "Building pkg-config for $ARCH"
case $ARCH in
ppc) TARGET_DIR=$TARGET_DIR_PPC;;
i386) TARGET_DIR=$TARGET_DIR_I386;;
+ x86_64) TARGET_DIR=$TARGET_DIR_X86_64;;
esac
mkdir pkg-config-`arch` >/dev/null 2>&1 || true
@@ -31,7 +32,7 @@
#gettext
# caveat - some of the build files in gettext appear to not respect CFLAGS
# and are compiling to `arch` instead of $ARCH. Lame.
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
echo "Building gettext for $ARCH"
export CFLAGS="$BASE_CFLAGS -arch $ARCH"
export CXXFLAGS="$CFLAGS"
@@ -41,7 +42,9 @@
ppc) HOST=powerpc-apple-darwin9
export PATH=$PATH_PPC;;
i386) HOST=i686-apple-darwin9
- export PATH=$PATH_I386;;
+ export PATH=$PATH_I386;;
+ x86_64) HOST=x86_64-apple-darwin9
+ export PATH=$PATH_X86_64;;
esac
mkdir gettext-$ARCH >/dev/null 2>&1 || true
@@ -69,12 +72,12 @@
# done
# popd > /dev/null 2>&1
-for ARCH in ppc i386; do
+for ARCH in ppc i386 x86_64; do
echo "Building glib for $ARCH"
LOCAL_BIN_DIR="$TARGET_DIR_BASE-$ARCH/bin"
LOCAL_LIB_DIR="$TARGET_DIR_BASE-$ARCH/lib"
LOCAL_INCLUDE_DIR="$TARGET_DIR_BASE-$ARCH/include"
- LOCAL_FLAGS="-L$LOCAL_LIB_DIR -I$LOCAL_INCLUDE_DIR -lintl -liconv"
+ LOCAL_FLAGS="-L$LOCAL_LIB_DIR -I$LOCAL_INCLUDE_DIR -lintl"
export PKG_CONFIG="$LOCAL_BIN_DIR/pkg-config"
export MSGFMT="$LOCAL_BIN_DIR/msgfmt"
@@ -86,6 +89,7 @@
case $ARCH in
ppc) HOST=powerpc-apple-darwin9;;
i386) HOST=i686-apple-darwin9;;
+ x86_64) HOST=x86_64-apple-darwin9;;
esac
mkdir glib-$ARCH >/dev/null 2>&1 || true
@@ -94,7 +98,7 @@
echo ' Configuring...'
"$SOURCEDIR/$GLIB/configure" \
--prefix=$TARGET_DIR \
- --with-libiconv \
+ --with-libiconv=native \
--disable-static --enable-shared \
--host=$HOST >> $LOG_FILE 2>&1
echo ' make && make install'
diff -r 6bc140dd9efb -r 88d7a58c12b8 Utilities/dep-build-scripts/glibconfig.h
--- a/Utilities/dep-build-scripts/glibconfig.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Utilities/dep-build-scripts/glibconfig.h Thu Apr 30 20:43:03 2009 -0700
@@ -2,6 +2,8 @@
#include <glibconfig-ppc.h>
#elif defined(__i386__)
#include <glibconfig-i386.h>
+#elif defined(__x86_64__)
+#include <glibconfig-x86_64.h>
#else
#error This isn't a recognized platform.
#endif
diff -r 6bc140dd9efb -r 88d7a58c12b8 Utilities/dep-build-scripts/libgadu.h
--- a/Utilities/dep-build-scripts/libgadu.h Wed Apr 29 16:25:58 2009 -0700
+++ b/Utilities/dep-build-scripts/libgadu.h Thu Apr 30 20:43:03 2009 -0700
@@ -2,6 +2,8 @@
#include "libgadu-ppc.h"
#elif defined(__i386__)
#include "libgadu-i386.h"
+#elif defined(__x86_64__)
+#include "libgadu-x86_64.h"
#else
#error This isn't a recognized platform.
#endif
diff -r 6bc140dd9efb -r 88d7a58c12b8 Utilities/dep-build-scripts/purple_dependencies_make.sh
--- a/Utilities/dep-build-scripts/purple_dependencies_make.sh Wed Apr 29 16:25:58 2009 -0700
+++ b/Utilities/dep-build-scripts/purple_dependencies_make.sh Thu Apr 30 20:43:03 2009 -0700
@@ -23,7 +23,7 @@
done
popd > /dev/null 2>&1
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
echo "Building Meanwhile for $ARCH"
export CFLAGS="$BASE_CFLAGS -arch $ARCH"
@@ -34,8 +34,11 @@
export PATH="$PATH_PPC"
export PKG_CONFIG_PATH="$TARGET_DIR_PPC/lib/pkgconfig";;
i386) TARGET_DIR="$TARGET_DIR_I386"
- export PATH="$PATH_I386"
- export PKG_CONFIG_PATH="$TARGET_DIR_I386/lib/pkgconfig";;
+ export PATH="$PATH_I386"
+ export PKG_CONFIG_PATH="$TARGET_DIR_I386/lib/pkgconfig";;
+ x86_64) TARGET_DIR="$TARGET_DIR_X86_64"
+ export PATH="$PATH_X86_64"
+ export PKG_CONFIG_PATH="$TARGET_DIR_X86_64/lib/pkgconfig";;
esac
mkdir meanwhile-$ARCH || true
@@ -68,7 +71,7 @@
popd > /dev/null 2>&1
# Gadu-gadu
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
echo "Building Gadu-Gadu for $ARCH"
export CFLAGS="$BASE_CFLAGS -arch $ARCH"
@@ -84,6 +87,10 @@
TARGET_DIR="$TARGET_DIR_I386"
export PATH="$PATH_I386"
export PKG_CONFIG_PATH="$TARGET_DIR_I386/lib/pkgconfig";;
+ x86_64) HOST=x86_64-apple-darwin9
+ TARGET_DIR="$TARGET_DIR_X86_64"
+ export PATH="$PATH_X86_64"
+ export PKG_CONFIG_PATH="$TARGET_DIR_X86_64/lib/pkgconfig";;
esac
mkdir gadu-$ARCH || true
@@ -102,7 +109,7 @@
# intltool so pidgin will configure
# need a native intltool in both ppc and i386
-for ARCH in ppc i386 ; do
+for ARCH in ppc i386 x86_64 ; do
echo "Building intltool for $ARCH"
mkdir intltool-$ARCH || true
@@ -111,6 +118,7 @@
case $ARCH in
ppc) TARGET_DIR="$TARGET_DIR_PPC" ;;
i386) TARGET_DIR="$TARGET_DIR_I386" ;;
+ x86_64) TARGET_DIR="$TARGET_DIR_X86_64" ;;
esac
echo ' Configuring...'
diff -r 6bc140dd9efb -r 88d7a58c12b8 Utilities/dep-build-scripts/universalize.sh
--- a/Utilities/dep-build-scripts/universalize.sh Wed Apr 29 16:25:58 2009 -0700
+++ b/Utilities/dep-build-scripts/universalize.sh Thu Apr 30 20:43:03 2009 -0700
@@ -41,6 +41,8 @@
$UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0/glibconfig-i386.h
cp $TARGET_DIR_PPC/lib/glib-2.0/include/glibconfig.h \
$UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0/glibconfig-ppc.h
+cp $TARGET_DIR_X86_64/lib/glib-2.0/include/glibconfig.h \
+ $UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0/glibconfig-x86_64.h
cp $SCRIPT_DIR/glibconfig.h $UNIVERSAL_DIR/include/libglib-2.0.0/glib-2.0
mkdir libgmodule-2.0.0 || true
@@ -59,6 +61,7 @@
# Another hack: we need libgadu.h
cp $TARGET_DIR_I386/include/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/libgadu-i386.h
cp $TARGET_DIR_PPC/include/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/libgadu-ppc.h
+cp $TARGET_DIR_X86_64/include/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/libgadu-x86_64.h
cp $SCRIPT_DIR/libgadu.h $UNIVERSAL_DIR/include/$PURPLE_FOLDER/
cd ..
More information about the commits
mailing list