Merge branch 'master' of github.com:mapnik/mapnik into expr-v2

This commit is contained in:
Dane Springmeyer 2014-01-21 21:01:48 -08:00
commit 99bf263afd
6 changed files with 31 additions and 21 deletions

View file

@ -391,6 +391,7 @@ opts.AddVariables(
BoolVariable('PYTHON_DYNAMIC_LOOKUP', 'On OSX, do not directly link python lib, but rather dynamically lookup symbols', 'True'),
('FRAMEWORK_SEARCH_PATH','Custom framework search path on Mac OS X', ''),
BoolVariable('FULL_LIB_PATH', 'Use the full path for the libmapnik.dylib "install_name" when linking on Mac OS X', 'True'),
BoolVariable('ENABLE_SONAME', 'Use the full path for the libmapnik.dylib "install_name" when linking on Mac OS X', 'True'),
ListVariable('BINDINGS','Language bindings to build','all',['python']),
EnumVariable('THREADING','Set threading support','multi', ['multi','single']),
EnumVariable('XMLPARSER','Set xml parser','libxml2', ['libxml2','ptree']),
@ -928,7 +929,11 @@ int main()
def boost_regex_has_icu(context):
if env['RUNTIME_LINK'] == 'static':
context.env.AppendUnique(LIBS='icudata')
# re-order icu libs to ensure linux linker is happy
for lib_name in ['icui18n',env['ICU_LIB_NAME'],'icudata']:
if lib_name in context.env['LIBS']:
context.env['LIBS'].remove(lib_name)
context.env.Append(LIBS=lib_name)
ret = context.TryRun("""
#include <boost/regex/icu.hpp>
@ -1363,7 +1368,6 @@ if not preconfigured:
# http://lists.boost.org/Archives/boost/2009/03/150076.php
# we need libicui18n if using static boost libraries, so it is
# important to try this check with the library linked
env.AppendUnique(LIBS='icui18n')
if conf.boost_regex_has_icu():
# TODO - should avoid having this be globally defined...
env.Append(CPPDEFINES = '-DBOOST_REGEX_HAS_ICU')

View file

@ -45,10 +45,10 @@ CONFIG_MAPNIK_DEFINES='%(defines)s'
CONFIG_MAPNIK_LIBNAME='%(mapnik_libname)s'
CONFIG_MAPNIK_LIBPATH="%(mapnik_libpath)s"
CONFIG_DEP_LIBS='%(dep_libs)s'
CONFIG_MAPNIK_LDFLAGS='%(ldflags)s'
CONFIG_MAPNIK_LDFLAGS="%(ldflags)s"
CONFIG_MAPNIK_INCLUDE="${CONFIG_PREFIX}/include -I${CONFIG_PREFIX}/include/mapnik/agg"
CONFIG_DEP_INCLUDES='%(dep_includes)s'
CONFIG_CXXFLAGS='%(cxxflags)s'
CONFIG_DEP_INCLUDES="%(dep_includes)s"
CONFIG_CXXFLAGS="%(cxxflags)s"
CONFIG_CXX='%(cxx)s'
'''
@ -105,12 +105,12 @@ else:
# for fonts and input plugins we should try
# to store the relative path, if feasible
fontspath = config_env['MAPNIK_FONTS']
lib_root = os.path.join(config_env['INSTALL_PREFIX'], config_env['LIBDIR_SCHEMA'])
lib_root = os.path.join(config_env['PREFIX'], config_env['LIBDIR_SCHEMA'])
if lib_root in fontspath:
fontspath = "${CONFIG_PREFIX}/" + os.path.relpath(fontspath,config_env['INSTALL_PREFIX'])
fontspath = "${CONFIG_PREFIX}/" + os.path.relpath(fontspath,config_env['PREFIX'])
inputpluginspath = config_env['MAPNIK_INPUT_PLUGINS']
if lib_root in inputpluginspath:
inputpluginspath = "${CONFIG_PREFIX}/" + os.path.relpath(inputpluginspath,config_env['INSTALL_PREFIX'])
inputpluginspath = "${CONFIG_PREFIX}/" + os.path.relpath(inputpluginspath,config_env['PREFIX'])
lib_path = "${CONFIG_PREFIX}/" + config_env['LIBDIR_SCHEMA']

View file

@ -55,6 +55,11 @@ link_all_libs = env['LINKING'] == 'static' or env['RUNTIME_LINK'] == 'static' or
if link_all_libs:
py_env.AppendUnique(LIBS=env['LIBMAPNIK_LIBS'])
# even though boost_thread is no longer used in mapnik core
# we need to link in for boost_python to avoid missing symbol: _ZN5boost6detail12get_tss_dataEPKv / boost::detail::get_tss_data
py_env.AppendUnique(LIBS = 'boost_thread%s' % env['BOOST_APPEND'])
# note: on linux -lrt must be linked after thread to avoid: undefined symbol: clock_gettime
if env['RUNTIME_LINK'] == 'static' and env['PLATFORM'] == 'Linux':
py_env.AppendUnique(LIBS='rt')
@ -177,7 +182,6 @@ if 'uninstall' not in COMMAND_LINE_TARGETS:
py_env.ParseConfig('pkg-config --cflags pycairo')
py_env.Append(CPPDEFINES = '-DHAVE_PYCAIRO')
py_env.AppendUnique(LIBS = 'boost_thread%s' % env['BOOST_APPEND'])
py_env.Append(LINKFLAGS=python_link_flag)
_mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LDMODULEPREFIX='', LDMODULESUFFIX='.so')

View file

@ -86,9 +86,6 @@ if len(env['EXTRA_FREETYPE_LIBS']):
lib_env['LIBS'].append('xml2')
lib_env['LIBS'].append('z')
#if env['THREADING'] == 'multi':
# lib_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND'])
if '-DBOOST_REGEX_HAS_ICU' in env['CPPDEFINES']:
lib_env['LIBS'].append('icui18n')
@ -103,12 +100,14 @@ if env['PLATFORM'] == 'Darwin':
if env['FULL_LIB_PATH']:
lib_path = '%s/%s' % (env['MAPNIK_LIB_BASE'],mapnik_libname)
else:
lib_path = mapnik_libname
lib_path = '@loader_path/'+libmapnik_libname
mapnik_lib_link_flag += ' -Wl,-install_name,%s' % lib_path
_d = {'version':env['MAPNIK_VERSION_STRING'].replace('-pre','')}
mapnik_lib_link_flag += ' -current_version %(version)s -compatibility_version %(version)s' % _d
else: # unix, non-macos
mapnik_libname = env.subst(env['MAPNIK_LIB_NAME']) + (".%d.%d" % (int(ABI_VERSION[0]),int(ABI_VERSION[1])))
mapnik_libname = env.subst(env['MAPNIK_LIB_NAME'])
if env['ENABLE_SONAME']:
mapnik_libname = env.subst(env['MAPNIK_LIB_NAME']) + (".%d.%d" % (int(ABI_VERSION[0]),int(ABI_VERSION[1])))
if env['PLATFORM'] == 'SunOS':
if env['CXX'].startswith('CC'):
mapnik_lib_link_flag += ' -R. -h %s' % mapnik_libname
@ -116,7 +115,13 @@ else: # unix, non-macos
mapnik_lib_link_flag += ' -Wl,-h,%s' % mapnik_libname
else: # Linux and others
lib_env['LIBS'].append('dl')
mapnik_lib_link_flag += ' -Wl,-rpath-link,. -Wl,-soname,%s' % mapnik_libname
mapnik_lib_link_flag += ' -Wl,-rpath-link,.'
if env['ENABLE_SONAME']:
mapnik_lib_link_flag += ' -Wl,-soname,%s' % mapnik_libname
if env['FULL_LIB_PATH']:
mapnik_lib_link_flag += ' -Wl,-rpath=%s' % env['MAPNIK_LIB_BASE']
else:
mapnik_lib_link_flag += ' -Wl,-z,origin -Wl,-rpath=\$$ORIGIN'
source = Split(
"""

View file

@ -168,7 +168,7 @@ void jpeg_reader<T>::skip(j_decompress_ptr cinfo, long count)
}
else
{
wrap->stream->seekg(count, std::ios_base::cur);
wrap->stream->seekg(count - wrap->manager.bytes_in_buffer, std::ios_base::cur);
// trigger buffer fill
wrap->manager.next_input_byte = 0;
wrap->manager.bytes_in_buffer = 0; //bytes_in_buffer may be zero on return.

View file

@ -4,11 +4,8 @@ from copy import copy
Import ('env')
filesystem = 'boost_filesystem%s' % env['BOOST_APPEND']
system = 'boost_system%s' % env['BOOST_APPEND']
regex = 'boost_regex%s' % env['BOOST_APPEND']
libraries = copy(env['LIBMAPNIK_LIBS'])
libraries.append('mapnik')
libraries = ['mapnik']
libraries.extend(copy(env['LIBMAPNIK_LIBS']))
for cpp_test in glob.glob('*_test.cpp'):
test_program = env.Program(cpp_test.replace('.cpp',''), [cpp_test], LIBS=libraries)