annotate build/darwin-config-dist.py @ 278:6a848ab742be

*renamed the patch file
author LinuxDonald@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 16 Jun 2009 18:38:17 +0000
parents 281159a9672c
children bbabe4942150
rev   line source
175
ea04dfe54aae * Buildscripts have been modified to work with different python versions.
nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 0
diff changeset
1 import os, sys
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
2
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
3 def initEnvironment(env):
268
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
4 env.Append(ENV={'PATH' : os.environ['PATH']})
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
5 env.Prepend(CXXFLAGS = '-DUSE_COCOA')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
6 return env
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
7
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
8 def addExtras(context):
268
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
9 context.env.Append(LIBPATH = ['/System/Library','/opt/local/lib'])
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
10 context.env.Append(SHLINKFLAGS='-F/opt/local/Library/Frameworks')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
11 context.env.Append(SHLINKFLAGS='-framework OpenAL')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
12 context.env.Append(SHLINKFLAGS='-framework Cocoa')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
13 context.env.Append(SHLINKFLAGS='-framework CoreFoundation')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
14 context.env.Append(SHLINKFLAGS='-framework OpenGL')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
15 context.env.Append(SHLINKFLAGS='-framework SDL')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
16 context.env.Append(SHLINKFLAGS='-framework SDL_image')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
17 context.env.Append(SHLINKFLAGS='-framework SDL_ttf')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
18 context.env.Append(SHLINKFLAGS='-framework Python')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
19 context.env.Append(SHLINKFLAGS='-lpng')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
20 context.env['SHLIBSUFFIX']='.so'
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
21
268
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
22 include_dirs = ['/opt/local/include',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
23 '/usr/local/include',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
24 '/usr/X11/include',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
25 '/Library/Frameworks/SDL.framework/Headers',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
26 '/opt/local/Library/Frameworks/SDL.framework/Headers',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
27 '/Library/Frameworks/SDL_image.framework/Headers',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
28 '/opt/local/Library/Frameworks/SDL_image.framework/Headers'
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
29 '/Library/Frameworks/SDL_ttf.framework/Headers',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
30 '/opt/local/Library/Frameworks/SDL_ttf.framework/Headers',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
31 '/opt/local/include/boost',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
32 '/System/Library/Frameworks/OpenAL.framework/Headers',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
33 '/opt/local/include/vorbis/',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
34 '/usr/include/python%s'%sys.version[:3],
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
35 '/opt/local/include/guichan',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
36 'ext/install/include',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
37 '../ext/install/include',
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
38 '../ext/install/include/guichan']
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
39
268
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
40 context.env.Append(CPPPATH = include_dirs)
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
41
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
42 lib_dirs = ['/opt/local/lib','/usr/local/lib','/usr/X11/lib','ext/install/lib','../ext/install/lib']
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
43 context.env.Append(LIBPATH = lib_dirs)
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
44
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
45 context.env.Append(CPPFLAGS='-D_THREAD_SAFE -F/opt/local/Library/Frameworks')
0
4a0efb7baf70 * Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
46
268
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
47 context.CheckHeader('SDL/SDL_image.h')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
48 context.CheckHeader('SDL/SDL_ttf.h')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
49 context.checkSimpleLib(['vorbisfile'], 'vorbisfile.h')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
50 context.checkSimpleLib(['guichan'])
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
51 context.checkSimpleLib(['guichan_sdl'])
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
52 context.checkSimpleLib(['z'], 'zlib.h')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
53 context.checkSimpleLib(['boost_filesystem-mt'])
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
54 context.checkSimpleLib(['boost_system-mt'])
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
55 context.checkSimpleLib(['boost_regex-mt'])
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
56
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
57 if context.env['opengl']:
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
58 context.checkSimpleLib(['guichan_opengl'], ['guichan/opengl.hpp'], 'cxx')
281159a9672c * Mac OS X build script fixes; wiki article is planned to be updated according to it
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 175
diff changeset
59 context.env.Append(SHLINKFLAGS='-framework OpenGL')