diff --git a/tools/macos-setup.sh b/tools/macos-setup.sh index fc6ff58061..62b701d86c 100755 --- a/tools/macos-setup.sh +++ b/tools/macos-setup.sh @@ -52,12 +52,18 @@ fi # While tar, in newer versions of macOS, can uncompress xz'ed tarballs, # it can't do so in older versions, and xz isn't provided with macOS. # -XZ_VERSION=5.2.3 +XZ_VERSION=5.2.5 # # Some packages need lzip to unpack their current source. # -LZIP_VERSION=1.19 +LZIP_VERSION=1.21 + +# +# The version of libPCRE on Catalina is insufficient to build glib due to +# missing UTF-8 support. +# +PCRE_VERSION=8.44 # # CMake is required to do the build - and to build some of the @@ -87,17 +93,17 @@ NINJA_VERSION=${NINJA_VERSION-1.8.2} # # The following libraries and tools are required even to build only TShark. # -GETTEXT_VERSION=0.19.8.1 -GLIB_VERSION=2.37.6 +GETTEXT_VERSION=0.21 +GLIB_VERSION=2.58.3 PKG_CONFIG_VERSION=0.29.2 # # libgpg-error is required for libgcrypt. # -LIBGPG_ERROR_VERSION=1.37 +LIBGPG_ERROR_VERSION=1.39 # # libgcrypt is required. # -LIBGCRYPT_VERSION=1.8.5 +LIBGCRYPT_VERSION=1.8.7 # # One or more of the following libraries are required to build Wireshark. @@ -130,7 +136,7 @@ fi # the optional libraries are required by other optional libraries. # LIBSMI_VERSION=0.4.8 -GNUTLS_VERSION=3.6.14 +GNUTLS_VERSION=3.6.15 if [ "$GNUTLS_VERSION" ]; then # # We'll be building GnuTLS, so we may need some additional libraries. @@ -144,22 +150,22 @@ if [ "$GNUTLS_VERSION" ]; then # # And, in turn, Nettle requires GMP. # - GMP_VERSION=6.2.0 + GMP_VERSION=6.2.1 fi # Use 5.2.4, not 5.3, for now; lua_bitop.c hasn't been ported to 5.3 # yet, and we need to check for compatibility issues (we'd want Lua # scripts to work with 5.1, 5.2, and 5.3, as long as they only use Lua # features present in all three versions) LUA_VERSION=5.2.4 -SNAPPY_VERSION=1.1.4 +SNAPPY_VERSION=1.1.8 ZSTD_VERSION=1.4.2 LIBXML2_VERSION=2.9.9 -LZ4_VERSION=1.7.5 +LZ4_VERSION=1.9.2 SBC_VERSION=1.3 CARES_VERSION=1.15.0 LIBSSH_VERSION=0.9.0 # mmdbresolve -MAXMINDDB_VERSION=1.3.2 +MAXMINDDB_VERSION=1.4.3 NGHTTP2_VERSION=1.39.2 SPANDSP_VERSION=0.0.6 SPEEXDSP_VERSION=1.2.0 @@ -173,7 +179,7 @@ BCG729_VERSION=1.0.2 ILBC_VERSION=2.0.2 OPUS_VERSION=1.3.1 PYTHON3_VERSION=3.7.1 -BROTLI_VERSION=1.0.7 +BROTLI_VERSION=1.0.9 # minizip ZLIB_VERSION=1.2.11 # Uncomment to enable automatic updates using Sparkle @@ -307,6 +313,42 @@ uninstall_lzip() { fi } +install_pcre() { + if [ "$PCRE_VERSION" -a ! -f pcre-$PCRE_VERSION-done ] ; then + echo "Downloading, building, and installing pcre:" + [ -f pcre-$PCRE_VERSION.tar.bz2 ] || curl -L -O https://ftp.pcre.org/pub/pcre/pcre-$PCRE_VERSION.tar.bz2 || exit 1 + $no_build && echo "Skipping installation" && return + bzcat pcre-$PCRE_VERSION.tar.bz2 | tar xf - || exit 1 + cd pcre-$PCRE_VERSION + ./configure --enable-unicode-properties || exit 1 + make $MAKE_BUILD_OPTS || exit 1 + $DO_MAKE_INSTALL || exit 1 + cd .. + touch pcre-$PCRE_VERSION-done + fi +} + +uninstall_pcre() { + if [ ! -z "$installed_pcre_version" ] ; then + echo "Uninstalling pcre:" + cd pcre-$installed_pcre_version + $DO_MAKE_UNINSTALL || exit 1 + make distclean || exit 1 + cd .. + rm pcre-$installed_pcre_version-done + + if [ "$#" -eq 1 -a "$1" = "-r" ] ; then + # + # Get rid of the previously downloaded and unpacked version. + # + rm -rf pcre-$installed_pcre_version + rm -rf pcre-$installed_pcre_version.tar.bz2 + fi + + installed_pcre_version="" + fi +} + install_autoconf() { if [ "$AUTOCONF_VERSION" -a ! -f autoconf-$AUTOCONF_VERSION-done ] ; then echo "Downloading, building and installing GNU autoconf..." @@ -706,6 +748,7 @@ uninstall_pkg_config() { install_glib() { if [ ! -f glib-$GLIB_VERSION-done ] ; then +set -x echo "Downloading, building, and installing GLib:" glib_dir=`expr $GLIB_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'` # @@ -743,6 +786,9 @@ install_glib() { # developer tools, there is a /usr/include directory). # includedir=`SDKROOT="$SDKPATH" xcrun --show-sdk-path 2>/dev/null`/usr/include + if [ ! -f ./configure ]; then + ./autogen.sh + fi if grep -qs '#define.*MACOSX' $includedir/ffi/fficonfig.h then # It's defined, nothing to do @@ -755,6 +801,7 @@ install_glib() { $DO_MAKE_INSTALL || exit 1 cd .. touch glib-$GLIB_VERSION-done +set +x fi } @@ -1218,14 +1265,16 @@ uninstall_lua() { install_snappy() { if [ "$SNAPPY_VERSION" -a ! -f snappy-$SNAPPY_VERSION-done ] ; then echo "Downloading, building, and installing snappy:" - [ -f snappy-$SNAPPY_VERSION.tar.gz ] || curl -L -O https://github.com/google/snappy/releases/download/$SNAPPY_VERSION/snappy-$SNAPPY_VERSION.tar.gz || exit 1 + [ -f snappy-$SNAPPY_VERSION.tar.gz ] || curl -L -o snappy-$SNAPPY_VERSION.tar.gz https://github.com/google/snappy/archive/$SNAPPY_VERSION.tar.gz || exit 1 $no_build && echo "Skipping installation" && return gzcat snappy-$SNAPPY_VERSION.tar.gz | tar xf - || exit 1 cd snappy-$SNAPPY_VERSION - CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1 + mkdir build_dir + cd build_dir + MACOSX_DEPLOYMENT_TARGET=$min_osx_target SDKROOT="$SDKPATH" cmake ../ || exit 1 make $MAKE_BUILD_OPTS || exit 1 $DO_MAKE_INSTALL || exit 1 - cd .. + cd ../.. touch snappy-$SNAPPY_VERSION-done fi } @@ -2389,6 +2438,17 @@ install_all() { uninstall_autoconf -r fi + if [ ! -z "$installed_pcre_version" -a \ + "$installed_pcre_version" != "$PCRE_VERSION" ] ; then + echo "Installed pcre version is $installed_pcre_version" + if [ -z "$PCRE_VERSION" ] ; then + echo "pcre is not requested" + else + echo "Requested pcre version is $PCRE_VERSION" + fi + uninstall_pcre -r + fi + if [ ! -z "$installed_lzip_version" -a \ "$installed_lzip_version" != "$LZIP_VERSION" ] ; then echo "Installed lzip version is $installed_lzip_version" @@ -2456,6 +2516,8 @@ install_all() { install_lzip + install_pcre + install_autoconf install_automake @@ -2654,6 +2716,8 @@ uninstall_all() { uninstall_autoconf + uninstall_pcre + uninstall_lzip uninstall_xz @@ -2762,6 +2826,7 @@ then installed_xz_version=`ls xz-*-done 2>/dev/null | sed 's/xz-\(.*\)-done/\1/'` installed_lzip_version=`ls lzip-*-done 2>/dev/null | sed 's/lzip-\(.*\)-done/\1/'` + installed_pcre_version=`ls pcre-*-done 2>/dev/null | sed 's/pcre-\(.*\)-done/\1/'` installed_autoconf_version=`ls autoconf-*-done 2>/dev/null | sed 's/autoconf-\(.*\)-done/\1/'` installed_automake_version=`ls automake-*-done 2>/dev/null | sed 's/automake-\(.*\)-done/\1/'` installed_libtool_version=`ls libtool-*-done 2>/dev/null | sed 's/libtool-\(.*\)-done/\1/'`