aboutsummaryrefslogtreecommitdiffstats
path: root/tools/macos-setup.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-05-18 13:03:11 -0700
committerGuy Harris <guy@alum.mit.edu>2018-05-18 20:03:58 +0000
commit7ae53c7e9511f7813495daad4396e173ab0bffd7 (patch)
tree94740916ebaf76ef7f7d7cf648b698bfa0b239d4 /tools/macos-setup.sh
parent24baf355663cd6837ae67447e50b066a7cd5d7af (diff)
Don't try to download Ninja on Lion or earlier.
The version of curl that comes with Lion gets a TLS error when trying to download Ninja. Also note some other issues. Change-Id: I0e26a5b2f2f54e36461d3d3909f719fcca2ac04b Reviewed-on: https://code.wireshark.org/review/27645 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools/macos-setup.sh')
-rwxr-xr-xtools/macos-setup.sh46
1 files changed, 34 insertions, 12 deletions
diff --git a/tools/macos-setup.sh b/tools/macos-setup.sh
index c244f80faf..43c7b5083f 100755
--- a/tools/macos-setup.sh
+++ b/tools/macos-setup.sh
@@ -17,6 +17,21 @@ shopt -s extglob
AUTOTOOLS=1
#
+# Get the major version of Darwin, so we can check the major macOS
+# version.
+#
+DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
+
+#
+# To make this work on Leopard (rather than working *on* Snow Leopard
+# when building *for* Leopard) will take more work.
+#
+if [[ $DARWIN_MAJOR_VERSION -le 9 ]]; then
+ echo "This script does not support any versions of macOS before Snow Leopard" 1>&2
+ exit 1
+fi
+
+#
# Versions of packages to download and install.
#
@@ -35,6 +50,11 @@ LZIP_VERSION=1.19
#
# CMake is required to do the build.
#
+# XXX - some versions fail on Lion due to issues with Lion's libc++, and
+# CMake 3.5 and 3.6 have an annoying "Make sure the combination of SDK
+# and Deployment Target are allowed" check that fails in some cases.
+# Figuring out what version to default to is a work in progress.
+#
CMAKE_VERSION=${CMAKE_VERSION-3.5.2}
#
@@ -42,7 +62,20 @@ CMAKE_VERSION=${CMAKE_VERSION-3.5.2}
# claimed to build faster than make.
# Comment it out if you don't want it.
#
-NINJA_VERSION=${NINJA_VERSION-1.8.2}
+# The version of curl that comes with Lion fails to download the latest
+# Ninja, with the error
+#
+# curl: (35) error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1
+# alert protocol version
+#
+# so we don't try to install it with Lion or earlier; if you want it you
+# will have to download and install it yourself.
+# XXX - what macOS version is the first one with a version of curl that
+# *can* download it? Sierra's can.
+#
+if [[ $DARWIN_MAJOR_VERSION -gt 10 ]]; then
+ NINJA_VERSION=${NINJA_VERSION-1.8.2}
+fi
#
# The following libraries and tools are required even to build only TShark.
@@ -134,8 +167,6 @@ if [ "$SPANDSP_VERSION" ]; then
fi
BCG729_VERSION=1.0.2
-DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
-
#
# GNU autotools; they're provided with releases up to Snow Leopard, but
# not in later releases, and the Snow Leopard version is too old for
@@ -2172,15 +2203,6 @@ fi
CFLAGS="-g -O2"
CXXFLAGS="-g -O2"
-#
-# To make this work on Leopard (rather than working *on* Snow Leopard
-# when building *for* Leopard) will take more work.
-#
-if [[ $DARWIN_MAJOR_VERSION -le 9 ]]; then
- echo "This script does not support any versions of macOS before Snow Leopard" 1>&2
- exit 1
-fi
-
# if no make options are present, set default options
if [ -z "$MAKE_BUILD_OPTS" ] ; then
# by default use 1.5x number of cores for parallel build