make mapnik-config able to report relative paths to share/ data
This commit is contained in:
parent
3e54b06935
commit
2de1805aa3
3 changed files with 33 additions and 1 deletions
|
@ -324,6 +324,7 @@ opts.AddVariables(
|
||||||
('PATH_REMOVE', 'A path prefix to exclude from all known command and compile paths (create multiple excludes separated by :)', ''),
|
('PATH_REMOVE', 'A path prefix to exclude from all known command and compile paths (create multiple excludes separated by :)', ''),
|
||||||
('PATH_REPLACE', 'Two path prefixes (divided with a :) to search/replace from all known command and compile paths', ''),
|
('PATH_REPLACE', 'Two path prefixes (divided with a :) to search/replace from all known command and compile paths', ''),
|
||||||
('MAPNIK_NAME', 'Name of library', 'mapnik'),
|
('MAPNIK_NAME', 'Name of library', 'mapnik'),
|
||||||
|
BoolVariable('MAPNIK_BUNDLED_SHARE_DIRECTORY', 'For portable packaging: instruct mapnik-config to report relative paths to bundled GDAL_DATA, PROJ_LIB, and ICU_DATA','False'),
|
||||||
|
|
||||||
# Boost variables
|
# Boost variables
|
||||||
# default is '/usr/include', see FindBoost method below
|
# default is '/usr/include', see FindBoost method below
|
||||||
|
@ -463,6 +464,7 @@ pickle_store = [# Scons internal variables
|
||||||
'MAPNIK_INPUT_PLUGINS_DEST',
|
'MAPNIK_INPUT_PLUGINS_DEST',
|
||||||
'MAPNIK_FONTS',
|
'MAPNIK_FONTS',
|
||||||
'MAPNIK_FONTS_DEST',
|
'MAPNIK_FONTS_DEST',
|
||||||
|
'MAPNIK_BUNDLED_SHARE_DIRECTORY',
|
||||||
'MAPNIK_LIB_BASE',
|
'MAPNIK_LIB_BASE',
|
||||||
'MAPNIK_LIB_BASE_DEST',
|
'MAPNIK_LIB_BASE_DEST',
|
||||||
'EXTRA_FREETYPE_LIBS',
|
'EXTRA_FREETYPE_LIBS',
|
||||||
|
|
|
@ -50,6 +50,9 @@ CONFIG_MAPNIK_INCLUDE="${CONFIG_PREFIX}/include -I${CONFIG_PREFIX}/include/mapni
|
||||||
CONFIG_DEP_INCLUDES="%(dep_includes)s"
|
CONFIG_DEP_INCLUDES="%(dep_includes)s"
|
||||||
CONFIG_CXXFLAGS="%(cxxflags)s"
|
CONFIG_CXXFLAGS="%(cxxflags)s"
|
||||||
CONFIG_CXX='%(cxx)s'
|
CONFIG_CXX='%(cxx)s'
|
||||||
|
CONFIG_MAPNIK_GDAL_DATA='%(mapnik_bundled_gdal_data)s'
|
||||||
|
CONFIG_MAPNIK_PROJ_LIB='%(mapnik_bundled_proj_data)s'
|
||||||
|
CONFIG_MAPNIK_ICU_DATA='%(mapnik_bundled_icu_data)s'
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -107,6 +110,15 @@ if lib_root in inputpluginspath:
|
||||||
|
|
||||||
lib_path = "${CONFIG_PREFIX}/" + config_env['LIBDIR_SCHEMA']
|
lib_path = "${CONFIG_PREFIX}/" + config_env['LIBDIR_SCHEMA']
|
||||||
|
|
||||||
|
mapnik_bundled_gdal_data = ''
|
||||||
|
mapnik_bundled_proj_data = ''
|
||||||
|
mapnik_bundled_icu_data = ''
|
||||||
|
|
||||||
|
if config_env.get('MAPNIK_BUNDLED_SHARE_DIRECTORY'):
|
||||||
|
mapnik_bundled_gdal_data = 'lib/mapnik/share/gdal'
|
||||||
|
mapnik_bundled_proj_data = 'lib/mapnik/share/proj'
|
||||||
|
mapnik_bundled_icu_data = 'lib/mapnik/share/icu'
|
||||||
|
|
||||||
configuration = {
|
configuration = {
|
||||||
"git_revision": git_revision,
|
"git_revision": git_revision,
|
||||||
"git_describe": git_describe,
|
"git_describe": git_describe,
|
||||||
|
@ -121,7 +133,10 @@ configuration = {
|
||||||
"input_plugins": inputpluginspath,
|
"input_plugins": inputpluginspath,
|
||||||
"defines":defines,
|
"defines":defines,
|
||||||
"cxxflags":cxxflags,
|
"cxxflags":cxxflags,
|
||||||
"cxx":env['CXX']
|
"cxx":env['CXX'],
|
||||||
|
"mapnik_bundled_gdal_data":mapnik_bundled_gdal_data,
|
||||||
|
"mapnik_bundled_proj_data":mapnik_bundled_proj_data,
|
||||||
|
"mapnik_bundled_icu_data":mapnik_bundled_icu_data,
|
||||||
}
|
}
|
||||||
|
|
||||||
## if we are statically linking depedencies
|
## if we are statically linking depedencies
|
||||||
|
|
|
@ -27,6 +27,9 @@ Known values for OPTION are:
|
||||||
--cflags all include paths, compiler flags, and pre-processor defines (for back-compatibility)
|
--cflags all include paths, compiler flags, and pre-processor defines (for back-compatibility)
|
||||||
--cxx c++ compiler used to build mapnik (new in 2.2.0)
|
--cxx c++ compiler used to build mapnik (new in 2.2.0)
|
||||||
--all-flags all compile and link flags (new in 2.2.0)
|
--all-flags all compile and link flags (new in 2.2.0)
|
||||||
|
--gdal-data path to GDAL_DATA directory, if known (relevant only for packaged builds of Mapnik) (new in 3.0.0)
|
||||||
|
--proj-lib path to PROJ_LIB directory, if known (relevant only for packaged builds of Mapnik) (new in 3.0.0)
|
||||||
|
--icu-data path to ICU_DATA directory, if known (relevant only for packaged builds of Mapnik) (new in 3.0.0)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
exit $1
|
exit $1
|
||||||
|
@ -128,6 +131,18 @@ while test $# -gt 0; do
|
||||||
echo -I${CONFIG_MAPNIK_INCLUDE} ${CONFIG_DEP_INCLUDES} ${CONFIG_MAPNIK_DEFINES} ${CONFIG_CXXFLAGS} -L${CONFIG_MAPNIK_LIBPATH} -l${CONFIG_MAPNIK_LIBNAME} ${CONFIG_MAPNIK_LDFLAGS} ${CONFIG_DEP_LIBS}
|
echo -I${CONFIG_MAPNIK_INCLUDE} ${CONFIG_DEP_INCLUDES} ${CONFIG_MAPNIK_DEFINES} ${CONFIG_CXXFLAGS} -L${CONFIG_MAPNIK_LIBPATH} -l${CONFIG_MAPNIK_LIBNAME} ${CONFIG_MAPNIK_LDFLAGS} ${CONFIG_DEP_LIBS}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--gdal-data)
|
||||||
|
if [[ ${CONFIG_MAPNIK_GDAL_DATA:-unset} != "unset" ]]; then echo ${CONFIG_PREFIX}/${CONFIG_MAPNIK_GDAL_DATA}; fi;
|
||||||
|
;;
|
||||||
|
|
||||||
|
--proj-lib)
|
||||||
|
if [[ ${CONFIG_MAPNIK_PROJ_LIB:-unset} != "unset" ]]; then echo ${CONFIG_PREFIX}/${CONFIG_MAPNIK_PROJ_LIB}; fi;
|
||||||
|
;;
|
||||||
|
|
||||||
|
--icu-data)
|
||||||
|
if [[ ${CONFIG_MAPNIK_ICU_DATA:-unset} != "unset" ]]; then echo ${CONFIG_PREFIX}/${CONFIG_MAPNIK_ICU_DATA}; fi;
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
# push to stderr any invalid options
|
# push to stderr any invalid options
|
||||||
echo "unknown option $1" 1>&2;
|
echo "unknown option $1" 1>&2;
|
||||||
|
|
Loading…
Reference in a new issue