backport solaris fixes for python runpaths and pthreads from trunk
This commit is contained in:
parent
503da430dc
commit
f1caa3bbd4
2 changed files with 17 additions and 8 deletions
|
@ -1009,6 +1009,8 @@ if not preconfigured:
|
|||
# but will retain logic for future use
|
||||
#if platform.mac_ver()[0].startswith('10.5'):
|
||||
# common_cxx_flags += '-DOSX_LEOPARD '
|
||||
elif env['PLATFORM'] == 'SunOS':
|
||||
pthread = '-pthreads'
|
||||
else:
|
||||
pthread = '-pthread'
|
||||
|
||||
|
|
|
@ -42,6 +42,16 @@ if env['BOOST_PYTHON_LIB']:
|
|||
else:
|
||||
libraries.append('boost_python%s' % env['BOOST_APPEND'])
|
||||
|
||||
|
||||
# set up an understanding of where libmapnik is being installed
|
||||
# so that the python module can locate it at runtime
|
||||
# and so that we can add its runpath to _mapnik.so if needed (e.g. solaris)
|
||||
# Note: we use prefix rather than install_prefix here since install_prefix is for package building
|
||||
# and we intend for python to look to the standard prefix location to find the fonts and plugins
|
||||
mapnik_lib_path = os.path.normpath(prefix + '/' + env['LIBDIR_SCHEMA'])
|
||||
mapnik_lib_dir_path = os.path.normpath(prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'])
|
||||
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_regex%s' % env['BOOST_APPEND'])
|
||||
|
@ -92,6 +102,10 @@ if env['PLATFORM'] == 'Darwin':
|
|||
# if we are not linking to a framework then use the *nix standard approach
|
||||
else:
|
||||
linkflags = '-lpython%s' % env['PYTHON_VERSION']
|
||||
elif env['PLATFORM'] == 'SunOS':
|
||||
# make sure to explicitly link mapnik.so against
|
||||
# libmapnik in its installed location
|
||||
linkflags = '-R%s' % mapnik_lib_path
|
||||
|
||||
|
||||
|
||||
|
@ -111,16 +125,9 @@ else:
|
|||
paths += "fontscollectionpath = os.path.normpath(mapniklibpath + '/fonts')"
|
||||
|
||||
|
||||
# write out the location of the 'mapniklibpath' into a python file
|
||||
# so that the python module can locate it at runtime
|
||||
exp = r"%s{2,}" % os.sep
|
||||
# Note: we use prefix rather than install_prefix here since install_prefix is for package building
|
||||
# and we intend for python to look to the standard prefix location to find the fonts and plugins
|
||||
mapnik_lib_path = re.sub(exp,os.sep, prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'])
|
||||
|
||||
if not os.path.exists('mapnik'):
|
||||
os.mkdir('mapnik')
|
||||
file('mapnik/paths.py','w').write(paths % (mapnik_lib_path))
|
||||
file('mapnik/paths.py','w').write(paths % (mapnik_lib_dir_path))
|
||||
|
||||
try:
|
||||
os.chmod('mapnik/paths.py',0666)
|
||||
|
|
Loading…
Reference in a new issue