2015-04-28 04:23:47 +02: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 19:21:55 +02:00
|
|
|
export MASON_BUILD_PATH=$(pwd)
|
2015-04-28 04:23:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function mason_compile {
|
|
|
|
HERE=$(pwd)
|
2015-04-29 00:30:18 +02:00
|
|
|
make install
|
|
|
|
if [ $UNAME = 'Darwin' ]; then
|
2015-04-29 15:51:22 +02:00
|
|
|
install_name_tool -id @loader_path/libmapnik.dylib ${MASON_PREFIX}"/lib/libmapnik.dylib";
|
|
|
|
fi;
|
2015-04-28 04:23:47 +02: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/gdal
|
|
|
|
mkdir -p ${MASON_PREFIX}/share/proj
|
|
|
|
mkdir -p ${MASON_PREFIX}/share/icu
|
|
|
|
cp -r $GDAL_DATA/ ${MASON_PREFIX}/share/gdal/
|
|
|
|
cp -r $PROJ_LIB/ ${MASON_PREFIX}/share/proj/
|
|
|
|
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 20:04:34 +02:00
|
|
|
echo "Done"
|
2015-04-28 04:23:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
mason_run "$@"
|