Merge pull request #3289 from lightmare/lts

bootstrap: relieve leaning toothpick syndrome
This commit is contained in:
Blake Thompson 2016-02-09 09:26:26 -06:00
commit 1d981e899b

View file

@ -23,15 +23,6 @@ function setup_mason() {
export CC=${CC:-clang} 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() { function install() {
MASON_PLATFORM_ID=$(mason env MASON_PLATFORM_ID) MASON_PLATFORM_ID=$(mason env MASON_PLATFORM_ID)
if [[ ! -d ./mason_packages/${MASON_PLATFORM_ID}/${1}/${2} ]]; then if [[ ! -d ./mason_packages/${MASON_PLATFORM_ID}/${1}/${2} ]]; then
@ -40,7 +31,7 @@ function install() {
if [[ $3 ]]; then if [[ $3 ]]; then
LA_FILE=$(${MASON_DIR:-~/.mason}/mason prefix $1 $2)/lib/$3.la LA_FILE=$(${MASON_DIR:-~/.mason}/mason prefix $1 $2)/lib/$3.la
if [[ -f ${LA_FILE} ]]; then 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 else
echo "$LA_FILE not found" echo "$LA_FILE not found"
fi fi
@ -82,12 +73,6 @@ export CPLUS_INCLUDE_PATH="${MASON_LINKED_ABS}/include"
export LIBRARY_PATH="${MASON_LINKED_ABS}/lib" export LIBRARY_PATH="${MASON_LINKED_ABS}/lib"
function make_config() { 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 " echo "
CXX = '$CXX' CXX = '$CXX'
CC = '$CC' CC = '$CC'
@ -96,7 +81,7 @@ INPUT_PLUGINS = 'all'
PATH = '${MASON_LINKED_REL}/bin' PATH = '${MASON_LINKED_REL}/bin'
PKG_CONFIG_PATH = '${MASON_LINKED_REL}/lib/pkgconfig' PKG_CONFIG_PATH = '${MASON_LINKED_REL}/lib/pkgconfig'
PATH_REMOVE = '/usr:/usr/local' 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_INCLUDES = '${MASON_LINKED_REL}/include'
BOOST_LIBS = '${MASON_LINKED_REL}/lib' BOOST_LIBS = '${MASON_LINKED_REL}/lib'
ICU_INCLUDES = '${MASON_LINKED_REL}/include' ICU_INCLUDES = '${MASON_LINKED_REL}/include'
@ -128,7 +113,7 @@ PGSQL2SQLITE = True
XMLPARSER = 'ptree' XMLPARSER = 'ptree'
SVG2PNG = True SVG2PNG = True
SAMPLE_INPUT_PLUGINS = True SAMPLE_INPUT_PLUGINS = True
" > ./config.py "
} }
# NOTE: the `mapnik-settings.env` is used by test/run (which is run by `make test`) # 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() { function main() {
setup_mason setup_mason
install_mason_deps install_mason_deps
make_config make_config > ./config.py
setup_runtime_settings setup_runtime_settings
echo "Ready, now run:" echo "Ready, now run:"
echo "" echo ""