Skip to content

Commit

Permalink
Merge pull request #676 from mapbox/tippecanoe-1.32.10
Browse files Browse the repository at this point in the history
Tippecanoe 1.32.10
  • Loading branch information
boblannon authored Jan 17, 2019
2 parents 58a0b2c + c9eff64 commit 569dc10
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/tippecanoe/1.32.10/.travis.yml
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}
75 changes: 75 additions & 0 deletions scripts/tippecanoe/1.32.10/script.sh
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 "$@"

0 comments on commit 569dc10

Please sign in to comment.