Changeset 1224

Show
Ignore:
Timestamp:
07/08/09 17:08:13 (14 months ago)
Author:
dane
Message:

scons: when auto-finding boost libraries take the shortest boost library name found to avoid problems with variable extension naming on linux (TODO add better regex approach)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1220 r1224  
    6161    else: 
    6262        color_print(1,'Problem encounted with SCons scripts, please post bug report to: http://trac.mapnik.org\nError was: %s' % stderr) 
     63 
     64def shortest_name(libs): 
     65    name = '-'*200 
     66    for lib in libs: 
     67        if len(name) > len(lib): 
     68            name = lib 
     69    return name 
    6370 
    6471if platform.uname()[4] == 'x86_64': 
     
    375382            BOOST_LIB_DIR = os.path.dirname(libItems[0]) 
    376383            BOOST_INCLUDE_DIR = incItems[0].rstrip('boost/') 
    377             match = re.search(r'libboost_filesystem-(.*)\..*', libItems[0]) 
     384            shortest_lib_name = shortest_name(libItems) 
     385            match = re.search(r'libboost_filesystem-(.*)\..*', shortest_lib_name) 
    378386            if hasattr(match,'groups'): 
    379387                BOOST_APPEND = match.groups()[0]