Merge branch 'master' into geometry_cleanup
This commit is contained in:
commit
39507d30f0
10 changed files with 3 additions and 127 deletions
|
@ -274,8 +274,6 @@ Mapnik 0.7.0 Release
|
|||
|
||||
- Python: Fixed potential crash if pycairo support is enabled but python-cairo module is missing (#392)
|
||||
|
||||
- Python: Added 'mapnik.mapnik_svn_revision()' function to svn revision of Mapnik was compiled at.
|
||||
|
||||
- Python: Added 'mapnik.has_pycairo()' function to test for pycairo support (r1278) (#284)
|
||||
|
||||
- Python: Added 'mapnik.register_plugins()' and 'mapnik.register_fonts()' functions (r1256)
|
||||
|
|
40
SConstruct
40
SConstruct
|
@ -140,34 +140,6 @@ def strip_first(string,find,replace=''):
|
|||
return string.replace(find,replace,1)
|
||||
return string
|
||||
|
||||
def get_libtool_major_version():
|
||||
"""libtool >= 2.1b support lt_dlopenadvise and the previous
|
||||
release appears to be 1.9f (based on NEWS) so checking for
|
||||
>= 2 seems adequate.
|
||||
"""
|
||||
cmd = 'libtool'
|
||||
if platform.uname()[0] == "Darwin":
|
||||
cmd = 'glibtool'
|
||||
version = None
|
||||
fallback_version = 2
|
||||
pattern = r'(.*[^\S])(\d{1}\.\d+\.?\d?)(.*[^\S])'
|
||||
ret = os.popen('%s --version' % cmd).read()
|
||||
match = re.match(pattern,ret)
|
||||
if match:
|
||||
groups = match.groups()
|
||||
if len(groups):
|
||||
version_string = groups[1]
|
||||
if version_string:
|
||||
version_string = version_string.split('.')[0]
|
||||
try:
|
||||
version = int(version_string)
|
||||
except ValueError:
|
||||
pass
|
||||
if not version:
|
||||
color_print(1,'Could not detect libtool --version, assuming major version 2')
|
||||
return fallback_version
|
||||
return version
|
||||
|
||||
# http://www.scons.org/wiki/InstallTargets
|
||||
def create_uninstall_target(env, path, is_glob=False):
|
||||
if 'uninstall' in COMMAND_LINE_TARGETS:
|
||||
|
@ -427,11 +399,9 @@ pickle_store = [# Scons internal variables
|
|||
'PYTHON_INSTALL_LOCATION',
|
||||
'PYTHON_SYS_PREFIX',
|
||||
'COLOR_PRINT',
|
||||
'SVN_REVISION',
|
||||
'HAS_CAIRO',
|
||||
'HAS_PYCAIRO',
|
||||
'HAS_LIBXML2',
|
||||
'LIBTOOL_SUPPORTS_ADVISE',
|
||||
'PYTHON_IS_64BIT',
|
||||
'SAMPLE_INPUT_PLUGINS',
|
||||
'PKG_CONFIG_PATH',
|
||||
|
@ -973,8 +943,6 @@ if not preconfigured:
|
|||
env['PLATFORM'] = platform.uname()[0]
|
||||
color_print(4,"Configuring on %s in *%s*..." % (env['PLATFORM'],mode))
|
||||
|
||||
env['LIBTOOL_SUPPORTS_ADVISE'] = get_libtool_major_version() >= 2
|
||||
|
||||
env['MISSING_DEPS'] = []
|
||||
env['SKIPPED_DEPS'] = []
|
||||
env['HAS_CAIRO'] = False
|
||||
|
@ -983,7 +951,6 @@ if not preconfigured:
|
|||
env['CAIROMM_CPPPATHS'] = []
|
||||
env['HAS_PYCAIRO'] = False
|
||||
env['HAS_LIBXML2'] = False
|
||||
env['SVN_REVISION'] = None
|
||||
env['LIBMAPNIK_LIBS'] = []
|
||||
env['LIBMAPNIK_CPPATHS'] = []
|
||||
env['LIBMAPNIK_CXXFLAGS'] = []
|
||||
|
@ -1432,13 +1399,6 @@ if not preconfigured:
|
|||
else :
|
||||
common_cxx_flags = '-D%s ' % env['PLATFORM'].upper()
|
||||
|
||||
svn_version = call('svnversion')
|
||||
if not svn_version == 'exported':
|
||||
pattern = r'(\d+)(.*)'
|
||||
try:
|
||||
env['SVN_REVISION'] = re.match(pattern,svn_version).groups()[0]
|
||||
except: pass
|
||||
|
||||
# Mac OSX (Darwin) special settings
|
||||
if env['PLATFORM'] == 'Darwin':
|
||||
pthread = ''
|
||||
|
|
|
@ -185,12 +185,6 @@ if env['HAS_PYCAIRO']:
|
|||
py_env.ParseConfig('pkg-config --cflags pycairo')
|
||||
py_env.Append(CXXFLAGS = '-DHAVE_PYCAIRO')
|
||||
|
||||
if env['SVN_REVISION']:
|
||||
sources.remove('mapnik_python.cpp')
|
||||
env2 = py_env.Clone()
|
||||
env2.Append(CXXFLAGS='-DSVN_REVISION=%s' % env['SVN_REVISION'])
|
||||
sources.insert(0,env2.SharedObject('mapnik_python.cpp'))
|
||||
|
||||
_mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LIBS=libraries, LDMODULEPREFIX='', LDMODULESUFFIX='.so',LINKFLAGS=linkflags)
|
||||
|
||||
Depends(_mapnik, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
|
|
|
@ -718,7 +718,6 @@ __all__ = [
|
|||
# version and environment
|
||||
'mapnik_version_string',
|
||||
'mapnik_version',
|
||||
'mapnik_svn_revision',
|
||||
'has_cairo',
|
||||
'has_pycairo',
|
||||
# factory methods
|
||||
|
|
|
@ -331,15 +331,6 @@ unsigned mapnik_version()
|
|||
return MAPNIK_VERSION;
|
||||
}
|
||||
|
||||
unsigned mapnik_svn_revision()
|
||||
{
|
||||
#if defined(SVN_REVISION)
|
||||
return SVN_REVISION;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
// indicator for jpeg read/write support within libmapnik
|
||||
bool has_jpeg()
|
||||
{
|
||||
|
@ -633,7 +624,6 @@ BOOST_PYTHON_MODULE(_mapnik)
|
|||
|
||||
def("save_map_to_string", &save_map_to_string, save_map_to_string_overloads());
|
||||
def("mapnik_version", &mapnik_version,"Get the Mapnik version number");
|
||||
def("mapnik_svn_revision", &mapnik_svn_revision,"Get the Mapnik svn revision");
|
||||
def("has_jpeg", &has_jpeg, "Get jpeg read/write support status");
|
||||
def("has_cairo", &has_cairo, "Get cairo library status");
|
||||
def("has_pycairo", &has_pycairo, "Get pycairo module status");
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#include <boost/utility.hpp>
|
||||
#include <boost/tuple/tuple.hpp>
|
||||
|
||||
#include <cstring> // required for memcpy with linux/g++
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
|
|
15
src/build.py
15
src/build.py
|
@ -105,6 +105,7 @@ source = Split(
|
|||
"""
|
||||
color.cpp
|
||||
box2d.cpp
|
||||
datasource_cache.cpp
|
||||
expression_string.cpp
|
||||
filter_factory.cpp
|
||||
feature_type_style.cpp
|
||||
|
@ -192,20 +193,6 @@ if env['RENDERING_STATS']:
|
|||
else:
|
||||
source.insert(0,processor_cpp);
|
||||
|
||||
|
||||
# add the datasource_cache.cpp with custom LIBTOOL flag if needed
|
||||
if env['LIBTOOL_SUPPORTS_ADVISE']:
|
||||
env3 = lib_env.Clone()
|
||||
env3.Append(CXXFLAGS='-DLIBTOOL_SUPPORTS_ADVISE')
|
||||
libmapnik_cxxflags.append('-DLIBTOOL_SUPPORTS_ADVISE')
|
||||
cpp = 'datasource_cache.cpp'
|
||||
if env['LINKING'] == 'static':
|
||||
source.insert(0,env3.StaticObject(cpp))
|
||||
else:
|
||||
source.insert(0,env3.SharedObject(cpp))
|
||||
else:
|
||||
source.insert(0,'datasource_cache.cpp')
|
||||
|
||||
if env['JPEG']:
|
||||
source += Split(
|
||||
"""
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include <mapnik/config_error.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
@ -152,64 +151,18 @@ void datasource_cache::register_datasources(const std::string& str)
|
|||
for (boost::filesystem::directory_iterator itr(path);itr!=end_itr;++itr )
|
||||
{
|
||||
|
||||
#if BOOST_VERSION < 103400
|
||||
if (!is_directory( *itr ) && is_input_plugin(itr->leaf()))
|
||||
#else
|
||||
#if (BOOST_FILESYSTEM_VERSION == 3)
|
||||
if (!is_directory( *itr ) && is_input_plugin(itr->path().filename().string()))
|
||||
#else // v2
|
||||
if (!is_directory( *itr ) && is_input_plugin(itr->path().leaf()))
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
try
|
||||
{
|
||||
#ifdef LIBTOOL_SUPPORTS_ADVISE
|
||||
/* Note: the below was added as a workaround pre http://trac.mapnik.org/ticket/790
|
||||
It could now be removed, but also is not doing any harm AFAICT.
|
||||
*/
|
||||
|
||||
// with ltdl >=2.2 we can actually pass RTDL_GLOBAL to dlopen via the
|
||||
// ltdl advise trick which is required on linux unless plugins are directly
|
||||
// linked to libmapnik (and deps) at build time. The only other approach is to
|
||||
// set the dlopen flags in the calling process (like in the python bindings)
|
||||
|
||||
// clear errors
|
||||
lt_dlerror();
|
||||
|
||||
lt_dlhandle module = 0;
|
||||
lt_dladvise advise;
|
||||
int ret;
|
||||
|
||||
ret = lt_dlinit();
|
||||
if (ret != 0) {
|
||||
std::clog << "Datasource loader: could not intialize dynamic loading: " << lt_dlerror() << "\n";
|
||||
}
|
||||
|
||||
ret = lt_dladvise_init(&advise);
|
||||
if (ret != 0) {
|
||||
std::clog << "Datasource loader: could not intialize dynamic loading: " << lt_dlerror() << "\n";
|
||||
}
|
||||
|
||||
ret = lt_dladvise_global(&advise);
|
||||
if (ret != 0) {
|
||||
std::clog << "Datasource loader: could not intialize dynamic loading of global symbols: " << lt_dlerror() << "\n";
|
||||
}
|
||||
#if (BOOST_FILESYSTEM_VERSION == 3)
|
||||
module = lt_dlopenadvise (itr->path().string().c_str(), advise);
|
||||
#else // v2
|
||||
module = lt_dlopenadvise (itr->string().c_str(), advise);
|
||||
#endif
|
||||
|
||||
lt_dladvise_destroy(&advise);
|
||||
#else
|
||||
|
||||
#if (BOOST_FILESYSTEM_VERSION == 3)
|
||||
lt_dlhandle module = lt_dlopen(itr->path().string().c_str());
|
||||
#else // v2
|
||||
lt_dlhandle module = lt_dlopen(itr->string().c_str());
|
||||
#endif
|
||||
|
||||
#endif
|
||||
if (module)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,6 @@ CONFIG_OTHER_INCLUDES='%(other_includes)s'
|
|||
CONFIG_FONTS='%(fonts)s'
|
||||
CONFIG_INPUT_PLUGINS='%(input_plugins)s'
|
||||
CONFIG_GIT_REVISION='%(git_revision)s'
|
||||
CONFIG_SVN_REVISION='%(svn_revision)s'
|
||||
|
||||
CONFIG_JSON="{
|
||||
\\"prefix\\": \\"${CONFIG_PREFIX}\\",
|
||||
|
@ -41,7 +40,6 @@ CONFIG_JSON="{
|
|||
\\"fonts\\": \\"${CONFIG_FONTS}\\",
|
||||
\\"input_plugins\\": \\"${CONFIG_INPUT_PLUGINS}\\",
|
||||
\\"git_revision\\": \\"${CONFIG_GIT_REVISION}\\",
|
||||
\\"svn_revision\\": ${CONFIG_SVN_REVISION},
|
||||
}"
|
||||
|
||||
'''
|
||||
|
@ -86,7 +84,6 @@ configuration = {
|
|||
"other_includes": other_includes,
|
||||
"fonts": config_env['MAPNIK_FONTS'],
|
||||
"input_plugins": config_env['MAPNIK_INPUT_PLUGINS'],
|
||||
"svn_revision": config_env['SVN_REVISION'],
|
||||
"git_revision": git_revision,
|
||||
"version": config_env['MAPNIK_VERSION_STRING'],
|
||||
}
|
||||
|
|
|
@ -64,10 +64,6 @@ while test $# -gt 0; do
|
|||
echo ${CONFIG_GIT_REVISION}
|
||||
;;
|
||||
|
||||
--svn-revision)
|
||||
echo ${CONFIG_SVN_REVISION}
|
||||
;;
|
||||
|
||||
--help)
|
||||
usage 0
|
||||
;;
|
||||
|
|
Loading…
Add table
Reference in a new issue