changeset 268:281159a9672c

* Mac OS X build script fixes; wiki article is planned to be updated according to it
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 14 Jun 2009 14:45:25 +0000
parents 8eec4c078223
children ab0e7dae1837
files build/darwin-config-dist.py
diffstat 1 files changed, 51 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/build/darwin-config-dist.py	Sat Jun 13 19:12:10 2009 +0000
+++ b/build/darwin-config-dist.py	Sun Jun 14 14:45:25 2009 +0000
@@ -1,43 +1,59 @@
 import os, sys
 
 def initEnvironment(env):
-    env.Append(ENV={'PATH' : os.environ['PATH']})
-    env.Prepend(CXXFLAGS = '-DUSE_COCOA')
-    return env
+	env.Append(ENV={'PATH' : os.environ['PATH']})
+	env.Prepend(CXXFLAGS = '-DUSE_COCOA')
+	return env
 
 def addExtras(context):
-    context.env.Append(LIBPATH = ['/System/Library'])
-    context.env.Append(SHLINKFLAGS='-framework OpenAL')
-    context.env.Append(SHLINKFLAGS='-framework Cocoa')
-    context.env.Append(SHLINKFLAGS='-framework CoreFoundation')
-    context.env.Append(SHLINKFLAGS='-framework OpenGL')
-    context.env.Append(SHLINKFLAGS='-framework SDL')
-    context.env.Append(SHLINKFLAGS='-framework SDL_image')
-    context.env.Append(SHLINKFLAGS='-framework SDL_ttf')
-    context.env.Append(SHLINKFLAGS='-framework Python')
-    context.env.Append(SHLINKFLAGS='-lpng')
-    context.env['SHLIBSUFFIX']='.so'
-
-    include_dirs = ['/opt/local/include', '/usr/local/include', '/usr/X11/include', '/Library/Frameworks/SDL.framework/Headers',
-        '/Library/Frameworks/SDL_image.framework/Headers', '/Library/Frameworks/SDL_ttf.framework/Headers',
-        '/opt/local/include/boost', '/System/Library/Frameworks/OpenAL.framework/Headers', '/opt/local/include/vorbis/',
-	'/usr/include/python%s'%sys.version[:3], '/opt/local/include/guichan', 'ext/install/include', '../ext/install/include', '../ext/install/include/guichan']
-    context.env.Append(CPPPATH = include_dirs)
+	context.env.Append(LIBPATH = ['/System/Library','/opt/local/lib'])
+	context.env.Append(SHLINKFLAGS='-F/opt/local/Library/Frameworks')
+	context.env.Append(SHLINKFLAGS='-framework OpenAL')
+	context.env.Append(SHLINKFLAGS='-framework Cocoa')
+	context.env.Append(SHLINKFLAGS='-framework CoreFoundation')
+	context.env.Append(SHLINKFLAGS='-framework OpenGL')
+	context.env.Append(SHLINKFLAGS='-framework SDL')
+	context.env.Append(SHLINKFLAGS='-framework SDL_image')
+	context.env.Append(SHLINKFLAGS='-framework SDL_ttf')
+	context.env.Append(SHLINKFLAGS='-framework Python')
+	context.env.Append(SHLINKFLAGS='-lpng')
+	context.env['SHLIBSUFFIX']='.so'
 
-    lib_dirs = ['/opt/local/lib','/usr/local/lib','/usr/X11/lib','ext/install/lib','../ext/install/lib']
-    context.env.Append(LIBPATH = lib_dirs)
-
-    context.env.Append(CPPFLAGS='-D_THREAD_SAFE')
+	include_dirs = ['/opt/local/include',
+			'/usr/local/include',
+			'/usr/X11/include',
+			'/Library/Frameworks/SDL.framework/Headers',
+			'/opt/local/Library/Frameworks/SDL.framework/Headers',
+			'/Library/Frameworks/SDL_image.framework/Headers',
+			'/opt/local/Library/Frameworks/SDL_image.framework/Headers'
+			'/Library/Frameworks/SDL_ttf.framework/Headers',
+			'/opt/local/Library/Frameworks/SDL_ttf.framework/Headers',
+			'/opt/local/include/boost',
+			'/System/Library/Frameworks/OpenAL.framework/Headers',
+			'/opt/local/include/vorbis/',
+			'/usr/include/python%s'%sys.version[:3],
+			'/opt/local/include/guichan',
+			'ext/install/include',
+			'../ext/install/include',
+			'../ext/install/include/guichan']
 
-    context.CheckHeader('SDL_image.h')
-    context.CheckHeader('SDL_ttf.h')
-    context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h')
-    context.checkSimpleLib(['guichan'])
-    context.checkSimpleLib(['guichan_sdl'])
-    context.checkSimpleLib(['z'], 'zlib.h')
-    context.checkSimpleLib(['boost_filesystem'], ['boost/filesystem/convenience.hpp'], 'cxx')
-    context.checkSimpleLib(['boost_regex'], ['boost/regex.hpp'], 'cxx')
+	context.env.Append(CPPPATH = include_dirs)
+
+	lib_dirs = ['/opt/local/lib','/usr/local/lib','/usr/X11/lib','ext/install/lib','../ext/install/lib']
+	context.env.Append(LIBPATH = lib_dirs)
+
+	context.env.Append(CPPFLAGS='-D_THREAD_SAFE -F/opt/local/Library/Frameworks')
 
-    if context.env['opengl']:
-        context.checkSimpleLib(['guichan_opengl'], ['guichan/opengl.hpp'], 'cxx')
-        context.env.Append(SHLINKFLAGS='-framework OpenGL')
+	context.CheckHeader('SDL/SDL_image.h')
+	context.CheckHeader('SDL/SDL_ttf.h')
+	context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h')
+	context.checkSimpleLib(['guichan'])
+	context.checkSimpleLib(['guichan_sdl'])
+	context.checkSimpleLib(['z'], 'zlib.h')
+	context.checkSimpleLib(['boost_filesystem-mt'])
+	context.checkSimpleLib(['boost_system-mt'])
+	context.checkSimpleLib(['boost_regex-mt'])
+
+	if context.env['opengl']:
+		context.checkSimpleLib(['guichan_opengl'], ['guichan/opengl.hpp'], 'cxx')
+		context.env.Append(SHLINKFLAGS='-framework OpenGL')