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
+17
View File
@@ -0,0 +1,17 @@
language: cpp
sudo: false
matrix:
include:
- os: osx
compiler: clang
- os: linux
compiler: clang
script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason link ${MASON_NAME} ${MASON_VERSION}
after_success:
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
+26
View File
@@ -0,0 +1,26 @@
diff --git a/configure b/configure
index eee34f8..808c020 100755
--- a/configure
+++ b/configure
@@ -16149,7 +16149,7 @@ fi
$as_echo "$dummy_cv_ansi" >&6; }
if test x"$dummy_cv_ansi" = xyes; then
- WARNFLAGS="$WARNFLAGS -ansi"
+ WARNFLAGS="$WARNFLAGS"
else
:
fi
diff --git a/include/geos/platform.h.in b/include/geos/platform.h.in
index ab63929..1bb2fae 100644
--- a/include/geos/platform.h.in
+++ b/include/geos/platform.h.in
@@ -84,7 +84,7 @@ extern "C"
#endif
#if defined(HAVE_ISNAN)
-# define ISNAN(x) (isnan(x))
+# define ISNAN(x) (std::isnan(x))
#else
# if defined(_MSC_VER)
# define ISNAN(x) _isnan(x)
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
MASON_NAME=geos
MASON_VERSION=3.4.2
MASON_LIB_FILE=lib/libgeos.a
. ${MASON_DIR}/mason.sh
function mason_load_source {
mason_download \
http://download.osgeo.org/geos/${MASON_NAME}-${MASON_VERSION}.tar.bz2 \
b248842dee2afa6e944693c21571a2999dfafc5a
mason_extract_tar_bz2
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION}
}
function mason_compile {
mason_step "Loading patch 'https://github.com/mapbox/mason/blob/${MASON_SLUG}/patch.diff'..."
curl --retry 3 -s -f -# -L \
https://raw.githubusercontent.com/mapbox/mason/${MASON_SLUG}/patch.diff \
-O || (mason_error "Could not find patch for ${MASON_SLUG}" && exit 1)
patch -N -p1 < ./patch.diff
# 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
CXX="${CXX} -stdlib=libc++ -std=c++11"
fi
./configure \
--prefix=${MASON_PREFIX} \
${MASON_HOST_ARG} \
--disable-shared --enable-static \
--disable-dependency-tracking
make -j${MASON_CONCURRENCY} install
}
function mason_clean {
make clean
}
mason_run "$@"
+25
View File
@@ -0,0 +1,25 @@
language: generic
matrix:
include:
- os: osx
osx_image: xcode7.3
compiler: clang
- os: linux
compiler: clang
env: CXX=clang++-3.5 CC=clang-3.5
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
packages:
- clang-3.5
script:
- ./mason build ${MASON_NAME} ${MASON_VERSION}
- ./mason link ${MASON_NAME} ${MASON_VERSION}
after_success:
- ./mason publish ${MASON_NAME} ${MASON_VERSION}
+26
View File
@@ -0,0 +1,26 @@
diff --git a/configure b/configure
index eee34f8..808c020 100755
--- a/configure
+++ b/configure
@@ -17611,7 +17611,7 @@
$as_echo "$dummy_cv_ansi" >&6; }
if test yes = "$dummy_cv_ansi"; then
- WARNFLAGS="$WARNFLAGS -ansi"
+ WARNFLAGS="$WARNFLAGS"
else
:
fi
diff --git a/include/geos/platform.h.in b/include/geos/platform.h.in
index ab63929..1bb2fae 100644
--- a/include/geos/platform.h.in
+++ b/include/geos/platform.h.in
@@ -84,7 +84,7 @@ extern "C"
#endif
#if defined(HAVE_ISNAN)
-# define ISNAN(x) (isnan(x))
+# define ISNAN(x) (std::isnan(x))
#else
# if defined(_MSC_VER)
# define ISNAN(x) _isnan(x)
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
MASON_NAME=geos
MASON_VERSION=3.5.0
MASON_LIB_FILE=lib/libgeos.a
. ${MASON_DIR}/mason.sh
function mason_load_source {
mason_download \
http://download.osgeo.org/geos/${MASON_NAME}-${MASON_VERSION}.tar.bz2 \
a641469449fc32b829fb885cb0ea5fdd3333ce62
mason_extract_tar_bz2
export MASON_BUILD_PATH=${MASON_ROOT}/.build/${MASON_NAME}-${MASON_VERSION}
}
function mason_compile {
if [ "$MASON_PLATFORM" == "linux" ]; then
mason_step "Loading patch ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff"
patch -N -p1 < ${MASON_DIR}/scripts/${MASON_NAME}/${MASON_VERSION}/patch.diff
fi
# 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
CXX="${CXX} -stdlib=libc++ -std=c++11"
fi
./configure \
--prefix=${MASON_PREFIX} \
${MASON_HOST_ARG} \
--disable-shared --enable-static \
--disable-dependency-tracking
make -j${MASON_CONCURRENCY} install
}
function mason_clean {
make clean
}
mason_run "$@"