Merge pull request #3289 from lightmare/lts
bootstrap: relieve leaning toothpick syndrome
This commit is contained in:
commit
1d981e899b
1 changed files with 4 additions and 19 deletions
23
bootstrap.sh
23
bootstrap.sh
|
@ -23,15 +23,6 @@ function setup_mason() {
|
|||
export CC=${CC:-clang}
|
||||
}
|
||||
|
||||
if [[ $(uname -s) == 'Darwin' ]]; then
|
||||
FIND_PATTERN="\/Users\/travis\/build\/mapbox\/mason"
|
||||
else
|
||||
FIND_PATTERN="\/home\/travis\/build\/mapbox\/mason"
|
||||
fi
|
||||
|
||||
REPLACE="$(pwd)"
|
||||
REPLACE=${REPLACE////\\/}
|
||||
|
||||
function install() {
|
||||
MASON_PLATFORM_ID=$(mason env MASON_PLATFORM_ID)
|
||||
if [[ ! -d ./mason_packages/${MASON_PLATFORM_ID}/${1}/${2} ]]; then
|
||||
|
@ -40,7 +31,7 @@ function install() {
|
|||
if [[ $3 ]]; then
|
||||
LA_FILE=$(${MASON_DIR:-~/.mason}/mason prefix $1 $2)/lib/$3.la
|
||||
if [[ -f ${LA_FILE} ]]; then
|
||||
perl -i -p -e "s/${FIND_PATTERN}/${REPLACE}/g;" ${LA_FILE}
|
||||
perl -i -p -e 's:\Q$ENV{HOME}/build/mapbox/mason\E:$ENV{PWD}:g' ${LA_FILE}
|
||||
else
|
||||
echo "$LA_FILE not found"
|
||||
fi
|
||||
|
@ -82,12 +73,6 @@ export CPLUS_INCLUDE_PATH="${MASON_LINKED_ABS}/include"
|
|||
export LIBRARY_PATH="${MASON_LINKED_ABS}/lib"
|
||||
|
||||
function make_config() {
|
||||
if [[ $(uname -s) == 'Darwin' ]]; then
|
||||
local PATH_REPLACE="/Users/travis/build/mapbox/mason/mason_packages:./mason_packages"
|
||||
else
|
||||
local PATH_REPLACE="/home/travis/build/mapbox/mason/mason_packages:./mason_packages"
|
||||
fi
|
||||
|
||||
echo "
|
||||
CXX = '$CXX'
|
||||
CC = '$CC'
|
||||
|
@ -96,7 +81,7 @@ INPUT_PLUGINS = 'all'
|
|||
PATH = '${MASON_LINKED_REL}/bin'
|
||||
PKG_CONFIG_PATH = '${MASON_LINKED_REL}/lib/pkgconfig'
|
||||
PATH_REMOVE = '/usr:/usr/local'
|
||||
PATH_REPLACE = '${PATH_REPLACE}'
|
||||
PATH_REPLACE = '$HOME/build/mapbox/mason/mason_packages:./mason_packages'
|
||||
BOOST_INCLUDES = '${MASON_LINKED_REL}/include'
|
||||
BOOST_LIBS = '${MASON_LINKED_REL}/lib'
|
||||
ICU_INCLUDES = '${MASON_LINKED_REL}/include'
|
||||
|
@ -128,7 +113,7 @@ PGSQL2SQLITE = True
|
|||
XMLPARSER = 'ptree'
|
||||
SVG2PNG = True
|
||||
SAMPLE_INPUT_PLUGINS = True
|
||||
" > ./config.py
|
||||
"
|
||||
}
|
||||
|
||||
# NOTE: the `mapnik-settings.env` is used by test/run (which is run by `make test`)
|
||||
|
@ -142,7 +127,7 @@ function setup_runtime_settings() {
|
|||
function main() {
|
||||
setup_mason
|
||||
install_mason_deps
|
||||
make_config
|
||||
make_config > ./config.py
|
||||
setup_runtime_settings
|
||||
echo "Ready, now run:"
|
||||
echo ""
|
||||
|
|
Loading…
Reference in a new issue