[Bf-committers] patch for OS X SConstruct

Michael Velikanje bf-committers@blender.org
Thu, 18 Mar 2004 22:06:34 -0900


This works on my system to automatically insert the correct version 
number into the darwin_precomp string in the config.opts file. It 
obviously needs to be tested on other systems, OS X systems that is 
:^).

Index: SConstruct
===================================================================
RCS file: /cvsroot/bf-blender/blender/SConstruct,v
retrieving revision 1.33
diff -u -r1.33 SConstruct
--- SConstruct	18 Mar 2004 15:06:48 -0000	1.33
+++ SConstruct	19 Mar 2004 06:54:41 -0000
@@ -111,9 +111,14 @@
      build_blender_static = 'false'
      build_blender_player = 'false'
      build_blender_plugin = 'false'
-    # TODO: replace darwin-6.8-powerpc with the actual directiory on 
the
-    #       build machine
-    darwin_precomp = '#../lib/darwin-6.8-powerpc'
+    # Start of code to insert the correct version number into the 
darwin_precomp
+    # string for OS X.
+    f = os.popen('uname -r')
+    a = f.readline()
+    f.close
+    b = a.split()
+    c = b[0]
+    darwin_precomp = '#../lib/darwin-%s-powerpc' %c
      extra_flags = ['-pipe', '-fPIC', '-funsigned-char']
      cxxflags = []
      defines = ['_THREAD_SAFE']


Michael Velikanje