File: bootstrap.sh

package info (click to toggle)
mapnik-vector-tile 1.6.1+dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,364 kB
  • sloc: cpp: 19,098; sh: 112; makefile: 82; xml: 58; python: 18
file content (34 lines) | stat: -rwxr-xr-x 1,362 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash

# if built against mason package fix dynamic data locations
function setup_runtime_settings() {
    if [[ -f $(pwd)/mason_packages/.link/bin/mapnik-config ]]; then
        # TODO: use --proj-lib, --gdal-data, etc after https://github.com/mapnik/mapnik/pull/3759 is fixed
        #export PROJ_LIB=$(mapnik-config --proj-lib)
        #export GDAL_DATA=$(mapnik-config --gdal-data)
        #export ICU_DATA=$(mapnik-config --icu-data)
        local MASON_LINKED_ABS=$(pwd)/mason_packages/.link
        export PROJ_LIB=${MASON_LINKED_ABS}/share/proj
        ICU_VERSION=$(ls ${MASON_LINKED_ABS}/share/icu/)
        export ICU_DATA=${MASON_LINKED_ABS}/share/icu/${ICU_VERSION}
        export GDAL_DATA=${MASON_LINKED_ABS}/share/gdal
        if [[ $(uname -s) == 'Darwin' ]]; then
            export DYLD_LIBRARY_PATH=$(pwd)/mason_packages/.link/lib:${DYLD_LIBRARY_PATH:-}
            # OS X > 10.11 blocks DYLD_LIBRARY_PATH so we pass along using a
            # differently named variable
            export MVT_LIBRARY_PATH=${DYLD_LIBRARY_PATH}
        else
            export LD_LIBRARY_PATH=$(pwd)/mason_packages/.link/lib:${LD_LIBRARY_PATH:-}
        fi
        export PATH=$(pwd)/mason_packages/.link/bin:${PATH}
    fi
}

function main() {
    setup_runtime_settings
    echo "Ready, now run:"
    echo ""
    echo "    make test"
}

main