-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #676 from mapbox/tippecanoe-1.32.10
Tippecanoe 1.32.10
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: generic | ||
|
||
matrix: | ||
include: | ||
- os: osx | ||
osx_image: xcode8 | ||
compiler: clang | ||
- os: linux | ||
compiler: clang | ||
sudo: false | ||
|
||
script: | ||
- ./mason build ${MASON_NAME} ${MASON_VERSION} | ||
- ./mason publish ${MASON_NAME} ${MASON_VERSION} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/usr/bin/env bash | ||
|
||
MASON_NAME=tippecanoe | ||
MASON_VERSION=1.32.10 | ||
MASON_LIB_FILE=bin/tippecanoe | ||
|
||
. ${MASON_DIR}/mason.sh | ||
|
||
function mason_load_source { | ||
mason_download \ | ||
https://github.com/mapbox/tippecanoe/archive/${MASON_VERSION}.tar.gz \ | ||
5787c0dd63217e2d3176ea6ade79d8ae8304feb8 | ||
|
||
mason_extract_tar_gz | ||
|
||
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} | ||
} | ||
|
||
SQLITE_VERSION=3.16.2 | ||
|
||
function mason_prepare_compile { | ||
LLVM_VERSION="7.0.0" | ||
${MASON_DIR}/mason install llvm ${LLVM_VERSION} | ||
MASON_LLVM=$(${MASON_DIR}/mason prefix llvm ${LLVM_VERSION}) | ||
${MASON_DIR}/mason install sqlite ${SQLITE_VERSION} | ||
MASON_SQLITE=$(${MASON_DIR}/mason prefix sqlite ${SQLITE_VERSION}) | ||
} | ||
|
||
function mason_compile { | ||
# Use llvm 7.x to statically link libc++ | ||
# https://github.com/mapbox/mason/pull/545#issuecomment-367082479 | ||
export CXX="${MASON_LLVM}/bin/clang++" | ||
export CC="${MASON_LLVM}/bin/clang" | ||
LDFLAGS="${LDFLAGS} -stdlib=libc++" | ||
if [[ $(uname -s) == 'Linux' ]]; then | ||
CXXFLAGS="-nostdinc++ -I${MASON_LLVM}/include/c++/v1" | ||
LDFLAGS="${LDFLAGS} -nostdlib++ ${MASON_LLVM}/lib/libc++.a" | ||
LDFLAGS="${LDFLAGS} ${MASON_LLVM}/lib/libc++abi.a" | ||
LDFLAGS="${LDFLAGS} ${MASON_LLVM}/lib/libunwind.a -rtlib=compiler-rt" | ||
fi | ||
|
||
# knock out /usr/local to ensure libsqlite without a doubt that | ||
# sqlite from from mason is used | ||
perl -i -p -e "s/-L\/usr\/local\/lib//g;" Makefile | ||
perl -i -p -e "s/-I\/usr\/local\/include//g;" Makefile | ||
|
||
|
||
PREFIX=${MASON_PREFIX} \ | ||
PATH=${MASON_SQLITE}/bin:${PATH} \ | ||
CXXFLAGS="${CXXFLAGS} -I${MASON_SQLITE}/include" \ | ||
LDFLAGS="${LDFLAGS} -L${MASON_SQLITE}/lib -ldl -lpthread" make | ||
|
||
PREFIX=${MASON_PREFIX} \ | ||
PATH=${MASON_SQLITE}/bin:${PATH} \ | ||
CXXFLAGS="${CXXFLAGS} -I${MASON_SQLITE}/include" \ | ||
LDFLAGS="${LDFLAGS} -L${MASON_SQLITE}/lib -ldl -lpthread" make install | ||
} | ||
|
||
function mason_cflags { | ||
: | ||
} | ||
|
||
function mason_ldflags { | ||
: | ||
} | ||
|
||
function mason_static_libs { | ||
: | ||
} | ||
|
||
function mason_clean { | ||
make clean | ||
} | ||
|
||
mason_run "$@" |