Merge commit 'f8dd96543542220181c76afb8c084f4908213fb5' as 'third_party/mason'

This commit is contained in:
Patrick Niklaus
2016-12-15 10:31:15 +00:00
796 changed files with 30230 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eu
set -o pipefail
$(dirname $0)/unit.sh
$(dirname $0)/c_install.sh
$(dirname $0)/c_build.sh
$(dirname $0)/c_build_android.sh
$(dirname $0)/c_install_symlink_includes.sh
$(dirname $0)/cpp11_header_install.sh
$(dirname $0)/cpp11_install.sh
$(dirname $0)/cpp11_build.sh
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
function assertEqual() {
if [ "$1" == "$2" ]; then
echo "ok - $1 ($3)"
else
echo "not ok - $1 != $2 ($3)"
CODE=1
fi
}
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e -u
set -o pipefail
./mason build sqlite 3.8.8.1
./mason build libuv 0.10.28
./mason build libuv 0.11.29
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e -u
set -o pipefail
export MASON_PLATFORM=android
export MASON_ANDROID_ARCH=arm
./mason build freetype 2.5.5
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e -u
set -o pipefail
./mason install sqlite 3.8.8.1
./mason install libuv 0.10.28
./mason install libuv 0.11.29
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e -u
set -o pipefail
./mason install libpng 1.6.16
./mason link libpng 1.6.16
failure=0
if [[ ! -d mason_packages/.link/include/libpng16 ]]; then
echo "could not find expected include/libpng16"
failure=1
fi
if [[ ! -L mason_packages/.link/include/libpng16/png.h ]]; then
echo "include/libpng16/png.h is expected to be a symlink"
failure=1
fi
if [[ ! -L mason_packages/.link/include/png.h ]]; then
echo "include/png.h is expected to be a symlink"
failure=1
fi
exit $failure
+34
View File
@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -e -u
set -o pipefail
# ensure building a C++ lib works
./mason build stxxl 1.4.1
# ensure linking results in expected files
./mason link stxxl 1.4.1
failure=0
if [[ ! -f mason_packages/.link/lib/libstxxl.a ]]; then
echo "could not find expected lib/libstxxl.a"
failure=1
fi
if [[ ! -f mason_packages/.link/lib/pkgconfig/stxxl.pc ]]; then
echo "could not find expected lib/pkgconfig/stxxl.pc"
failure=1
fi
if [[ ! -d mason_packages/.link/include/stxxl ]]; then
echo "could not find expected include/stxxl"
failure=1
fi
if [[ ! -f mason_packages/.link/include/stxxl.h ]]; then
echo "could not find expected include/stxxl.h"
failure=1
fi
exit $failure
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -e -u
set -o pipefail
./mason install boost 1.57.0
./mason link boost 1.57.0
failure=0
# boost and packages other we symlink the directory
if [[ ! -d mason_packages/.link/include/boost ]]; then
echo "could not find expected include/boost"
failure=1
fi
# install packages that share namespaces and directories
# and insure they get placed okay (and don't prevent each other
# from being symlinked)
./mason install sparsehash 2.0.2
./mason link sparsehash 2.0.2
./mason install protobuf 2.6.1
./mason link protobuf 2.6.1
./mason install geometry 0.7.0
./mason link geometry 0.7.0
./mason install variant 1.1.0
./mason link variant 1.1.0
if [[ ! -d mason_packages/.link/include/google/sparsehash ]]; then
echo "could not find expected include/google/sparsehash"
failure=1
fi
if [[ ! -d mason_packages/.link/include/google/protobuf ]]; then
echo "could not find expected include/google/protobuf"
failure=1
fi
if [[ ! -d mason_packages/.link/include/mapbox/geometry ]]; then
echo "could not find expected include/mapbox/geometry"
failure=1
fi
exit $failure
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -e -u
set -o pipefail
./mason install boost_libregex 1.57.0
./mason link boost_libregex 1.57.0
failure=0
if [[ ! -f mason_packages/.link/lib/libboost_regex.a ]]; then
echo "could not find expected lib/libboost_regex.a"
failure=1
fi
if [[ ! -L mason_packages/.link/lib/libboost_regex.a ]]; then
echo "lib/libboost_regex.a is not a symlink like expected"
failure=1
fi
exit $failure
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
CODE=0
source $(dirname $0)/assert.sh
VAL=$(./mason env MASON_DIR)
assertEqual "$?" "0" "able to run ./mason env MASON_DIR"
if [[ ${MASON_DIR:-unset} != "unset" ]]; then
assertEqual "$MASON_DIR" "$VAL" "got correct result of ./mason env MASON_DIR"
else
assertEqual "$(pwd)" "$VAL" "got correct result of ./mason env MASON_DIR"
fi
VAL=$(./mason --version)
assertEqual "$?" "0" "able to run ./mason --version"
assertEqual "0.3.0" "$VAL" "got correct result of ./mason --version"
exit $CODE