From ea6f217ad9dfa4300854549818cd0cfe705da582 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 26 Apr 2015 20:32:20 +0200 Subject: [PATCH] use mapnik-settings.env --- Makefile | 8 +++++--- bootstrap.sh | 7 ++++--- localize.sh | 10 +++------- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index c94020792..5e62659da 100755 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ uninstall: @$(PYTHON) scons/scons.py -j$(JOBS) --config=cache --implicit-cache --max-drift=1 uninstall test: - @source localize.sh && ./test/unit/run && \ + @source localize.sh && source mapnik-settings.env && ./test/unit/run && \ for FILE in test/standalone/*-bin; do \ $${FILE}; \ done; @@ -80,10 +80,12 @@ pep8: @pep8 -r --select=W391 -q --filename=*.py `pwd`/tests/ | xargs ged -i '/./,/^$$/!d' grind: - @for FILE in test/standalone/*-bin; do \ + @source localize.sh && source mapnik-settings.env && \ + for FILE in test/standalone/*-bin; do \ valgrind --leak-check=full --log-fd=1 $${FILE} | grep definitely; \ done - valgrind --leak-check=full --log-fd=1 ./test/unit/run | grep definitely + @source localize.sh && source mapnik-settings.env && \ + valgrind --leak-check=full --log-fd=1 ./test/unit/run | grep definitely render: @for FILE in tests/data/good_maps/*xml; do \ diff --git a/bootstrap.sh b/bootstrap.sh index 9d7ee7a57..65e8caab8 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -115,9 +115,10 @@ SAMPLE_INPUT_PLUGINS = True } function setup_runtime_settings() { - export PROJ_LIB=${MASON_LINKED_ABS}/share/proj - export ICU_DATA=${MASON_LINKED_ABS}/share/icu/54.1 - export GDAL_DATA=${MASON_LINKED_ABS}/share/gdal + echo "export PROJ_LIB=${MASON_LINKED_ABS}/share/proj" > mapnik-settings.env + echo "export ICU_DATA=${MASON_LINKED_ABS}/share/icu/54.1" >> mapnik-settings.env + echo "export GDAL_DATA=${MASON_LINKED_ABS}/share/gdal" >> mapnik-settings.env + source mapnik-settings.env } function main() { diff --git a/localize.sh b/localize.sh index 58287eea7..628c1b2f8 100755 --- a/localize.sh +++ b/localize.sh @@ -1,12 +1,8 @@ #!/bin/bash -UNAME=$(uname -s) +# TODO - use rpath to avoid needing this to run tests locally export CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -if [ ${UNAME} = 'Darwin' ]; then +if [ $(uname -s) = 'Darwin' ]; then export DYLD_LIBRARY_PATH="${CURRENT_DIR}/src/":${DYLD_LIBRARY_PATH} else export LD_LIBRARY_PATH="${CURRENT_DIR}/src/":${LD_LIBRARY_PATH} -fi -export MAPNIK_FONT_DIRECTORY="${CURRENT_DIR}/fonts/dejavu-fonts-ttf-2.34/ttf/" -export MAPNIK_INPUT_PLUGINS_DIRECTORY="${CURRENT_DIR}/plugins/input/" -export PATH="${CURRENT_DIR}/utils/mapnik-config":${PATH} -export PATH="${CURRENT_DIR}/utils/nik2img":${PATH} +fi \ No newline at end of file