[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54230] trunk/blender/build_files/scons/ tools/Blender.py: Fix scons building under unix.

Bastien Montagne montagne29 at wanadoo.fr
Thu Jan 31 13:24:19 CET 2013


Revision: 54230
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54230
Author:   mont29
Date:     2013-01-31 12:24:12 +0000 (Thu, 31 Jan 2013)
Log Message:
-----------
Fix scons building under unix. Now we should really have only *one* '/usr/lib' lib search path, in last position! Previously we could have a bunch of those, even in first position, which would e.g. prevent linking against a custom boost in /opt/lib/boost if you had a system boost installed...

Modified Paths:
--------------
    trunk/blender/build_files/scons/tools/Blender.py

Modified: trunk/blender/build_files/scons/tools/Blender.py
===================================================================
--- trunk/blender/build_files/scons/tools/Blender.py	2013-01-31 11:17:08 UTC (rev 54229)
+++ trunk/blender/build_files/scons/tools/Blender.py	2013-01-31 12:24:12 UTC (rev 54230)
@@ -29,6 +29,7 @@
 import SCons.Action
 import SCons.Util
 import SCons.Builder
+import SCons.Subst
 import SCons.Tool
 import bcolors
 bc = bcolors.bcolors()
@@ -234,10 +235,6 @@
         if lenv['WITH_BF_STATICLLVM']:
             statlibs += Split(lenv['BF_LLVM_LIB_STATIC'])
 
-    # setting this last so any overriding of manually libs could be handled
-    if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'):
-        libincs.append('/usr/lib')
-
     if lenv['WITH_BF_JEMALLOC']:
         libincs += Split(lenv['BF_JEMALLOC_LIBPATH'])
         if lenv['WITH_BF_STATICJEMALLOC']:
@@ -249,6 +246,12 @@
             if lenv['WITH_BF_STATIC3DMOUSE']:
                 statlibs += Split(lenv['BF_3DMOUSE_LIB_STATIC'])
 
+    # setting this last so any overriding of manually libs could be handled
+    if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'):
+        # We must remove any previous items defining this path, for same reason stated above!
+        libincs = [e for e in libincs if SCons.Subst.scons_subst(e, lenv, gvars=lenv.Dictionary()) != "/usr/lib"]
+        libincs.append('/usr/lib')
+
     return statlibs, libincs
 
 def setup_syslibs(lenv):




More information about the Bf-blender-cvs mailing list