directly link libmapnik in plugins (not just darwin) - patch from Stella L. - closes #790
This commit is contained in:
parent
3bbd4b9b3a
commit
e84119aed9
14 changed files with 72 additions and 96 deletions
1
AUTHORS
1
AUTHORS
|
@ -39,6 +39,7 @@ Patches
|
|||
- Aubrey Holland
|
||||
- Konstantin Käfer
|
||||
- Mak Kolybabi
|
||||
- Stella Laurenzo
|
||||
- Dennis Luxen
|
||||
- Tom MacWright
|
||||
- Michal Migurski
|
||||
|
|
|
@ -14,6 +14,8 @@ For a complete change history, see the SVN log.
|
|||
Mapnik Trunk
|
||||
------------
|
||||
|
||||
- Directly link input plugins to libmapnik to avoid having to set dlopen flags from binding languages (#790)
|
||||
|
||||
- Throw an error during registration for fonts which Freetype2 does not report a family or style name (r2985).
|
||||
|
||||
- Fixed quoting syntax for "table"."attribute" in PostGIS plugin (previously if table aliases were used quoting like "table.attribute" would cause query failure) (r2979).
|
||||
|
|
|
@ -43,18 +43,6 @@ import os
|
|||
import sys
|
||||
import warnings
|
||||
|
||||
try:
|
||||
from ctypes import RTLD_NOW, RTLD_GLOBAL
|
||||
except ImportError:
|
||||
try:
|
||||
from DLFCN import RTLD_NOW, RTLD_GLOBAL
|
||||
except ImportError:
|
||||
RTLD_NOW = 2
|
||||
RTLD_GLOBAL = 256
|
||||
|
||||
flags = sys.getdlopenflags()
|
||||
sys.setdlopenflags(RTLD_NOW | RTLD_GLOBAL)
|
||||
|
||||
from _mapnik2 import *
|
||||
from paths import inputpluginspath, fontscollectionpath
|
||||
|
||||
|
@ -660,9 +648,6 @@ def register_fonts(path=fontscollectionpath,valid_extensions=['.ttf','.otf','.tt
|
|||
register_plugins()
|
||||
register_fonts()
|
||||
|
||||
#set dlopen flags back to the original
|
||||
sys.setdlopenflags(flags)
|
||||
|
||||
# Explicitly export API members to avoid namespace pollution
|
||||
# and ensure correct documentation processing
|
||||
__all__ = [
|
||||
|
|
|
@ -35,15 +35,14 @@ gdal_src = Split(
|
|||
|
||||
libraries = [env['PLUGINS']['gdal']['lib']]
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
|
||||
input_plugin = plugin_env.SharedLibrary('../gdal', source=gdal_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -36,7 +36,7 @@ geos_src = Split(
|
|||
|
||||
libraries = [env['PLUGINS']['geos']['lib']]
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
|
@ -44,9 +44,8 @@ if env['PLATFORM'] == 'Darwin':
|
|||
|
||||
input_plugin = plugin_env.SharedLibrary('../geos', source=geos_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -34,16 +34,15 @@ kismet_src = Split(
|
|||
)
|
||||
|
||||
libraries = []
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_thread%s' % env['BOOST_APPEND'])
|
||||
|
||||
input_plugin = plugin_env.SharedLibrary('../kismet', source=kismet_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -37,15 +37,13 @@ occi_src = Split(
|
|||
)
|
||||
|
||||
libraries = [ 'occi', 'ociei' ]
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
|
||||
input_plugin = plugin_env.SharedLibrary('../occi', source=occi_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -38,7 +38,7 @@ ogr_src = Split(
|
|||
|
||||
libraries = [env['PLUGINS']['ogr']['lib']]
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
|
@ -46,9 +46,8 @@ if env['PLATFORM'] == 'Darwin':
|
|||
|
||||
input_plugin = plugin_env.SharedLibrary('../ogr', source=ogr_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -39,15 +39,13 @@ osm_src = Split(
|
|||
|
||||
libraries = [ 'xml2' ]
|
||||
libraries.append('curl')
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
|
||||
input_plugin = plugin_env.SharedLibrary('../osm', source=osm_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -35,7 +35,7 @@ postgis_src = Split(
|
|||
|
||||
libraries = ['pq']
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
if env['THREADING'] == 'multi':
|
||||
|
@ -43,9 +43,8 @@ if env['PLATFORM'] == 'Darwin':
|
|||
|
||||
input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -35,7 +35,7 @@ raster_src = Split(
|
|||
)
|
||||
|
||||
libraries = []
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
|
@ -43,9 +43,8 @@ if env['PLATFORM'] == 'Darwin':
|
|||
|
||||
input_plugin = plugin_env.SharedLibrary('../raster', source=raster_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -35,7 +35,7 @@ rasterlite_src = Split(
|
|||
|
||||
libraries = [env['PLUGINS']['rasterlite']['lib']]
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
|
@ -43,9 +43,8 @@ if env['PLATFORM'] == 'Darwin':
|
|||
|
||||
input_plugin = plugin_env.SharedLibrary('../rasterlite', source=rasterlite_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -39,7 +39,7 @@ shape_src = Split(
|
|||
|
||||
libraries = []
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
|
@ -50,9 +50,8 @@ if env['SHAPE_MEMORY_MAPPED_FILE']:
|
|||
|
||||
input_plugin = plugin_env.SharedLibrary('../shape', SHLIBSUFFIX='.input', source=shape_src, SHLIBPREFIX='', LIBS = libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
|
@ -34,7 +34,8 @@ sqlite_src = Split(
|
|||
)
|
||||
|
||||
libraries = [ 'sqlite3' ]
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
|
||||
# Link Library to Dependencies
|
||||
libraries.append('mapnik2')
|
||||
libraries.append(env['ICU_LIB_NAME'])
|
||||
libraries.append('boost_system%s' % env['BOOST_APPEND'])
|
||||
|
@ -42,9 +43,8 @@ if env['PLATFORM'] == 'Darwin':
|
|||
|
||||
input_plugin = plugin_env.SharedLibrary('../sqlite', source=sqlite_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
# if the plugin links to libmapnik2 ensure it is built first
|
||||
Depends(input_plugin,'../../../src/libmapnik2.dylib')
|
||||
Depends(input_plugin, env.subst('../../../src/${SHLIBPREFIX}mapnik2${SHLIBSUFFIX}'))
|
||||
|
||||
if 'uninstall' not in COMMAND_LINE_TARGETS:
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + env['LIB_DIR_NAME'] + '/input', input_plugin)
|
||||
|
|
Loading…
Reference in a new issue