diff --git a/.travis.yml b/.travis.yml index 742f24a36..9b987a0b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,16 +27,20 @@ matrix: include: - os: linux compiler: clang - env: JOBS=8 + env: JOBS=8 MASON_PUBLISH=true - os: linux compiler: gcc env: JOBS=6 + - os: osx + compiler: clang + env: JOBS=8 MASON_PUBLISH=true - os: osx compiler: clang env: JOBS=8 COVERAGE=true before_install: - export COVERAGE=${COVERAGE:-false} + - export MASON_PUBLISH=${MASON_PUBLISH:-false} install: - if [[ $(uname -s) == 'Linux' ]]; then @@ -54,14 +58,16 @@ install: script: - source bootstrap.sh - - if [[ ${COVERAGE} != true ]]; then + - if [[ ${COVERAGE} == true ]]; then + ./configure CUSTOM_LDFLAGS='--coverage' CUSTOM_CXXFLAGS='--coverage' CUSTOM_CFLAGS='--coverage' DEBUG=True; + elif [[ ${MASON_PUBLISH == true]]; then export MASON_NAME=mapnik; export MASON_VERSION=latest; export MASON_LIB_FILE=lib/libmapnik-wkt.a source ./.mason.sh; ./configure PREFIX=${MASON_PREFIX} PATH_REPLACE='' MAPNIK_BUNDLED_SHARE_DIRECTORY=True; else - ./configure CUSTOM_LDFLAGS='--coverage' CUSTOM_CXXFLAGS='--coverage' CUSTOM_CFLAGS='--coverage' DEBUG=True; + ./configure fi; - make - git clone --depth=1 https://github.com/mapnik/test-data test-data @@ -75,7 +81,7 @@ script: fi; after_success: - - if [[ ${COVERAGE} != true ]]; then + - if [[ ${MASON_PUBLISH} == true ]]; then ./mason_latest.sh build; ./mason_latest.sh link; ./mason_latest.sh publish; diff --git a/mason_latest.sh b/mason_latest.sh index 7cb282ae4..d877e7024 100755 --- a/mason_latest.sh +++ b/mason_latest.sh @@ -12,6 +12,10 @@ function mason_load_source { function mason_compile { HERE=$(pwd) + make install + if [ $UNAME = 'Darwin' ]; then + install_name_tool -id @loader_path/libmapnik.dylib ${MASON_PREFIX}"/lib/libmapnik.dylib" + fi python -c "data=open('$MASON_PREFIX/bin/mapnik-config','r').read();open('$MASON_PREFIX/bin/mapnik-config','w').write(data.replace('$HERE','.'))" mkdir -p ${MASON_PREFIX}/share/gdal mkdir -p ${MASON_PREFIX}/share/proj