fixes for building on solaris and opensolaris, in addition to automatic running of ldconfig (will benefit builds on linux and fail silently otherwise)
This commit is contained in:
parent
317830784e
commit
9674171eb4
3 changed files with 34 additions and 12 deletions
|
@ -32,17 +32,19 @@ source = Split(
|
|||
|
||||
headers = env['CPPPATH']
|
||||
|
||||
boost_thread = 'boost_thread%s' % env['BOOST_APPEND']
|
||||
boost_regex = 'boost_regex%s' % env['BOOST_APPEND']
|
||||
|
||||
libraries = [boost_thread,'mapnik2']
|
||||
libraries = ['mapnik2']
|
||||
|
||||
if env['THREADING'] == 'multi':
|
||||
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
|
||||
if env['HAS_CAIRO'] in env['CXXFLAGS']:
|
||||
# add cairo and cairomm-1.0 to libs
|
||||
libraries.append('cairomm-1.0')
|
||||
libraries.append('cairo')
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
if env['PLATFORM'] in ('Darwin','SunOS'):
|
||||
libraries.append(boost_regex)
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
|
||||
|
|
|
@ -581,9 +581,9 @@ def tool_list(platform, env):
|
|||
ars = ['sgiar']
|
||||
elif str(platform) == 'sunos':
|
||||
"prefer Forte tools on SunOS"
|
||||
linkers = ['sunlink', 'gnulink']
|
||||
c_compilers = ['suncc', 'gcc', 'cc']
|
||||
cxx_compilers = ['sunc++', 'g++', 'c++']
|
||||
linkers = ['gnulink','sunlink']
|
||||
c_compilers = ['gcc','suncc', 'cc']
|
||||
cxx_compilers = ['g++','sunc++', 'c++']
|
||||
assemblers = ['as', 'gas']
|
||||
fortran_compilers = ['sunf95', 'sunf90', 'sunf77', 'f95', 'f90', 'f77',
|
||||
'gfortran', 'g77', 'fortran']
|
||||
|
|
|
@ -20,11 +20,23 @@
|
|||
# $Id$
|
||||
|
||||
|
||||
import glob
|
||||
import os
|
||||
import glob
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
Import('env')
|
||||
|
||||
def call(cmd, silent=True):
|
||||
stdin, stderr = Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate()
|
||||
if not stderr:
|
||||
return stdin.strip()
|
||||
elif not silent:
|
||||
print stderr
|
||||
|
||||
|
||||
def ldconfig(*args,**kwargs):
|
||||
call('ldconfig')
|
||||
|
||||
ABI_VERSION = env['ABI_VERSION']
|
||||
|
||||
prefix = env['PREFIX']
|
||||
|
@ -74,8 +86,11 @@ if env['PLATFORM'] == 'Darwin':
|
|||
linkflags = '-Wl,-install_name,%s' % lib_path
|
||||
_d = {'version':env['MAPNIK_VERSION_STRING']}
|
||||
linkflags += ' -current_version %(version)s -compatibility_version %(version)s' % _d
|
||||
elif env['PLATFORM'] == 'SunOS' and env['CXX'].startswith('CC'):
|
||||
linkflags = '-R. -h %s' % mapnik_libname
|
||||
elif env['PLATFORM'] == 'SunOS':
|
||||
if env['CXX'].startswith('CC'):
|
||||
linkflags = '-R. -h %s' % mapnik_libname
|
||||
else:
|
||||
linkflags = '-Wl,-h,%s' % mapnik_libname
|
||||
else: # Linux and others
|
||||
linkflags = '-Wl,-rpath-link,. -Wl,-soname,%s' % mapnik_libname
|
||||
|
||||
|
@ -226,7 +241,11 @@ if env['PLATFORM'] != 'Darwin':
|
|||
target = os.path.join(libDir, soFile)
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Alias(target='install', source=env.InstallAs(target=target, source=mapnik))
|
||||
result = env.InstallAs(target=target, source=mapnik)
|
||||
env.Alias(target='install', source=result)
|
||||
if result:
|
||||
env.AddPostAction(result, ldconfig)
|
||||
|
||||
|
||||
# Install symlinks
|
||||
target1 = os.path.join(libDir, "%s.%d.%d" % (os.path.basename(str(mapnik[0])),major, minor))
|
||||
|
@ -235,7 +254,6 @@ if env['PLATFORM'] != 'Darwin':
|
|||
if 'install' in COMMAND_LINE_TARGETS:
|
||||
link1 = env.Command(target1, target, symlink)
|
||||
env.Alias(target='install', source=link1)
|
||||
if 'install' in COMMAND_LINE_TARGETS:
|
||||
link2 = env.Command(target2, target1, symlink)
|
||||
env.Alias(target='install', source=link2)
|
||||
# delete in reverse order..
|
||||
|
@ -246,7 +264,9 @@ if env['PLATFORM'] != 'Darwin':
|
|||
else:
|
||||
target_path = os.path.normpath(install_prefix + '/' + env['LIBDIR_SCHEMA'])
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Alias(target='install', source=env.Install(target_path, mapnik))
|
||||
result = env.Install(target_path, mapnik)
|
||||
env.Alias(target='install', source=result)
|
||||
|
||||
env['create_uninstall_target'](env, os.path.join(target_path,mapnik_libname))
|
||||
|
||||
includes = glob.glob('../include/mapnik/*.hpp')
|
||||
|
|
Loading…
Reference in a new issue