2015-04-28 02:23:47 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
MASON_NAME=mapnik
|
|
|
|
MASON_VERSION=latest
|
|
|
|
MASON_LIB_FILE=lib/libmapnik-wkt.a
|
|
|
|
|
|
|
|
. ${MASON_DIR:-~/.mason}/mason.sh
|
|
|
|
|
|
|
|
function mason_load_source {
|
2015-04-28 17:21:55 +00:00
|
|
|
export MASON_BUILD_PATH=$(pwd)
|
2015-04-28 02:23:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function mason_compile {
|
|
|
|
HERE=$(pwd)
|
2015-04-28 22:30:18 +00:00
|
|
|
make install
|
2015-04-29 17:13:52 +00:00
|
|
|
if [[ `uname` == 'Darwin' ]]; then
|
2015-04-30 17:39:23 +00:00
|
|
|
install_name_tool -id @loader_path/libmapnik.dylib ${MASON_PREFIX}"/lib/libmapnik.dylib";
|
2015-05-04 16:35:09 +00:00
|
|
|
PLUGINDIR=${MASON_PREFIX}"/lib/mapnik/input/*.input";
|
|
|
|
for f in $PLUGINDIR; do
|
2015-05-04 14:30:40 +00:00
|
|
|
echo $f;
|
|
|
|
echo `basename $f`;
|
2015-05-01 19:01:29 +00:00
|
|
|
install_name_tool -id plugins/input/`basename $f` $f;
|
|
|
|
install_name_tool -change ${MASON_PREFIX}"/lib/libmapnik.dylib" @loader_path/../../libmapnik.dylib $f;
|
2015-04-30 17:39:23 +00:00
|
|
|
done;
|
2015-04-29 13:51:22 +00:00
|
|
|
fi;
|
2015-04-28 02:23:47 +00:00
|
|
|
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/icu
|
2015-06-16 16:23:58 +00:00
|
|
|
cp -r $GDAL_DATA ${MASON_PREFIX}/share/
|
|
|
|
cp -r $PROJ_LIB ${MASON_PREFIX}/share/
|
2015-04-28 02:23:47 +00:00
|
|
|
cp -r $ICU_DATA/*dat ${MASON_PREFIX}/share/icu/
|
|
|
|
find ${MASON_PREFIX} -name "*.pyc" -exec rm {} \;
|
|
|
|
}
|
|
|
|
|
|
|
|
function mason_cflags {
|
|
|
|
""
|
|
|
|
}
|
|
|
|
|
|
|
|
function mason_ldflags {
|
|
|
|
""
|
|
|
|
}
|
|
|
|
|
|
|
|
function mason_clean {
|
2015-04-28 18:04:34 +00:00
|
|
|
echo "Done"
|
2015-04-28 02:23:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
mason_run "$@"
|