1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
$NetBSD: patch-ae,v 1.4 2006/02/10 20:34:25 adam Exp $
--- SConstruct.orig 2006-01-22 23:46:29.000000000 +0100
+++ SConstruct
@@ -38,7 +38,7 @@ else:
playername = 'blenderplayer$PROGSUFFIX'
# Build directory.
-# root_build_dir = '..' + os.sep + 'build' + os.sep + sys.platform + os.sep
+root_build_dir = '..' + os.sep + 'build' + os.sep + sys.platform + os.sep
bs_config.parseOpts()
@@ -61,7 +61,102 @@ sdl_env = Environment (ENV = os.environ)
freetype_env = Environment (ENV = os.environ)
env = Environment (ENV = os.environ)
-if sys.platform == 'linux2' or sys.platform == 'linux-i386':
+# pkgsrc patch
+#
+sys.platform = 'pkgsrc'
+if sys.platform == 'pkgsrc':
+ print "Building for pkgsrc systems"
+ use_international = 'false'
+ use_gameengine = 'true'
+ use_openal = 'false'
+ use_fmod = 'false'
+ use_quicktime = 'false'
+ use_sumo = 'true'
+ use_ode = 'false'
+ use_bullet = 'true'
+ use_buildinfo = 'true'
+ use_fluidsim = 'true'
+ build_blender_dynamic = 'true'
+ build_blender_static = 'false'
+ build_blender_player = 'false'
+ build_blender_plugin = 'false'
+ release_flags = string.split(os.environ[ 'CFLAGS' ])
+ debug_flags = ['-O2', '-g']
+ extra_flags = ['-pipe', '-fPIC', '-funsigned-char']
+ cxxflags = []
+ defines = []
+ warn_flags = ['-Wall','-W']
+ window_system = 'X11'
+ platform_libs = ['m', 'stdc++', 'pthread', 'util']
+ platform_libpath = []
+ platform_linkflags = []
+ extra_includes = []
+ z_lib = ['z']
+ z_libpath = []
+ z_include = []
+ # png library information
+ png_lib = ['png']
+ png_libpath = os.environ[ 'ADD_C_LIB_DIRS' ].split(",")
+ png_include = os.environ[ 'ADD_C_INCLUDE_DIRS' ].split(",")
+ # jpeg library information
+ jpeg_lib = ['jpeg']
+ jpeg_libpath = os.environ[ 'ADD_C_LIB_DIRS' ].split(",")
+ jpeg_include = os.environ[ 'ADD_C_INCLUDE_DIRS' ].split(",")
+ # tiff library information
+ tiff_lib = ['tiff']
+ tiff_libpath = os.environ[ 'ADD_C_LIB_DIRS' ].split(",")
+ tiff_include = os.environ[ 'ADD_C_INCLUDE_DIRS' ].split(",")
+ # OpenGL library information
+ opengl_lib = ['GL', 'GLU']
+ opengl_libpath = os.environ[ 'ADD_C_LIB_DIRS' ].split(",")
+ opengl_include = os.environ[ 'ADD_C_INCLUDE_DIRS' ].split(",")
+ opengl_static = ['libGL.a', 'libGLU.a']
+ # SDL library information
+ sdl_env.ParseConfig ('sdl-config --cflags --libs')
+ sdl_cflags = sdl_env.Dictionary()['CCFLAGS']
+ sdl_include = sdl_env.Dictionary()['CPPPATH']
+ sdl_libpath = sdl_env.Dictionary()['LIBPATH']
+ sdl_lib = sdl_env.Dictionary()['LIBS']
+ # SOLID library information
+ solid_lib = [] # TODO
+ solid_libpath = [] # TODO
+ solid_include = ['#extern/solid']
+ qhull_lib = [] # TODO
+ qhull_libpath = [] # TODO
+ qhull_include = ['#extern/qhull/include']
+ # Bullet library information
+ bullet_lib = []
+ bullet_libpath = []
+ bullet_include = ['#extern/bullet','#extern/bullet/LinearMath','#extern/bullet/Bullet','#extern/bullet/BulletDynamics']
+ # ODE library information
+ ode_lib = ['ode']
+ ode_libpath = os.environ[ 'ADD_C_LIB_DIRS' ].split(",")
+ ode_include = os.environ[ 'ADD_C_INCLUDE_DIRS' ].split(",")
+ # Python library information
+ python_lib = ['python%d.%d' % sys.version_info[0:2]]
+ python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
+ python_include = [sysconfig.get_python_inc ()]
+ python_linkflags = Split (sysconfig.get_config_var('LINKFORSHARED'))
+ # International support information
+ ftgl_lib = ['ftgl']
+ ftgl_libpath = ['#../lib/linux-glibc2.2.5-i386/ftgl/lib']
+ ftgl_include = ['#../lib/linux-glibc2.2.5-i386/ftgl/include']
+ freetype_env.ParseConfig('pkg-config --cflags --libs freetype2')
+ freetype_lib = freetype_env.Dictionary()['LIBS']
+ freetype_libpath = freetype_env.Dictionary()['LIBPATH']
+ freetype_include = freetype_env.Dictionary()['CPPPATH']
+ gettext_lib = []
+ gettext_libpath = []
+ gettext_include = []
+ # OpenAL library information
+ openal_lib = ['openal']
+ openal_libpath = []
+ openal_include = []
+
+elif sys.platform=='freebsd4' or sys.platform=='freebsd5':
+ print "Building for FreeBSD"
+
+elif sys.platform == 'linux2' or sys.platform == 'linux-i386':
use_international = 'true'
use_gameengine = 'true'
use_openal = 'true'
@@ -561,7 +656,7 @@ elif string.find (sys.platform, 'irix')
use_openal = 'false'
use_fmod = 'false'
use_quicktime = 'false'
- use_sumo = 'false'
+ use_sumo = 'true'
use_ode = 'false'
use_bullet = 'false'
use_buildinfo = 'false'
|