Skip to content

Commit 9a697a7

Browse files
author
Dane Springmeyer
committed
boottrap: fix paths embedded in .la files
- these are invalid for local setups since they have travis absolute paths by default - this is not needed for building mapnik (since mapnik does not use libtool) - but it enables using the result of mapnik-config to build apps that do use libtool - so it unblocks building mod_tile against a local mapnik/mapnik-config built against mason
1 parent aae52da commit 9a697a7

File tree

1 file changed

+30
-13
lines changed

1 file changed

+30
-13
lines changed

bootstrap.sh

+30-13
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,54 @@ function setup_mason() {
2323
export CC=${CC:-clang}
2424
}
2525

26+
if [[ $(uname -s) == 'Darwin' ]]; then
27+
FIND_PATTERN="\/Users\/travis\/build\/mapbox\/mason"
28+
else
29+
FIND_PATTERN="\/home\/travis\/build\/mapbox\/mason"
30+
fi
31+
32+
REPLACE="$(pwd)"
33+
REPLACE=${REPLACE////\\/}
34+
2635
function install() {
2736
MASON_PLATFORM_ID=$(mason env MASON_PLATFORM_ID)
2837
if [[ ! -d ./mason_packages/${MASON_PLATFORM_ID}/${1}/${2} ]]; then
2938
mason install $1 $2
3039
mason link $1 $2
40+
if [[ $3 ]]; then
41+
LA_FILE=$(${MASON_DIR:-~/.mason}/mason prefix $1 $2)/lib/$3.la
42+
if [[ -f ${LA_FILE} ]]; then
43+
perl -i -p -e "s/${FIND_PATTERN}/${REPLACE}/g;" ${LA_FILE}
44+
else
45+
echo "$LA_FILE not found"
46+
fi
47+
fi
3148
fi
3249
}
3350

3451
function install_mason_deps() {
35-
install gdal 1.11.2 &
52+
install gdal 1.11.2 libgdal &
3653
install boost 1.57.0 &
3754
install boost_libsystem 1.57.0 &
3855
install boost_libthread 1.57.0 &
3956
install boost_libfilesystem 1.57.0 &
4057
install boost_libprogram_options 1.57.0 &
4158
install boost_libregex 1.57.0 &
4259
install boost_libpython 1.57.0 &
43-
install freetype 2.5.5 &
44-
install harfbuzz 0.9.40 &
45-
install jpeg_turbo 1.4.0 &
46-
install libxml2 2.9.2 &
47-
install libpng 1.6.16 &
48-
install webp 0.4.2 &
60+
install freetype 2.5.5 libfreetype &
61+
install harfbuzz 0.9.40 libharfbuzz &
62+
install jpeg_turbo 1.4.0 libjpeg &
63+
install libxml2 2.9.2 libxml2 &
64+
install libpng 1.6.16 libpng &
65+
install webp 0.4.2 libwebp &
4966
install icu 54.1 &
50-
install proj 4.8.0 &
51-
install libtiff 4.0.4beta &
67+
install proj 4.8.0 libproj &
68+
install libtiff 4.0.4beta libtiff &
5269
install libpq 9.4.0 &
53-
install sqlite 3.8.8.1 &
54-
install expat 2.1.0 &
55-
install pixman 0.32.6 &
56-
install cairo 1.12.18 &
70+
install sqlite 3.8.8.1 libsqlite3 &
71+
install expat 2.1.0 libexpat &
72+
install pixman 0.32.6 libpixman-1 &
73+
install cairo 1.12.18 libcairo &
5774
wait
5875
}
5976

0 commit comments

Comments
 (0)