Merge commit 'f8dd96543542220181c76afb8c084f4908213fb5' as 'third_party/mason'

This commit is contained in:
Patrick Niklaus
2016-12-15 10:31:15 +00:00
796 changed files with 30230 additions and 0 deletions
@@ -0,0 +1,68 @@
language: c
sudo: false
# Save common build configurations as shortcuts, so we can reference them later.
addons_shortcuts:
cmake3: &cmake3
apt:
sources: [ 'george-edison55-precise-backports' ]
packages: [ 'cmake', 'cmake-data' ]
matrix:
exclude:
- os: linux
- os: osx
include:
- os: osx
osx_image: xcode7
env: MASON_PLATFORM=ios
compiler: clang
- os: osx
osx_image: xcode7.2
env: MASON_PLATFORM=ios
compiler: clang
- os: osx
osx_image: xcode7.3
env: MASON_PLATFORM=ios
compiler: clang
- os: osx
osx_image: xcode7
env: MASON_PLATFORM=osx
compiler: clang
- os: linux
env: MASON_PLATFORM=linux CXX=clang++-3.7
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7', 'george-edison55-precise-backports' ]
packages: [ 'clang-3.7', 'cmake', 'cmake-data' ]
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v5
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v7
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v8
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86-64
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips-64
addons: *cmake3
before_install:
- if [[ ${MASON_PLATFORM} == "osx" || ${MASON_PLATFORM} == "ios" ]]; then brew install cmake ; fi
script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
after_success:
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
+57
View File
@@ -0,0 +1,57 @@
#!/usr/bin/env bash
MASON_NAME=js-number-to-string
MASON_VERSION=1.0.2
MASON_LIB_FILE=lib/libjs-number-to-string.a
. ${MASON_DIR}/mason.sh
function mason_load_source {
mason_download \
https://github.com/mapbox/js-number-to-string/archive/v${MASON_VERSION}.tar.gz \
b6b7e0184876ef9035a555936921e8481eb9801a
mason_extract_tar_gz
export MASON_BUILD_PATH=${MASON_ROOT}/.build/js-number-to-string-${MASON_VERSION}
}
function mason_compile {
rm -rf build
mkdir build
cd build
CMAKE_TOOLCHAIN_FILE=
if [ ${MASON_PLATFORM} == 'ios' ] ; then
# Make sure CMake thinks we're cross-compiling and manually set the exit codes
# because CMake can't run the test programs
echo "set (CMAKE_SYSTEM_NAME Darwin)" > toolchain.cmake
CMAKE_TOOLCHAIN_FILE="-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake"
elif [ ${MASON_PLATFORM} == 'android' ] ; then
# Make sure CMake thinks we're cross-compiling and manually set the exit codes
# because CMake can't run the test programs
echo "set (CMAKE_SYSTEM_NAME Android)" > toolchain.cmake
CMAKE_TOOLCHAIN_FILE="-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake"
fi
cmake .. ${CMAKE_TOOLCHAIN_FILE} \
-DCMAKE_CXX_FLAGS="${CFLAGS:-}" \
-DCMAKE_INSTALL_PREFIX=${MASON_PREFIX} \
-DCMAKE_BUILD_TYPE=Release
make -j${MASON_CONCURRENCY} VERBOSE=1
make install
}
function mason_cflags {
echo "-I${MASON_PREFIX}/include"
}
function mason_ldflags {
echo "-L${MASON_PREFIX}/lib -ljs-number-to-string"
}
function mason_clean {
make clean
}
mason_run "$@"
@@ -0,0 +1,68 @@
language: c
sudo: false
# Save common build configurations as shortcuts, so we can reference them later.
addons_shortcuts:
cmake3: &cmake3
apt:
sources: [ 'george-edison55-precise-backports' ]
packages: [ 'cmake', 'cmake-data' ]
matrix:
exclude:
- os: linux
- os: osx
include:
- os: osx
osx_image: xcode7
env: MASON_PLATFORM=ios
compiler: clang
- os: osx
osx_image: xcode7.2
env: MASON_PLATFORM=ios
compiler: clang
- os: osx
osx_image: xcode7.3
env: MASON_PLATFORM=ios
compiler: clang
- os: osx
osx_image: xcode7
env: MASON_PLATFORM=osx
compiler: clang
- os: linux
env: MASON_PLATFORM=linux CXX=clang++-3.7
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7', 'george-edison55-precise-backports' ]
packages: [ 'clang-3.7', 'cmake', 'cmake-data' ]
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v5
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v7
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v8
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86-64
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips
addons: *cmake3
- os: linux
env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips-64
addons: *cmake3
before_install:
- if [[ ${MASON_PLATFORM} == "osx" || ${MASON_PLATFORM} == "ios" ]]; then brew install cmake ; fi
script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
after_success:
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
MASON_NAME=js-number-to-string
MASON_VERSION=1.0.3
MASON_LIB_FILE=lib/libjs-number-to-string.a
. ${MASON_DIR}/mason.sh
function mason_load_source {
mason_download \
https://github.com/mapbox/js-number-to-string/archive/v${MASON_VERSION}.tar.gz \
b85f911c51309c77c5bd3239c74a62129bd6bc1c
mason_extract_tar_gz
export MASON_BUILD_PATH=${MASON_ROOT}/.build/js-number-to-string-${MASON_VERSION}
}
function mason_compile {
rm -rf build
mkdir build
cd build
CMAKE_TOOLCHAIN_FILE=
if [ ${MASON_PLATFORM} == 'ios' ] ; then
# Make sure CMake thinks we're cross-compiling and manually set the exit codes
# because CMake can't run the test programs
echo "set (CMAKE_SYSTEM_NAME Darwin)" > toolchain.cmake
CMAKE_TOOLCHAIN_FILE="-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake"
elif [ ${MASON_PLATFORM} == 'android' ] ; then
# Make sure CMake thinks we're cross-compiling and manually set the exit codes
# because CMake can't run the test programs
echo "set (CMAKE_SYSTEM_NAME Android)" > toolchain.cmake
CMAKE_TOOLCHAIN_FILE="-DCMAKE_TOOLCHAIN_FILE=toolchain.cmake"
fi
cmake .. ${CMAKE_TOOLCHAIN_FILE} \
-DCMAKE_CXX_FLAGS="${CFLAGS:-}" \
-DCMAKE_INSTALL_PREFIX=${MASON_PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_EXAMPLES=OFF
make -j${MASON_CONCURRENCY} VERBOSE=1
make install
}
function mason_cflags {
echo "-I${MASON_PREFIX}/include"
}
function mason_ldflags {
echo "-L${MASON_PREFIX}/lib -ljs-number-to-string"
}
function mason_clean {
make clean
}
mason_run "$@"