diff --git a/third_party/mason/.travis.yml b/third_party/mason/.travis.yml index c208970af..f7cffc379 100644 --- a/third_party/mason/.travis.yml +++ b/third_party/mason/.travis.yml @@ -10,13 +10,20 @@ matrix: install: - | + export if [[ ${MASON_PLATFORM:-unset} == 'unset' ]] || [[ ${MASON_PLATFORM} == 'osx' ]] || [[ ${MASON_PLATFORM} == 'linux' ]]; then - echo "Installing clang for OSX/Linux via 'install' target" - source utils/toolchain.sh - which ${CC} - ${CC} -v - which ${CXX} - ${CXX} -v + # If platform is Linux or OSX, we might still be cross compiling if the + # MASON_PLATFORM_VERSION is not the same as the host platform. + if [[ ${CXX:-unset} == 'unset' ]] || [[ ${CXX} == "clang" ]] ; then + if [[ ${MASON_PLATFORM_VERSION} == `uname -m` ]] || [[ -z ${MASON_PLATFORM_VERSION} ]]; then + echo "Installing clang for OSX/Linux via 'install' target" + source utils/toolchain.sh + which ${CC} + ${CC} -v + which ${CXX} + ${CXX} -v + fi + fi fi script: diff --git a/third_party/mason/CHANGELOG.md b/third_party/mason/CHANGELOG.md index cd52d6cd6..a310bf3fb 100644 --- a/third_party/mason/CHANGELOG.md +++ b/third_party/mason/CHANGELOG.md @@ -1,3 +1,58 @@ +# Mason releases + +## 0.7.0 + + - Added + - or-tools 5.1 + - jni.hpp 3.0.0 + - libpng 1.6.28 + - jpeg turbo 1.5.1 + - freetype 2.7.1 + - harfbuzz 1.4.2 (links no deps) + - harfbuzz 1.4.2-ft (links freetype 2.7.1) + - libpq and postgres 9.6.1 + - webp 0.6.0 + - protobuf 3.2.0 + - proj 4.9.3 + - libtiff 4.0.7 + - gdal 2.1.3 + - cairo 1.14.8 + - geojsonvt 6.2.0 + - tbb 2017_20161128 + - kdbush 0.1.1-1 + - benchmark 1.0.0-1 + - jni 2.0.0-1 + - earcut 0.12.2 + - libgdal 2.1.3 (minimal package of just headers, lib, data) + + - Fixed + - gcc 5.3.0-i686 lib file corrected + - unique_resource pinned to cba309e + - gdal-config to work even if not linked + - api-trace now built with g++-5 + +Changes: https://github.com/mapbox/mason/compare/v0.6.0...v0.7.0 + +## 0.6.0 + + - Added valgrind 3.12.0, earcut 0.12.1, protozero 1.5.0/1.5.1, + libprogram_options 1.62.0-cxx11abi, jemalloc 4.4.0, llnode 1.4.1, + Omnibus mesa 13.0.3, cmake 3.7.2, minjur 0.1.0, libosmium, 2.11.0, + tippecanoe 1.16.3, sqlite 3.16.2, osmium-tool 1.5.1, apitrace 6a30de1, + nsis 3.01, llvm-argdumper and lldb-server to lldb package + - Removed valgrind latest, minjur latest, tippecanoe latest + - Fixed harfbuzz package (#327), boost_regex_icu variant + +Changes: https://github.com/mapbox/mason/compare/v0.5.0...v0.6.0 + +## 0.5.0 + + - Various fixes to support cross compiling + - Support for cross compiling to cortex_a9 on travis + - Added vector-tile 1.0.0-rc4, zlib_shared 1.2.8 + - Fixes to zlib 1.2.8 ldflags + +Changes: https://github.com/mapbox/mason/compare/v0.4.0...v0.5.0 ## 0.4.0 diff --git a/third_party/mason/contributing.md b/third_party/mason/contributing.md index 7f81e0b73..30c8b2712 100644 --- a/third_party/mason/contributing.md +++ b/third_party/mason/contributing.md @@ -1,7 +1,6 @@ # Release process - Increment version at the top of `mason` -- Increment version in test/unit.sh - Update changelog - Ensure tests are passing - Tag a release: diff --git a/third_party/mason/mason b/third_party/mason/mason index 16cd82e59..03f267a56 100755 --- a/third_party/mason/mason +++ b/third_party/mason/mason @@ -7,7 +7,7 @@ MASON_VERSION=$1 ; shift set -e set -o pipefail -MASON_RELEASED_VERSION="0.4.0" +MASON_RELEASED_VERSION="0.7.0" if [ "${MASON_COMMAND}" = "--version" ]; then echo ${MASON_RELEASED_VERSION} diff --git a/third_party/mason/mason.cmake b/third_party/mason/mason.cmake index d2ff03fca..31b231261 100644 --- a/third_party/mason/mason.cmake +++ b/third_party/mason/mason.cmake @@ -51,7 +51,7 @@ elseif(MASON_PLATFORM STREQUAL "android") else() set(MASON_PLATFORM_VERSION "arm-v7-9") endif() -else() +elseif(NOT MASON_PLATFORM_VERSION) execute_process( COMMAND uname -m OUTPUT_VARIABLE MASON_PLATFORM_VERSION diff --git a/third_party/mason/mason.sh b/third_party/mason/mason.sh index 926264159..0e78f31d6 100644 --- a/third_party/mason/mason.sh +++ b/third_party/mason/mason.sh @@ -110,7 +110,7 @@ elif [ ${MASON_PLATFORM} = 'linux' ]; then MASON_XC_PACKAGE=${MASON_XC_PACKAGE_NAME}-${MASON_XC_PACKAGE_VERSION} MASON_XC_ROOT=$(MASON_PLATFORM= MASON_PLATFORM_VERSION= ${MASON_DIR}/mason prefix ${MASON_XC_PACKAGE_NAME} ${MASON_XC_PACKAGE_VERSION}) if [[ ! ${MASON_XC_ROOT} =~ ".build" ]] && [ ! -d ${MASON_XC_ROOT} ] ; then - $(MASON_PLATFORM= MASON_PLATFORM_VERSION= ${MASON_DIR}/mason install ${MASON_XC_PACKAGE_NAME} ${MASON_XC_PACKAGE_VERSION}) + MASON_PLATFORM= MASON_PLATFORM_VERSION= ${MASON_DIR}/mason install ${MASON_XC_PACKAGE_NAME} ${MASON_XC_PACKAGE_VERSION} MASON_XC_ROOT=$(MASON_PLATFORM= MASON_PLATFORM_VERSION= ${MASON_DIR}/mason prefix ${MASON_XC_PACKAGE_NAME} ${MASON_XC_PACKAGE_VERSION}) fi diff --git a/third_party/mason/scripts/android-ndk/README.md b/third_party/mason/scripts/android-ndk/README.md new file mode 100644 index 000000000..dff5af1ad --- /dev/null +++ b/third_party/mason/scripts/android-ndk/README.md @@ -0,0 +1,4 @@ +- Versions are a concatenation of the architecture slug and the NDK release version +- Starting with r13, they are named "--" +- They contain a toolchain.sh + toolchain.cmake file +- Eventually we're going to remove Android-vars from mason.sh diff --git a/third_party/mason/scripts/android-ndk/arm-v5-9-r13b/.travis.yml b/third_party/mason/scripts/android-ndk/arm-v5-9-r13b/.travis.yml new file mode 100644 index 000000000..972226179 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/arm-v5-9-r13b/.travis.yml @@ -0,0 +1,7 @@ +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/android-ndk/arm-v5-9-r13b/script.sh b/third_party/mason/scripts/android-ndk/arm-v5-9-r13b/script.sh new file mode 100755 index 000000000..94940f80b --- /dev/null +++ b/third_party/mason/scripts/android-ndk/arm-v5-9-r13b/script.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +MASON_NAME=android-ndk +MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}")) +MASON_LIB_FILE= + +export MASON_ANDROID_TOOLCHAIN="arm-linux-androideabi" +export MASON_CFLAGS="-target armv5te-none-linux-androideabi -march=armv5te -mtune=xscale -msoft-float -fno-integrated-as -mthumb" +export MASON_LDFLAGS="-Wl,--exclude-libs,libunwind.a" +export MASON_ANDROID_ABI="armeabi" +export MASON_ANDROID_NDK_ARCH="arm" + +. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh diff --git a/third_party/mason/scripts/android-ndk/arm-v7-9-r13b/.travis.yml b/third_party/mason/scripts/android-ndk/arm-v7-9-r13b/.travis.yml new file mode 100644 index 000000000..972226179 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/arm-v7-9-r13b/.travis.yml @@ -0,0 +1,7 @@ +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/android-ndk/arm-v7-9-r13b/script.sh b/third_party/mason/scripts/android-ndk/arm-v7-9-r13b/script.sh new file mode 100755 index 000000000..c718c0336 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/arm-v7-9-r13b/script.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +MASON_NAME=android-ndk +MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}")) +MASON_LIB_FILE= + +export MASON_ANDROID_TOOLCHAIN="arm-linux-androideabi" +export MASON_CFLAGS="-target armv7-none-linux-androideabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-integrated-as -mthumb" +export MASON_LDFLAGS="-Wl,--fix-cortex-a8 -Wl,--exclude-libs,libunwind.a" +export MASON_ANDROID_ABI="armeabi-v7a" +export MASON_ANDROID_NDK_ARCH="arm" + +. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh diff --git a/third_party/mason/scripts/android-ndk/arm-v8-21-r13b/.travis.yml b/third_party/mason/scripts/android-ndk/arm-v8-21-r13b/.travis.yml new file mode 100644 index 000000000..972226179 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/arm-v8-21-r13b/.travis.yml @@ -0,0 +1,7 @@ +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/android-ndk/arm-v8-21-r13b/script.sh b/third_party/mason/scripts/android-ndk/arm-v8-21-r13b/script.sh new file mode 100755 index 000000000..921f70910 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/arm-v8-21-r13b/script.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +MASON_NAME=android-ndk +MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}")) +MASON_LIB_FILE= + +export MASON_ANDROID_TOOLCHAIN="aarch64-linux-android" +export MASON_CFLAGS="-target aarch64-none-linux-android" +export MASON_LDFLAGS="" +export MASON_ANDROID_ABI="arm64-v8a" +export MASON_ANDROID_NDK_ARCH="arm64" + +. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh diff --git a/third_party/mason/scripts/android-ndk/mips-64-21-r13b/.travis.yml b/third_party/mason/scripts/android-ndk/mips-64-21-r13b/.travis.yml new file mode 100644 index 000000000..972226179 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/mips-64-21-r13b/.travis.yml @@ -0,0 +1,7 @@ +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/android-ndk/mips-64-21-r13b/script.sh b/third_party/mason/scripts/android-ndk/mips-64-21-r13b/script.sh new file mode 100755 index 000000000..b7766dd08 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/mips-64-21-r13b/script.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +MASON_NAME=android-ndk +MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}")) +MASON_LIB_FILE= + +export MASON_ANDROID_TOOLCHAIN="mips64el-linux-android" +export MASON_CFLAGS="-target mips64el-none-linux-android" +export MASON_LDFLAGS="" +export MASON_ANDROID_ABI="mips64" +export MASON_ANDROID_NDK_ARCH="mips64" + +. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh + diff --git a/third_party/mason/scripts/android-ndk/mips-9-r13b/.travis.yml b/third_party/mason/scripts/android-ndk/mips-9-r13b/.travis.yml index 0abc340e5..972226179 100644 --- a/third_party/mason/scripts/android-ndk/mips-9-r13b/.travis.yml +++ b/third_party/mason/scripts/android-ndk/mips-9-r13b/.travis.yml @@ -1,10 +1,5 @@ -language: cpp sudo: false -os: - - linux - - osx - script: - ./mason build ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/android-ndk/mips-9-r13b/script.sh b/third_party/mason/scripts/android-ndk/mips-9-r13b/script.sh index 619e67e00..63a05d6b7 100755 --- a/third_party/mason/scripts/android-ndk/mips-9-r13b/script.sh +++ b/third_party/mason/scripts/android-ndk/mips-9-r13b/script.sh @@ -1,47 +1,13 @@ #!/usr/bin/env bash MASON_NAME=android-ndk -MASON_VERSION=mips-9-r13b +MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}")) MASON_LIB_FILE= -. ${MASON_DIR}/mason.sh +export MASON_ANDROID_TOOLCHAIN="mipsel-linux-android" +export MASON_CFLAGS="-target mipsel-none-linux-android -mips32" +export MASON_LDFLAGS="" +export MASON_ANDROID_ABI="mips" +export MASON_ANDROID_NDK_ARCH="mips" -function mason_load_source { - if [ ${MASON_PLATFORM} = 'osx' ]; then - mason_download \ - http://dl.google.com/android/repository/android-ndk-r13b-darwin-x86_64.zip \ - b822dd239f63cd2e1e72c823c41bd732da2e5ad6 - elif [ ${MASON_PLATFORM} = 'linux' ]; then - mason_download \ - http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip \ - b95dd1fba5096ca3310a67e90b2a5a8aca3ddec7 - fi - - mason_setup_build_dir - rm -rf ./android-ndk-r13b - unzip -q ../.cache/${MASON_SLUG} $@ - - export MASON_BUILD_PATH=${MASON_ROOT}/.build/android-ndk-r13b -} - -function mason_compile { - rm -rf ${MASON_PREFIX} - mkdir -p ${MASON_PREFIX} - - ${MASON_BUILD_PATH}/build/tools/make_standalone_toolchain.py \ - --force \ - --arch mips \ - --api 9 \ - --stl libc++ \ - --install-dir "${MASON_PREFIX}" - - # NDK r12 ships with .so files which are preferred when linking, but cause - # errors on devices when it's not present. - find "${MASON_PREFIX}" -name "libstdc++.so" -delete -} - -function mason_clean { - make clean -} - -mason_run "$@" +. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh diff --git a/third_party/mason/scripts/android-ndk/script-r13b.sh b/third_party/mason/scripts/android-ndk/script-r13b.sh new file mode 100644 index 000000000..d831f5a4d --- /dev/null +++ b/third_party/mason/scripts/android-ndk/script-r13b.sh @@ -0,0 +1,52 @@ +export MASON_ANDROID_PLATFORM_VERSION=${MASON_VERSION%-*} +export MASON_ANDROID_NDK_VERSION=${MASON_VERSION##*-} +export MASON_ANDROID_NDK_API_LEVEL=${MASON_ANDROID_PLATFORM_VERSION##*-} + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + if [ ${MASON_PLATFORM} = 'osx' ]; then + mason_download \ + http://dl.google.com/android/repository/android-ndk-${MASON_ANDROID_NDK_VERSION}-darwin-x86_64.zip \ + b822dd239f63cd2e1e72c823c41bd732da2e5ad6 + elif [ ${MASON_PLATFORM} = 'linux' ]; then + mason_download \ + http://dl.google.com/android/repository/android-ndk-${MASON_ANDROID_NDK_VERSION}-linux-x86_64.zip \ + b95dd1fba5096ca3310a67e90b2a5a8aca3ddec7 + fi + + mason_setup_build_dir + rm -rf ./android-ndk-${MASON_ANDROID_NDK_VERSION} + unzip -q ../.cache/${MASON_SLUG} $@ + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/android-ndk-${MASON_ANDROID_NDK_VERSION} +} + +function mason_compile { + rm -rf ${MASON_PREFIX} + mkdir -p ${MASON_PREFIX} + + ${MASON_BUILD_PATH}/build/tools/make_standalone_toolchain.py \ + --force \ + --arch ${MASON_ANDROID_NDK_ARCH} \ + --api ${MASON_ANDROID_NDK_API_LEVEL} \ + --stl libc++ \ + --install-dir "${MASON_PREFIX}" + + # NDK r12 ships with .so files which are preferred when linking, but cause + # errors on devices when it's not present. + find "${MASON_PREFIX}" -name "libstdc++.so" -delete + + # Add a toolchain.sh and toolchain.cmake file. + ROOT="${MASON_PREFIX}" ${MASON_DIR}/scripts/android-ndk/write_toolchain-${MASON_ANDROID_NDK_VERSION}.sh + + # Copy the gdbserver + mkdir -p "${MASON_PREFIX}/prebuilt" + cp -rv "${MASON_BUILD_PATH}/prebuilt/android-${MASON_ANDROID_NDK_ARCH}/gdbserver" "${MASON_PREFIX}/prebuilt" +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/android-ndk/write_toolchain-r13b.sh b/third_party/mason/scripts/android-ndk/write_toolchain-r13b.sh new file mode 100755 index 000000000..f9ea0ce3d --- /dev/null +++ b/third_party/mason/scripts/android-ndk/write_toolchain-r13b.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail +set -u + +export CFLAGS="${MASON_CFLAGS} --sysroot=\${MASON_XC_ROOT}/sysroot -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security" +export LDFLAGS="${MASON_LDFLAGS} --sysroot=\${MASON_XC_ROOT}/sysroot -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now" + +# Write CMake toolchain file +CMAKE_TOOLCHAIN="${ROOT}/toolchain.cmake" +echo "set(CMAKE_SYSTEM_NAME Android)" > "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_SYSTEM_VERSION 1)" >> "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_C_COMPILER \"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-clang\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_CXX_COMPILER \"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-clang++\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_RANLIB \"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-ranlib\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_C_FLAGS \"${CFLAGS} \${CMAKE_C_FLAGS}\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_CXX_FLAGS \"${CFLAGS} \${CMAKE_CXX_FLAGS}\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_EXE_LINKER_FLAGS \"${LDFLAGS} \${CMAKE_EXE_LINKER_FLAGS}\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(CMAKE_SHARED_LINKER_FLAGS \"${LDFLAGS} \${CMAKE_SHARED_LINKER_FLAGS}\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(STRIP_COMMAND \"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-strip\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(ANDROID_TOOLCHAIN \"${MASON_ANDROID_TOOLCHAIN}\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(ANDROID_ABI \"${MASON_ANDROID_ABI}\")" >> "${CMAKE_TOOLCHAIN}" +echo "set(ANDROID_NATIVE_API_LEVEL \"${MASON_ANDROID_NDK_API_LEVEL}\")" >> "${CMAKE_TOOLCHAIN}" + +# Write shell script toolchain file +SHELL_TOOLCHAIN="${ROOT}/toolchain.sh" +echo "export CC=\"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-clang\"" >> "${SHELL_TOOLCHAIN}" +echo "export CXX=\"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-clang++\"" >> "${SHELL_TOOLCHAIN}" +echo "export LD=\"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-ld\"" >> "${SHELL_TOOLCHAIN}" +echo "export LINK=\"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-clang++\"" >> "${SHELL_TOOLCHAIN}" +echo "export AR=\"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-ar\"" >> "${SHELL_TOOLCHAIN}" +echo "export RANLIB=\"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-ranlib\"" >> "${SHELL_TOOLCHAIN}" +echo "export STRIP=\"\${MASON_XC_ROOT}/bin/${MASON_ANDROID_TOOLCHAIN}-strip\"" >> "${SHELL_TOOLCHAIN}" +echo "export CFLAGS=\"${CFLAGS} \${CFLAGS}\"" >> "${SHELL_TOOLCHAIN}" +echo "export CXXFLAGS=\"${CFLAGS} \${CXXFLAGS}\"" >> "${SHELL_TOOLCHAIN}" +echo "export ANDROID_TOOLCHAIN=\"${MASON_ANDROID_TOOLCHAIN}\"" >> "${SHELL_TOOLCHAIN}" +echo "export ANDROID_ABI=\"${MASON_ANDROID_ABI}\"" >> "${SHELL_TOOLCHAIN}" +echo "export ANDROID_NATIVE_API_LEVEL=\"${MASON_ANDROID_NDK_API_LEVEL}\"" >> "${SHELL_TOOLCHAIN}" diff --git a/third_party/mason/scripts/android-ndk/x86-64-21-r13b/.travis.yml b/third_party/mason/scripts/android-ndk/x86-64-21-r13b/.travis.yml new file mode 100644 index 000000000..972226179 --- /dev/null +++ b/third_party/mason/scripts/android-ndk/x86-64-21-r13b/.travis.yml @@ -0,0 +1,7 @@ +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/android-ndk/x86-64-21-r13b/script.sh b/third_party/mason/scripts/android-ndk/x86-64-21-r13b/script.sh new file mode 100755 index 000000000..81261060c --- /dev/null +++ b/third_party/mason/scripts/android-ndk/x86-64-21-r13b/script.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +MASON_NAME=android-ndk +MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}")) +MASON_LIB_FILE= + +export MASON_ANDROID_TOOLCHAIN="x86_64-linux-android" +export MASON_CFLAGS="-target x86_64-none-linux-android" +export MASON_LDFLAGS="" +export MASON_ANDROID_ABI="x86_64" +export MASON_ANDROID_NDK_ARCH="x86_64" + +. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh diff --git a/third_party/mason/scripts/android-ndk/x86-9-r13b/.travis.yml b/third_party/mason/scripts/android-ndk/x86-9-r13b/.travis.yml index 0abc340e5..972226179 100644 --- a/third_party/mason/scripts/android-ndk/x86-9-r13b/.travis.yml +++ b/third_party/mason/scripts/android-ndk/x86-9-r13b/.travis.yml @@ -1,10 +1,5 @@ -language: cpp sudo: false -os: - - linux - - osx - script: - ./mason build ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/android-ndk/x86-9-r13b/script.sh b/third_party/mason/scripts/android-ndk/x86-9-r13b/script.sh index 8ce5c3b73..793828c5d 100755 --- a/third_party/mason/scripts/android-ndk/x86-9-r13b/script.sh +++ b/third_party/mason/scripts/android-ndk/x86-9-r13b/script.sh @@ -1,47 +1,13 @@ #!/usr/bin/env bash MASON_NAME=android-ndk -MASON_VERSION=x86-9-r13b +MASON_VERSION=$(basename $(dirname "${BASH_SOURCE[0]}")) MASON_LIB_FILE= -. ${MASON_DIR}/mason.sh +export MASON_ANDROID_TOOLCHAIN="i686-linux-android" +export MASON_CFLAGS="-target i686-none-linux-android" +export MASON_LDFLAGS="" +export MASON_ANDROID_ABI="x86" +export MASON_ANDROID_NDK_ARCH="x86" -function mason_load_source { - if [ ${MASON_PLATFORM} = 'osx' ]; then - mason_download \ - http://dl.google.com/android/repository/android-ndk-r13b-darwin-x86_64.zip \ - b822dd239f63cd2e1e72c823c41bd732da2e5ad6 - elif [ ${MASON_PLATFORM} = 'linux' ]; then - mason_download \ - http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip \ - b95dd1fba5096ca3310a67e90b2a5a8aca3ddec7 - fi - - mason_setup_build_dir - rm -rf ./android-ndk-r13b - unzip -q ../.cache/${MASON_SLUG} $@ - - export MASON_BUILD_PATH=${MASON_ROOT}/.build/android-ndk-r13b -} - -function mason_compile { - rm -rf ${MASON_PREFIX} - mkdir -p ${MASON_PREFIX} - - ${MASON_BUILD_PATH}/build/tools/make_standalone_toolchain.py \ - --force \ - --arch x86 \ - --api 9 \ - --stl libc++ \ - --install-dir "${MASON_PREFIX}" - - # NDK r12 ships with .so files which are preferred when linking, but cause - # errors on devices when it's not present. - find "${MASON_PREFIX}" -name "libstdc++.so" -delete -} - -function mason_clean { - make clean -} - -mason_run "$@" +. ${MASON_DIR}/scripts/android-ndk/script-${MASON_VERSION##*-}.sh diff --git a/third_party/mason/scripts/apitrace/6a30de1/.travis.yml b/third_party/mason/scripts/apitrace/6a30de1/.travis.yml new file mode 100644 index 000000000..156e282ba --- /dev/null +++ b/third_party/mason/scripts/apitrace/6a30de1/.travis.yml @@ -0,0 +1,18 @@ +language: generic + +matrix: + include: + - os: linux + dist: trusty + sudo: false + env: CXX=g++-5 CC=gcc-5 + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-5 + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/apitrace/6a30de1/script.sh b/third_party/mason/scripts/apitrace/6a30de1/script.sh new file mode 100755 index 000000000..f92c967b5 --- /dev/null +++ b/third_party/mason/scripts/apitrace/6a30de1/script.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +MASON_NAME=apitrace +MASON_VERSION=6a30de1 + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/apitrace/apitrace/archive/${MASON_VERSION}.tar.gz \ + 622308260cbbe770672ee0753f650aafa7e1a04e + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-6a30de197ad8221e6481510155025a9f93dfd5c3 +} + +function mason_compile { + cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_INSTALL_PREFIX="${MASON_PREFIX}" + make -C build + make -C build install +} + +function mason_ldflags { + : +} + +function mason_cflags { + : +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/benchmark/1.0.0-1/.travis.yml b/third_party/mason/scripts/benchmark/1.0.0-1/.travis.yml new file mode 100644 index 000000000..54dd6670c --- /dev/null +++ b/third_party/mason/scripts/benchmark/1.0.0-1/.travis.yml @@ -0,0 +1,45 @@ +language: cpp + +sudo: false + +matrix: + exclude: + - os: linux + include: + - os: osx + osx_image: xcode7 + env: MASON_PLATFORM=ios + compiler: clang + - os: osx + osx_image: xcode7 + env: MASON_PLATFORM=osx + compiler: clang + - os: linux + env: MASON_PLATFORM=linux + compiler: clang + +addons: + apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.7 + - george-edison55-precise-backports + packages: + - clang-3.7 + - cmake + - cmake-data + +cache: apt + + +before_install: +- if [[ ${MASON_PLATFORM} == "osx" || ${MASON_PLATFORM} == "ios" ]]; then brew install cmake ; fi + +before_script: + - if [[ ${MASON_PLATFORM} == "linux" && ${CXX} == "clang++" ]]; then export CXX="clang++-3.7" CC="clang-3.7" ; fi + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/benchmark/1.0.0-1/script.sh b/third_party/mason/scripts/benchmark/1.0.0-1/script.sh new file mode 100755 index 000000000..e916e37a5 --- /dev/null +++ b/third_party/mason/scripts/benchmark/1.0.0-1/script.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +MASON_NAME=benchmark +MASON_VERSION=1.0.0-1 +MASON_LIB_FILE=lib/libbenchmark.a + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/google/benchmark/archive/v1.0.0.tar.gz \ + dcf87e5faead951fd1e9ab103cb36a7c8ebe4837 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/benchmark-1.0.0 +} + +function mason_compile { + rm -rf build + mkdir -p build + cd build + 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 \ + -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \ + -DRUN_HAVE_STD_REGEX=1 \ + -DRUN_HAVE_POSIX_REGEX=0 \ + -DRUN_HAVE_STEADY_CLOCK=0 \ + -DCMAKE_CXX_FLAGS="${CFLAGS:-}" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${MASON_PREFIX}" \ + -DBENCHMARK_ENABLE_LTO=ON \ + -DBENCHMARK_ENABLE_TESTING=OFF \ + .. + else + cmake \ + ${MASON_CMAKE_TOOLCHAIN} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="${MASON_PREFIX}" \ + -DBENCHMARK_ENABLE_LTO=ON \ + -DBENCHMARK_ENABLE_TESTING=OFF \ + .. + fi + + make install -j${MASON_CONCURRENCY} +} + +function mason_cflags { + echo -isystem ${MASON_PREFIX}/include +} + +function mason_ldflags { + echo -lpthread +} + +function mason_static_libs { + echo ${MASON_PREFIX}/${MASON_LIB_FILE} +} + +mason_run "$@" diff --git a/third_party/mason/scripts/boost_libprogram_options/1.62.0-cxx11abi/.travis.yml b/third_party/mason/scripts/boost_libprogram_options/1.62.0-cxx11abi/.travis.yml new file mode 100644 index 000000000..af8da0474 --- /dev/null +++ b/third_party/mason/scripts/boost_libprogram_options/1.62.0-cxx11abi/.travis.yml @@ -0,0 +1,19 @@ +language: cpp + +matrix: + include: + - os: linux + sudo: true + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++-5-dev + +script: +- sudo perl -i -p -e "s/# define _GLIBCXX_USE_DUAL_ABI 0/# define _GLIBCXX_USE_DUAL_ABI 1/g;" /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/boost_libprogram_options/1.62.0-cxx11abi/script.sh b/third_party/mason/scripts/boost_libprogram_options/1.62.0-cxx11abi/script.sh new file mode 100755 index 000000000..e11f76702 --- /dev/null +++ b/third_party/mason/scripts/boost_libprogram_options/1.62.0-cxx11abi/script.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# dynamically determine the path to this package +HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" + +# key properties unique to this library +THIS_DIR=$(basename $(dirname $HERE)) +BOOST_LIBRARY=${THIS_DIR#boost_lib} +MASON_NAME=boost_lib${BOOST_LIBRARY} +MASON_LIB_FILE=lib/libboost_${BOOST_LIBRARY}.a +# hack for inconsistently named test lib +if [[ ${MASON_LIB_FILE} == "lib/libboost_test.a" ]]; then + MASON_LIB_FILE=lib/libboost_unit_test_framework.a +fi + +# inherit from boost base (used for all boost library packages) +BASE_PATH=${HERE}/../../boost/$(basename $HERE |cut -d- -f1) +source ${BASE_PATH}/base.sh + +# XXX: Append the -cxx11abi prefix to the package +export BOOST_VERSION_DOWNLOAD=$MASON_VERSION +export MASON_VERSION=$MASON_VERSION-cxx11abi + +# setup mason env +. ${MASON_DIR}/mason.sh + +# source common build functions +source ${BASE_PATH}/common.sh + +export CXXFLAGS="${CXXFLAGS} -D_GLIBCXX_USE_CXX11_ABI=1" + +function mason_load_source { + mason_download \ + http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION_DOWNLOAD}/boost_${BOOST_VERSION}.tar.bz2 \ + ${BOOST_SHASUM} + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/boost_${BOOST_VERSION} + + mason_extract_tar_bz2 +} + +mason_run "$@" diff --git a/third_party/mason/scripts/boost_libregex_icu/1.61.0/script.sh b/third_party/mason/scripts/boost_libregex_icu/1.61.0/script.sh index 7a556ac0b..de94e5385 100755 --- a/third_party/mason/scripts/boost_libregex_icu/1.61.0/script.sh +++ b/third_party/mason/scripts/boost_libregex_icu/1.61.0/script.sh @@ -5,10 +5,10 @@ HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" # key properties unique to this library THIS_DIR=$(basename $(dirname $HERE)) -# Note: cannot duduce from directory since it is named in a custom way +# Note: cannot deduce from directory since it is named in a custom way #BOOST_LIBRARY=${THIS_DIR#boost_lib} BOOST_LIBRARY=regex -MASON_NAME=boost_lib${BOOST_LIBRARY} +MASON_NAME=boost_lib${BOOST_LIBRARY}_icu MASON_LIB_FILE=lib/libboost_${BOOST_LIBRARY}.a # hack for inconsistently named test lib if [[ ${MASON_LIB_FILE} == "lib/libboost_test.a" ]]; then diff --git a/third_party/mason/scripts/boost_libregex_icu/1.62.0/script.sh b/third_party/mason/scripts/boost_libregex_icu/1.62.0/script.sh index 7a556ac0b..de94e5385 100755 --- a/third_party/mason/scripts/boost_libregex_icu/1.62.0/script.sh +++ b/third_party/mason/scripts/boost_libregex_icu/1.62.0/script.sh @@ -5,10 +5,10 @@ HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" # key properties unique to this library THIS_DIR=$(basename $(dirname $HERE)) -# Note: cannot duduce from directory since it is named in a custom way +# Note: cannot deduce from directory since it is named in a custom way #BOOST_LIBRARY=${THIS_DIR#boost_lib} BOOST_LIBRARY=regex -MASON_NAME=boost_lib${BOOST_LIBRARY} +MASON_NAME=boost_lib${BOOST_LIBRARY}_icu MASON_LIB_FILE=lib/libboost_${BOOST_LIBRARY}.a # hack for inconsistently named test lib if [[ ${MASON_LIB_FILE} == "lib/libboost_test.a" ]]; then diff --git a/third_party/mason/scripts/boost_libregex_icu/1.63.0/script.sh b/third_party/mason/scripts/boost_libregex_icu/1.63.0/script.sh index 7a556ac0b..de94e5385 100755 --- a/third_party/mason/scripts/boost_libregex_icu/1.63.0/script.sh +++ b/third_party/mason/scripts/boost_libregex_icu/1.63.0/script.sh @@ -5,10 +5,10 @@ HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" # key properties unique to this library THIS_DIR=$(basename $(dirname $HERE)) -# Note: cannot duduce from directory since it is named in a custom way +# Note: cannot deduce from directory since it is named in a custom way #BOOST_LIBRARY=${THIS_DIR#boost_lib} BOOST_LIBRARY=regex -MASON_NAME=boost_lib${BOOST_LIBRARY} +MASON_NAME=boost_lib${BOOST_LIBRARY}_icu MASON_LIB_FILE=lib/libboost_${BOOST_LIBRARY}.a # hack for inconsistently named test lib if [[ ${MASON_LIB_FILE} == "lib/libboost_test.a" ]]; then diff --git a/third_party/mason/scripts/cairo/1.14.8/.travis.yml b/third_party/mason/scripts/cairo/1.14.8/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/cairo/1.14.8/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/cairo/1.14.8/patch.diff b/third_party/mason/scripts/cairo/1.14.8/patch.diff new file mode 100644 index 000000000..a0f21614f --- /dev/null +++ b/third_party/mason/scripts/cairo/1.14.8/patch.diff @@ -0,0 +1,96 @@ +diff --git a/build/configure.ac.tools b/build/configure.ac.tools +index a24dbce..aaf0e5d 100644 +--- a/build/configure.ac.tools ++++ b/build/configure.ac.tools +@@ -10,16 +10,3 @@ AC_C_INLINE + + dnl =========================================================================== + +-PKG_PROG_PKG_CONFIG() +-if test "x$PKG_CONFIG" = x; then +- AC_MSG_ERROR([pkg-config >= $PKGCONFIG_REQUIRED required but not found (http://pkgconfig.freedesktop.org/)]) +-fi +- +-dnl Check for recent pkg-config which supports Requires.private +-case `$PKG_CONFIG --version` in +-[0.?|0.?.?|0.1[0-7]|0.1[0-7].?]) PKGCONFIG_REQUIRES="Requires"; ;; +-*) PKGCONFIG_REQUIRES="Requires.private"; ;; +-esac +- +-AC_SUBST(PKGCONFIG_REQUIRES) +- +diff --git a/configure.ac b/configure.ac +index 2ce1959..87c71ac 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -321,26 +321,7 @@ CAIRO_ENABLE_SURFACE_BACKEND(gallium, Gallium3D, no, [ + dnl =========================================================================== + + CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [ +- use_png=no +- AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config]) +- if test "x$png_REQUIRES" = x; then +- # libpng13 is GnuWin32's libpng-1.2.8 :-( +- for l in libpng libpng14 libpng12 libpng13 libpng10; do +- if $PKG_CONFIG --exists $l ; then +- png_REQUIRES=$l +- use_png=yes +- break +- fi +- done +- else +- use_png=yes +- fi +- +- if test "x$use_png" = "xyes" ; then +- PKG_CHECK_MODULES(png, $png_REQUIRES, , : ) +- else +- AC_MSG_WARN([Could not find libpng in the pkg-config search path]) +- fi ++ use_png=yes + ]) + + dnl =========================================================================== +@@ -495,10 +476,6 @@ FREETYPE_MIN_RELEASE=2.1.9 + FREETYPE_MIN_VERSION=9.7.3 + + CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [ +- +- PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION, +- [freetype_pkgconfig=yes], +- [freetype_pkgconfig=no]) + + if test "x$freetype_pkgconfig" = "xyes"; then + ft_REQUIRES="freetype2 >= $FREETYPE_MIN_VERSION $ft_REQUIRES" +@@ -662,18 +639,12 @@ CAIRO_ENABLE(test_surfaces, test surfaces, no) + dnl =========================================================================== + + CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [ +- pixman_REQUIRES="pixman-1 >= 0.30.0" +- PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, , +- [use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"]) ++ use_image=yes + image_REQUIRES=$pixman_REQUIRES + image_CFLAGS=$pixman_CFLAGS + image_LIBS=$pixman_LIBS + ]) + +-if pkg-config --exists 'pixman-1 >= 0.27.1'; then +- AC_DEFINE([HAS_PIXMAN_GLYPHS], 1, [Enable pixman glyph cache]) +-fi +- + + dnl =========================================================================== + +diff --git a/test/Makefile.am b/test/Makefile.am +index 950629b..f733dd9 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -75,7 +75,6 @@ endif + endif + test_sources += $(test) + +-noinst_PROGRAMS = cairo-test-suite$(EXEEXT) # always build + noinst_SCRIPTS = check-refs.sh + + TESTS += cairo-test-suite$(EXEEXT) diff --git a/third_party/mason/scripts/cairo/1.14.8/script.sh b/third_party/mason/scripts/cairo/1.14.8/script.sh new file mode 100755 index 000000000..5cc5f8591 --- /dev/null +++ b/third_party/mason/scripts/cairo/1.14.8/script.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env bash + +MASON_NAME=cairo +MASON_VERSION=1.14.8 +MASON_LIB_FILE=lib/libcairo.a + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://cairographics.org/releases/${MASON_NAME}-${MASON_VERSION}.tar.xz \ + b6a7b9d02e24fdd5fc5c44d30040f14d361a0950 + + mason_extract_tar_xz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_prepare_compile { + PNG_VERSION="1.6.28" + FREETYPE_VERSION="2.7.1" + PIXMAN_VERSION="0.34.0" + ${MASON_DIR}/mason install libpng ${PNG_VERSION} + MASON_PNG=$(${MASON_DIR}/mason prefix libpng ${PNG_VERSION}) + ${MASON_DIR}/mason install freetype ${FREETYPE_VERSION} + MASON_FREETYPE=$(${MASON_DIR}/mason prefix freetype ${FREETYPE_VERSION}) + ${MASON_DIR}/mason install pixman ${PIXMAN_VERSION} + MASON_PIXMAN=$(${MASON_DIR}/mason prefix pixman ${PIXMAN_VERSION}) +} + +function mason_compile { + mason_step "Loading patch" + patch -N -p1 < ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff + CFLAGS="${CFLAGS} -Wno-enum-conversion -I${MASON_PIXMAN}/include/pixman-1 -I${MASON_FREETYPE}/include/freetype2 -I${MASON_PNG}/include/" + LDFLAGS="-L${MASON_PIXMAN}/lib -lpixman-1 -L${MASON_FREETYPE}/lib -lfreetype -L${MASON_PNG}/lib -lpng" + # note CFLAGS overrides defaults + CAIRO_CFLAGS_DEFAULTS="-Wall -Wextra -Wmissing-declarations -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wsign-compare -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wvolatile-register-var -Wstrict-aliasing=2 -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline -fno-strict-aliasing -fno-common -Wp,-D_FORTIFY_SOURCE=2" + # so we need to add optimization flags back + export CFLAGS="${CFLAGS} ${CAIRO_CFLAGS_DEFAULTS} -O3 -DNDEBUG" + LDFLAGS=${LDFLAGS} ./autogen.sh \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-static --disable-shared \ + --enable-pdf=yes \ + --enable-ft=yes \ + --enable-png=yes \ + --enable-svg=yes \ + --enable-ps=yes \ + --enable-fc=no \ + --enable-script=no \ + --enable-interpreter=no \ + --enable-quartz=no \ + --enable-quartz-image=no \ + --enable-quartz-font=no \ + --enable-trace=no \ + --enable-gtk-doc=no \ + --enable-qt=no \ + --enable-win32=no \ + --enable-win32-font=no \ + --enable-skia=no \ + --enable-os2=no \ + --enable-beos=no \ + --enable-drm=no \ + --enable-gallium=no \ + --enable-gl=no \ + --enable-glesv2=no \ + --enable-directfb=no \ + --enable-vg=no \ + --enable-egl=no \ + --enable-glx=no \ + --enable-wgl=no \ + --enable-test-surfaces=no \ + --enable-tee=no \ + --enable-xml=no \ + --disable-valgrind \ + --enable-gobject=no \ + --enable-xlib=no \ + --enable-xlib-xrender=no \ + --enable-xcb=no \ + --enable-xlib-xcb=no \ + --enable-xcb-shm=no \ + --enable-full-testing=no \ + --enable-symbol-lookup=no \ + --disable-dependency-tracking + # The -i and -k flags are to workaround make[6]: [install-data-local] Error 1 (ignored) + make V=1 -j${MASON_CONCURRENCY} -i -k + make install -i -k +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/cmake/3.7.2/.travis.yml b/third_party/mason/scripts/cmake/3.7.2/.travis.yml new file mode 100644 index 000000000..9a6107680 --- /dev/null +++ b/third_party/mason/scripts/cmake/3.7.2/.travis.yml @@ -0,0 +1,18 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8 + compiler: clang + - os: linux + compiler: clang + sudo: false + addons: + apt: + sources: [ 'ubuntu-toolchain-r-test' ] + packages: [ 'libstdc++-5-dev' ] + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/cmake/3.7.2/script.sh b/third_party/mason/scripts/cmake/3.7.2/script.sh new file mode 100755 index 000000000..2779af6fc --- /dev/null +++ b/third_party/mason/scripts/cmake/3.7.2/script.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +MASON_NAME=cmake +MASON_VERSION=3.7.2 +MASON_LIB_FILE=bin/cmake + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://www.cmake.org/files/v3.7/cmake-${MASON_VERSION}.tar.gz \ + 35e73aad419b0dca4d5f8e8ba483e29ff54b7f05 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_compile { + ./configure --prefix=${MASON_PREFIX} + make -j${MASON_CONCURRENCY} VERBOSE=1 + make install + # remove non-essential things to save on package size + rm -f ${MASON_PREFIX}/bin/ccmake + rm -f ${MASON_PREFIX}/bin/cmakexbuild + rm -f ${MASON_PREFIX}/bin/cpack + rm -f ${MASON_PREFIX}/bin/ctest + rm -rf ${MASON_PREFIX}/share/cmake-*/Help + ls -lh ${MASON_PREFIX}/bin/ +} + +function mason_cflags { + : +} + +function mason_ldflags { + : +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/unique_resource/dev/.travis.yml b/third_party/mason/scripts/earcut/0.12.1/.travis.yml similarity index 100% rename from third_party/mason/scripts/unique_resource/dev/.travis.yml rename to third_party/mason/scripts/earcut/0.12.1/.travis.yml diff --git a/third_party/mason/scripts/earcut/0.12.1/script.sh b/third_party/mason/scripts/earcut/0.12.1/script.sh new file mode 100755 index 000000000..05be6747d --- /dev/null +++ b/third_party/mason/scripts/earcut/0.12.1/script.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +MASON_NAME=earcut +MASON_VERSION=0.12.1 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/earcut.hpp/archive/v${MASON_VERSION}.tar.gz \ + 19ac12c56687fb6a44ee99974f3eb0866374d06b + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/earcut.hpp-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/mapbox + cp -v include/mapbox/earcut.hpp ${MASON_PREFIX}/include/mapbox/earcut.hpp + cp -v README.md LICENSE ${MASON_PREFIX} +} + +function mason_cflags { + echo -isystem ${MASON_PREFIX}/include -I${MASON_PREFIX}/include +} + +function mason_ldflags { + : +} + +function mason_static_libs { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/earcut/0.12.2/.travis.yml b/third_party/mason/scripts/earcut/0.12.2/.travis.yml new file mode 100644 index 000000000..1dee2e218 --- /dev/null +++ b/third_party/mason/scripts/earcut/0.12.2/.travis.yml @@ -0,0 +1,5 @@ +language: generic + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/earcut/0.12.2/script.sh b/third_party/mason/scripts/earcut/0.12.2/script.sh new file mode 100755 index 000000000..9c2d1d8bf --- /dev/null +++ b/third_party/mason/scripts/earcut/0.12.2/script.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +MASON_NAME=earcut +MASON_VERSION=0.12.2 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/earcut.hpp/archive/v${MASON_VERSION}.tar.gz \ + fcc64054afaf4f908b72e51944796339064344f5 + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/earcut.hpp-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/mapbox + cp -v include/mapbox/earcut.hpp ${MASON_PREFIX}/include/mapbox/earcut.hpp + cp -v README.md LICENSE ${MASON_PREFIX} +} + +function mason_cflags { + echo -I${MASON_PREFIX}/include +} + +function mason_ldflags { + : +} + +function mason_static_libs { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/freetype/2.7.1/.travis.yml b/third_party/mason/scripts/freetype/2.7.1/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/freetype/2.7.1/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/freetype/2.7.1/script.sh b/third_party/mason/scripts/freetype/2.7.1/script.sh new file mode 100755 index 000000000..c35c7c88c --- /dev/null +++ b/third_party/mason/scripts/freetype/2.7.1/script.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +MASON_NAME=freetype +MASON_VERSION=2.7.1 +MASON_LIB_FILE=lib/libfreetype.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/freetype2.pc + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://nongnu.askapache.com/freetype/freetype-${MASON_VERSION}.tar.bz2 \ + 51abc6f9afd5bbcbdcc0d9ea20b145f0ff1be632 + + mason_extract_tar_bz2 + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/freetype-${MASON_VERSION} +} + +function mason_compile { + # note CFLAGS overrides defaults (-Wall -g -O2) so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG" + ./configure --prefix=${MASON_PREFIX} \ + --enable-static \ + --disable-shared ${MASON_HOST_ARG} \ + --with-zlib=yes \ + --with-bzip2=no \ + --with-harfbuzz=no \ + --with-png=no \ + --with-quickdraw-toolbox=no \ + --with-quickdraw-carbon=no \ + --with-ats=no \ + --with-fsref=no \ + --with-fsspec=no \ + + make -j${MASON_CONCURRENCY} + make install +} + +function mason_ldflags { + : # We're only using the full path to the archive, which is output in static_libs +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include/freetype2" +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/gcc/4.9.2-cortex_a9-hf/script.sh b/third_party/mason/scripts/gcc/4.9.2-cortex_a9-hf/script.sh index 0ff3c0898..17fb186da 100755 --- a/third_party/mason/scripts/gcc/4.9.2-cortex_a9-hf/script.sh +++ b/third_party/mason/scripts/gcc/4.9.2-cortex_a9-hf/script.sh @@ -28,4 +28,8 @@ function mason_ldflags { : } +function mason_static_libs { + : +} + mason_run "$@" diff --git a/third_party/mason/scripts/gcc/4.9.2-cortex_a9/script.sh b/third_party/mason/scripts/gcc/4.9.2-cortex_a9/script.sh index f991dd4ce..690acee82 100755 --- a/third_party/mason/scripts/gcc/4.9.2-cortex_a9/script.sh +++ b/third_party/mason/scripts/gcc/4.9.2-cortex_a9/script.sh @@ -29,4 +29,8 @@ function mason_ldflags { : } +function mason_static_libs { + : +} + mason_run "$@" diff --git a/third_party/mason/scripts/gcc/4.9.2-i686/script.sh b/third_party/mason/scripts/gcc/4.9.2-i686/script.sh index 30d5735ac..db29ffa69 100755 --- a/third_party/mason/scripts/gcc/4.9.2-i686/script.sh +++ b/third_party/mason/scripts/gcc/4.9.2-i686/script.sh @@ -29,4 +29,8 @@ function mason_ldflags { : } +function mason_static_libs { + : +} + mason_run "$@" diff --git a/third_party/mason/scripts/gcc/5.3.0-cortex_a9-hf/script.sh b/third_party/mason/scripts/gcc/5.3.0-cortex_a9-hf/script.sh index 1b2beffd0..9502218a6 100755 --- a/third_party/mason/scripts/gcc/5.3.0-cortex_a9-hf/script.sh +++ b/third_party/mason/scripts/gcc/5.3.0-cortex_a9-hf/script.sh @@ -36,4 +36,8 @@ function mason_ldflags { : } +function mason_static_libs { + : +} + mason_run "$@" diff --git a/third_party/mason/scripts/gcc/5.3.0-cortex_a9/script.sh b/third_party/mason/scripts/gcc/5.3.0-cortex_a9/script.sh index e41ca7635..6667a296e 100755 --- a/third_party/mason/scripts/gcc/5.3.0-cortex_a9/script.sh +++ b/third_party/mason/scripts/gcc/5.3.0-cortex_a9/script.sh @@ -36,4 +36,8 @@ function mason_ldflags { : } +function mason_static_libs { + : +} + mason_run "$@" diff --git a/third_party/mason/scripts/gcc/5.3.0-i686/script.sh b/third_party/mason/scripts/gcc/5.3.0-i686/script.sh index e5a320890..b8ed9e2aa 100755 --- a/third_party/mason/scripts/gcc/5.3.0-i686/script.sh +++ b/third_party/mason/scripts/gcc/5.3.0-i686/script.sh @@ -2,7 +2,7 @@ MASON_NAME=gcc MASON_VERSION=5.3.0-i686 -MASON_LIB_FILE=root/bin/arm-i686-linux-gnueabi-gcc +MASON_LIB_FILE=root/bin/i686-pc-linux-gnu-gcc . ${MASON_DIR}/mason.sh @@ -36,4 +36,8 @@ function mason_ldflags { : } +function mason_static_libs { + : +} + mason_run "$@" diff --git a/third_party/mason/scripts/gdal/2.1.3/.travis.yml b/third_party/mason/scripts/gdal/2.1.3/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/gdal/2.1.3/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/gdal/2.1.3/patch.diff b/third_party/mason/scripts/gdal/2.1.3/patch.diff new file mode 100644 index 000000000..74945d50d --- /dev/null +++ b/third_party/mason/scripts/gdal/2.1.3/patch.diff @@ -0,0 +1,141 @@ +diff --git a/apps/GNUmakefile b/apps/GNUmakefile +index a87cd0f..931a988 100644 +--- a/apps/GNUmakefile ++++ b/apps/GNUmakefile +@@ -79,103 +79,103 @@ gdalbuildvrt_lib.$(OBJ_EXT): gdalbuildvrt_lib.cpp + $(CXX) -c $(GDAL_INCLUDE) $(CPPFLAGS) $(CXXFLAGS) $< -o $@ + + gdalinfo$(EXE): gdalinfo_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) $(CONFIG_LIB_UTILS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) $(CONFIG_LIB_UTILS) -o $@ $(LNK_FLAGS) + + gdalserver$(EXE): gdalserver.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdal_translate$(EXE): gdal_translate_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdaladdo$(EXE): gdaladdo.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalwarp$(EXE): gdalwarp_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdal_contour$(EXE): gdal_contour.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + nearblack$(EXE): nearblack_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalmanage$(EXE): gdalmanage.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdal_rasterize$(EXE): gdal_rasterize_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdaltindex$(EXE): gdaltindex.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalbuildvrt$(EXE): gdalbuildvrt_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + multireadtest$(EXE): multireadtest.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + dumpoverviews$(EXE): dumpoverviews.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalenhance$(EXE): gdalenhance.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdaldem$(EXE): gdaldem_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdal_grid$(EXE): gdal_grid_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalwarpsimple$(EXE): gdalwarpsimple.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdaltransform$(EXE): gdaltransform.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdallocationinfo$(EXE): gdallocationinfo.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalsrsinfo$(EXE): gdalsrsinfo.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalflattenmask$(EXE): gdalflattenmask.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdaltorture$(EXE): gdaltorture.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdal2ogr$(EXE): gdal2ogr.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + ogrinfo$(EXE): ogrinfo.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + ogrlineref$(EXE): ogrlineref.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + ogr2ogr$(EXE): ogr2ogr_bin.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + testepsg$(EXE): testepsg.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + ogrtindex$(EXE): ogrtindex.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + test_ogrsf$(EXE): test_ogrsf.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gdalasyncread$(EXE): gdalasyncread.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + testreprojmulti$(EXE): testreprojmulti.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gnmmanage$(EXE): gnmmanage.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + gnmanalyse$(EXE): gnmanalyse.$(OBJ_EXT) $(DEP_LIBS) +- $(LD) $(LNK_FLAGS) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ ++ $(LD) $< $(XTRAOBJ) $(CONFIG_LIBS) -o $@ $(LNK_FLAGS) + + clean: + $(RM) *.o $(BIN_LIST) core gdal-config gdal-config-inst diff --git a/third_party/mason/scripts/gdal/2.1.3/script.sh b/third_party/mason/scripts/gdal/2.1.3/script.sh new file mode 100755 index 000000000..7848da8f6 --- /dev/null +++ b/third_party/mason/scripts/gdal/2.1.3/script.sh @@ -0,0 +1,189 @@ +#!/usr/bin/env bash + +MASON_NAME=gdal +MASON_VERSION=2.1.3 +MASON_LIB_FILE=lib/libgdal.a + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://download.osgeo.org/gdal/${MASON_VERSION}/gdal-${MASON_VERSION}.tar.gz \ + 552231f8ffe060ba30e37f1a8e6c4665bcf3cd1d + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_prepare_compile { + cd $(dirname ${MASON_ROOT}) + # set up to fix libtool .la files + # https://github.com/mapbox/mason/issues/61 + if [[ $(uname -s) == 'Darwin' ]]; then + FIND="\/Users\/travis\/build\/mapbox\/mason" + else + FIND="\/home\/travis\/build\/mapbox\/mason" + fi + REPLACE="$(pwd)" + REPLACE=${REPLACE////\\/} + ${MASON_DIR}/mason install libtiff 4.0.7 + MASON_TIFF=$(${MASON_DIR}/mason prefix libtiff 4.0.7) + perl -i -p -e "s/${FIND}/${REPLACE}/g;" ${MASON_TIFF}/lib/libtiff.la + ${MASON_DIR}/mason install proj 4.9.3 + MASON_PROJ=$(${MASON_DIR}/mason prefix proj 4.9.3) + perl -i -p -e "s/${FIND}/${REPLACE}/g;" ${MASON_PROJ}/lib/libproj.la + ${MASON_DIR}/mason install jpeg_turbo 1.5.1 + MASON_JPEG=$(${MASON_DIR}/mason prefix jpeg_turbo 1.5.1) + perl -i -p -e "s/${FIND}/${REPLACE}/g;" ${MASON_JPEG}/lib/libjpeg.la + ${MASON_DIR}/mason install libpng 1.6.28 + MASON_PNG=$(${MASON_DIR}/mason prefix libpng 1.6.28) + perl -i -p -e "s/${FIND}/${REPLACE}/g;" ${MASON_PNG}/lib/libpng.la + ${MASON_DIR}/mason install expat 2.2.0 + MASON_EXPAT=$(${MASON_DIR}/mason prefix expat 2.2.0) + perl -i -p -e "s/${FIND}/${REPLACE}/g;" ${MASON_EXPAT}/lib/libexpat.la + ${MASON_DIR}/mason install libpq 9.6.1 + MASON_LIBPQ=$(${MASON_DIR}/mason prefix libpq 9.6.1) + # depends on sudo apt-get install zlib1g-dev + ${MASON_DIR}/mason install zlib system + MASON_ZLIB=$(${MASON_DIR}/mason prefix zlib system) + # depends on sudo apt-get install libc6-dev + #${MASON_DIR}/mason install iconv system + #MASON_ICONV=$(${MASON_DIR}/mason prefix iconv system) + export LIBRARY_PATH=${MASON_LIBPQ}/lib:$LIBRARY_PATH + ${MASON_DIR}/mason install ccache 3.3.1 + MASON_CCACHE=$(${MASON_DIR}/mason prefix ccache 3.3.1)/bin/ccache +} + +function mason_compile { + if [[ ${MASON_PLATFORM} == 'linux' ]]; then + mason_step "Loading patch" + patch -N -p1 < ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff + fi + + # note CFLAGS overrides defaults so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG" + + CUSTOM_LIBS="-L${MASON_TIFF}/lib -ltiff -L${MASON_JPEG}/lib -ljpeg -L${MASON_PROJ}/lib -lproj -L${MASON_PNG}/lib -lpng -L${MASON_EXPAT}/lib -lexpat" + CUSTOM_CFLAGS="${CFLAGS} -I${MASON_LIBPQ}/include -I${MASON_TIFF}/include -I${MASON_JPEG}/include -I${MASON_PROJ}/include -I${MASON_PNG}/include -I${MASON_EXPAT}/include" + + # very custom handling for libpq/postgres support + # forcing our portable static library to be used + MASON_LIBPQ_PATH=${MASON_LIBPQ}/lib/libpq.a + if [[ $(uname -s) == 'Linux' ]]; then + # on Linux passing -Wl will lead to libtool re-positioning libpq.a in the wrong place (no longer after libgdal.a) + # which leads to unresolved symbols + CUSTOM_LDFLAGS="${LDFLAGS} ${MASON_LIBPQ_PATH}" + else + # on OSX not passing -Wl will break libtool archive creation leading to confusing arch errors + CUSTOM_LDFLAGS="${LDFLAGS} -Wl,${MASON_LIBPQ_PATH}" + fi + # we have to remove -lpq otherwise it will trigger linking to system /usr/lib/libpq + perl -i -p -e "s/\-lpq //g;" configure + # on linux -Wl,/path/to/libpq.a still does not work for the configure test + # so we have to force it into LIBS. But we don't do this on OS X since it breaks libtool archive logic + if [[ $(uname -s) == 'Linux' ]]; then + CUSTOM_LIBS="${MASON_LIBPQ}/lib/libpq.a -pthread ${CUSTOM_LIBS}" + fi + + export CXX="${MASON_CCACHE} ${CXX}" + + # note: we put ${STDLIB_CXXFLAGS} into CXX instead of LDFLAGS due to libtool oddity: + # http://stackoverflow.com/questions/16248360/autotools-libtool-link-library-with-libstdc-despite-stdlib-libc-option-pass + if [[ $(uname -s) == 'Darwin' ]]; then + export CXX="${CXX} -stdlib=libc++ -std=c++11" + fi + + # note: it might be tempting to build with --without-libtool + # but I find that will only lead to a shared libgdal.so and will + # not produce a static library even if --enable-static is passed + LIBS="${CUSTOM_LIBS}" LDFLAGS="${CUSTOM_LDFLAGS}" CFLAGS="${CUSTOM_CFLAGS}" ./configure \ + --enable-static --disable-shared \ + ${MASON_HOST_ARG} \ + --prefix=${MASON_PREFIX} \ + --with-libz=${MASON_ZLIB} \ + --disable-rpath \ + --with-libjson-c=internal \ + --with-geotiff=internal \ + --with-expat=${MASON_EXPAT} \ + --with-threads=yes \ + --with-fgdb=no \ + --with-rename-internal-libtiff-symbols=no \ + --with-rename-internal-libgeotiff-symbols=no \ + --with-hide-internal-symbols=yes \ + --with-libtiff=${MASON_TIFF} \ + --with-jpeg=${MASON_JPEG} \ + --with-png=${MASON_PNG} \ + --with-pg=${MASON_LIBPQ}/bin/pg_config \ + --with-static-proj4=${MASON_PROJ} \ + --with-spatialite=no \ + --with-geos=no \ + --with-sqlite3=no \ + --with-curl=no \ + --with-xml2=no \ + --with-pcraster=no \ + --with-cfitsio=no \ + --with-odbc=no \ + --with-libkml=no \ + --with-pcidsk=no \ + --with-jasper=no \ + --with-gif=no \ + --with-grib=no \ + --with-freexl=no \ + --with-avx=no \ + --with-sse=no \ + --with-perl=no \ + --with-ruby=no \ + --with-python=no \ + --with-java=no \ + --with-podofo=no \ + --with-pam \ + --with-webp=no \ + --with-pcre=no \ + --with-liblzma=no \ + --with-netcdf=no \ + --with-poppler=no + + make -j${MASON_CONCURRENCY} + make install + + relativize_gdal_config ${MASON_PREFIX}/bin/gdal-config ${MASON_PREFIX} ${MASON_ROOT}/${MASON_PLATFORM_ID} + +} + +function relativize_gdal_config() { + path_to_gdal_config=${1} + prefix_path=${2} + build_path=${3} + RESOLVE_SYMLINK="readlink" + if [[ $(uname -s) == 'Linux' ]];then + RESOLVE_SYMLINK="readlink -f" + fi + mv ${path_to_gdal_config} /tmp/gdal-config-backup + # append code at start + echo 'if test -L $0; then BASE=$( dirname $( '${RESOLVE_SYMLINK}' "$0" ) ); else BASE=$( dirname "$0" ); fi' > ${path_to_gdal_config} + cat /tmp/gdal-config-backup >> ${path_to_gdal_config} + chmod +x ${path_to_gdal_config} + + # now modify in place + python -c "data=open('${path_to_gdal_config}','r').read();open('${path_to_gdal_config}','w').write(data.replace('${prefix_path}','\$( cd \"\$( dirname \${BASE} )\" && pwd )'))" + # fix the path to dep libs (CONFIG_DEP_LIBS) + python -c "data=open('${path_to_gdal_config}','r').read();open('${path_to_gdal_config}','w').write(data.replace('${build_path}','\$( cd \"\$( dirname \$( dirname \$( dirname \${BASE} ) ))\" && pwd )'))" + # hack to re-add -lpq since otherwise it will not end up in --dep-libs + python -c "data=open('${path_to_gdal_config}','r').read();open('${path_to_gdal_config}','w').write(data.replace('\$CONFIG_DEP_LIBS','\$CONFIG_DEP_LIBS -lpq'))" +} + + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + echo $(${MASON_PREFIX}/bin/gdal-config --static --libs) +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/geojsonvt/6.2.0/.travis.yml b/third_party/mason/scripts/geojsonvt/6.2.0/.travis.yml new file mode 100644 index 000000000..5fca39ee3 --- /dev/null +++ b/third_party/mason/scripts/geojsonvt/6.2.0/.travis.yml @@ -0,0 +1,8 @@ +language: cpp +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/geojsonvt/6.2.0/script.sh b/third_party/mason/scripts/geojsonvt/6.2.0/script.sh new file mode 100644 index 000000000..8238746fa --- /dev/null +++ b/third_party/mason/scripts/geojsonvt/6.2.0/script.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +MASON_NAME=geojsonvt +MASON_VERSION=6.2.0 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/geojson-vt-cpp/archive/v${MASON_VERSION}.tar.gz \ + 3f23bc6ed6b51e742af7199bf46a1e6db6c6d32d + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/geojson-vt-cpp-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/ + cp -r include/mapbox ${MASON_PREFIX}/include/mapbox +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + : +} + + +mason_run "$@" diff --git a/third_party/mason/scripts/gflags/2.1.2/.travis.yml b/third_party/mason/scripts/gflags/2.1.2/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/gflags/2.1.2/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/gflags/2.1.2/script.sh b/third_party/mason/scripts/gflags/2.1.2/script.sh new file mode 100755 index 000000000..de7c784f3 --- /dev/null +++ b/third_party/mason/scripts/gflags/2.1.2/script.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +MASON_NAME=gflags +MASON_VERSION=2.1.2 +MASON_LIB_FILE=lib/libgflags.a + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/gflags/${MASON_NAME}/archive/v${MASON_VERSION}.tar.gz \ + 6810db9e9cb378bfc0b0fb250f27f4416df5beec + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_prepare_compile { + CCACHE_VERSION=3.3.1 + ${MASON_DIR}/mason install ccache ${CCACHE_VERSION} + MASON_CCACHE=$(${MASON_DIR}/mason prefix ccache ${CCACHE_VERSION}) + ${MASON_DIR}/mason install cmake 3.7.2 + ${MASON_DIR}/mason link cmake 3.7.2 +} + +function mason_compile { + rm -rf build + mkdir -p build + cd build + CMAKE_PREFIX_PATH=${MASON_ROOT}/.link \ + ${MASON_ROOT}/.link/bin/cmake \ + -DCMAKE_INSTALL_PREFIX=${MASON_PREFIX} \ + -DCMAKE_CXX_COMPILER_LAUNCHER="${MASON_CCACHE}/bin/ccache" \ + -DCMAKE_BUILD_TYPE=Release \ + .. + make VERBOSE=1 -j${MASON_CONCURRENCY} + make install + +} + +function mason_cflags { + : +} + +function mason_ldflags { + : +} + +function mason_static_libs { + echo ${MASON_PREFIX}/${MASON_LIB_FILE} +} + +mason_run "$@" diff --git a/third_party/mason/scripts/gtest/1.8.0/.travis.yml b/third_party/mason/scripts/gtest/1.8.0/.travis.yml index ac6d9af01..777495b87 100644 --- a/third_party/mason/scripts/gtest/1.8.0/.travis.yml +++ b/third_party/mason/scripts/gtest/1.8.0/.travis.yml @@ -14,10 +14,10 @@ matrix: - os: linux include: - os: osx - osx_image: xcode7 + osx_image: xcode8 env: MASON_PLATFORM=ios - os: osx - osx_image: xcode7 + osx_image: xcode8 env: MASON_PLATFORM=osx - os: linux env: MASON_PLATFORM=linux diff --git a/third_party/mason/scripts/gtest/1.8.0/script.sh b/third_party/mason/scripts/gtest/1.8.0/script.sh index 20d8a860b..598bf87bb 100755 --- a/third_party/mason/scripts/gtest/1.8.0/script.sh +++ b/third_party/mason/scripts/gtest/1.8.0/script.sh @@ -69,7 +69,9 @@ function mason_cflags { } function mason_ldflags { - echo -lpthread + if [ ${MASON_PLATFORM} != 'android' ]; then + echo -lpthread + fi } function mason_static_libs { diff --git a/third_party/mason/scripts/harfbuzz/0.9.40/script.sh b/third_party/mason/scripts/harfbuzz/0.9.40/script.sh index a16faaf88..7720dc963 100755 --- a/third_party/mason/scripts/harfbuzz/0.9.40/script.sh +++ b/third_party/mason/scripts/harfbuzz/0.9.40/script.sh @@ -27,13 +27,18 @@ function mason_prepare_compile { export C_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export CPLUS_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export LIBRARY_PATH="${MASON_FREETYPE}/lib" + if [[ ! `which pkg-config` ]]; then + echo "harfbuzz configure needs pkg-config, please install pkg-config" + exit 1 + fi } function mason_compile { export FREETYPE_CFLAGS="-I${MASON_FREETYPE}/include/freetype2" export FREETYPE_LIBS="-L${MASON_FREETYPE}/lib -lfreetype -lz" - export CXXFLAGS="${CXXFLAGS} -DHB_NO_MT ${FREETYPE_CFLAGS}" - export CFLAGS="${CFLAGS} -DHB_NO_MT ${FREETYPE_CFLAGS}" + # Note CXXFLAGS overrides the harbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" export LDFLAGS="${LDFLAGS} ${FREETYPE_LIBS}" mason_step "Loading patch 'https://github.com/mapbox/mason/blob/${MASON_SLUG}/patch.diff'..." diff --git a/third_party/mason/scripts/harfbuzz/0.9.41/script.sh b/third_party/mason/scripts/harfbuzz/0.9.41/script.sh index ff7422c8c..84beebd1b 100755 --- a/third_party/mason/scripts/harfbuzz/0.9.41/script.sh +++ b/third_party/mason/scripts/harfbuzz/0.9.41/script.sh @@ -27,13 +27,18 @@ function mason_prepare_compile { export C_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export CPLUS_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export LIBRARY_PATH="${MASON_FREETYPE}/lib" + if [[ ! `which pkg-config` ]]; then + echo "harfbuzz configure needs pkg-config, please install pkg-config" + exit 1 + fi } function mason_compile { export FREETYPE_CFLAGS="-I${MASON_FREETYPE}/include/freetype2" export FREETYPE_LIBS="-L${MASON_FREETYPE}/lib -lfreetype -lz" - export CXXFLAGS="${CXXFLAGS} -DHB_NO_MT ${FREETYPE_CFLAGS}" - export CFLAGS="${CFLAGS} -DHB_NO_MT ${FREETYPE_CFLAGS}" + # Note CXXFLAGS overrides the harbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" export LDFLAGS="${LDFLAGS} ${FREETYPE_LIBS}" mason_step "Loading patch 'https://github.com/mapbox/mason/blob/${MASON_SLUG}/patch.diff'..." diff --git a/third_party/mason/scripts/harfbuzz/1.1.2/script.sh b/third_party/mason/scripts/harfbuzz/1.1.2/script.sh index da165dd04..9ad725243 100755 --- a/third_party/mason/scripts/harfbuzz/1.1.2/script.sh +++ b/third_party/mason/scripts/harfbuzz/1.1.2/script.sh @@ -27,13 +27,18 @@ function mason_prepare_compile { export C_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export CPLUS_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export LIBRARY_PATH="${MASON_FREETYPE}/lib" + if [[ ! `which pkg-config` ]]; then + echo "harfbuzz configure needs pkg-config, please install pkg-config" + exit 1 + fi } function mason_compile { export FREETYPE_CFLAGS="-I${MASON_FREETYPE}/include/freetype2" export FREETYPE_LIBS="-L${MASON_FREETYPE}/lib -lfreetype -lz" - export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS}" - export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS}" + # Note CXXFLAGS overrides the harbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" export LDFLAGS="${LDFLAGS} ${FREETYPE_LIBS}" ./configure --prefix=${MASON_PREFIX} ${MASON_HOST_ARG} \ diff --git a/third_party/mason/scripts/harfbuzz/1.2.1/script.sh b/third_party/mason/scripts/harfbuzz/1.2.1/script.sh index a5cd6dd50..f5f40f2dd 100755 --- a/third_party/mason/scripts/harfbuzz/1.2.1/script.sh +++ b/third_party/mason/scripts/harfbuzz/1.2.1/script.sh @@ -27,13 +27,18 @@ function mason_prepare_compile { export C_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export CPLUS_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export LIBRARY_PATH="${MASON_FREETYPE}/lib" + if [[ ! `which pkg-config` ]]; then + echo "harfbuzz configure needs pkg-config, please install pkg-config" + exit 1 + fi } function mason_compile { export FREETYPE_CFLAGS="-I${MASON_FREETYPE}/include/freetype2" export FREETYPE_LIBS="-L${MASON_FREETYPE}/lib -lfreetype -lz" - export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS}" - export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS}" + # Note CXXFLAGS overrides the harbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" export LDFLAGS="${LDFLAGS} ${FREETYPE_LIBS}" ./configure --prefix=${MASON_PREFIX} ${MASON_HOST_ARG} \ diff --git a/third_party/mason/scripts/harfbuzz/1.2.6/script.sh b/third_party/mason/scripts/harfbuzz/1.2.6/script.sh index 4e4184ed1..90853ebb1 100755 --- a/third_party/mason/scripts/harfbuzz/1.2.6/script.sh +++ b/third_party/mason/scripts/harfbuzz/1.2.6/script.sh @@ -27,13 +27,18 @@ function mason_prepare_compile { export C_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export CPLUS_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export LIBRARY_PATH="${MASON_FREETYPE}/lib" + if [[ ! `which pkg-config` ]]; then + echo "harfbuzz configure needs pkg-config, please install pkg-config" + exit 1 + fi } function mason_compile { export FREETYPE_CFLAGS="-I${MASON_FREETYPE}/include/freetype2" export FREETYPE_LIBS="-L${MASON_FREETYPE}/lib -lfreetype -lz" - export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS}" - export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS}" + # Note CXXFLAGS overrides the harbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" export LDFLAGS="${LDFLAGS} ${FREETYPE_LIBS}" ./configure --prefix=${MASON_PREFIX} ${MASON_HOST_ARG} \ diff --git a/third_party/mason/scripts/harfbuzz/1.3.0/script.sh b/third_party/mason/scripts/harfbuzz/1.3.0/script.sh index d352c4af5..da240df5c 100755 --- a/third_party/mason/scripts/harfbuzz/1.3.0/script.sh +++ b/third_party/mason/scripts/harfbuzz/1.3.0/script.sh @@ -36,8 +36,9 @@ function mason_prepare_compile { function mason_compile { export FREETYPE_CFLAGS="-I${MASON_FREETYPE}/include/freetype2" export FREETYPE_LIBS="-L${MASON_FREETYPE}/lib -lfreetype -lz" - export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS}" - export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS}" + # Note CXXFLAGS overrides the harbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" export LDFLAGS="${LDFLAGS} ${FREETYPE_LIBS}" ./configure --prefix=${MASON_PREFIX} ${MASON_HOST_ARG} \ diff --git a/third_party/mason/scripts/harfbuzz/1.4.2-ft/.travis.yml b/third_party/mason/scripts/harfbuzz/1.4.2-ft/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/harfbuzz/1.4.2-ft/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/harfbuzz/2cd5323531dcd800549b2cb1cb51d708e72ab2d8/script.sh b/third_party/mason/scripts/harfbuzz/1.4.2-ft/script.sh similarity index 56% rename from third_party/mason/scripts/harfbuzz/2cd5323531dcd800549b2cb1cb51d708e72ab2d8/script.sh rename to third_party/mason/scripts/harfbuzz/1.4.2-ft/script.sh index 76eee1b52..64e9b4279 100755 --- a/third_party/mason/scripts/harfbuzz/2cd5323531dcd800549b2cb1cb51d708e72ab2d8/script.sh +++ b/third_party/mason/scripts/harfbuzz/1.4.2-ft/script.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash MASON_NAME=harfbuzz -MASON_VERSION=2cd5323531dcd800549b2cb1cb51d708e72ab2d8 +MASON_VERSION=1.4.2-ft MASON_LIB_FILE=lib/libharfbuzz.a MASON_PKGCONFIG_FILE=lib/pkgconfig/harfbuzz.pc @@ -9,52 +9,64 @@ MASON_PKGCONFIG_FILE=lib/pkgconfig/harfbuzz.pc function mason_load_source { mason_download \ - https://github.com/behdad/harfbuzz/archive/${MASON_VERSION}.tar.gz \ - 671c4cd7d31013de720e98c7e1f4bbfa06871fce + http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${MASON_VERSION/-ft/}.tar.bz2 \ + d8b08c8d792500f414472c8a54f69b08aabb06b4 - mason_extract_tar_gz + mason_extract_tar_bz2 - export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION/-ft/} } function mason_prepare_compile { - ${MASON_DIR}/mason install freetype 2.5.4 - MASON_FREETYPE=$(${MASON_DIR}/mason prefix freetype 2.5.4) + FREETYPE_VERSION="2.7.1" + ${MASON_DIR}/mason install freetype ${FREETYPE_VERSION} + MASON_FREETYPE=$(${MASON_DIR}/mason prefix freetype ${FREETYPE_VERSION}) MASON_PLATFORM= ${MASON_DIR}/mason install ragel 6.9 export PATH=$(MASON_PLATFORM= ${MASON_DIR}/mason prefix ragel 6.9)/bin:$PATH - export PKG_CONFIG_PATH="$(${MASON_DIR}/mason prefix freetype 2.5.4)/lib/pkgconfig":$PKG_CONFIG_PATH + export PKG_CONFIG_PATH="$(${MASON_DIR}/mason prefix freetype ${FREETYPE_VERSION})/lib/pkgconfig":$PKG_CONFIG_PATH export C_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export CPLUS_INCLUDE_PATH="${MASON_FREETYPE}/include/freetype2" export LIBRARY_PATH="${MASON_FREETYPE}/lib" + if [[ ! `which pkg-config` ]]; then + echo "harfbuzz configure needs pkg-config, please install pkg-config" + exit 1 + fi } function mason_compile { export FREETYPE_CFLAGS="-I${MASON_FREETYPE}/include/freetype2" export FREETYPE_LIBS="-L${MASON_FREETYPE}/lib -lfreetype -lz" - export CXXFLAGS="${CXXFLAGS} -DHB_NO_MT ${FREETYPE_CFLAGS}" - export CFLAGS="${CFLAGS} -DHB_NO_MT ${FREETYPE_CFLAGS}" + # Note CXXFLAGS overrides the harfbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} ${FREETYPE_CFLAGS} -O3 -DNDEBUG" export LDFLAGS="${LDFLAGS} ${FREETYPE_LIBS}" - NOCONFIGURE=1 ./autogen.sh ${HOST_ARG} ./configure --prefix=${MASON_PREFIX} ${MASON_HOST_ARG} \ --enable-static \ --disable-shared \ --disable-dependency-tracking \ + --with-freetype \ + --with-ucdn=yes \ --with-icu=no \ --with-cairo=no \ --with-glib=no \ --with-gobject=no \ --with-graphite2=no \ - --with-freetype \ + --with-fontconfig=no \ --with-uniscribe=no \ - --with-coretext=no || cat config.log + --with-directwrite=no \ + --with-coretext=no make -j${MASON_CONCURRENCY} V=1 make install } function mason_ldflags { - echo "-lharfbuzz" + : # We're only using the full path to the archive, which is output in static_libs +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" } function mason_clean { diff --git a/third_party/mason/scripts/harfbuzz/1.4.2/.travis.yml b/third_party/mason/scripts/harfbuzz/1.4.2/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/harfbuzz/1.4.2/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/harfbuzz/1.4.2/script.sh b/third_party/mason/scripts/harfbuzz/1.4.2/script.sh new file mode 100755 index 000000000..7efacc5d9 --- /dev/null +++ b/third_party/mason/scripts/harfbuzz/1.4.2/script.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +MASON_NAME=harfbuzz +MASON_VERSION=1.4.2 +MASON_LIB_FILE=lib/libharfbuzz.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/harfbuzz.pc + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${MASON_VERSION}.tar.bz2 \ + d8b08c8d792500f414472c8a54f69b08aabb06b4 + + mason_extract_tar_bz2 + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_prepare_compile { + MASON_PLATFORM= ${MASON_DIR}/mason install ragel 6.9 + export PATH=$(MASON_PLATFORM= ${MASON_DIR}/mason prefix ragel 6.9)/bin:$PATH + if [[ ! `which pkg-config` ]]; then + echo "harfbuzz configure needs pkg-config, please install pkg-config" + exit 1 + fi +} + +function mason_compile { + # Note CXXFLAGS overrides the harfbuzz default with is `-O2 -g` + export CXXFLAGS="${CXXFLAGS} -O3 -DNDEBUG" + export CFLAGS="${CFLAGS} -O3 -DNDEBUG" + + ./configure --prefix=${MASON_PREFIX} ${MASON_HOST_ARG} \ + --enable-static \ + --disable-shared \ + --disable-dependency-tracking \ + --with-freetype=no \ + --with-ucdn=yes \ + --with-icu=no \ + --with-cairo=no \ + --with-glib=no \ + --with-gobject=no \ + --with-graphite2=no \ + --with-fontconfig=no \ + --with-uniscribe=no \ + --with-directwrite=no \ + --with-coretext=no + + make -j${MASON_CONCURRENCY} V=1 + make install +} + +function mason_ldflags { + : # We're only using the full path to the archive, which is output in static_libs +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/icu/58.1/.travis.yml b/third_party/mason/scripts/icu/58.1/.travis.yml index f88bf1b22..370fbba2b 100644 --- a/third_party/mason/scripts/icu/58.1/.travis.yml +++ b/third_party/mason/scripts/icu/58.1/.travis.yml @@ -8,6 +8,10 @@ matrix: - os: osx env: MASON_PLATFORM=ios compiler: clang + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 + - os: linux + env: MASON_PLATFORM_VERSION=i686 - os: linux compiler: clang sudo: false diff --git a/third_party/mason/scripts/icu/58.1/script.sh b/third_party/mason/scripts/icu/58.1/script.sh index 8c003292a..ef2c38df6 100755 --- a/third_party/mason/scripts/icu/58.1/script.sh +++ b/third_party/mason/scripts/icu/58.1/script.sh @@ -23,7 +23,7 @@ function mason_load_source { } function mason_prepare_compile { - if [[ ${MASON_PLATFORM} == 'ios' || ${MASON_PLATFORM} == 'android' ]]; then + if [[ ${MASON_PLATFORM} == 'ios' || ${MASON_PLATFORM} == 'android' || ${MASON_PLATFORM_VERSION} != `uname -m` ]]; then mason_substep "Cross-compiling ICU. Starting with host build of ICU to generate tools." pushd ${MASON_ROOT}/.. @@ -40,7 +40,7 @@ function mason_prepare_compile { } function mason_compile { - if [[ ${MASON_PLATFORM} == 'ios' || ${MASON_PLATFORM} == 'android' ]]; then + if [[ ${MASON_PLATFORM} == 'ios' || ${MASON_PLATFORM} == 'android' || ${MASON_PLATFORM_VERSION} != `uname -m` ]]; then MASON_CROSS_BUILD=1 fi mason_compile_base diff --git a/third_party/mason/scripts/valgrind/latest/.travis.yml b/third_party/mason/scripts/jemalloc/4.4.0/.travis.yml similarity index 76% rename from third_party/mason/scripts/valgrind/latest/.travis.yml rename to third_party/mason/scripts/jemalloc/4.4.0/.travis.yml index 3431d4fb7..e5ec5ff23 100644 --- a/third_party/mason/scripts/valgrind/latest/.travis.yml +++ b/third_party/mason/scripts/jemalloc/4.4.0/.travis.yml @@ -1,16 +1,14 @@ -language: cpp - -sudo: false +language: generic matrix: include: - os: osx + osx_image: xcode8.2 compiler: clang - os: linux compiler: clang + sudo: false script: - ./mason build ${MASON_NAME} ${MASON_VERSION} - -after_success: - ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/jemalloc/4.4.0/script.sh b/third_party/mason/scripts/jemalloc/4.4.0/script.sh new file mode 100755 index 000000000..c82368aa8 --- /dev/null +++ b/third_party/mason/scripts/jemalloc/4.4.0/script.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +MASON_NAME=jemalloc +MASON_VERSION=4.4.0 +MASON_LIB_FILE=bin/jeprof + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/jemalloc/jemalloc/releases/download/${MASON_VERSION}/jemalloc-${MASON_VERSION}.tar.bz2 \ + 90f752aeb070639f5f8fd5d87a86cf9cc2ddc8f3 + + mason_extract_tar_bz2 + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_compile { + # warning: CFLAGS overwrites jemalloc CFLAGS, so we need to add back the jemalloc defaults + export CFLAGS="${CFLAGS} -std=gnu11 -Wall -pipe -O3 -funroll-loops -DNDEBUG -D_REENTRANT" + ./configure --prefix=${MASON_PREFIX} + make -j${MASON_CONCURRENCY} VERBOSE=1 + make install +} + +function mason_cflags { + : +} + +function mason_ldflags { + : +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/jni.hpp/2.0.0-1/.travis.yml b/third_party/mason/scripts/jni.hpp/2.0.0-1/.travis.yml new file mode 100644 index 000000000..379192656 --- /dev/null +++ b/third_party/mason/scripts/jni.hpp/2.0.0-1/.travis.yml @@ -0,0 +1,8 @@ +language: cpp +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} \ No newline at end of file diff --git a/third_party/mason/scripts/jni.hpp/2.0.0-1/script.sh b/third_party/mason/scripts/jni.hpp/2.0.0-1/script.sh new file mode 100755 index 000000000..85ecdecce --- /dev/null +++ b/third_party/mason/scripts/jni.hpp/2.0.0-1/script.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +MASON_NAME=jni.hpp +MASON_VERSION=2.0.0-1 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/jni.hpp/archive/v2.0.0.tar.gz \ + 02a99b3a4b55686a8956c8bef9de036819826de0 + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/jni.hpp-2.0.0 +} + +function mason_compile { + mkdir -p ${MASON_PREFIX} + cp -vR include README.md LICENSE.txt ${MASON_PREFIX} +} + +function mason_cflags { + echo -isystem ${MASON_PREFIX}/include -I${MASON_PREFIX}/include +} + +function mason_ldflags { + : +} + +function mason_static_libs { + : +} + +mason_run "$@" \ No newline at end of file diff --git a/third_party/mason/scripts/jni.hpp/3.0.0/.travis.yml b/third_party/mason/scripts/jni.hpp/3.0.0/.travis.yml new file mode 100644 index 000000000..379192656 --- /dev/null +++ b/third_party/mason/scripts/jni.hpp/3.0.0/.travis.yml @@ -0,0 +1,8 @@ +language: cpp +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} \ No newline at end of file diff --git a/third_party/mason/scripts/jni.hpp/3.0.0/script.sh b/third_party/mason/scripts/jni.hpp/3.0.0/script.sh new file mode 100755 index 000000000..3082755a6 --- /dev/null +++ b/third_party/mason/scripts/jni.hpp/3.0.0/script.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +MASON_NAME=jni.hpp +MASON_VERSION=3.0.0 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/jni.hpp/archive/v${MASON_VERSION}.tar.gz \ + abc0e127abfe0ce7992e29f0f1b51877495ad4f0 + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/jni.hpp-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX} + cp -vR include README.md LICENSE.txt ${MASON_PREFIX} +} + +function mason_cflags { + echo -isystem ${MASON_PREFIX}/include -I${MASON_PREFIX}/include +} + +function mason_ldflags { + : +} + +function mason_static_libs { + : +} + +mason_run "$@" \ No newline at end of file diff --git a/third_party/mason/scripts/jpeg_turbo/1.5.1/.travis.yml b/third_party/mason/scripts/jpeg_turbo/1.5.1/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/jpeg_turbo/1.5.1/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/jpeg_turbo/1.5.1/script.sh b/third_party/mason/scripts/jpeg_turbo/1.5.1/script.sh new file mode 100755 index 000000000..25ed7c4ae --- /dev/null +++ b/third_party/mason/scripts/jpeg_turbo/1.5.1/script.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +MASON_NAME=jpeg_turbo +MASON_VERSION=1.5.1 +MASON_LIB_FILE=lib/libjpeg.a + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://downloads.sourceforge.net/project/libjpeg-turbo/${MASON_VERSION}/libjpeg-turbo-${MASON_VERSION}.tar.gz \ + 4038bb4242a3fc3387d5dc4e37fc2ac7fffaf5da + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/libjpeg-turbo-${MASON_VERSION} +} + +function mason_prepare_compile { + MASON_PLATFORM= ${MASON_DIR}/mason install nasm 2.11.06 + MASON_NASM=$(MASON_PLATFORM= ${MASON_DIR}/mason prefix nasm 2.11.06) +} + +function mason_compile { + # note CFLAGS overrides defaults so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG" + ./configure \ + NASM="${MASON_NASM}/bin/nasm" \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --with-jpeg8 \ + --without-12bit \ + --without-java \ + --enable-static \ + --disable-shared \ + --disable-dependency-tracking + + make V=1 -j1 # -j1 since build breaks with concurrency + make install +} + +function mason_cflags { + echo -I${MASON_PREFIX}/include +} + +function mason_ldflags { + echo -L${MASON_PREFIX}/lib -ljpeg +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/kdbush/0.1.1-1/.travis.yml b/third_party/mason/scripts/kdbush/0.1.1-1/.travis.yml new file mode 100644 index 000000000..5fca39ee3 --- /dev/null +++ b/third_party/mason/scripts/kdbush/0.1.1-1/.travis.yml @@ -0,0 +1,8 @@ +language: cpp +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/kdbush/0.1.1-1/script.sh b/third_party/mason/scripts/kdbush/0.1.1-1/script.sh new file mode 100644 index 000000000..053dbb30a --- /dev/null +++ b/third_party/mason/scripts/kdbush/0.1.1-1/script.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +MASON_NAME=kdbush +MASON_VERSION=0.1.1-1 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mourner/kdbush.hpp/archive/v0.1.1.tar.gz \ + a7ce2860374fc547fbf4568c6c77eba6af376e5a + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/kdbush.hpp-0.1.1 +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/ + cp -v include/*.hpp ${MASON_PREFIX}/include + cp -v README.md LICENSE ${MASON_PREFIX} +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + : +} + + +mason_run "$@" diff --git a/third_party/mason/scripts/libgdal/2.1.3/.travis.yml b/third_party/mason/scripts/libgdal/2.1.3/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/libgdal/2.1.3/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/libgdal/2.1.3/script.sh b/third_party/mason/scripts/libgdal/2.1.3/script.sh new file mode 100755 index 000000000..3dad7bdb8 --- /dev/null +++ b/third_party/mason/scripts/libgdal/2.1.3/script.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +MASON_NAME=libgdal +MASON_VERSION=2.1.3 +MASON_LIB_FILE=lib/libgdal.a + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} + mkdir -p ${MASON_BUILD_PATH} +} + +function mason_prepare_compile { + ${MASON_DIR}/mason install gdal ${MASON_VERSION} + GDAL_PREFIX=$(${MASON_DIR}/mason prefix gdal ${MASON_VERSION}) +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/lib + mkdir -p ${MASON_PREFIX}/include + mkdir -p ${MASON_PREFIX}/share + mkdir -p ${MASON_PREFIX}/bin + cp -r ${GDAL_PREFIX}/bin/gdal-config ${MASON_PREFIX}/bin/ + cp -r ${GDAL_PREFIX}/include/* ${MASON_PREFIX}/include/ + cp -r ${GDAL_PREFIX}/share/* ${MASON_PREFIX}/share/ + cp -r ${GDAL_PREFIX}/lib/libgdal.a ${MASON_PREFIX}/lib/ +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + echo $(${MASON_PREFIX}/bin/gdal-config --static --libs) +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/libjpeg-turbo/1.5.0/.travis.yml b/third_party/mason/scripts/libjpeg-turbo/1.5.0/.travis.yml index 2b263e4de..ad12b05a5 100644 --- a/third_party/mason/scripts/libjpeg-turbo/1.5.0/.travis.yml +++ b/third_party/mason/scripts/libjpeg-turbo/1.5.0/.travis.yml @@ -7,6 +7,14 @@ matrix: - os: osx env: MASON_PLATFORM=osx compiler: clang + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 + - os: linux + env: MASON_PLATFORM_VERSION=i686 + addons: + apt: + sources: [ 'ubuntu-toolchain-r-test' ] + packages: [ 'libstdc++-5-dev', 'yasm' ] - os: linux env: MASON_PLATFORM=linux compiler: clang diff --git a/third_party/mason/scripts/libosmium/2.11.0/.travis.yml b/third_party/mason/scripts/libosmium/2.11.0/.travis.yml new file mode 100644 index 000000000..00c277c21 --- /dev/null +++ b/third_party/mason/scripts/libosmium/2.11.0/.travis.yml @@ -0,0 +1,11 @@ +language: generic + +matrix: + include: + - os: linux + compiler: clang + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/libosmium/2.11.0/script.sh b/third_party/mason/scripts/libosmium/2.11.0/script.sh new file mode 100755 index 000000000..f9f647244 --- /dev/null +++ b/third_party/mason/scripts/libosmium/2.11.0/script.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +MASON_NAME=libosmium +MASON_VERSION=2.11.0 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/osmcode/${MASON_NAME}/archive/v${MASON_VERSION}.tar.gz \ + 0e6b565a8566e359393e5c1f5486aaba2a2e15b8 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/ + cp -r include/osmium ${MASON_PREFIX}/include/osmium +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/libpng/1.6.25/.travis.yml b/third_party/mason/scripts/libpng/1.6.25/.travis.yml index fca15836e..c38cf5962 100644 --- a/third_party/mason/scripts/libpng/1.6.25/.travis.yml +++ b/third_party/mason/scripts/libpng/1.6.25/.travis.yml @@ -7,6 +7,13 @@ matrix: - os: osx env: MASON_PLATFORM=osx compiler: clang + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 + - os: linux + env: MASON_PLATFORM_VERSION=i686 + addons: + apt: + packages: [ 'zlib1g-dev:i386' ] - os: linux env: MASON_PLATFORM=linux compiler: clang diff --git a/third_party/mason/scripts/libpng/1.6.25/script.sh b/third_party/mason/scripts/libpng/1.6.25/script.sh index b63fff061..7b8682d85 100755 --- a/third_party/mason/scripts/libpng/1.6.25/script.sh +++ b/third_party/mason/scripts/libpng/1.6.25/script.sh @@ -5,11 +5,14 @@ MASON_VERSION=1.6.25 MASON_LIB_FILE=lib/libpng.a MASON_PKGCONFIG_FILE=lib/pkgconfig/libpng.pc +# Used when cross compiling to cortex_a9 +ZLIB_SHARED_VERSION=1.2.8 + . ${MASON_DIR}/mason.sh function mason_load_source { mason_download \ - http://downloads.sourceforge.net/project/libpng/libpng16/${MASON_VERSION}/libpng-${MASON_VERSION}.tar.gz \ + http://downloads.sourceforge.net/project/libpng/libpng16/older-releases/${MASON_VERSION}/libpng-${MASON_VERSION}.tar.gz \ a88b710714a8e27e5e5aa52de28076860fc7748c mason_extract_tar_gz @@ -17,8 +20,29 @@ function mason_load_source { export MASON_BUILD_PATH=${MASON_ROOT}/.build/libpng-${MASON_VERSION} } +function mason_prepare_compile { + # Install the zlib dependency when cross compiling as usually the host system only + # provides the zlib headers and libraries in the path for the host architecture. + if [ ${MASON_PLATFORM_VERSION} == "cortex_a9" ] || [ ${MASON_PLATFORM_VERSION} == "i686" ]; then + cd $(dirname ${MASON_ROOT}) + ${MASON_DIR}/mason install zlib_shared ${ZLIB_SHARED_VERSION} + ${MASON_DIR}/mason link zlib_shared ${ZLIB_SHARED_VERSION} + + MASON_ZLIB_CFLAGS="$(${MASON_DIR}/mason cflags zlib_shared ${ZLIB_SHARED_VERSION})" + MASON_ZLIB_LDFLAGS="-L$(${MASON_DIR}/mason prefix zlib_shared ${ZLIB_SHARED_VERSION})/lib" + fi +} + function mason_compile { - export CFLAGS="${CFLAGS:-} -O3" + export CFLAGS="${CFLAGS:-} ${MASON_ZLIB_CFLAGS} -O3" + export LDFLAGS="${CFLAGS:-} ${MASON_ZLIB_LDFLAGS}" + + if [ ${MASON_PLATFORM_VERSION} == "cortex_a9" ] || [ ${MASON_PLATFORM_VERSION} == "i686" ]; then + # XXX: This hack is because libpng does not respect CFLAGS + # for all the files. Bruteforce in the compiler command line. + export CC="${CC:-} ${CFLAGS}" + fi + ./configure \ --prefix=${MASON_PREFIX} \ ${MASON_HOST_ARG} \ @@ -27,7 +51,7 @@ function mason_compile { --disable-shared \ --disable-dependency-tracking - make install -j${MASON_CONCURRENCY} + V=1 VERBOSE=1 make install -j${MASON_CONCURRENCY} } function mason_strip_ldflags { diff --git a/third_party/mason/scripts/libpng/1.6.28/.travis.yml b/third_party/mason/scripts/libpng/1.6.28/.travis.yml new file mode 100644 index 000000000..215be2672 --- /dev/null +++ b/third_party/mason/scripts/libpng/1.6.28/.travis.yml @@ -0,0 +1,45 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 + sudo: false + - os: linux + env: MASON_PLATFORM_VERSION=i686 + sudo: false + addons: + apt: + packages: [ 'zlib1g-dev:i386' ] + - os: linux + env: MASON_PLATFORM=linux + compiler: clang + sudo: false + - os: linux + env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v5 + sudo: false + - os: linux + env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v7 + sudo: false + - os: linux + env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v8 + sudo: false + - os: linux + env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86 + sudo: false + - os: linux + env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86-64 + sudo: false + - os: linux + env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips + sudo: false + - os: linux + env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips-64 + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/libpng/1.6.28/script.sh b/third_party/mason/scripts/libpng/1.6.28/script.sh new file mode 100755 index 000000000..4c475a3d6 --- /dev/null +++ b/third_party/mason/scripts/libpng/1.6.28/script.sh @@ -0,0 +1,71 @@ +#!/usr/bin/env bash + +MASON_NAME=libpng +MASON_VERSION=1.6.28 +MASON_LIB_FILE=lib/libpng.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/libpng.pc + +# Used when cross compiling to cortex_a9 +ZLIB_SHARED_VERSION=1.2.8 + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://downloads.sourceforge.net/project/libpng/libpng16/${MASON_VERSION}/libpng-${MASON_VERSION}.tar.gz \ + a424121a192420e2fbbea20db1d13dca0c7c99ca + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/libpng-${MASON_VERSION} +} + +function mason_prepare_compile { + # Install the zlib dependency when cross compiling as usually the host system only + # provides the zlib headers and libraries in the path for the host architecture. + if [ ${MASON_PLATFORM_VERSION} == "cortex_a9" ] || [ ${MASON_PLATFORM_VERSION} == "i686" ]; then + cd $(dirname ${MASON_ROOT}) + ${MASON_DIR}/mason install zlib_shared ${ZLIB_SHARED_VERSION} + ${MASON_DIR}/mason link zlib_shared ${ZLIB_SHARED_VERSION} + + MASON_ZLIB_CFLAGS="$(${MASON_DIR}/mason cflags zlib_shared ${ZLIB_SHARED_VERSION})" + MASON_ZLIB_LDFLAGS="-L$(${MASON_DIR}/mason prefix zlib_shared ${ZLIB_SHARED_VERSION})/lib" + fi +} + +function mason_compile { + export CFLAGS="${CFLAGS:-} ${MASON_ZLIB_CFLAGS} -O3 -DNDEBUG" + export LDFLAGS="${CFLAGS:-} ${MASON_ZLIB_LDFLAGS}" + + if [ ${MASON_PLATFORM_VERSION} == "cortex_a9" ] || [ ${MASON_PLATFORM_VERSION} == "i686" ]; then + # XXX: This hack is because libpng does not respect CFLAGS + # for all the files. Bruteforce in the compiler command line. + export CC="${CC:-} ${CFLAGS}" + fi + + ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-static \ + --with-pic \ + --disable-shared \ + --disable-dependency-tracking + + V=1 VERBOSE=1 make install -j${MASON_CONCURRENCY} +} + +function mason_strip_ldflags { + shift # -L... + shift # -lpng16 + echo "$@" +} + +function mason_ldflags { + mason_strip_ldflags $(`mason_pkgconfig` --static --libs) +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/libpq/9.6.1/.travis.yml b/third_party/mason/scripts/libpq/9.6.1/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/libpq/9.6.1/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/libpq/9.6.1/patch.diff b/third_party/mason/scripts/libpq/9.6.1/patch.diff new file mode 100644 index 000000000..ae2f06a46 --- /dev/null +++ b/third_party/mason/scripts/libpq/9.6.1/patch.diff @@ -0,0 +1,11 @@ +--- src/include/pg_config_manual.h 2013-10-07 20:17:38.000000000 -0700 ++++ src/include/pg_config_manual.h 2014-03-08 21:29:48.000000000 -0800 +@@ -144,7 +144,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" + + /* + * The random() function is expected to yield values between 0 and diff --git a/third_party/mason/scripts/libpq/9.6.1/script.sh b/third_party/mason/scripts/libpq/9.6.1/script.sh new file mode 100755 index 000000000..ce3bc4f33 --- /dev/null +++ b/third_party/mason/scripts/libpq/9.6.1/script.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +MASON_NAME=libpq +MASON_VERSION=9.6.1 +MASON_LIB_FILE=lib/libpq.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/libpq.pc + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://ftp.postgresql.org/pub/source/v${MASON_VERSION}/postgresql-${MASON_VERSION}.tar.bz2 \ + 6aef3fb521aaf987a9363a314ff7d5539b6601cd + + mason_extract_tar_bz2 + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/postgresql-${MASON_VERSION} +} + +function mason_compile { + if [[ ${MASON_PLATFORM} == 'linux' ]]; then + mason_step "Loading patch" + patch src/include/pg_config_manual.h ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff + fi + + # note CFLAGS overrides defaults (-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument) so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument" + ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-thread-safety \ + --enable-largefile \ + --without-bonjour \ + --without-openssl \ + --without-pam \ + --without-krb5 \ + --without-gssapi \ + --without-ossp-uuid \ + --without-readline \ + --without-ldap \ + --without-zlib \ + --without-libxml \ + --without-libxslt \ + --without-selinux \ + --without-python \ + --without-perl \ + --without-tcl \ + --disable-rpath \ + --disable-debug \ + --disable-profiling \ + --disable-coverage \ + --disable-dtrace \ + --disable-depend \ + --disable-cassert + + make -j${MASON_CONCURRENCY} -C src/bin/pg_config install + make -j${MASON_CONCURRENCY} -C src/interfaces/libpq/ install + cp src/include/postgres_ext.h ${MASON_PREFIX}/include/ + cp src/include/pg_config_ext.h ${MASON_PREFIX}/include/ + rm -f ${MASON_PREFIX}/lib/libpq{*.so*,*.dylib} +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/libtiff/4.0.7/.travis.yml b/third_party/mason/scripts/libtiff/4.0.7/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/libtiff/4.0.7/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/libtiff/4.0.7/script.sh b/third_party/mason/scripts/libtiff/4.0.7/script.sh new file mode 100755 index 000000000..cf17b39d6 --- /dev/null +++ b/third_party/mason/scripts/libtiff/4.0.7/script.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +MASON_NAME=libtiff +MASON_VERSION=4.0.7 +MASON_LIB_FILE=lib/libtiff.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/libtiff-4.pc + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://download.osgeo.org/libtiff/tiff-${MASON_VERSION}.tar.gz \ + 3ef673aa786929fea2f997439e33473777465927 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/tiff-${MASON_VERSION} +} + +function mason_prepare_compile { + cd $(dirname ${MASON_ROOT}) + ${MASON_DIR}/mason install jpeg_turbo 1.5.1 + MASON_JPEG=$(${MASON_DIR}/mason prefix jpeg_turbo 1.5.1) + # depends on sudo apt-get install zlib1g-dev + ${MASON_DIR}/mason install zlib system + MASON_ZLIB=$(${MASON_DIR}/mason prefix zlib system) +} + + +function mason_compile { + # note CFLAGS overrides defaults (-g -O2 -Wall -W) so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG" + ./configure --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-static --disable-shared \ + --enable-largefile \ + --enable-defer-strile-load \ + --enable-chunky-strip-read \ + --disable-jpeg12 \ + --disable-dependency-tracking \ + --disable-cxx \ + --with-jpeg-include-dir=${MASON_JPEG}/include \ + --with-jpeg-lib-dir=${MASON_JPEG}/lib \ + --with-zlib-include-dir=${MASON_ZLIB}/include \ + --with-zlib-lib-dir=${MASON_ZLIB}/lib \ + --disable-lzma --disable-jbig --disable-mdi \ + --without-x --disable-pixarlog --disable-next --disable-old-jpeg --disable-logluv \ + --disable-thunder --disable-packbits --disable-ccitt + + make -j${MASON_CONCURRENCY} V=1 + make install +} + +function mason_ldflags { + echo "-ltiff -ljpeg -lz" +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/lldb/base/common.sh b/third_party/mason/scripts/lldb/base/common.sh index 9b1250a4f..8444e3cca 100755 --- a/third_party/mason/scripts/lldb/base/common.sh +++ b/third_party/mason/scripts/lldb/base/common.sh @@ -6,6 +6,8 @@ function mason_build { # copy bin mkdir -p "${MASON_PREFIX}/bin" cp "${CLANG_PREFIX}/bin/${MASON_NAME}" "${MASON_PREFIX}/bin/" + cp "${CLANG_PREFIX}/bin/lldb-server" "${MASON_PREFIX}/bin/" + cp "${CLANG_PREFIX}/bin/lldb-argdumper" "${MASON_PREFIX}/bin/" # copy lib mkdir -p "${MASON_PREFIX}/lib" if [[ $(uname -s) == 'Darwin' ]]; then diff --git a/third_party/mason/scripts/llnode/1.4.1/.travis.yml b/third_party/mason/scripts/llnode/1.4.1/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/llnode/1.4.1/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/llnode/1.4.1/script.sh b/third_party/mason/scripts/llnode/1.4.1/script.sh new file mode 100755 index 000000000..2c3da09db --- /dev/null +++ b/third_party/mason/scripts/llnode/1.4.1/script.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +MASON_NAME=llnode +MASON_VERSION=1.4.1 +MASON_LIB_FILE=lib/llnode.${MASON_DYNLIB_SUFFIX} + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/nodejs/llnode/archive/v${MASON_VERSION}.tar.gz \ + b7ff83ff4686fdeb15517310b6e048c9c864794a + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_prepare_compile { + LLVM_VERSION=3.9.1 + ${MASON_DIR}/mason install llvm 3.9.1 + LLVM_PATH=$(${MASON_DIR}/mason prefix llvm 3.9.1) +} + +function mason_compile { + git clone --depth 1 https://chromium.googlesource.com/external/gyp.git tools/gyp + # ../src/llv8.cc:256:43: error: expected ')' + #snprintf(tmp, sizeof(tmp), " fn=0x%016" PRIx64, fn.raw()); + # need to define STDC macros since libc++ adheres to spec: http://en.cppreference.com/w/cpp/types/integer + export CXXFLAGS="-stdlib=libc++ ${CXXFLAGS} -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" + export LDFLAGS="-stdlib=libc++ ${LDFLAGS}" + # per the llvm package, on linux we statically link libc++ for full portability + # while on osx we use the system libc++ + if [[ -f ${LLVM_PATH}/lib/libc++.a ]]; then + export LDFLAGS="-Wl,--whole-archive ${LLVM_PATH}/lib/libc++.a ${LLVM_PATH}/lib/libc++abi.a ${LDFLAGS}" + fi + ./gyp_llnode -Dlldb_build_dir=${LLVM_PATH} -Dlldb_dir=${LLVM_PATH} + make -C out/ -j${MASON_CONCURRENCY} V=1 + mkdir -p ${MASON_PREFIX}/lib + if [[ $(uname -s) == 'Darwin' ]]; then + cp ./out/Release/llnode* ${MASON_PREFIX}/lib/ + else + cp ./out/Release/lib.target/llnode* ${MASON_PREFIX}/lib/ + fi +} + +function mason_cflags { + : +} + +function mason_ldflags { + echo -L${MASON_PREFIX} -llnode +} + +function mason_static_libs { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/llvm/3.8.1-libstdcxx/script.sh b/third_party/mason/scripts/llvm/3.8.1-libstdcxx/script.sh index 745a02004..583fee6d9 100755 --- a/third_party/mason/scripts/llvm/3.8.1-libstdcxx/script.sh +++ b/third_party/mason/scripts/llvm/3.8.1-libstdcxx/script.sh @@ -8,23 +8,23 @@ HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" MASON_NAME=$(basename $(dirname $HERE)) # dynamically take the version of the package from directory MASON_VERSION=$(basename $HERE) -MASON_VERSION=${MASON_VERSION/-libstdcxx/} +export MASON_BASE_VERSION=${MASON_VERSION/-libstdcxx/} # inherit all functions from llvm base source ${HERE}/../../${MASON_NAME}/base/common.sh function setup_release() { - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/llvm-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ 6de84b7bb71e49ef2764d364c4318e01fda1e1e3 - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/cfe-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang 9a05f9c1c8dc865c064782dedbbbfb533c3909ac - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/compiler-rt-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt 678cbff6e177a18f4e2d0662901a744163da3347 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/llvm-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ 6de84b7bb71e49ef2764d364c4318e01fda1e1e3 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/cfe-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang 9a05f9c1c8dc865c064782dedbbbfb533c3909ac + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/compiler-rt-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt 678cbff6e177a18f4e2d0662901a744163da3347 if [[ ${BUILD_AND_LINK_LIBCXX} == true ]]; then - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxx-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx d15220e86eb8480e58a4378a4c977bbb5463fb79 - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxxabi-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi b7508c64ab8e670062ee57a12ae1e542bcb2bfb4 - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libunwind-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind 90c0184ca72e1999fec304f76bfa10340f038ee5 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libcxx-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx d15220e86eb8480e58a4378a4c977bbb5463fb79 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libcxxabi-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi b7508c64ab8e670062ee57a12ae1e542bcb2bfb4 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libunwind-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind 90c0184ca72e1999fec304f76bfa10340f038ee5 fi - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lld-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld 416c36ded12ead42dc4739d52eabf22267300883 - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/clang-tools-extra-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra ea40e36d54dc8c9bb21cbebcc872a3221a2ed685 - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lldb-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb c8c38fa9ab92f9021067678f1a1c8f07ea75ac93 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/lld-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld 416c36ded12ead42dc4739d52eabf22267300883 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/clang-tools-extra-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra ea40e36d54dc8c9bb21cbebcc872a3221a2ed685 + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/lldb-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb c8c38fa9ab92f9021067678f1a1c8f07ea75ac93 } mason_run "$@" diff --git a/third_party/mason/scripts/llvm/base/README.md b/third_party/mason/scripts/llvm/base/README.md new file mode 100644 index 000000000..4bd90d815 --- /dev/null +++ b/third_party/mason/scripts/llvm/base/README.md @@ -0,0 +1,40 @@ +## llvm + +This is a package of llvm. Multiple packages are based on repackaging the binaries from this one. + +### Depends + +#### On Linux + + - >= Ubuntu precise + - binutils 2.27 from mason for -flto support + +#### On OS X + + - OS X >= 10.11 + - On XCode >= 8 installed to `/Applications/Xcode.app` such that `xcode-select -p` returns `/Applications/Xcode.app/Contents/Developer` + +If you don't have Xcode installed in `/Applications` you can still use the clang++ in this package but you need to set: + +1) `-isysroot` to point at your Mac SDK (the value returned from `xcrun --show-sdk-path`) + +2) Add an include flag to point at your C++ headers which are generally at `ls $(dirname $(xcrun --find clang++))/../include/c++/v1`. For the command line tools this directory is at `/Library/Developer/CommandLineTools/usr/include/c++/v1/` + +### Details of builds + + - OS X build done on OS X 10.12.1 + - Linux build done on Ubuntu precise + +Builds (and rebuilds) are done using `utils/rebuild-llvm-tools.sh` + +#### OS X details + +On MacOS we use the apple system clang++ to compile and link against the apple system libc++. + +#### Linux details + +On Linux we use Ubuntu Precise in order to ensure that binaries can be run on Ubuntu Precise and newer platforms. + +We link clang++ and other llvm c++ tools to libc++ (the one within the build) to avoid clang++ itself depending on a specific libstdc++ version. + +The clang++ binary still defaults to building and linking linux programs against libstdc++. \ No newline at end of file diff --git a/third_party/mason/scripts/llvm/base/common.sh b/third_party/mason/scripts/llvm/base/common.sh index 35b8ad01c..af81f2acc 100755 --- a/third_party/mason/scripts/llvm/base/common.sh +++ b/third_party/mason/scripts/llvm/base/common.sh @@ -5,7 +5,8 @@ MASON_LIB_FILE=bin/clang . ${MASON_DIR}/mason.sh -export MAJOR_MINOR=$(echo ${MASON_VERSION} | cut -d '.' -f1-2) +export MASON_BASE_VERSION=${MASON_BASE_VERSION:-${MASON_VERSION}} +export MAJOR_MINOR=$(echo ${MASON_BASE_VERSION} | cut -d '.' -f1-2) if [[ $(uname -s) == 'Darwin' ]]; then export BUILD_AND_LINK_LIBCXX=false @@ -72,24 +73,24 @@ function get_llvm_project() { # Note: override this function to set custom hash function setup_release() { - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/llvm-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/cfe-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/compiler-rt-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/llvm-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/ + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/cfe-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/compiler-rt-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/compiler-rt if [[ ${BUILD_AND_LINK_LIBCXX} == true ]]; then - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxx-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libcxxabi-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/libunwind-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libcxx-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxx + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libcxxabi-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libcxxabi + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/libunwind-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/projects/libunwind fi - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lld-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/clang-tools-extra-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra - get_llvm_project "http://llvm.org/releases/${MASON_VERSION}/lldb-${MASON_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/lld-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lld + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/clang-tools-extra-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/clang/tools/extra + get_llvm_project "http://llvm.org/releases/${MASON_BASE_VERSION}/lldb-${MASON_BASE_VERSION}.src.tar.xz" ${MASON_BUILD_PATH}/tools/lldb get_llvm_project "https://github.com/include-what-you-use/include-what-you-use/archive/clang_${MAJOR_MINOR}.tar.gz" ${MASON_BUILD_PATH}/tools/clang/tools/include-what-you-use } function mason_load_source { mkdir -p "${MASON_ROOT}/.cache" cd "${MASON_ROOT}/.cache" - export MASON_BUILD_PATH=${MASON_ROOT}/.build/llvm-${MASON_VERSION} + export MASON_BUILD_PATH=${MASON_ROOT}/.build/llvm-${MASON_BASE_VERSION} mkdir -p "${MASON_ROOT}/.build" if [[ -d ${MASON_BUILD_PATH}/ ]]; then rm -rf ${MASON_BUILD_PATH}/ diff --git a/third_party/mason/scripts/mesa/13.0.3/.travis.yml b/third_party/mason/scripts/mesa/13.0.3/.travis.yml new file mode 100644 index 000000000..bb91b2187 --- /dev/null +++ b/third_party/mason/scripts/mesa/13.0.3/.travis.yml @@ -0,0 +1,28 @@ +language: generic + +matrix: + include: + - os: linux + sudo: false + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++-4.8-dev + - pkg-config + - libpthread-stubs0-dev + - libssl-dev + - x11proto-gl-dev + - libx11-dev + - libxext-dev + - libxcb1-dev + - libdrm-dev + - valgrind + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/mesa/13.0.3/script.sh b/third_party/mason/scripts/mesa/13.0.3/script.sh new file mode 100644 index 000000000..9384d9548 --- /dev/null +++ b/third_party/mason/scripts/mesa/13.0.3/script.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +MASON_NAME=mesa +MASON_VERSION=13.0.3 + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://mesa.freedesktop.org/archive/${MASON_VERSION}/mesa-${MASON_VERSION}.tar.gz \ + c65114c3566674642f698580efc136fe1fe19c67 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/mesa-${MASON_VERSION} +} + +function mason_prepare_compile { + LLVM_VERSION=3.8.1-libstdcxx + ${MASON_DIR}/mason install llvm ${LLVM_VERSION} + MASON_LLVM=$(${MASON_DIR}/mason prefix llvm ${LLVM_VERSION}) +} + +function mason_compile { + CFLAGS=-g CXXFLAGS=-g \ + ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-opengl \ + --enable-gles1 \ + --enable-gles2 \ + --enable-egl \ + --disable-osmesa \ + --enable-gallium-osmesa \ + --enable-gbm \ + --enable-dri \ + --disable-dri3 \ + --enable-gallium-llvm \ + --enable-glx \ + --enable-glx-tls \ + --enable-texture-float \ + --enable-shared-glapi \ + --enable-valgrind \ + --with-dri-drivers=swrast \ + --with-gallium-drivers=swrast \ + --with-egl-platforms=x11,drm,surfaceless \ + --disable-llvm-shared-libs \ + --with-llvm-prefix=${MASON_LLVM} \ + --with-sha1=libcrypto + + make + make install +} + +function mason_cflags { + echo -I${MASON_PREFIX}/include +} + +function mason_ldflags { + # We include just the library path. Users are expected to provide additional flags + # depending on which of the packaged libraries they actually want to link: + # + # * For GLX: -lGL -lX11 + # * For EGL: -lGLESv2 -lEGL -lgbm + # * For OSMesa: -lOSMesa + # + echo -L${MASON_PREFIX}/lib +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/mesa/13.0.4/.travis.yml b/third_party/mason/scripts/mesa/13.0.4/.travis.yml new file mode 100644 index 000000000..bb91b2187 --- /dev/null +++ b/third_party/mason/scripts/mesa/13.0.4/.travis.yml @@ -0,0 +1,28 @@ +language: generic + +matrix: + include: + - os: linux + sudo: false + dist: trusty + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++-4.8-dev + - pkg-config + - libpthread-stubs0-dev + - libssl-dev + - x11proto-gl-dev + - libx11-dev + - libxext-dev + - libxcb1-dev + - libdrm-dev + - valgrind + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/mesa/13.0.4/script.sh b/third_party/mason/scripts/mesa/13.0.4/script.sh new file mode 100644 index 000000000..0366a6c5e --- /dev/null +++ b/third_party/mason/scripts/mesa/13.0.4/script.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash + +MASON_NAME=mesa +MASON_VERSION=13.0.4 + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://mesa.freedesktop.org/archive/${MASON_VERSION}/mesa-${MASON_VERSION}.tar.gz \ + 0584af2f3760d6a990a532b7c0af4f5447ebdd04 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/mesa-${MASON_VERSION} +} + +function mason_prepare_compile { + LLVM_VERSION=3.8.1-libstdcxx + ${MASON_DIR}/mason install llvm ${LLVM_VERSION} + MASON_LLVM=$(${MASON_DIR}/mason prefix llvm ${LLVM_VERSION}) +} + +function mason_compile { + CFLAGS=-g CXXFLAGS=-g \ + ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-opengl \ + --enable-gles1 \ + --enable-gles2 \ + --enable-egl \ + --disable-osmesa \ + --enable-gallium-osmesa \ + --enable-gbm \ + --enable-dri \ + --disable-dri3 \ + --enable-gallium-llvm \ + --enable-glx \ + --enable-glx-tls \ + --enable-texture-float \ + --enable-shared-glapi \ + --enable-valgrind \ + --with-dri-drivers=swrast \ + --with-gallium-drivers=swrast \ + --with-egl-platforms=x11,drm,surfaceless \ + --disable-llvm-shared-libs \ + --with-llvm-prefix=${MASON_LLVM} \ + --with-sha1=libcrypto + + make + make install +} + +function mason_cflags { + echo -I${MASON_PREFIX}/include +} + +function mason_ldflags { + # We include just the library path. Users are expected to provide additional flags + # depending on which of the packaged libraries they actually want to link: + # + # * For GLX: -lGL -lX11 + # * For EGL: -lGLESv2 -lEGL -lgbm + # * For OSMesa: -lOSMesa + # + echo -L${MASON_PREFIX}/lib +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/minjur/latest/.travis.yml b/third_party/mason/scripts/minjur/0.1.0/.travis.yml similarity index 100% rename from third_party/mason/scripts/minjur/latest/.travis.yml rename to third_party/mason/scripts/minjur/0.1.0/.travis.yml diff --git a/third_party/mason/scripts/minjur/latest/script.sh b/third_party/mason/scripts/minjur/0.1.0/script.sh similarity index 65% rename from third_party/mason/scripts/minjur/latest/script.sh rename to third_party/mason/scripts/minjur/0.1.0/script.sh index dd74f207e..d6e53db03 100755 --- a/third_party/mason/scripts/minjur/latest/script.sh +++ b/third_party/mason/scripts/minjur/0.1.0/script.sh @@ -1,33 +1,34 @@ #!/usr/bin/env bash MASON_NAME=minjur -MASON_VERSION=latest +MASON_VERSION=0.1.0 MASON_LIB_FILE=bin/minjur . ${MASON_DIR}/mason.sh function mason_load_source { - export MASON_BUILD_PATH=${MASON_ROOT}/.build/minjur-latest - if [[ ! -d ${MASON_BUILD_PATH} ]]; then - git clone --depth 1 https://github.com/mapbox/minjur.git ${MASON_BUILD_PATH} - else - (cd ${MASON_BUILD_PATH} && git pull) - fi + mason_download \ + https://github.com/mapbox/${MASON_NAME}/archive/v${MASON_VERSION}.tar.gz \ + dfad234d88ed2777229d303e1b9cb8ec21b94b39 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} } function mason_prepare_compile { - ${MASON_DIR}/mason install cmake 3.6.2 - ${MASON_DIR}/mason link cmake 3.6.2 + ${MASON_DIR}/mason install cmake 3.7.1 + ${MASON_DIR}/mason link cmake 3.7.1 ${MASON_DIR}/mason install utfcpp 2.3.4 ${MASON_DIR}/mason link utfcpp 2.3.4 - ${MASON_DIR}/mason install protozero 1.4.5 - ${MASON_DIR}/mason link protozero 1.4.5 + ${MASON_DIR}/mason install protozero 1.5.1 + ${MASON_DIR}/mason link protozero 1.5.1 ${MASON_DIR}/mason install rapidjson 2016-07-20-369de87 ${MASON_DIR}/mason link rapidjson 2016-07-20-369de87 - ${MASON_DIR}/mason install libosmium 2.10.3 - ${MASON_DIR}/mason link libosmium 2.10.3 - ${MASON_DIR}/mason install boost 1.62.0 - ${MASON_DIR}/mason link boost 1.62.0 + ${MASON_DIR}/mason install libosmium 2.11.0 + ${MASON_DIR}/mason link libosmium 2.11.0 + ${MASON_DIR}/mason install boost 1.63.0 + ${MASON_DIR}/mason link boost 1.63.0 ${MASON_DIR}/mason install zlib 1.2.8 ${MASON_DIR}/mason link zlib 1.2.8 ${MASON_DIR}/mason install expat 2.2.0 diff --git a/third_party/mason/scripts/nsis/3.01/.travis.yml b/third_party/mason/scripts/nsis/3.01/.travis.yml new file mode 100644 index 000000000..d4048f062 --- /dev/null +++ b/third_party/mason/scripts/nsis/3.01/.travis.yml @@ -0,0 +1,19 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8 + compiler: clang + - os: linux + sudo: false + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++-5-dev + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/nsis/3.01/script.sh b/third_party/mason/scripts/nsis/3.01/script.sh new file mode 100755 index 000000000..10b97a437 --- /dev/null +++ b/third_party/mason/scripts/nsis/3.01/script.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +MASON_NAME=nsis +MASON_VERSION=3.01 +MASON_LIB_FILE=bin/makensis + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://downloads.sourceforge.net/project/nsis/NSIS%203/${MASON_VERSION}/nsis-${MASON_VERSION}-src.tar.bz2 \ + 99614aa0831b1cd93d13c479beda4f424b3e5875 + + mason_extract_tar_bz2 + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION}-src +} + +function mason_compile { + if [ ! -f scons-local-2.5.1.tar.gz ]; then + wget http://prdownloads.sourceforge.net/scons/scons-local-2.5.1.tar.gz + tar xvf scons-local-2.5.1.tar.gz + fi + perl -i -p -e "s/'__attribute__\(\(__stdcall__\)\)'/'\"__attribute__\(\(__stdcall__\)\)\"'/g" SCons/Config/gnu + if [[ $(uname -s) == 'Darwin' ]]; then + perl -i -p -e "s/'-Wall'/'-Wall','-stdlib=libstdc++','-fpermissive'/g" SCons/Config/gnu + perl -i -p -e "s/'-pthread'/'-stdlib=libstdc++'/g" SCons/Config/gnu + else + perl -i -p -e "s/'-Wall'/'-Wall','-fpermissive'/g" SCons/Config/gnu + perl -i -p -e "s/'-m32'/'-m64'/g" SCons/Config/gnu + fi + #perl -i -p -e "s/#include //g" Source/exehead/util.h + python scons.py STRIP=0 SKIPUTILS=all PREFIX=${MASON_PREFIX} makensis + mkdir -p ${MASON_PREFIX}/bin + cp build/urelease/makensis/makensis ${MASON_PREFIX}/bin/ + mkdir -p ${MASON_PREFIX}/Include + if [ ! -f nsis-${MASON_VERSION}.zip ]; then + wget https://downloads.sourceforge.net/project/nsis/NSIS%203/${MASON_VERSION}/nsis-${MASON_VERSION}.zip + unzip nsis-${MASON_VERSION}.zip + fi + mkdir -p ${MASON_PREFIX}/Plugins/ + cp -r nsis-${MASON_VERSION}/Plugins/* ${MASON_PREFIX}/Plugins/ + mkdir -p ${MASON_PREFIX}/Include/ + cp -r nsis-${MASON_VERSION}/Include/* ${MASON_PREFIX}/Include/ + mkdir -p ${MASON_PREFIX}/share/nsis/Contrib/ + mkdir -p ${MASON_PREFIX}/Contrib + cp -r nsis-${MASON_VERSION}/Contrib/* ${MASON_PREFIX}/share/nsis/Contrib/ + cp -r nsis-${MASON_VERSION}/Contrib/* ${MASON_PREFIX}/Contrib/ + mkdir -p ${MASON_PREFIX}/share/nsis/Stubs/ + mkdir -p ${MASON_PREFIX}/Stubs/ + cp nsis-${MASON_VERSION}/Stubs/* ${MASON_PREFIX}/Stubs/ + cp nsis-${MASON_VERSION}/Stubs/* ${MASON_PREFIX}/share/nsis/Stubs/ +} + +function mason_cflags { + : +} + +function mason_ldflags { + : +} + +function mason_static_libs { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/or-tools/5.1/.travis.yml b/third_party/mason/scripts/or-tools/5.1/.travis.yml new file mode 100644 index 000000000..ca922876b --- /dev/null +++ b/third_party/mason/scripts/or-tools/5.1/.travis.yml @@ -0,0 +1,19 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++-4.9-dev + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/or-tools/5.1/patch.diff b/third_party/mason/scripts/or-tools/5.1/patch.diff new file mode 100644 index 000000000..1e1605054 --- /dev/null +++ b/third_party/mason/scripts/or-tools/5.1/patch.diff @@ -0,0 +1,145 @@ +diff --git a/makefiles/Makefile.third_party.unix b/makefiles/Makefile.third_party.unix +index f2b3403..c82d55d 100755 +--- a/makefiles/Makefile.third_party.unix ++++ b/makefiles/Makefile.third_party.unix +@@ -285,7 +285,7 @@ dependencies/sources/cbc-$(CBC_TAG)/Makefile: dependencies/sources/cbc-$(CBC_TAG + cd dependencies/sources/cbc-$(CBC_TAG) && $(SET_PATH) $(SET_COMPILER) ./configure --prefix=$(OR_ROOT_FULL)/dependencies/install --disable-bzlib --without-lapack --enable-static --enable-shared --with-pic ADD_CXXFLAGS="-DCBC_THREAD_SAFE -DCBC_NO_INTERRUPT $(MAC_VERSION)" + + dependencies/sources/cbc-$(CBC_TAG)/Makefile.in: +- svn co https://projects.coin-or.org/svn/Cbc/releases/$(CBC_TAG) dependencies/sources/cbc-$(CBC_TAG) ++ svn co --trust-server-cert --non-interactive https://projects.coin-or.org/svn/Cbc/releases/$(CBC_TAG) dependencies/sources/cbc-$(CBC_TAG) + + # Install pcre (dependency of SWIG). + dependencies/install/bin/pcretest: dependencies/sources/pcre-$(PCRE_TAG)/Makefile $(ACLOCAL_TARGET) +@@ -351,6 +351,8 @@ dependencies/install/bin/bison: dependencies/sources/bison-$(BISON_TAG)/Makefile + + dependencies/sources/bison-$(BISON_TAG)/Makefile: dependencies/sources/bison-$(BISON_TAG)/configure $(ACLOCAL_TARGET) + cd dependencies/sources/bison-$(BISON_TAG) && $(SET_PATH) autoreconf ++ sed -e "s/^INFO_DEPS = .*/INFO_DEPS =/g" < dependencies/sources/bison-$(BISON_TAG)/Makefile.in > dependencies/sources/bison-$(BISON_TAG)/Makefile.in.new ++ mv -f dependencies/sources/bison-$(BISON_TAG)/Makefile.in.new dependencies/sources/bison-$(BISON_TAG)/Makefile.in + cd dependencies/sources/bison-$(BISON_TAG) && $(SET_PATH) ./configure --prefix=$(OR_ROOT_FULL)/dependencies/install + + dependencies/sources/bison-$(BISON_TAG)/configure: dependencies/archives/bison-$(BISON_TAG).tar.gz +@@ -396,18 +398,22 @@ dependencies/sources/libtool-$(LIBTOOL_TAG)/Makefile: dependencies/sources/libto + + dependencies/sources/libtool-$(LIBTOOL_TAG)/configure: dependencies/archives/libtool-$(LIBTOOL_TAG).tar.gz + cd dependencies/sources && tar xvzmf ../archives/libtool-$(LIBTOOL_TAG).tar.gz ++ sed -e "s/^INFO_DEPS = .*/INFO_DEPS =/g" < dependencies/sources/libtool-$(LIBTOOL_TAG)/Makefile.in > dependencies/sources/libtool-$(LIBTOOL_TAG)/Makefile.in.new ++ mv -f dependencies/sources/libtool-$(LIBTOOL_TAG)/Makefile.in.new dependencies/sources/libtool-$(LIBTOOL_TAG)/Makefile.in + + dependencies/archives/libtool-$(LIBTOOL_TAG).tar.gz: + cd dependencies/archives && curl -OL http://ftpmirror.gnu.org/libtool/libtool-$(LIBTOOL_TAG).tar.gz + + # Install automake + dependencies/install/bin/automake: dependencies/sources/automake-$(AUTOMAKE_TAG)/Makefile +- cd dependencies/sources/automake-$(AUTOMAKE_TAG) && $(SET_PATH) ./bootstrap.sh + cd dependencies/sources/automake-$(AUTOMAKE_TAG) && $(SET_PATH) make + cd dependencies/sources/automake-$(AUTOMAKE_TAG) && $(SET_PATH) make install + + + dependencies/sources/automake-$(AUTOMAKE_TAG)/Makefile: dependencies/sources/automake-$(AUTOMAKE_TAG)/configure dependencies/install/bin/autoconf ++ cd dependencies/sources/automake-$(AUTOMAKE_TAG) && $(SET_PATH) ./bootstrap.sh ++ sed -e "s/^INFO_DEPS =.*/INFO_DEPS =/g" -e 's/^.*automake-history.info$$//g' < dependencies/sources/automake-$(AUTOMAKE_TAG)/Makefile.in > dependencies/sources/automake-$(AUTOMAKE_TAG)/Makefile.in.new ++ mv -f dependencies/sources/automake-$(AUTOMAKE_TAG)/Makefile.in.new dependencies/sources/automake-$(AUTOMAKE_TAG)/Makefile.in + cd dependencies/sources/automake-$(AUTOMAKE_TAG) && $(SET_PATH) ./configure --prefix=$(OR_ROOT_FULL)/dependencies/install + + dependencies/sources/automake-$(AUTOMAKE_TAG)/configure: dependencies/archives/automake-$(AUTOMAKE_TAG).tar.gz +@@ -471,22 +477,22 @@ makefile_third_party: Makefile.local + Makefile.local: makefiles/Makefile.third_party.unix + -$(DEL) Makefile.local + @echo Generating Makefile.local +- @echo $(SELECTED_JDK_DEF)>> Makefile.local +- @echo UNIX_PYTHON_VER = $(DETECTED_PYTHON_VERSION)>> Makefile.local +- @echo PATH_TO_CSHARP_COMPILER = $(DETECTED_MCS_BINARY)>> Makefile.local +- @echo CLR_KEYFILE = bin/or-tools.snk>> Makefile.local ++ #@echo $(SELECTED_JDK_DEF)>> Makefile.local ++ #@echo UNIX_PYTHON_VER = $(DETECTED_PYTHON_VERSION)>> Makefile.local ++ #@echo PATH_TO_CSHARP_COMPILER = $(DETECTED_MCS_BINARY)>> Makefile.local ++ #@echo CLR_KEYFILE = bin/or-tools.snk>> Makefile.local + @echo >> Makefile.local +- @echo $(GLPK_MAKEFILE)>> Makefile.local +- @echo $(SCIP_MAKEFILE)>> Makefile.local +- @echo \# Define UNIX_SLM_DIR to use Sulum Optimization.>> Makefile.local +- @echo \# Define UNIX_GUROBI_DIR and GUROBI_LIB_VERSION to use Gurobi.>> Makefile.local +- @echo \# Define UNIX_CPLEX_DIR to use CPLEX.>> Makefile.local ++ #@echo $(GLPK_MAKEFILE)>> Makefile.local ++ #@echo $(SCIP_MAKEFILE)>> Makefile.local ++ #@echo \# Define UNIX_SLM_DIR to use Sulum Optimization.>> Makefile.local ++ #@echo \# Define UNIX_GUROBI_DIR and GUROBI_LIB_VERSION to use Gurobi.>> Makefile.local ++ #@echo \# Define UNIX_CPLEX_DIR to use CPLEX.>> Makefile.local + @echo >> Makefile.local + @echo UNIX_GFLAGS_DIR = $(OR_ROOT_FULL)/dependencies/install>> Makefile.local + @echo UNIX_PROTOBUF_DIR = $(OR_ROOT_FULL)/dependencies/install>> Makefile.local + @echo UNIX_SPARSEHASH_DIR = $(OR_ROOT_FULL)/dependencies/install>> Makefile.local +- @echo UNIX_SWIG_BINARY = $(OR_ROOT_FULL)/dependencies/install/bin/swig>> Makefile.local +- @echo UNIX_CLP_DIR = $(OR_ROOT_FULL)/dependencies/install>> Makefile.local +- @echo UNIX_CBC_DIR = $(OR_ROOT_FULL)/dependencies/install>> Makefile.local +- @echo UNIX_SCIP_TAG = $(SCIP_TAG)>> Makefile.local +- @echo UNIX_SULUM_VERSION = $(SULUM_TAG) >> Makefile.local +\ No newline at end of file ++ #@echo UNIX_SWIG_BINARY = $(OR_ROOT_FULL)/dependencies/install/bin/swig>> Makefile.local ++ #@echo UNIX_CLP_DIR = $(OR_ROOT_FULL)/dependencies/install>> Makefile.local ++ #@echo UNIX_CBC_DIR = $(OR_ROOT_FULL)/dependencies/install>> Makefile.local ++ #@echo UNIX_SCIP_TAG = $(SCIP_TAG)>> Makefile.local ++ #@echo UNIX_SULUM_VERSION = $(SULUM_TAG) >> Makefile.local +\ No newline at end of file +diff --git a/makefiles/Makefile.unix b/makefiles/Makefile.unix +index 003352c..b3f3ee1 100755 +--- a/makefiles/Makefile.unix ++++ b/makefiles/Makefile.unix +@@ -102,7 +102,7 @@ endif + SWIG_INC = $(GLPK_SWIG) $(CLP_SWIG) $(CBC_SWIG) $(SCIP_SWIG) $(SLM_SWIG) $(GUROBI_SWIG) $(CPLEX_SWIG) -DUSE_GLOP -DUSE_BOP + + # Compilation flags +-DEBUG = -O4 -DNDEBUG ++DEBUG = -O3 -DNDEBUG + JNIDEBUG = -O1 -DNDEBUG + + # Check wether CBC/CLP need a coin subdir in library. +@@ -118,8 +118,8 @@ ifdef UNIX_CLP_DIR + endif + + ifeq ($(PLATFORM),LINUX) +- CCC = g++ -fPIC -std=c++0x -fwrapv +- DYNAMIC_LD = g++ -shared ++ CCC = clang++ -fPIC -std=c++11 -fwrapv ++ DYNAMIC_LD = clang++ -shared + CMAKE = cmake + ifeq ($(PTRLENGTH),64) + ARCH = -DARCH_K8 +@@ -181,9 +181,9 @@ ifeq ($(PLATFORM),LINUX) + JNI_LIB_EXT = so + LIB_SUFFIX = so + SWIG_LIB_SUFFIX = so +- LINK_CMD = g++ -shared ++ LINK_CMD = clang++ -shared + LINK_PREFIX = -o # Need the space. +- PRE_LIB = -Wl,-rpath $(OR_ROOT_FULL)/lib -L$(OR_ROOT_FULL)/lib -l ++ PRE_LIB = -Wl,-z,origin -Wl,-rpath=\$$ORIGIN + POST_LIB = + BISON = dependencies/install/bin/bison + FLEX = dependencies/install/bin/flex +diff --git a/src/constraint_solver/constraint_solveri.h b/src/constraint_solver/constraint_solveri.h +index 1a5efbd..8f1419c 100644 +--- a/src/constraint_solver/constraint_solveri.h ++++ b/src/constraint_solver/constraint_solveri.h +@@ -63,6 +63,7 @@ + #include "base/integral_types.h" + #include "base/logging.h" + #include "base/sysinfo.h" ++#include "base/casts.h" + #include "base/timer.h" + #include "base/join.h" + #include "base/sparse_hash.h" +@@ -252,9 +253,9 @@ inline uint64 Hash1(int value) { return Hash1(static_cast(value)); } + + inline uint64 Hash1(void* const ptr) { + #if defined(ARCH_K8) || defined(__powerpc64__) || defined(__aarch64__) +- return Hash1(reinterpret_cast(ptr)); ++ return Hash1(bit_cast(ptr)); + #else +- return Hash1(reinterpret_cast(ptr)); ++ return Hash1(bit_cast(ptr)); + #endif + } + diff --git a/third_party/mason/scripts/or-tools/5.1/script.sh b/third_party/mason/scripts/or-tools/5.1/script.sh new file mode 100644 index 000000000..344593e85 --- /dev/null +++ b/third_party/mason/scripts/or-tools/5.1/script.sh @@ -0,0 +1,93 @@ +#!/usr/bin/env bash + +MASON_NAME=or-tools +MASON_VERSION=5.1 +MASON_LIB_FILE=lib/libortools.${MASON_DYNLIB_SUFFIX} + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/google/or-tools/archive/v${MASON_VERSION}.tar.gz \ + 3d30004e60acfb27776fc7a8d135adb2e1924dde + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/or-tools-${MASON_VERSION} +} + +function mason_prepare_compile { + ${MASON_DIR}/mason install gflags 2.1.2 + MASON_GFLAGS=$(${MASON_DIR}/mason prefix gflags 2.1.2) + ${MASON_DIR}/mason install protobuf 3.0.0 + MASON_PROTOBUF=$(${MASON_DIR}/mason prefix protobuf 3.0.0) + ${MASON_DIR}/mason install sparsehash 2.0.2 + MASON_SPARSEHASH=$(${MASON_DIR}/mason prefix sparsehash 2.0.2) +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + echo "-L${MASON_PREFIX}/lib -lortools -lz" +} + +function mason_compile { + + # The following patch to the build script disables some of the more useless + # and heavyweight parts of the build, like building the automake and autoconf + # .info docs with TeXinfo. + patch -N -p1 < ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff + + export CXXFLAGS="${CXXFLAGS} -fpermissive" + export CXX="${MASON_CCACHE} ${CXX}" + export CC="${MASON_CCACHE} ${CC}" + export CFLAGS="${CFLAGS} -fpermissive" + + make missing_directories + mkdir -p $(pwd)/dependencies/install/lib + mkdir -p $(pwd)/dependencies/install/bin + mkdir -p $(pwd)/dependencies/install/include/google + # includes + ln -s ${MASON_GFLAGS}/include/gflags $(pwd)/dependencies/install/include/gflags + ln -s ${MASON_PROTOBUF}/include/google/protobuf $(pwd)/dependencies/install/include/google/protobuf + cp -r ${MASON_SPARSEHASH}/include/google/* $(pwd)/dependencies/install/include/google/ + cp -r ${MASON_SPARSEHASH}/include/sparsehash $(pwd)/dependencies/install/include/ + # programs + ln -s ${MASON_PROTOBUF}/bin/protoc $(pwd)/dependencies/install/bin/protoc + # libraries + ln -s ${MASON_GFLAGS}/lib/libgflags.a $(pwd)/dependencies/install/lib/libgflags.a + ln -s ${MASON_PROTOBUF}/lib/libprotobuf.a $(pwd)/dependencies/install/lib/libprotobuf.a + + make ortoolslibs -j${MASON_CONCURRENCY} + + if [[ $(uname -s) == "Darwin" ]] ; then + install_name_tool -id @loader_path/libortools.dylib lib/libortools.dylib + fi + + mkdir -p ${MASON_PREFIX}/lib/ + cp -r lib/libortools* ${MASON_PREFIX}/lib/ + + mkdir -p "${MASON_PREFIX}/include/or-tools/" + + for i in {algorithms,base,bop,constraint_solver,glop,graph,linear_solver,sat,util}; do + cp -r src/$i ${MASON_PREFIX}/include/or-tools/ + done + + for i in {algorithms,base,bop,constraint_solver,glop,graph,linear_solver,sat,util}; do + if [[ -d src/gen/$i ]]; then + cp -r src/gen/$i/*h ${MASON_PREFIX}/include/or-tools/$i/ || true + fi + done + +} + +function mason_static_libs { + : +} + + +echo $DIR + +mason_run "$@" diff --git a/third_party/mason/scripts/osmium-tool/1.5.1/.travis.yml b/third_party/mason/scripts/osmium-tool/1.5.1/.travis.yml new file mode 100644 index 000000000..ebbe5fc07 --- /dev/null +++ b/third_party/mason/scripts/osmium-tool/1.5.1/.travis.yml @@ -0,0 +1,21 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8 + compiler: clang + - os: linux + sudo: false + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - libstdc++-5-dev + - pandoc + +script: +- if [[ $(uname -s) == 'Darwin' ]]; then brew install pandoc || true; fi; +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/osmium-tool/1.5.1/script.sh b/third_party/mason/scripts/osmium-tool/1.5.1/script.sh new file mode 100755 index 000000000..abfa1e030 --- /dev/null +++ b/third_party/mason/scripts/osmium-tool/1.5.1/script.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +MASON_NAME=osmium-tool +MASON_VERSION=1.5.1 +MASON_LIB_FILE=bin/osmium + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/osmcode/${MASON_NAME}/archive/v${MASON_VERSION}.tar.gz \ + 0071430132d32936bd2683cf84d3e0a39e379389 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_prepare_compile { + CCACHE_VERSION=3.3.1 + ${MASON_DIR}/mason install ccache ${CCACHE_VERSION} + MASON_CCACHE=$(${MASON_DIR}/mason prefix ccache ${CCACHE_VERSION}) + ${MASON_DIR}/mason install cmake 3.7.1 + ${MASON_DIR}/mason link cmake 3.7.1 + ${MASON_DIR}/mason install utfcpp 2.3.4 + ${MASON_DIR}/mason link utfcpp 2.3.4 + ${MASON_DIR}/mason install protozero 1.5.1 + ${MASON_DIR}/mason link protozero 1.5.1 + ${MASON_DIR}/mason install rapidjson 2016-07-20-369de87 + ${MASON_DIR}/mason link rapidjson 2016-07-20-369de87 + ${MASON_DIR}/mason install libosmium 2.11.0 + ${MASON_DIR}/mason link libosmium 2.11.0 + BOOST_VERSION=1.63.0 + ${MASON_DIR}/mason install boost ${BOOST_VERSION} + ${MASON_DIR}/mason link boost ${BOOST_VERSION} + ${MASON_DIR}/mason install boost_libprogram_options ${BOOST_VERSION} + ${MASON_DIR}/mason link boost_libprogram_options ${BOOST_VERSION} + ${MASON_DIR}/mason install zlib 1.2.8 + ${MASON_DIR}/mason link zlib 1.2.8 + ${MASON_DIR}/mason install expat 2.2.0 + ${MASON_DIR}/mason link expat 2.2.0 + ${MASON_DIR}/mason install bzip2 1.0.6 + ${MASON_DIR}/mason link bzip2 1.0.6 +} + +function mason_compile { + rm -rf build + mkdir -p build + cd build + CMAKE_PREFIX_PATH=${MASON_ROOT}/.link \ + ${MASON_ROOT}/.link/bin/cmake \ + -DCMAKE_INSTALL_PREFIX=${MASON_PREFIX} \ + -DCMAKE_CXX_COMPILER_LAUNCHER="${MASON_CCACHE}/bin/ccache" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBoost_NO_SYSTEM_PATHS=ON \ + -DBoost_USE_STATIC_LIBS=ON \ + .. + # limit concurrency on travis to avoid heavy jobs being killed + if [[ ${TRAVIS_OS_NAME:-} ]]; then + make VERBOSE=1 -j4 + else + make VERBOSE=1 -j${MASON_CONCURRENCY} + fi + make install + +} + +function mason_cflags { + : +} + +function mason_ldflags { + : +} + +function mason_static_libs { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/osmium-tool/latest/script.sh b/third_party/mason/scripts/osmium-tool/latest/script.sh deleted file mode 100644 index c39c48f4d..000000000 --- a/third_party/mason/scripts/osmium-tool/latest/script.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash - -MASON_NAME=osmium-tool -MASON_VERSION=latest -MASON_LIB_FILE=bin/osmium - -. ${MASON_DIR}/mason.sh - -function mason_load_source { - export MASON_BUILD_PATH=${MASON_ROOT}/.build/osmium-tool-latest - if [[ ! -d ${MASON_BUILD_PATH} ]]; then - git clone --depth 1 https://github.com/osmcode/osmium-tool.git ${MASON_BUILD_PATH} - else - (cd ${MASON_BUILD_PATH} && git pull) - fi -} - -function mason_prepare_compile { - echo ${MASON_ROOT}/.build - cd ${MASON_ROOT} - OSMIUM_INCLUDE_DIR=${MASON_ROOT}/osmcode-libosmium-latest/include - curl --retry 3 -f -# -L "https://github.com/osmcode/libosmium/tarball/master" -o osmium.tar.gz - rm -rf osmcode-libosmium-* - tar -xzf osmium.tar.gz - mv osmcode-libosmium-* osmcode-libosmium-latest - - cd $(dirname ${MASON_ROOT}) - ${MASON_DIR}/mason install boost 1.57.0 - ${MASON_DIR}/mason link boost 1.57.0 - ${MASON_DIR}/mason install boost_libprogram_options 1.57.0 - ${MASON_DIR}/mason link boost_libprogram_options 1.57.0 - ${MASON_DIR}/mason install protobuf 2.6.1 - ${MASON_DIR}/mason link protobuf 2.6.1 - ${MASON_DIR}/mason install zlib 1.2.8 - ${MASON_DIR}/mason link zlib 1.2.8 - ${MASON_DIR}/mason install expat 2.1.0 - ${MASON_DIR}/mason link expat 2.1.0 - ${MASON_DIR}/mason install osmpbf 1.3.3 - ${MASON_DIR}/mason link osmpbf 1.3.3 - ${MASON_DIR}/mason install bzip2 1.0.6 - ${MASON_DIR}/mason link bzip2 1.0.6 - ${MASON_DIR}/mason install geos 3.5.0 - ${MASON_DIR}/mason link geos 3.5.0 -} - -function mason_compile { - mkdir build - cd build - CMAKE_PREFIX_PATH=${MASON_ROOT}/.link \ - cmake \ - -DOSMIUM_INCLUDE_DIR=${OSMIUM_INCLUDE_DIR} \ - -DCMAKE_INSTALL_PREFIX=${MASON_PREFIX} \ - .. - make install -} - -function mason_clean { - make clean -} - -mason_run "$@" diff --git a/third_party/mason/scripts/postgres/9.6.1/.travis.yml b/third_party/mason/scripts/postgres/9.6.1/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/postgres/9.6.1/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/postgres/9.6.1/patch.diff b/third_party/mason/scripts/postgres/9.6.1/patch.diff new file mode 100644 index 000000000..ae2f06a46 --- /dev/null +++ b/third_party/mason/scripts/postgres/9.6.1/patch.diff @@ -0,0 +1,11 @@ +--- src/include/pg_config_manual.h 2013-10-07 20:17:38.000000000 -0700 ++++ src/include/pg_config_manual.h 2014-03-08 21:29:48.000000000 -0800 +@@ -144,7 +144,7 @@ + * here's where to twiddle it. You can also override this at runtime + * with the postmaster's -k switch. + */ +-#define DEFAULT_PGSOCKET_DIR "/tmp" ++#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql" + + /* + * The random() function is expected to yield values between 0 and diff --git a/third_party/mason/scripts/postgres/9.6.1/script.sh b/third_party/mason/scripts/postgres/9.6.1/script.sh new file mode 100755 index 000000000..8ca3af308 --- /dev/null +++ b/third_party/mason/scripts/postgres/9.6.1/script.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +MASON_NAME=postgres +MASON_VERSION=9.6.1 +MASON_LIB_FILE=bin/psql + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://ftp.postgresql.org/pub/source/v${MASON_VERSION}/postgresql-${MASON_VERSION}.tar.bz2 \ + 6aef3fb521aaf987a9363a314ff7d5539b6601cd + + mason_extract_tar_bz2 + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/postgresql-${MASON_VERSION} +} + +function mason_compile { + if [[ ${MASON_PLATFORM} == 'linux' ]]; then + mason_step "Loading patch" + patch src/include/pg_config_manual.h ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff + fi + + # note CFLAGS overrides defaults (-Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument) so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument" + ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-thread-safety \ + --enable-largefile \ + --with-python \ + --with-zlib \ + --without-bonjour \ + --without-openssl \ + --without-pam \ + --without-gssapi \ + --without-ossp-uuid \ + --without-readline \ + --without-ldap \ + --without-libxml \ + --without-libxslt \ + --without-selinux \ + --without-perl \ + --without-tcl \ + --disable-rpath \ + --disable-debug \ + --disable-profiling \ + --disable-coverage \ + --disable-dtrace \ + --disable-depend \ + --disable-cassert + + make -j${MASON_CONCURRENCY} -C src/interfaces/libpq/ install + rm -f src/interfaces/libpq{*.so*,*.dylib} + rm -f ${MASON_PREFIX}/lib/libpq{*.so*,*.dylib} + MASON_LIBPQ_PATH=${MASON_PREFIX}/lib/libpq.a + MASON_LIBPQ_PATH2=${MASON_LIBPQ_PATH////\\/} + perl -i -p -e "s/\-lpq/${MASON_LIBPQ_PATH2} -pthread/g;" src//Makefile.global.in + perl -i -p -e "s/\-lpq/${MASON_LIBPQ_PATH2} -pthread/g;" src//Makefile.global + make -j${MASON_CONCURRENCY} install + make -j${MASON_CONCURRENCY} -C contrib/hstore install + rm -f ${MASON_PREFIX}/lib/lib{*.so*,*.dylib} +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/osmium-tool/latest/.travis.yml b/third_party/mason/scripts/proj/4.9.3/.travis.yml similarity index 69% rename from third_party/mason/scripts/osmium-tool/latest/.travis.yml rename to third_party/mason/scripts/proj/4.9.3/.travis.yml index 6cb8a7653..e5ec5ff23 100644 --- a/third_party/mason/scripts/osmium-tool/latest/.travis.yml +++ b/third_party/mason/scripts/proj/4.9.3/.travis.yml @@ -1,17 +1,14 @@ -language: cpp - -sudo: false +language: generic matrix: include: - os: osx + osx_image: xcode8.2 compiler: clang - os: linux compiler: clang + sudo: false script: - ./mason build ${MASON_NAME} ${MASON_VERSION} -- ./mason link ${MASON_NAME} ${MASON_VERSION} - -after_success: - ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/proj/4.9.3/script.sh b/third_party/mason/scripts/proj/4.9.3/script.sh new file mode 100755 index 000000000..c89a91b84 --- /dev/null +++ b/third_party/mason/scripts/proj/4.9.3/script.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +MASON_NAME=proj +MASON_VERSION=4.9.3 +MASON_LIB_FILE=lib/libproj.a +GRID_VERSION="1.6" + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://download.osgeo.org/proj/proj-${MASON_VERSION}.tar.gz \ + e3426c86eb2b834de78bf6535eff60d2ff521120 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_compile { + curl --retry 3 -f -# -L http://download.osgeo.org/proj/proj-datumgrid-${GRID_VERSION}.zip -o proj-datumgrid-${GRID_VERSION}.zip + cd nad + unzip -o ../proj-datumgrid-${GRID_VERSION}.zip + cd ../ + # note CFLAGS overrides defaults (-g -O2) so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG" + ./configure --prefix=${MASON_PREFIX} \ + --without-mutex ${MASON_HOST_ARG} \ + --with-jni=no \ + --enable-static \ + --disable-shared \ + --disable-dependency-tracking + + make -j${MASON_CONCURRENCY} + make install +} + +function mason_ldflags { + echo "-lproj" +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/protobuf/3.2.0/.travis.yml b/third_party/mason/scripts/protobuf/3.2.0/.travis.yml new file mode 100644 index 000000000..8c71516f9 --- /dev/null +++ b/third_party/mason/scripts/protobuf/3.2.0/.travis.yml @@ -0,0 +1,13 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/protobuf/3.2.0/script.sh b/third_party/mason/scripts/protobuf/3.2.0/script.sh new file mode 100755 index 000000000..abf1ec517 --- /dev/null +++ b/third_party/mason/scripts/protobuf/3.2.0/script.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +MASON_NAME=protobuf +MASON_VERSION=3.2.0 +MASON_LIB_FILE=lib/libprotobuf-lite.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/protobuf-lite.pc + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/google/protobuf/releases/download/v${MASON_VERSION}/protobuf-cpp-${MASON_VERSION}.tar.gz \ + 29792bf4d86237e41118d692dc11ca03dbe796d8 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_compile { + # note CFLAGS overrides defaults (-O2 -g -DNDEBUG) so we need to add optimization flags back + export CFLAGS="${CFLAGS} -O3 -DNDEBUG" + export CXXFLAGS="${CXXFLAGS} -O3 -DNDEBUG" + ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-static --disable-shared \ + --disable-debug --without-zlib \ + --disable-dependency-tracking + + make V=1 -j${MASON_CONCURRENCY} + make install -j${MASON_CONCURRENCY} +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/protozero/1.5.0/.travis.yml b/third_party/mason/scripts/protozero/1.5.0/.travis.yml new file mode 100644 index 000000000..00c277c21 --- /dev/null +++ b/third_party/mason/scripts/protozero/1.5.0/.travis.yml @@ -0,0 +1,11 @@ +language: generic + +matrix: + include: + - os: linux + compiler: clang + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/protozero/1.5.0/script.sh b/third_party/mason/scripts/protozero/1.5.0/script.sh new file mode 100644 index 000000000..16603b044 --- /dev/null +++ b/third_party/mason/scripts/protozero/1.5.0/script.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +MASON_NAME=protozero +MASON_VERSION=1.5.0 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/protozero/archive/v${MASON_VERSION}.tar.gz \ + 4590673eddd523bfeb5d99d42ac7c73ce9c70f6f + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/protozero-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/ + cp -r include/protozero ${MASON_PREFIX}/include/protozero +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/protozero/1.5.1/.travis.yml b/third_party/mason/scripts/protozero/1.5.1/.travis.yml new file mode 100644 index 000000000..00c277c21 --- /dev/null +++ b/third_party/mason/scripts/protozero/1.5.1/.travis.yml @@ -0,0 +1,11 @@ +language: generic + +matrix: + include: + - os: linux + compiler: clang + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/protozero/1.5.1/script.sh b/third_party/mason/scripts/protozero/1.5.1/script.sh new file mode 100644 index 000000000..e2644981b --- /dev/null +++ b/third_party/mason/scripts/protozero/1.5.1/script.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +MASON_NAME=protozero +MASON_VERSION=1.5.1 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/protozero/archive/v${MASON_VERSION}.tar.gz \ + d36e3a99b7e29383455459df723dbbc0a83a85ae + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/protozero-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/ + cp -r include/protozero ${MASON_PREFIX}/include/protozero +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + : +} + +mason_run "$@" diff --git a/third_party/mason/scripts/sqlite/3.14.2/.travis.yml b/third_party/mason/scripts/sqlite/3.14.2/.travis.yml index 1ff10f7cf..150694291 100644 --- a/third_party/mason/scripts/sqlite/3.14.2/.travis.yml +++ b/third_party/mason/scripts/sqlite/3.14.2/.travis.yml @@ -10,6 +10,10 @@ matrix: include: - os: osx osx_image: xcode7 + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 + - os: linux + env: MASON_PLATFORM_VERSION=i686 - os: linux sudo: false addons: diff --git a/third_party/mason/scripts/sqlite/3.16.2/.travis.yml b/third_party/mason/scripts/sqlite/3.16.2/.travis.yml new file mode 100644 index 000000000..be65d22ff --- /dev/null +++ b/third_party/mason/scripts/sqlite/3.16.2/.travis.yml @@ -0,0 +1,39 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + - os: linux + sudo: false + env: MASON_PLATFORM_VERSION=cortex_a9 + - os: linux + sudo: false + env: MASON_PLATFORM_VERSION=i686 + - os: linux + sudo: false + - os: linux + sudo: false + env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v5 + - os: linux + sudo: false + env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v7 + - os: linux + sudo: false + env: MASON_PLATFORM=android MASON_ANDROID_ABI=arm-v8 + - os: linux + sudo: false + env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86 + - os: linux + sudo: false + env: MASON_PLATFORM=android MASON_ANDROID_ABI=x86-64 + - os: linux + sudo: false + env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips + - os: linux + sudo: false + env: MASON_PLATFORM=android MASON_ANDROID_ABI=mips-64 + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/sqlite/3.16.2/script.sh b/third_party/mason/scripts/sqlite/3.16.2/script.sh new file mode 100755 index 000000000..e5b0c872f --- /dev/null +++ b/third_party/mason/scripts/sqlite/3.16.2/script.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +MASON_NAME=sqlite +MASON_VERSION=3.16.2 +MASON_LIB_FILE=lib/libsqlite3.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/sqlite3.pc + +SQLITE_FILE_VERSION=3160200 + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://www.sqlite.org/2017/sqlite-autoconf-${SQLITE_FILE_VERSION}.tar.gz \ + e070d08277ed4f1da54a0d31d85cda2a14438e3f + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/sqlite-autoconf-${SQLITE_FILE_VERSION} +} + +function mason_compile { + # Note: setting CFLAGS overrides the default in sqlite of `-g -O2` + # hence we add back the preferred optimization + CFLAGS="-O3 ${CFLAGS}" ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-static \ + --with-pic \ + --disable-shared \ + --disable-dependency-tracking + + make install -j${MASON_CONCURRENCY} +} + +function mason_strip_ldflags { + shift # -L... + shift # -lsqlite3 + echo "$@" +} + +function mason_ldflags { + mason_strip_ldflags $(`mason_pkgconfig` --static --libs) +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/supercluster/0.2.0-1/.travis.yml b/third_party/mason/scripts/supercluster/0.2.0-1/.travis.yml new file mode 100644 index 000000000..5fca39ee3 --- /dev/null +++ b/third_party/mason/scripts/supercluster/0.2.0-1/.travis.yml @@ -0,0 +1,8 @@ +language: cpp +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/supercluster/0.2.0-1/script.sh b/third_party/mason/scripts/supercluster/0.2.0-1/script.sh new file mode 100644 index 000000000..96a069923 --- /dev/null +++ b/third_party/mason/scripts/supercluster/0.2.0-1/script.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +MASON_NAME=supercluster +MASON_VERSION=0.2.0-1 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/supercluster.hpp/archive/v0.2.0.tar.gz \ + 48bda562627a3032ba73b8b1ff739dc525544d72 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/supercluster.hpp-0.2.0 +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/ + cp -v include/*.hpp ${MASON_PREFIX}/include + cp -v README.md LICENSE ${MASON_PREFIX} +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + : +} + + +mason_run "$@" diff --git a/third_party/mason/scripts/supercluster/0.2.0/script.sh b/third_party/mason/scripts/supercluster/0.2.0/script.sh index 2753884d7..64402733a 100644 --- a/third_party/mason/scripts/supercluster/0.2.0/script.sh +++ b/third_party/mason/scripts/supercluster/0.2.0/script.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash MASON_NAME=supercluster -MASON_VERSION=0.2.0 +MASON_VERSION=0.2.0-1 MASON_HEADER_ONLY=true . ${MASON_DIR}/mason.sh diff --git a/third_party/mason/scripts/tbb/2017_20161128/.travis.yml b/third_party/mason/scripts/tbb/2017_20161128/.travis.yml new file mode 100644 index 000000000..e5ec5ff23 --- /dev/null +++ b/third_party/mason/scripts/tbb/2017_20161128/.travis.yml @@ -0,0 +1,14 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + compiler: clang + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/tbb/2017_20161128/patch.diff b/third_party/mason/scripts/tbb/2017_20161128/patch.diff new file mode 100644 index 000000000..aa90e6c3e --- /dev/null +++ b/third_party/mason/scripts/tbb/2017_20161128/patch.diff @@ -0,0 +1,48 @@ +diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc +index b7ed0c5..588fcd2 100644 +--- a/build/linux.gcc.inc ++++ b/build/linux.gcc.inc +@@ -32,8 +32,8 @@ DYLIB_KEY = -shared + EXPORT_KEY = -Wl,--version-script, + LIBDL = -ldl + +-CPLUS = g++ +-CONLY = gcc ++CPLUS = $(CXX) ++CONLY = $(CC) + LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY) + LIBS += -lpthread -lrt + LINK_FLAGS = -Wl,-rpath-link=. -rdynamic +@@ -68,7 +68,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])")) + endif + + ifeq ($(cfg), release) +- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD ++ CPLUS_FLAGS = $(ITT_NOTIFY) -O3 -DNDEBUG -DUSE_PTHREAD + endif + ifeq ($(cfg), debug) + CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD +diff --git a/build/macos.clang.inc b/build/macos.clang.inc +index 330c721..4d7d568 100644 +--- a/build/macos.clang.inc ++++ b/build/macos.clang.inc +@@ -16,8 +16,8 @@ + # + # + +-CPLUS = clang++ +-CONLY = clang ++CPLUS = $(CXX) ++CONLY = $(CC) + COMPILE_ONLY = -c -MMD + PREPROC_ONLY = -E -x c++ + INCLUDE_KEY = -I +@@ -39,7 +39,7 @@ LIB_LINK_FLAGS = -dynamiclib -install_name @rpath/$(BUILDING_LIBRARY) + C_FLAGS = $(CPLUS_FLAGS) + + ifeq ($(cfg), release) +- CPLUS_FLAGS = -g -O2 ++ CPLUS_FLAGS = -O3 -DNDEBUG + else + CPLUS_FLAGS = -g -O0 -DTBB_USE_DEBUG + endif diff --git a/third_party/mason/scripts/tbb/2017_20161128/script.sh b/third_party/mason/scripts/tbb/2017_20161128/script.sh new file mode 100755 index 000000000..d7362daf2 --- /dev/null +++ b/third_party/mason/scripts/tbb/2017_20161128/script.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env bash + +MASON_NAME=tbb +MASON_VERSION=2017_20161128 +MASON_LIB_FILE=lib/libtbb.${MASON_DYNLIB_SUFFIX} + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${MASON_VERSION}oss_src.tgz \ + 2eaf7db61c59a31c2a6c9faaad36cc42fb8d1da7 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}${MASON_VERSION}oss +} + +function create_links() { + libname=$1 + if [ -f ${MASON_PREFIX}/lib/${libname}.so ]; then rm ${MASON_PREFIX}/lib/${libname}.so; fi + cp $(pwd)/build/BUILDPREFIX_release/${libname}.so.2 ${MASON_PREFIX}/lib/ + (cd ${MASON_PREFIX}/lib/ && ln -s ${libname}.so.2 ${libname}.so) +} + +function mason_compile { + mason_step "Loading patch" + patch -N -p1 < ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff + CXXFLAGS="${CXXFLAGS} -Wno-attributes" + # libtbb does not support -fvisibility=hidden + CXXFLAGS="${CXXFLAGS//-fvisibility=hidden}" + export CXXFLAGS="${CXXFLAGS//-fvisibility-inlines-hidden}" + + if [[ $(uname -s) == 'Darwin' ]]; then + # build shared libs first + make -j${MASON_CONCURRENCY} tbb_build_prefix=BUILDPREFIX cfg=release arch=intel64 stdver=c++11 stdlib=libc++ compiler=clang tbb_build_dir=$(pwd)/build + # prevent ldflags being sent to ar for the static linking, which does not work + unset LDFLAGS + make -j${MASON_CONCURRENCY} tbb_build_prefix=BUILDPREFIX cfg=release arch=intel64 stdver=c++11 stdlib=libc++ compiler=clang tbb_build_dir=$(pwd)/build extra_inc=big_iron.inc + else + LDFLAGS="${LDFLAGS} "'-Wl,-z,origin -Wl,-rpath=\$$ORIGIN' + make -j${MASON_CONCURRENCY} tbb_build_prefix=BUILDPREFIX cfg=release arch=intel64 stdver=c++11 tbb_build_dir=$(pwd)/build + # prevent ldflags being sent to ar for the static linking, which does not work + unset LDFLAGS + make -j${MASON_CONCURRENCY} tbb_build_prefix=BUILDPREFIX cfg=release arch=intel64 stdver=c++11 tbb_build_dir=$(pwd)/build extra_inc=big_iron.inc + fi + + # custom install + mkdir -p ${MASON_PREFIX}/lib/ + mkdir -p ${MASON_PREFIX}/include/ + mkdir -p ${MASON_PREFIX}/bin/ + + if [[ $(uname -s) == "Darwin" ]]; then + cp $(pwd)/build/BUILDPREFIX_release/lib*.* ${MASON_PREFIX}/lib/ + # add rpath so that apps building against this lib can embed location to this lib + # by passing '-rpath ${MASON_PREFIX}/lib/' + # https://wincent.com/wiki/@executable_path,_@load_path_and_@rpath + install_name_tool -id @rpath/libtbb.dylib ${MASON_PREFIX}/lib/libtbb.dylib + install_name_tool -id @rpath/libtbbmalloc.dylib ${MASON_PREFIX}/lib/libtbbmalloc.dylib + install_name_tool -id @rpath/libtbbmalloc_proxy.dylib ${MASON_PREFIX}/lib/libtbbmalloc_proxy.dylib + install_name_tool -change libtbbmalloc.dylib @rpath/libtbbmalloc.dylib ${MASON_PREFIX}/lib/libtbbmalloc_proxy.dylib + else + # the linux libraries are funky: the lib.so.2 is the real lib + # and the lib.so is an ascii text file, so we need to only copy + # the lib.so.2 and then recreate the lib.so as a relative symlink + # to the lib.so.2 + create_links libtbbmalloc_proxy + create_links libtbbmalloc + create_links libtbb + cp $(pwd)/build/BUILDPREFIX_release/lib*.a ${MASON_PREFIX}/lib/ + fi + cp -r $(pwd)/include/tbb ${MASON_PREFIX}/include/ + touch ${MASON_PREFIX}/bin/tbb +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_static_libs { + echo ${MASON_PREFIX}/lib/libtbb.a +} + +function mason_ldflags { + echo "-L${MASON_PREFIX}/lib -ltbb" +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/tippecanoe/latest/.travis.yml b/third_party/mason/scripts/tippecanoe/1.16.3/.travis.yml similarity index 81% rename from third_party/mason/scripts/tippecanoe/latest/.travis.yml rename to third_party/mason/scripts/tippecanoe/1.16.3/.travis.yml index 0a2b60f97..27039bdbf 100644 --- a/third_party/mason/scripts/tippecanoe/latest/.travis.yml +++ b/third_party/mason/scripts/tippecanoe/1.16.3/.travis.yml @@ -1,4 +1,4 @@ -language: cpp +language: generic sudo: false @@ -6,6 +6,7 @@ matrix: include: - os: osx compiler: clang + osx_image: xcode8.2 - os: linux compiler: clang addons: @@ -15,7 +16,4 @@ matrix: script: - ./mason build ${MASON_NAME} ${MASON_VERSION} -- ./mason link ${MASON_NAME} ${MASON_VERSION} - -after_success: - ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/tippecanoe/1.16.3/script.sh b/third_party/mason/scripts/tippecanoe/1.16.3/script.sh new file mode 100644 index 000000000..7aac9713b --- /dev/null +++ b/third_party/mason/scripts/tippecanoe/1.16.3/script.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +MASON_NAME=tippecanoe +MASON_VERSION=1.16.3 +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 \ + ec03e364934a61fe19b8f47970fd373ea8db2a27 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +SQLITE_VERSION=3.16.2 + +function mason_prepare_compile { + ${MASON_DIR}/mason install sqlite ${SQLITE_VERSION} + MASON_SQLITE=$(${MASON_DIR}/mason prefix sqlite ${SQLITE_VERSION}) +} + +function mason_compile { + # 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 "$@" diff --git a/third_party/mason/scripts/tippecanoe/latest/script.sh b/third_party/mason/scripts/tippecanoe/latest/script.sh deleted file mode 100644 index 3bff9dc26..000000000 --- a/third_party/mason/scripts/tippecanoe/latest/script.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -MASON_NAME=tippecanoe -MASON_VERSION=latest -MASON_LIB_FILE=bin/tippecanoe - -. ${MASON_DIR}/mason.sh - -function mason_load_source { - export MASON_BUILD_PATH=${MASON_ROOT}/.build/tippecanoe-latest - if [[ ! -d ${MASON_BUILD_PATH} ]]; then - git clone --depth 1 https://github.com/mapbox/tippecanoe.git ${MASON_BUILD_PATH} - else - (cd ${MASON_BUILD_PATH} && git pull) - fi -} - -function mason_prepare_compile { - cd $(dirname ${MASON_ROOT}) - ${MASON_DIR}/mason install protobuf 2.6.1 - ${MASON_DIR}/mason link protobuf 2.6.1 - ${MASON_DIR}/mason install sqlite 3.9.1 - ${MASON_DIR}/mason link sqlite 3.9.1 -} - -function mason_compile { - PREFIX=${MASON_PREFIX} \ - PATH=${MASON_DIR}/mason_packages/.link/bin:${PATH} \ - CXXFLAGS=-I${MASON_DIR}/mason_packages/.link/include \ - LDFLAGS="-L${MASON_DIR}/mason_packages/.link/lib -lprotobuf-lite -ldl -lpthread" make - - PREFIX=${MASON_PREFIX} \ - PATH=${MASON_DIR}/mason_packages/.link/bin:${PATH} \ - CXXFLAGS=-I${MASON_DIR}/mason_packages/.link/include \ - LDFLAGS="-L${MASON_DIR}/mason_packages/.link/lib -lprotobuf-lite -ldl -lpthread" make install -} - -function mason_clean { - make clean -} - -mason_run "$@" diff --git a/third_party/mason/scripts/unique_resource/cba309e/.travis.yml b/third_party/mason/scripts/unique_resource/cba309e/.travis.yml new file mode 100644 index 000000000..5fca39ee3 --- /dev/null +++ b/third_party/mason/scripts/unique_resource/cba309e/.travis.yml @@ -0,0 +1,8 @@ +language: cpp +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/unique_resource/dev/script.sh b/third_party/mason/scripts/unique_resource/cba309e/script.sh similarity index 96% rename from third_party/mason/scripts/unique_resource/dev/script.sh rename to third_party/mason/scripts/unique_resource/cba309e/script.sh index 715658672..e80498e4a 100644 --- a/third_party/mason/scripts/unique_resource/dev/script.sh +++ b/third_party/mason/scripts/unique_resource/cba309e/script.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash MASON_NAME=unique_resource -MASON_VERSION=dev +MASON_VERSION=cba309e MASON_HEADER_ONLY=true GIT_HASH="cba309e92ec79a95be2aa5a324a688a06af8d40a" diff --git a/third_party/mason/scripts/v8/3.14.5.10/.travis.yml b/third_party/mason/scripts/v8/3.14.5.10/.travis.yml index a998b49bd..24b13a5aa 100644 --- a/third_party/mason/scripts/v8/3.14.5.10/.travis.yml +++ b/third_party/mason/scripts/v8/3.14.5.10/.travis.yml @@ -13,11 +13,6 @@ matrix: sources: [ 'ubuntu-toolchain-r-test' ] packages: [ 'libstdc++-5-dev' ] -env: - global: - - secure: "clCFM3prHnDocZ8lXlimPxAogvFirD1Zx8cMcFJ/XpkTA/0pCgnhpArM4y/NzLHR57pNZTSCr3p6XZI1c1iTG4Zm8x0sK2A4aTFRahypXNy/e+LzAbtd1y1+dEEDwlJvNNGxizQX4frhOgSNQFDFnWLtmF3stlft5YWyc2kI+FI=" - - secure: "jKJErCng8Sk8YJ0IN2FX3lhv7G1LeudMfFBAXViZaXn8w/gWPs+SlfXQmIJ5SruU7U2GQKnAhzbjwXjVAgAh8OAblzny0DDm5Lh5WmwkgAP8JH1LpsBwCYx2S/v8qyR4DX1RVhHS8mQu298180ZDVgGccw+hd8xrE/S5TEQcNfQ=" - script: - ./mason build ${MASON_NAME} ${MASON_VERSION} - ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/v8/5.1.281.47/.travis.yml b/third_party/mason/scripts/v8/5.1.281.47/.travis.yml index a998b49bd..24b13a5aa 100644 --- a/third_party/mason/scripts/v8/5.1.281.47/.travis.yml +++ b/third_party/mason/scripts/v8/5.1.281.47/.travis.yml @@ -13,11 +13,6 @@ matrix: sources: [ 'ubuntu-toolchain-r-test' ] packages: [ 'libstdc++-5-dev' ] -env: - global: - - secure: "clCFM3prHnDocZ8lXlimPxAogvFirD1Zx8cMcFJ/XpkTA/0pCgnhpArM4y/NzLHR57pNZTSCr3p6XZI1c1iTG4Zm8x0sK2A4aTFRahypXNy/e+LzAbtd1y1+dEEDwlJvNNGxizQX4frhOgSNQFDFnWLtmF3stlft5YWyc2kI+FI=" - - secure: "jKJErCng8Sk8YJ0IN2FX3lhv7G1LeudMfFBAXViZaXn8w/gWPs+SlfXQmIJ5SruU7U2GQKnAhzbjwXjVAgAh8OAblzny0DDm5Lh5WmwkgAP8JH1LpsBwCYx2S/v8qyR4DX1RVhHS8mQu298180ZDVgGccw+hd8xrE/S5TEQcNfQ=" - script: - ./mason build ${MASON_NAME} ${MASON_VERSION} - ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/harfbuzz/2cd5323531dcd800549b2cb1cb51d708e72ab2d8/.travis.yml b/third_party/mason/scripts/valgrind/3.12.0/.travis.yml similarity index 85% rename from third_party/mason/scripts/harfbuzz/2cd5323531dcd800549b2cb1cb51d708e72ab2d8/.travis.yml rename to third_party/mason/scripts/valgrind/3.12.0/.travis.yml index 3431d4fb7..b0f3f980b 100644 --- a/third_party/mason/scripts/harfbuzz/2cd5323531dcd800549b2cb1cb51d708e72ab2d8/.travis.yml +++ b/third_party/mason/scripts/valgrind/3.12.0/.travis.yml @@ -4,8 +4,6 @@ sudo: false matrix: include: - - os: osx - compiler: clang - os: linux compiler: clang diff --git a/third_party/mason/scripts/valgrind/latest/script.sh b/third_party/mason/scripts/valgrind/3.12.0/script.sh similarity index 75% rename from third_party/mason/scripts/valgrind/latest/script.sh rename to third_party/mason/scripts/valgrind/3.12.0/script.sh index af595792d..553be7e1b 100755 --- a/third_party/mason/scripts/valgrind/latest/script.sh +++ b/third_party/mason/scripts/valgrind/3.12.0/script.sh @@ -1,19 +1,20 @@ #!/usr/bin/env bash MASON_NAME=valgrind -MASON_VERSION=latest +MASON_VERSION=3.12.0 MASON_LIB_FILE=bin/valgrind MASON_IGNORE_OSX_SDK=true . ${MASON_DIR}/mason.sh function mason_load_source { - export MASON_BUILD_PATH=${MASON_ROOT}/.build/valgrind-trunk - if [[ ! -d ${MASON_BUILD_PATH} ]]; then - svn co svn://svn.valgrind.org/valgrind/trunk ${MASON_BUILD_PATH} - else - (cd ${MASON_BUILD_PATH} && svn update) - fi + mason_download \ + http://valgrind.org/downloads/valgrind-${MASON_VERSION}.tar.bz2 \ + 9d10673077704b02513d216672ecb64d3719f537 + + mason_extract_tar_bz2 + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} } function mason_compile { diff --git a/third_party/mason/scripts/vector-tile/1.0.0-rc4/.travis.yml b/third_party/mason/scripts/vector-tile/1.0.0-rc4/.travis.yml new file mode 100644 index 000000000..6eaefcf17 --- /dev/null +++ b/third_party/mason/scripts/vector-tile/1.0.0-rc4/.travis.yml @@ -0,0 +1,7 @@ +language: generic + +sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} \ No newline at end of file diff --git a/third_party/mason/scripts/vector-tile/1.0.0-rc4/script.sh b/third_party/mason/scripts/vector-tile/1.0.0-rc4/script.sh new file mode 100644 index 000000000..fc563c103 --- /dev/null +++ b/third_party/mason/scripts/vector-tile/1.0.0-rc4/script.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +MASON_NAME=vector-tile +MASON_VERSION=1.0.0-rc4 +MASON_HEADER_ONLY=true + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/mapbox/${MASON_NAME}/archive/v${MASON_VERSION}.tar.gz \ + 7f9e12913ccb09bbe4e32cc8300383b1e7a2aef0 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION} +} + +function mason_compile { + mkdir -p ${MASON_PREFIX}/include/ + cp -r include/mapbox ${MASON_PREFIX}/include/mapbox +} + +function mason_cflags { + echo "-I${MASON_PREFIX}/include" +} + +function mason_ldflags { + : +} + +function mason_static_libs { + : +} + +mason_run "$@" \ No newline at end of file diff --git a/third_party/mason/scripts/webp/0.5.1/.travis.yml b/third_party/mason/scripts/webp/0.5.1/.travis.yml index 1e1ad8504..ac1977aaf 100644 --- a/third_party/mason/scripts/webp/0.5.1/.travis.yml +++ b/third_party/mason/scripts/webp/0.5.1/.travis.yml @@ -7,6 +7,10 @@ matrix: - os: osx osx_image: xcode7 compiler: clang + - os: linux + env: MASON_PLATFORM_VERSION=i686 + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 - os: linux compiler: clang sudo: false diff --git a/third_party/mason/scripts/webp/0.5.1/script.sh b/third_party/mason/scripts/webp/0.5.1/script.sh index e4e7589ae..557877349 100755 --- a/third_party/mason/scripts/webp/0.5.1/script.sh +++ b/third_party/mason/scripts/webp/0.5.1/script.sh @@ -19,6 +19,14 @@ function mason_load_source { function mason_compile { export CFLAGS="${CFLAGS:-} -Os" + + # -mfpu=neon is not enabled by default for cortex_a9 because + # it affects floating point precision. webp is fine with it. + # See: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html + if [[ ${MASON_PLATFORM_VERSION} == "cortex_a9" ]]; then + CFLAGS="${CFLAGS:-} -mfloat-abi=softfp -mfpu=neon" + fi + ./configure \ --prefix=${MASON_PREFIX} \ ${MASON_HOST_ARG} \ diff --git a/third_party/mason/scripts/webp/0.6.0/.travis.yml b/third_party/mason/scripts/webp/0.6.0/.travis.yml new file mode 100644 index 000000000..51e10bc90 --- /dev/null +++ b/third_party/mason/scripts/webp/0.6.0/.travis.yml @@ -0,0 +1,20 @@ +language: generic + +matrix: + include: + - os: osx + osx_image: xcode8.2 + compiler: clang + - os: linux + env: MASON_PLATFORM_VERSION=i686 + sudo: false + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 + sudo: false + - os: linux + compiler: clang + sudo: false + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/webp/0.6.0/script.sh b/third_party/mason/scripts/webp/0.6.0/script.sh new file mode 100755 index 000000000..b5dcd7ef9 --- /dev/null +++ b/third_party/mason/scripts/webp/0.6.0/script.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env bash + +MASON_NAME=webp +MASON_VERSION=0.6.0 +MASON_LIB_FILE=lib/libwebp.a +MASON_PKGCONFIG_FILE=lib/pkgconfig/libwebp.pc + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + http://downloads.webmproject.org/releases/webp/libwebp-$MASON_VERSION.tar.gz \ + 7669dc9a7c110cafc9e352d3abc1753bcb465dc0 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/libwebp-${MASON_VERSION} +} + +function mason_compile { + + # note CFLAGS overrides defaults + # -fvisibility=hidden -Wall -Wdeclaration-after-statement -Wextra -Wfloat-conversion -Wformat -Wformat-nonliteral -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wold-style-definition -Wshadow -Wshorten-64-to-32 -Wunreachable-code -Wunused -Wvla -g -O2 + # so we need to add optimization flags back + export CFLAGS="${CFLAGS:-} -O3 -DNDEBUG -fvisibility=hidden -Wall" + + # -mfpu=neon is not enabled by default for cortex_a9 because + # it affects floating point precision. webp is fine with it. + # See: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html + # this avoids the error from webp of: + # #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h + if [[ ${MASON_PLATFORM_VERSION} == "cortex_a9" ]]; then + CFLAGS="${CFLAGS:-} -mfloat-abi=softfp -mfpu=neon" + fi + + # TODO(springmeyer) - why is --enable-swap-16bit-csp enabled? + ./configure \ + --prefix=${MASON_PREFIX} \ + ${MASON_HOST_ARG} \ + --enable-static \ + --disable-shared \ + --with-pic \ + --disable-cwebp \ + --disable-dwebp \ + --enable-swap-16bit-csp \ + --disable-gl \ + --disable-png \ + --disable-jpeg \ + --disable-tiff \ + --disable-gif \ + --disable-wic \ + --disable-dependency-tracking + + make V=1 -j${MASON_CONCURRENCY} + make install -j${MASON_CONCURRENCY} +} + +function mason_strip_ldflags { + ldflags=() + while [[ $1 ]] + do + case "$1" in + -lwebp) + shift + ;; + -L*) + shift + ;; + *) + ldflags+=("$1") + shift + ;; + esac + done + echo "${ldflags[@]}" +} + +function mason_ldflags { + mason_strip_ldflags $(`mason_pkgconfig` --static --libs) +} + +function mason_clean { + make clean +} + +mason_run "$@" diff --git a/third_party/mason/scripts/zlib/1.2.8/script.sh b/third_party/mason/scripts/zlib/1.2.8/script.sh index 82cba56c5..f64dc38ce 100755 --- a/third_party/mason/scripts/zlib/1.2.8/script.sh +++ b/third_party/mason/scripts/zlib/1.2.8/script.sh @@ -9,8 +9,8 @@ MASON_PKGCONFIG_FILE=lib/pkgconfig/zlib.pc function mason_load_source { mason_download \ - http://zlib.net/zlib-1.2.8.tar.gz \ - ed88885bd4027806753656d64006ab86a29e967e + https://github.com/madler/zlib/archive/v1.2.8.tar.gz \ + 72509ccfd1708e0073c84e8ee09de7a869816823 mason_extract_tar_gz @@ -25,18 +25,4 @@ function mason_compile { make install -j${MASON_CONCURRENCY} } -function mason_strip_ldflags { - shift # -L... - shift # -lz - echo "$@" -} - -function mason_ldflags { - mason_strip_ldflags $(`mason_pkgconfig` --static --libs) -} - -function mason_clean { - make clean -} - mason_run "$@" diff --git a/third_party/mason/scripts/zlib_shared/1.2.8/.travis.yml b/third_party/mason/scripts/zlib_shared/1.2.8/.travis.yml new file mode 100644 index 000000000..54ccebb35 --- /dev/null +++ b/third_party/mason/scripts/zlib_shared/1.2.8/.travis.yml @@ -0,0 +1,19 @@ +language: cpp + +sudo: false + +compiler: clang + +matrix: + include: + - os: linux + env: MASON_PLATFORM_VERSION=cortex_a9 + - os: linux + env: MASON_PLATFORM_VERSION=i686 + - os: linux + +script: +- ./mason build ${MASON_NAME} ${MASON_VERSION} + +after_success: +- ./mason publish ${MASON_NAME} ${MASON_VERSION} diff --git a/third_party/mason/scripts/zlib_shared/1.2.8/script.sh b/third_party/mason/scripts/zlib_shared/1.2.8/script.sh new file mode 100755 index 000000000..202584d73 --- /dev/null +++ b/third_party/mason/scripts/zlib_shared/1.2.8/script.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +MASON_NAME=zlib +MASON_VERSION=1.2.8 +MASON_LIB_FILE=lib/libz.${MASON_DYNLIB_SUFFIX} +MASON_PKGCONFIG_FILE=lib/pkgconfig/zlib.pc + +. ${MASON_DIR}/mason.sh + +function mason_load_source { + mason_download \ + https://github.com/madler/zlib/archive/v1.2.8.tar.gz \ + 72509ccfd1708e0073c84e8ee09de7a869816823 + + mason_extract_tar_gz + + export MASON_BUILD_PATH=${MASON_ROOT}/.build/zlib-${MASON_VERSION} +} + +function mason_compile { + ./configure \ + --prefix=${MASON_PREFIX} \ + --shared + + make install -j${MASON_CONCURRENCY} +} + +mason_run "$@" diff --git a/third_party/mason/test/all.sh b/third_party/mason/test/all.sh index 46d858c11..2557fe765 100755 --- a/third_party/mason/test/all.sh +++ b/third_party/mason/test/all.sh @@ -4,6 +4,7 @@ set -eu set -o pipefail $(dirname $0)/unit.sh +$(dirname $0)/llvm.sh $(dirname $0)/c_install.sh $(dirname $0)/c_build.sh $(dirname $0)/c_build_android.sh diff --git a/third_party/mason/test/llvm.sh b/third_party/mason/test/llvm.sh new file mode 100755 index 000000000..fd7b92457 --- /dev/null +++ b/third_party/mason/test/llvm.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +set -e -u +set -o pipefail + +failure=0 + +if [[ $(uname -s) == 'Linux' ]]; then + + # install both llvm variants + ./mason install llvm 3.8.1 # linked to libc++ + ./mason install llvm 3.8.1-libstdcxx # linked to libstd++ + LLVM1=$(./mason prefix llvm 3.8.1) + LLVM2=$(./mason prefix llvm 3.8.1-libstdcxx) + + if [[ ${LLVM1} == ${LLVM2} ]]; then + echo "expected prefix to be different for both llvm versions" + failure=1 + fi + + CXXFLAGS1=$($(./mason prefix llvm 3.8.1)/bin/llvm-config --cxxflags) + if [[ ${CXXFLAGS1} =~ '-stdlib=libc++' ]]; then + # found expected libc++ flag + : + else + echo "Did not find libc++ in flags" + failure=1 + fi + + CXXFLAGS2=$($(./mason prefix llvm 3.8.1-libstdcxx)/bin/llvm-config --cxxflags) + if [[ ${CXXFLAGS2} =~ '-stdlib=libc++' ]]; then + echo "Found libc++ in flags (unexpected for libstdc++ package variant)" + failure=1 + fi +fi + +exit $failure \ No newline at end of file diff --git a/third_party/mason/test/unit.sh b/third_party/mason/test/unit.sh index af22e196e..270a05781 100755 --- a/third_party/mason/test/unit.sh +++ b/third_party/mason/test/unit.sh @@ -14,7 +14,5 @@ fi VAL=$(./mason --version) assertEqual "$?" "0" "able to run ./mason --version" -assertEqual "0.4.0" "$VAL" "got correct result of ./mason --version" - exit $CODE \ No newline at end of file