2018-04-15 09:44:18 +00:00
|
|
|
#!/bin/bash
|
2017-04-05 17:50:53 +00:00
|
|
|
# Setup development environment on macOS (tested with 10.6.8 and Xcode
|
|
|
|
# 3.2.6 and with 10.12.4 and Xcode 8.3).
|
2011-07-15 21:48:02 +00:00
|
|
|
#
|
2013-09-14 13:11:38 +00:00
|
|
|
# Copyright 2011 Michael Tuexen, Joerg Mayer, Guy Harris (see AUTHORS file)
|
2011-07-15 21:48:02 +00:00
|
|
|
#
|
2013-09-14 13:11:38 +00:00
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
2018-03-06 14:31:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2011-07-15 21:48:02 +00:00
|
|
|
|
2018-04-15 09:44:18 +00:00
|
|
|
shopt -s extglob
|
2013-07-06 19:32:07 +00:00
|
|
|
|
2018-05-18 20:03:11 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# Versions of packages to download and install.
|
|
|
|
#
|
|
|
|
|
2018-05-19 00:29:25 +00:00
|
|
|
#
|
|
|
|
# We use curl, but older versions of curl in older macOS releases can't
|
|
|
|
# handle some sites - including the xz site.
|
|
|
|
#
|
|
|
|
# If the version of curl in the system is older than 7.54.0, download
|
|
|
|
# curl and install it.
|
|
|
|
#
|
|
|
|
current_curl_version=`curl --version | sed -n 's/curl \([0-9.]*\) .*/\1/p'`
|
|
|
|
current_curl_major_version="`expr $current_curl_version : '\([0-9][0-9]*\).*'`"
|
|
|
|
current_curl_minor_version="`expr $current_curl_version : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
if [[ $current_curl_major_version -lt 7 ||
|
|
|
|
($current_curl_major_version -eq 7 &&
|
|
|
|
$current_curl_minor_version -lt 54) ]]; then
|
|
|
|
CURL_VERSION=${CURL_VERSION-7.60.0}
|
|
|
|
fi
|
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
#
|
|
|
|
# Some packages need xz to unpack their current source.
|
2021-01-02 13:42:20 +00:00
|
|
|
# While tar, since macOS 10.9, can uncompress xz'ed tarballs,
|
2017-04-05 17:50:53 +00:00
|
|
|
# it can't do so in older versions, and xz isn't provided with macOS.
|
2013-10-29 01:49:59 +00:00
|
|
|
#
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
XZ_VERSION=5.2.5
|
2013-10-29 01:49:59 +00:00
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
#
|
|
|
|
# Some packages need lzip to unpack their current source.
|
|
|
|
#
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
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
|
2017-06-16 07:19:53 +00:00
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
#
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
# CMake is required to do the build - and to build some of the
|
|
|
|
# dependencies.
|
2013-10-29 01:49:59 +00:00
|
|
|
#
|
2018-05-18 23:40:17 +00:00
|
|
|
# Sigh. CMake versions 3.7 and later 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.
|
2018-05-18 20:03:11 +00:00
|
|
|
#
|
2021-01-04 00:35:25 +00:00
|
|
|
# 3.19.2 is the first version to support Apple Silicon, but the precompiled
|
|
|
|
# binary on cmake.org is only a universal binary that requires macOS 10.0
|
|
|
|
# (Yosemite) or newer.
|
|
|
|
#
|
|
|
|
# So if you're on Lion, we choose version 3.5.2, otherwise on Mountain
|
|
|
|
# Lion and Mavericks we choose the last stable release that works on
|
|
|
|
# them (3.18.5), and on Yosemite and later we choose the latest stable
|
|
|
|
# version (currently 3.19.2).
|
|
|
|
#
|
|
|
|
if [[ $DARWIN_MAJOR_VERSION -gt 13 ]]; then
|
|
|
|
CMAKE_VERSION=${CMAKE_VERSION-3.19.2}
|
|
|
|
elif [[ $DARWIN_MAJOR_VERSION -gt 11 ]]; then
|
|
|
|
CMAKE_VERSION=${CMAKE_VERSION-3.18.5}
|
2018-05-18 23:40:17 +00:00
|
|
|
else
|
|
|
|
CMAKE_VERSION=${CMAKE_VERSION-3.5.2}
|
|
|
|
fi
|
2013-10-29 01:49:59 +00:00
|
|
|
|
2018-05-15 03:42:32 +00:00
|
|
|
#
|
|
|
|
# Ninja isn't required, as make is provided with Xcode, but it is
|
|
|
|
# claimed to build faster than make.
|
|
|
|
# Comment it out if you don't want it.
|
|
|
|
#
|
2018-05-19 00:29:25 +00:00
|
|
|
NINJA_VERSION=${NINJA_VERSION-1.8.2}
|
2018-05-15 03:42:32 +00:00
|
|
|
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# The following libraries and tools are required even to build only TShark.
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
GETTEXT_VERSION=0.21
|
|
|
|
GLIB_VERSION=2.58.3
|
2017-04-19 16:14:00 +00:00
|
|
|
PKG_CONFIG_VERSION=0.29.2
|
2017-06-16 07:30:46 +00:00
|
|
|
#
|
|
|
|
# libgpg-error is required for libgcrypt.
|
|
|
|
#
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
LIBGPG_ERROR_VERSION=1.39
|
2017-06-16 07:30:46 +00:00
|
|
|
#
|
|
|
|
# libgcrypt is required.
|
|
|
|
#
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
LIBGCRYPT_VERSION=1.8.7
|
2013-10-23 01:39:54 +00:00
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
#
|
|
|
|
# One or more of the following libraries are required to build Wireshark.
|
|
|
|
#
|
2018-04-09 05:03:07 +00:00
|
|
|
# To override the version of Qt call the script with some of the variables
|
|
|
|
# set to the new values. Setting the variable to empty will disable building
|
|
|
|
# the toolkit and will uninstall # any version previously installed by the
|
|
|
|
# script, e.g.
|
2018-04-15 09:44:18 +00:00
|
|
|
# "QT_VERSION=5.10.1 ./macos-setup.sh"
|
|
|
|
# will build and install with QT 5.10.1.
|
2015-12-29 18:42:27 +00:00
|
|
|
#
|
2015-07-11 21:12:28 +00:00
|
|
|
# Note that Qt 5, prior to 5.5.0, mishandles context menus in ways that,
|
|
|
|
# for example, cause them not to work reliably in the packet detail or
|
|
|
|
# packet data pane; see, for example, Qt bugs QTBUG-31937, QTBUG-41017,
|
|
|
|
# and QTBUG-43464, all of which seem to be the same bug.
|
2013-10-29 01:49:59 +00:00
|
|
|
#
|
2020-12-27 16:04:13 +00:00
|
|
|
QT_VERSION=${QT_VERSION-5.12.6}
|
2018-04-09 05:03:07 +00:00
|
|
|
|
2015-04-17 06:18:57 +00:00
|
|
|
if [ "$QT_VERSION" ]; then
|
|
|
|
QT_MAJOR_VERSION="`expr $QT_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
QT_MINOR_VERSION="`expr $QT_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
QT_DOTDOT_VERSION="`expr $QT_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
QT_MAJOR_MINOR_VERSION=$QT_MAJOR_VERSION.$QT_MINOR_VERSION
|
2015-10-11 21:35:47 +00:00
|
|
|
QT_MAJOR_MINOR_DOTDOT_VERSION=$QT_MAJOR_VERSION.$QT_MINOR_VERSION.$QT_DOTDOT_VERSION
|
2015-04-17 06:18:57 +00:00
|
|
|
fi
|
2013-07-05 23:26:15 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# The following libraries are optional.
|
|
|
|
# Comment them out if you don't want them, but note that some of
|
|
|
|
# the optional libraries are required by other optional libraries.
|
|
|
|
#
|
|
|
|
LIBSMI_VERSION=0.4.8
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
GNUTLS_VERSION=3.6.15
|
2017-06-16 07:19:53 +00:00
|
|
|
if [ "$GNUTLS_VERSION" ]; then
|
|
|
|
#
|
|
|
|
# We'll be building GnuTLS, so we may need some additional libraries.
|
|
|
|
# We assume GnuTLS can work with Nettle; newer versions *only* use
|
|
|
|
# Nettle, not libgcrypt.
|
|
|
|
#
|
|
|
|
GNUTLS_MAJOR_VERSION="`expr $GNUTLS_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
GNUTLS_MINOR_VERSION="`expr $GNUTLS_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
2020-05-27 12:27:19 +00:00
|
|
|
NETTLE_VERSION=3.6
|
2017-06-16 07:19:53 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# And, in turn, Nettle requires GMP.
|
|
|
|
#
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
GMP_VERSION=6.2.1
|
2020-11-26 06:10:34 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# And p11-kit
|
|
|
|
P11KIT_VERSION=0.23.21
|
|
|
|
|
|
|
|
# Which requires libtasn1
|
|
|
|
LIBTASN1_VERSION=4.16.0
|
2017-06-16 07:19:53 +00:00
|
|
|
fi
|
2016-08-09 19:48:49 +00:00
|
|
|
# Use 5.2.4, not 5.3, for now; lua_bitop.c hasn't been ported to 5.3
|
2015-01-28 19:39:04 +00:00
|
|
|
# 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)
|
2016-08-09 19:48:49 +00:00
|
|
|
LUA_VERSION=5.2.4
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
SNAPPY_VERSION=1.1.8
|
2019-08-12 21:57:45 +00:00
|
|
|
ZSTD_VERSION=1.4.2
|
2019-01-17 17:08:35 +00:00
|
|
|
LIBXML2_VERSION=2.9.9
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
LZ4_VERSION=1.9.2
|
2016-10-20 08:36:36 +00:00
|
|
|
SBC_VERSION=1.3
|
2018-11-12 23:09:06 +00:00
|
|
|
CARES_VERSION=1.15.0
|
2019-09-08 13:15:32 +00:00
|
|
|
LIBSSH_VERSION=0.9.0
|
2018-02-09 01:20:26 +00:00
|
|
|
# mmdbresolve
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
MAXMINDDB_VERSION=1.4.3
|
2019-08-14 17:08:35 +00:00
|
|
|
NGHTTP2_VERSION=1.39.2
|
2017-08-01 23:36:01 +00:00
|
|
|
SPANDSP_VERSION=0.0.6
|
2020-01-13 21:48:10 +00:00
|
|
|
SPEEXDSP_VERSION=1.2.0
|
2017-08-01 23:36:01 +00:00
|
|
|
if [ "$SPANDSP_VERSION" ]; then
|
|
|
|
#
|
|
|
|
# SpanDSP depends on libtiff.
|
|
|
|
#
|
|
|
|
LIBTIFF_VERSION=3.8.1
|
|
|
|
fi
|
2017-08-02 00:04:15 +00:00
|
|
|
BCG729_VERSION=1.0.2
|
2020-06-01 22:21:57 +00:00
|
|
|
ILBC_VERSION=2.0.2
|
2020-09-29 04:33:06 +00:00
|
|
|
OPUS_VERSION=1.3.1
|
2021-01-03 18:09:34 +00:00
|
|
|
|
|
|
|
# 3.7.6 is the final version of Python to have official packages for the
|
|
|
|
# 64-bit/32-bit variant that supports 10.6 (Snow Leopard) through 10.8
|
|
|
|
# (Mountain Lion), and 3.9.1 is the first version of Python to support
|
|
|
|
# macOS 11 Big Sur and Apple Silicon (arm-based Macs).
|
|
|
|
|
|
|
|
# So on Snow Leopard through Mountain Lion, choose 3.7.6, otherwise
|
|
|
|
# get the latest stable version (3.9.1).
|
|
|
|
if [[ $DARWIN_MAJOR_VERSION -gt 12 ]]; then
|
|
|
|
PYTHON3_VERSION=3.9.1
|
|
|
|
else
|
|
|
|
PYTHON3_VERSION=3.7.6
|
|
|
|
fi
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
BROTLI_VERSION=1.0.9
|
2019-09-17 16:31:39 +00:00
|
|
|
# minizip
|
|
|
|
ZLIB_VERSION=1.2.11
|
2019-11-14 16:08:28 +00:00
|
|
|
# Uncomment to enable automatic updates using Sparkle
|
|
|
|
#SPARKLE_VERSION=1.22.0
|
2019-09-17 16:31:39 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Asciidoctor is required to build the documentation.
|
|
|
|
#
|
2019-10-08 15:30:48 +00:00
|
|
|
ASCIIDOCTOR_VERSION=${ASCIIDOCTOR_VERSION-2.0.10}
|
|
|
|
ASCIIDOCTORPDF_VERSION=${ASCIIDOCTORPDF_VERSION-1.5.0.beta.5}
|
2016-08-26 13:18:29 +00:00
|
|
|
|
2013-07-06 19:32:07 +00:00
|
|
|
#
|
|
|
|
# GNU autotools; they're provided with releases up to Snow Leopard, but
|
2016-03-30 21:30:23 +00:00
|
|
|
# not in later releases, and the Snow Leopard version is too old for
|
|
|
|
# current Wireshark, so we install them unconditionally.
|
2013-07-06 19:32:07 +00:00
|
|
|
#
|
2016-03-30 21:30:23 +00:00
|
|
|
AUTOCONF_VERSION=2.69
|
2017-04-19 16:14:00 +00:00
|
|
|
AUTOMAKE_VERSION=1.15
|
2016-07-29 20:21:13 +00:00
|
|
|
LIBTOOL_VERSION=2.4.6
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2018-05-19 00:29:25 +00:00
|
|
|
install_curl() {
|
|
|
|
if [ "$CURL_VERSION" -a ! -f curl-$CURL_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing curl:"
|
|
|
|
[ -f curl-$CURL_VERSION.tar.bz2 ] || curl -L -O https://curl.haxx.se/download/curl-$CURL_VERSION.tar.bz2 || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
bzcat curl-$CURL_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
cd curl-$CURL_VERSION
|
|
|
|
./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch curl-$CURL_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_curl() {
|
|
|
|
if [ ! -z "$installed_curl_version" ] ; then
|
|
|
|
echo "Uninstalling curl:"
|
|
|
|
cd curl-$installed_curl_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm curl-$installed_curl_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf curl-$installed_curl_version
|
|
|
|
rm -rf curl-$installed_curl_version.tar.bz2
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_curl_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-01-22 00:17:07 +00:00
|
|
|
install_xz() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$XZ_VERSION" -a ! -f xz-$XZ_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing xz:"
|
2017-04-05 09:31:48 +00:00
|
|
|
[ -f xz-$XZ_VERSION.tar.bz2 ] || curl -L -O http://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
bzcat xz-$XZ_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
cd xz-$XZ_VERSION
|
2019-02-23 19:21:06 +00:00
|
|
|
#
|
|
|
|
# This builds and installs liblzma, which libxml2 uses, and
|
|
|
|
# Wireshark uses liblzma, so we need to build this with
|
|
|
|
# all the minimum-deployment-version and SDK stuff.
|
|
|
|
#
|
|
|
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2015-01-22 02:09:30 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch xz-$XZ_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_xz() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_xz_version" ] ; then
|
|
|
|
echo "Uninstalling xz:"
|
|
|
|
cd xz-$installed_xz_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm xz-$installed_xz_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf xz-$installed_xz_version
|
|
|
|
rm -rf xz-$installed_xz_version.tar.bz2
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_xz_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
install_lzip() {
|
|
|
|
if [ "$LZIP_VERSION" -a ! -f lzip-$LZIP_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing lzip:"
|
|
|
|
[ -f lzip-$LZIP_VERSION.tar.gz ] || curl -L -O http://download.savannah.gnu.org/releases/lzip/lzip-$LZIP_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat lzip-$LZIP_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd lzip-$LZIP_VERSION
|
|
|
|
./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch lzip-$LZIP_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_lzip() {
|
|
|
|
if [ ! -z "$installed_lzip_version" ] ; then
|
|
|
|
echo "Uninstalling lzip:"
|
|
|
|
cd lzip-$installed_lzip_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm lzip-$installed_lzip_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf lzip-$installed_lzip_version
|
|
|
|
rm -rf lzip-$installed_lzip_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_lzip_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2015-01-22 00:17:07 +00:00
|
|
|
install_autoconf() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$AUTOCONF_VERSION" -a ! -f autoconf-$AUTOCONF_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building and installing GNU autoconf..."
|
2017-04-05 09:31:48 +00:00
|
|
|
[ -f autoconf-$AUTOCONF_VERSION.tar.xz ] || curl -L -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.xz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
xzcat autoconf-$AUTOCONF_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd autoconf-$AUTOCONF_VERSION
|
|
|
|
./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch autoconf-$AUTOCONF_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_autoconf() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_autoconf_version" ] ; then
|
2015-01-22 08:18:40 +00:00
|
|
|
#
|
|
|
|
# automake and libtool depend on this, so uninstall them.
|
|
|
|
#
|
2020-12-17 02:14:30 +00:00
|
|
|
uninstall_libtool "$@"
|
|
|
|
uninstall_automake "$@"
|
2015-01-22 08:18:40 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
echo "Uninstalling GNU autoconf:"
|
|
|
|
cd autoconf-$installed_autoconf_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm autoconf-$installed_autoconf_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf autoconf-$installed_autoconf_version
|
|
|
|
rm -rf autoconf-$installed_autoconf_version.tar.xz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_autoconf_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_automake() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$AUTOMAKE_VERSION" -a ! -f automake-$AUTOMAKE_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building and installing GNU automake..."
|
2017-04-05 09:31:48 +00:00
|
|
|
[ -f automake-$AUTOMAKE_VERSION.tar.xz ] || curl -L -O ftp://ftp.gnu.org/gnu/automake/automake-$AUTOMAKE_VERSION.tar.xz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
xzcat automake-$AUTOMAKE_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd automake-$AUTOMAKE_VERSION
|
|
|
|
./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch automake-$AUTOMAKE_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_automake() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_automake_version" ] ; then
|
2015-01-22 08:18:40 +00:00
|
|
|
#
|
|
|
|
# libtool depends on this(?), so uninstall it.
|
|
|
|
#
|
2015-04-16 21:21:00 +00:00
|
|
|
uninstall_libtool "$@"
|
2015-01-22 08:18:40 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
echo "Uninstalling GNU automake:"
|
|
|
|
cd automake-$installed_automake_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm automake-$installed_automake_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf automake-$installed_automake_version
|
|
|
|
rm -rf automake-$installed_automake_version.tar.xz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_automake_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_libtool() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$LIBTOOL_VERSION" -a ! -f libtool-$LIBTOOL_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building and installing GNU libtool..."
|
2017-04-05 09:31:48 +00:00
|
|
|
[ -f libtool-$LIBTOOL_VERSION.tar.xz ] || curl -L -O ftp://ftp.gnu.org/gnu/libtool/libtool-$LIBTOOL_VERSION.tar.xz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
xzcat libtool-$LIBTOOL_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd libtool-$LIBTOOL_VERSION
|
2019-09-18 16:25:27 +00:00
|
|
|
./configure --program-prefix=g || exit 1
|
2015-01-22 02:09:30 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libtool-$LIBTOOL_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libtool() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_libtool_version" ] ; then
|
|
|
|
echo "Uninstalling GNU libtool:"
|
|
|
|
cd libtool-$installed_libtool_version
|
|
|
|
$DO_MV /usr/local/bin/glibtool /usr/local/bin/libtool
|
|
|
|
$DO_MV /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm libtool-$installed_libtool_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf libtool-$installed_libtool_version
|
|
|
|
rm -rf libtool-$installed_libtool_version.tar.xz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_libtool_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
2018-05-15 03:42:32 +00:00
|
|
|
install_ninja() {
|
|
|
|
if [ "$NINJA_VERSION" -a ! -f ninja-$NINJA_VERSION-done ] ; then
|
|
|
|
echo "Downloading and installing Ninja:"
|
|
|
|
#
|
|
|
|
# Download the zipball, unpack it, and move the binary to
|
|
|
|
# /usr/local/bin.
|
|
|
|
#
|
|
|
|
[ -f ninja-mac-v$NINJA_VERSION.zip ] || curl -L -o ninja-mac-v$NINJA_VERSION.zip https://github.com/ninja-build/ninja/releases/download/v$NINJA_VERSION/ninja-mac.zip || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
unzip ninja-mac-v$NINJA_VERSION.zip
|
|
|
|
sudo mv ninja /usr/local/bin
|
|
|
|
touch ninja-$NINJA_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_ninja() {
|
|
|
|
if [ ! -z "$installed_ninja_version" ]; then
|
|
|
|
echo "Uninstalling Ninja:"
|
|
|
|
sudo rm /usr/local/bin/ninja
|
2020-12-17 02:14:30 +00:00
|
|
|
rm ninja-$installed_ninja_version-done
|
2018-05-15 03:42:32 +00:00
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
rm -f ninja-mac-v$installed_ninja_version.zip
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_ninja_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-02-26 23:11:51 +00:00
|
|
|
install_asciidoctor() {
|
|
|
|
if [ ! -f asciidoctor-${ASCIIDOCTOR_VERSION}-done ]; then
|
|
|
|
echo "Downloading and installing Asciidoctor:"
|
|
|
|
sudo gem install -V asciidoctor --version "=${ASCIIDOCTOR_VERSION}"
|
|
|
|
touch asciidoctor-${ASCIIDOCTOR_VERSION}-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_asciidoctor() {
|
|
|
|
if [ ! -z "$installed_asciidoctor_version" ]; then
|
|
|
|
echo "Uninstalling Asciidoctor:"
|
|
|
|
sudo gem uninstall -V asciidoctor --version "=${installed_asciidoctor_version}"
|
|
|
|
rm asciidoctor-$installed_asciidoctor_version-done
|
|
|
|
|
|
|
|
##if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version,
|
|
|
|
# whatever it might happen to be called.
|
|
|
|
#
|
|
|
|
## rm -f asciidoctor-$installed_asciidoctor_version
|
|
|
|
##fi
|
|
|
|
installed_asciidoctor_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_asciidoctorpdf() {
|
|
|
|
if [ ! -f asciidoctorpdf-${ASCIIDOCTORPDF_VERSION}-done ]; then
|
|
|
|
## XXX gem does not track dependencies that are installed for asciidoctor-pdf
|
|
|
|
## record them for uninstallation
|
|
|
|
## ttfunk, pdf-core, prawn, prawn-table, Ascii85, ruby-rc4, hashery, afm, pdf-reader, prawn-templates, public_suffix, addressable, css_parser, prawn-svg, prawn-icon, safe_yaml, thread_safe, polyglot, treetop, asciidoctor-pdf
|
|
|
|
echo "Downloading and installing Asciidoctor-pdf:"
|
|
|
|
sudo gem install -V asciidoctor-pdf --prerelease --version "=${ASCIIDOCTORPDF_VERSION}"
|
|
|
|
touch asciidoctorpdf-${ASCIIDOCTORPDF_VERSION}-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_asciidoctorpdf() {
|
|
|
|
if [ ! -z "$installed_asciidoctorpdf_version" ]; then
|
|
|
|
echo "Uninstalling Asciidoctor:"
|
|
|
|
sudo gem uninstall -V asciidoctor-pdf --version "=${installed_asciidoctorpdf_version}"
|
|
|
|
## XXX uninstall dependencies
|
|
|
|
rm asciidoctorpdf-$installed_asciidoctorpdf_version-done
|
|
|
|
|
|
|
|
##if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version,
|
|
|
|
# whatever it might happen to be called.
|
|
|
|
#
|
|
|
|
## rm -f asciidoctorpdf-$installed_asciidoctorpdf_version
|
|
|
|
##fi
|
|
|
|
installed_asciidoctorpdf_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-01-22 00:17:07 +00:00
|
|
|
install_cmake() {
|
2018-05-14 22:07:25 +00:00
|
|
|
if [ ! -f cmake-$CMAKE_VERSION-done ]; then
|
2015-01-22 02:09:30 +00:00
|
|
|
echo "Downloading and installing CMake:"
|
2015-06-24 02:08:14 +00:00
|
|
|
CMAKE_MAJOR_VERSION="`expr $CMAKE_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
CMAKE_MINOR_VERSION="`expr $CMAKE_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
CMAKE_MAJOR_MINOR_VERSION=$CMAKE_MAJOR_VERSION.$CMAKE_MINOR_VERSION
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
#
|
|
|
|
# NOTE: the "64" in "Darwin64" doesn't mean "64-bit-only"; the
|
|
|
|
# package in question supports both 32-bit and 64-bit x86.
|
|
|
|
#
|
2015-06-24 02:08:14 +00:00
|
|
|
case "$CMAKE_MAJOR_VERSION" in
|
|
|
|
|
2021-01-04 00:35:25 +00:00
|
|
|
0|1|2)
|
2015-06-24 02:08:14 +00:00
|
|
|
echo "CMake $CMAKE_VERSION" is too old 1>&2
|
|
|
|
;;
|
|
|
|
|
|
|
|
3)
|
|
|
|
#
|
|
|
|
# Download the DMG and do a drag install, where "drag" means
|
|
|
|
# "mv".
|
|
|
|
#
|
|
|
|
# 3.0.* and 3.1.0 have a Darwin64-universal DMG.
|
|
|
|
# 3.1.1 and later have a Darwin-x86_64 DMG.
|
2021-01-04 00:35:25 +00:00
|
|
|
# 3.19.2 and later have a macos-universal DMG.
|
2015-06-24 02:08:14 +00:00
|
|
|
# Probably not many people are still developing on 32-bit
|
|
|
|
# Macs, so we don't worry about them.
|
|
|
|
#
|
|
|
|
if [ "$CMAKE_MINOR_VERSION" = 0 -o \
|
|
|
|
"$CMAKE_VERSION" = 3.1.0 ]; then
|
|
|
|
type="Darwin64-universal"
|
2021-01-04 00:35:25 +00:00
|
|
|
elif [ "$CMAKE_MINOR_VERSION" -lt 19 -o \
|
|
|
|
"$CMAKE_VERSION" = 3.19.0 -o \
|
|
|
|
"$CMAKE_VERSION" = 3.19.1 ]; then
|
2015-06-24 02:08:14 +00:00
|
|
|
type="Darwin-x86_64"
|
2021-01-04 00:35:25 +00:00
|
|
|
else
|
|
|
|
type="macos-universal"
|
2015-06-24 02:08:14 +00:00
|
|
|
fi
|
2017-04-05 09:31:48 +00:00
|
|
|
[ -f cmake-$CMAKE_VERSION-$type.dmg ] || curl -L -O https://cmake.org/files/v$CMAKE_MAJOR_MINOR_VERSION/cmake-$CMAKE_VERSION-$type.dmg || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-06-24 02:08:14 +00:00
|
|
|
sudo hdiutil attach cmake-$CMAKE_VERSION-$type.dmg || exit 1
|
|
|
|
sudo ditto /Volumes/cmake-$CMAKE_VERSION-$type/CMake.app /Applications/CMake.app || exit 1
|
|
|
|
|
|
|
|
#
|
|
|
|
# Plant the appropriate symbolic links in /usr/local/bin.
|
|
|
|
# It's a drag-install, so there's no installer to make them,
|
|
|
|
# and the CMake code to put them in place is lame, as
|
|
|
|
#
|
|
|
|
# 1) it defaults to /usr/bin, not /usr/local/bin;
|
|
|
|
# 2) it doesn't request the necessary root privileges;
|
|
|
|
# 3) it can't be run from the command line;
|
|
|
|
#
|
|
|
|
# so we do it ourselves.
|
2015-10-11 21:35:47 +00:00
|
|
|
#
|
2015-06-24 02:08:14 +00:00
|
|
|
for i in ccmake cmake cmake-gui cmakexbuild cpack ctest
|
|
|
|
do
|
|
|
|
sudo ln -s /Applications/CMake.app/Contents/bin/$i /usr/local/bin/$i
|
|
|
|
done
|
|
|
|
sudo hdiutil detach /Volumes/cmake-$CMAKE_VERSION-$type
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2015-01-22 02:09:30 +00:00
|
|
|
touch cmake-$CMAKE_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_cmake() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_cmake_version" ]; then
|
|
|
|
echo "Uninstalling CMake:"
|
2015-06-24 02:08:14 +00:00
|
|
|
installed_cmake_major_version="`expr $installed_cmake_version : '\([0-9][0-9]*\).*'`"
|
|
|
|
case "$installed_cmake_major_version" in
|
|
|
|
|
2021-01-04 00:35:25 +00:00
|
|
|
0|1|2)
|
2015-06-24 02:08:14 +00:00
|
|
|
echo "CMake $installed_cmake_version" is too old 1>&2
|
|
|
|
;;
|
|
|
|
|
|
|
|
3)
|
|
|
|
sudo rm -rf /Applications/CMake.app
|
|
|
|
for i in ccmake cmake cmake-gui cmakexbuild cpack ctest
|
|
|
|
do
|
|
|
|
sudo rm -f /usr/local/bin/$i
|
|
|
|
done
|
|
|
|
rm cmake-$installed_cmake_version-done
|
|
|
|
;;
|
|
|
|
esac
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
2015-06-24 02:08:14 +00:00
|
|
|
# Get rid of the previously downloaded and unpacked version,
|
|
|
|
# whatever it might happen to be called.
|
2015-01-22 08:30:47 +00:00
|
|
|
#
|
|
|
|
rm -f cmake-$installed_cmake_version-Darwin64-universal.dmg
|
2015-06-24 02:08:14 +00:00
|
|
|
rm -f cmake-$installed_cmake_version-Darwin-x86_64.dmg
|
2021-01-04 00:35:25 +00:00
|
|
|
rm -f cmake-$installed_cmake_version-macos-universal.dmg
|
2015-01-22 08:30:47 +00:00
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_cmake_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_gettext() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -f gettext-$GETTEXT_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing GNU gettext:"
|
2017-04-05 09:31:48 +00:00
|
|
|
[ -f gettext-$GETTEXT_VERSION.tar.gz ] || curl -L -O http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.gz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
gzcat gettext-$GETTEXT_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd gettext-$GETTEXT_VERSION
|
|
|
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
2018-04-15 09:44:18 +00:00
|
|
|
touch gettext-$GETTEXT_VERSION-done
|
2015-01-22 02:09:30 +00:00
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_gettext() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_gettext_version" ] ; then
|
2015-01-22 04:15:05 +00:00
|
|
|
#
|
|
|
|
# GLib depends on this, so uninstall it.
|
|
|
|
#
|
2015-01-22 08:30:47 +00:00
|
|
|
uninstall_glib "$@"
|
2015-01-22 04:15:05 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
echo "Uninstalling GNU gettext:"
|
|
|
|
cd gettext-$installed_gettext_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm gettext-$installed_gettext_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf gettext-$installed_gettext_version
|
|
|
|
rm -rf gettext-$installed_gettext_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_gettext_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_pkg_config() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -f pkg-config-$PKG_CONFIG_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing pkg-config:"
|
2017-04-05 09:31:48 +00:00
|
|
|
[ -f pkg-config-$PKG_CONFIG_VERSION.tar.gz ] || curl -L -O https://pkgconfig.freedesktop.org/releases/pkg-config-$PKG_CONFIG_VERSION.tar.gz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
gzcat pkg-config-$PKG_CONFIG_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd pkg-config-$PKG_CONFIG_VERSION
|
|
|
|
./configure --with-internal-glib || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch pkg-config-$PKG_CONFIG_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_pkg_config() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_pkg_config_version" ] ; then
|
|
|
|
echo "Uninstalling pkg-config:"
|
|
|
|
cd pkg-config-$installed_pkg_config_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm pkg-config-$installed_pkg_config_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf pkg-config-$installed_pkg_config_version
|
|
|
|
rm -rf pkg-config-$installed_pkg_config_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_pkg_config_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_glib() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -f glib-$GLIB_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing GLib:"
|
|
|
|
glib_dir=`expr $GLIB_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
|
2018-04-10 04:58:26 +00:00
|
|
|
#
|
|
|
|
# Starting with GLib 2.28.8, xz-compressed tarballs are available.
|
|
|
|
#
|
|
|
|
[ -f glib-$GLIB_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/glib/$glib_dir/glib-$GLIB_VERSION.tar.xz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
xzcat glib-$GLIB_VERSION.tar.xz | tar xf - || exit 1
|
2015-01-22 02:09:30 +00:00
|
|
|
cd glib-$GLIB_VERSION
|
2015-01-22 00:17:07 +00:00
|
|
|
#
|
2017-04-05 17:50:53 +00:00
|
|
|
# macOS ships with libffi, but doesn't provide its pkg-config file;
|
2015-01-22 02:09:30 +00:00
|
|
|
# explicitly specify LIBFFI_CFLAGS and LIBFFI_LIBS, so the configure
|
|
|
|
# script doesn't try to use pkg-config to get the appropriate
|
|
|
|
# C flags and loader flags.
|
2015-01-22 00:17:07 +00:00
|
|
|
#
|
2015-01-22 02:09:30 +00:00
|
|
|
# And, what's worse, at least with the version of Xcode that comes
|
|
|
|
# with Leopard, /usr/include/ffi/fficonfig.h doesn't define MACOSX,
|
|
|
|
# which causes the build of GLib to fail. If we don't find
|
|
|
|
# "#define.*MACOSX" in /usr/include/ffi/fficonfig.h, explicitly
|
|
|
|
# define it.
|
|
|
|
#
|
|
|
|
# While we're at it, suppress -Wformat-nonliteral to avoid a case
|
|
|
|
# where clang's stricter rules on when not to complain about
|
|
|
|
# non-literal format arguments cause it to complain about code
|
|
|
|
# that's safe but it wasn't told that. See my comment #25 in
|
|
|
|
# GNOME bug 691608:
|
|
|
|
#
|
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=691608#c25
|
|
|
|
#
|
|
|
|
# First, determine where the system include files are. (It's not
|
|
|
|
# necessarily /usr/include.) There's a bit of a greasy hack here;
|
|
|
|
# pre-5.x versions of the developer tools don't support the
|
|
|
|
# --show-sdk-path option, and will produce no output, so includedir
|
|
|
|
# will be set to /usr/include (in those older versions of the
|
|
|
|
# developer tools, there is a /usr/include directory).
|
|
|
|
#
|
2020-12-16 22:09:22 +00:00
|
|
|
includedir=`SDKROOT="$SDKPATH" xcrun --show-sdk-path 2>/dev/null`/usr/include
|
2020-12-17 20:43:43 +00:00
|
|
|
if [ ! -f ./configure ]; then
|
|
|
|
LIBTOOLIZE=glibtoolize ./autogen.sh
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
fi
|
2015-01-22 02:09:30 +00:00
|
|
|
if grep -qs '#define.*MACOSX' $includedir/ffi/fficonfig.h
|
|
|
|
then
|
|
|
|
# It's defined, nothing to do
|
|
|
|
LIBFFI_CFLAGS="-I $includedir/ffi" LIBFFI_LIBS="-lffi" CFLAGS="$CFLAGS -Wno-format-nonliteral $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS -Wno-format-nonliteral $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
else
|
|
|
|
LIBFFI_CFLAGS="-I $includedir/ffi" LIBFFI_LIBS="-lffi" CFLAGS="$CFLAGS -DMACOSX -Wno-format-nonliteral $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS -DMACOSX -Wno-format-nonliteral $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch glib-$GLIB_VERSION-done
|
2015-01-22 00:17:07 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_glib() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_glib_version" ] ; then
|
|
|
|
echo "Uninstalling GLib:"
|
|
|
|
cd glib-$installed_glib_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
2020-12-19 22:21:15 +00:00
|
|
|
#
|
|
|
|
# This appears to delete dependencies out from under other
|
|
|
|
# Makefiles in the tree, causing it to fail. At least until
|
|
|
|
# that gets fixed, if it ever gets fixed, we just ignore the
|
|
|
|
# exit status of "make distclean"
|
|
|
|
#
|
|
|
|
# make distclean || exit 1
|
|
|
|
make distclean || echo "Ignoring make distclean failure" 1>&2
|
2015-01-22 02:09:30 +00:00
|
|
|
cd ..
|
|
|
|
rm glib-$installed_glib_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf glib-$installed_glib_version
|
2018-04-10 04:58:26 +00:00
|
|
|
rm -rf glib-$installed_glib_version.tar.xz
|
2015-01-22 08:30:47 +00:00
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_glib_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_qt() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$QT_VERSION" -a ! -f qt-$QT_VERSION-done ]; then
|
2019-10-13 02:38:49 +00:00
|
|
|
echo "Downloading and installing Qt:"
|
2015-01-22 02:09:30 +00:00
|
|
|
#
|
|
|
|
# What you get for this URL might just be a 302 Found reply, so use
|
|
|
|
# -L so we get redirected.
|
|
|
|
#
|
2018-05-15 03:25:10 +00:00
|
|
|
# 5.0 - 5.1: qt-mac-opensource-{version}-clang-offline.dmg
|
|
|
|
# 5.2.0: qt-mac-opensource-{version}.dmg
|
|
|
|
# 5.2.1: qt-opensource-mac-x64-clang-{version}.dmg
|
|
|
|
# 5.3 - 5.8: qt-opensource-mac-x64-clang-{version}.dmg
|
2021-01-08 13:12:23 +00:00
|
|
|
# 5.9 - 5.14: qt-opensource-mac-x64-{version}.dmg
|
2018-04-09 05:03:07 +00:00
|
|
|
#
|
2018-05-15 03:25:10 +00:00
|
|
|
case $QT_MAJOR_VERSION in
|
2015-04-17 06:18:57 +00:00
|
|
|
|
2018-05-15 03:25:10 +00:00
|
|
|
1|2|3|4)
|
|
|
|
echo "Qt $QT_VERSION" is too old 1>&2
|
|
|
|
;;
|
|
|
|
|
|
|
|
5*)
|
|
|
|
case $QT_MINOR_VERSION in
|
|
|
|
|
2021-01-08 13:12:23 +00:00
|
|
|
0|1|2)
|
2018-05-16 07:07:49 +00:00
|
|
|
echo "Qt $QT_VERSION" is too old 1>&2
|
2018-05-15 03:25:10 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
3|4|5|6|7|8)
|
|
|
|
QT_VOLUME=qt-opensource-mac-x64-clang-$QT_VERSION
|
|
|
|
;;
|
|
|
|
|
2021-01-08 13:12:23 +00:00
|
|
|
9|10|11|12|13|14)
|
2018-05-15 03:25:10 +00:00
|
|
|
QT_VOLUME=qt-opensource-mac-x64-$QT_VERSION
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
[ -f $QT_VOLUME.dmg ] || curl -L -O http://download.qt.io/archive/qt/$QT_MAJOR_MINOR_VERSION/$QT_MAJOR_MINOR_DOTDOT_VERSION/$QT_VOLUME.dmg || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
sudo hdiutil attach $QT_VOLUME.dmg || exit 1
|
|
|
|
|
|
|
|
#
|
|
|
|
# Run the installer executable directly, so that we wait for
|
|
|
|
# it to finish. Then unmount the volume.
|
|
|
|
#
|
|
|
|
/Volumes/$QT_VOLUME/$QT_VOLUME.app/Contents/MacOS/$QT_VOLUME
|
|
|
|
sudo hdiutil detach /Volumes/$QT_VOLUME
|
|
|
|
touch qt-$QT_VERSION-done
|
|
|
|
esac
|
2015-01-22 02:09:30 +00:00
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_qt() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_qt_version" ] ; then
|
|
|
|
echo "Uninstalling Qt:"
|
2015-04-17 06:18:57 +00:00
|
|
|
rm -rf $HOME/Qt$installed_qt_version
|
2015-01-22 02:09:30 +00:00
|
|
|
rm qt-$installed_qt_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
2015-04-17 06:18:57 +00:00
|
|
|
# Get rid of the previously downloaded version.
|
2015-01-22 08:30:47 +00:00
|
|
|
#
|
2018-05-15 03:25:10 +00:00
|
|
|
# 5.0 - 5.1: qt-mac-opensource-{version}-clang-offline.dmg
|
|
|
|
# 5.2.0: qt-mac-opensource-{version}.dmg
|
|
|
|
# 5.2.1: qt-opensource-mac-x64-clang-{version}.dmg
|
|
|
|
# 5.3 - 5.8: qt-opensource-mac-x64-clang-{version}.dmg
|
2021-01-08 13:12:23 +00:00
|
|
|
# 5.9 - 5.14: qt-opensource-mac-x64-{version}.dmg
|
2018-05-15 03:25:10 +00:00
|
|
|
#
|
|
|
|
installed_qt_major_version="`expr $installed_qt_version : '\([0-9][0-9]*\).*'`"
|
|
|
|
installed_qt_minor_version="`expr $installed_qt_version : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
installed_qt_dotdot_version="`expr $installed_qt_version : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
case $installed_qt_major_version in
|
|
|
|
|
|
|
|
1|2|3|4)
|
|
|
|
echo "Qt $installed_qt_version" is too old 1>&2
|
|
|
|
;;
|
|
|
|
|
|
|
|
5*)
|
|
|
|
case $installed_qt_minor_version in
|
|
|
|
|
|
|
|
0|1)
|
2021-01-08 13:12:23 +00:00
|
|
|
echo "Qt $installed_qt_version" is too old 1>&2
|
2018-05-15 03:25:10 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
2)
|
|
|
|
case $installed_qt_dotdot_version in
|
|
|
|
|
|
|
|
0)
|
|
|
|
installed_qt_volume=qt-mac-opensource-$installed_qt_version.dmg
|
|
|
|
;;
|
|
|
|
|
|
|
|
1)
|
|
|
|
installed_qt_volume=qt-opensource-mac-x64-clang-$installed_qt_version.dmg
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
|
|
|
|
3|4|5|6|7|8)
|
|
|
|
installed_qt_volume=qt-opensource-mac-x64-clang-$installed_qt_version.dmg
|
|
|
|
;;
|
|
|
|
|
|
|
|
9|10)
|
|
|
|
installed_qt_volume=qt-opensource-mac-x64-$installed_qt_version.dmg
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
rm -f $installed_qt_volume
|
2015-01-22 08:30:47 +00:00
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_qt_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_libsmi() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$LIBSMI_VERSION" -a ! -f libsmi-$LIBSMI_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing libsmi:"
|
|
|
|
[ -f libsmi-$LIBSMI_VERSION.tar.gz ] || curl -L -O https://www.ibr.cs.tu-bs.de/projects/libsmi/download/libsmi-$LIBSMI_VERSION.tar.gz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
gzcat libsmi-$LIBSMI_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd libsmi-$LIBSMI_VERSION
|
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libsmi-$LIBSMI_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libsmi() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_libsmi_version" ] ; then
|
|
|
|
echo "Uninstalling libsmi:"
|
|
|
|
cd libsmi-$installed_libsmi_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm libsmi-$installed_libsmi_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf libsmi-$installed_libsmi_version
|
|
|
|
rm -rf libsmi-$installed_libsmi_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_libsmi_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_libgpg_error() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$LIBGPG_ERROR_VERSION" -a ! -f libgpg-error-$LIBGPG_ERROR_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing libgpg-error:"
|
2018-09-21 04:43:10 +00:00
|
|
|
[ -f libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 ] || curl -L -O https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
bzcat libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
cd libgpg-error-$LIBGPG_ERROR_VERSION
|
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libgpg-error-$LIBGPG_ERROR_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libgpg_error() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_libgpg_error_version" ] ; then
|
2015-01-22 04:15:05 +00:00
|
|
|
#
|
|
|
|
# libgcrypt depends on this, so uninstall it.
|
|
|
|
#
|
2015-01-22 08:30:47 +00:00
|
|
|
uninstall_libgcrypt "$@"
|
2015-01-22 04:15:05 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
echo "Uninstalling libgpg-error:"
|
|
|
|
cd libgpg-error-$installed_libgpg_error_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm libgpg-error-$installed_libgpg_error_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf libgpg-error-$installed_libgpg_error_version
|
|
|
|
rm -rf libgpg-error-$installed_libgpg_error_version.tar.bz2
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_libgpg_error_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_libgcrypt() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$LIBGCRYPT_VERSION" -a ! -f libgcrypt-$LIBGCRYPT_VERSION-done ] ; then
|
|
|
|
#
|
|
|
|
# libgpg-error is required for libgcrypt.
|
|
|
|
#
|
|
|
|
if [ -z $LIBGPG_ERROR_VERSION ]
|
|
|
|
then
|
|
|
|
echo "libgcrypt requires libgpg-error, but you didn't install libgpg-error." 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
echo "Downloading, building, and installing libgcrypt:"
|
2018-09-21 04:43:10 +00:00
|
|
|
[ -f libgcrypt-$LIBGCRYPT_VERSION.tar.gz ] || curl -L -O https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-$LIBGCRYPT_VERSION.tar.gz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
gzcat libgcrypt-$LIBGCRYPT_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd libgcrypt-$LIBGCRYPT_VERSION
|
|
|
|
#
|
2017-04-05 17:50:53 +00:00
|
|
|
# The assembler language code is not compatible with the macOS
|
2015-01-22 02:09:30 +00:00
|
|
|
# x86 assembler (or is it an x86-64 vs. x86-32 issue?).
|
|
|
|
#
|
|
|
|
# libgcrypt expects gnu89, not c99/gnu99, semantics for
|
|
|
|
# "inline". See, for example:
|
|
|
|
#
|
|
|
|
# http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2010-October/198809.html
|
|
|
|
#
|
2019-02-22 19:15:58 +00:00
|
|
|
CFLAGS="$CFLAGS -std=gnu89 $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-asm || exit 1
|
2015-01-22 02:09:30 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libgcrypt-$LIBGCRYPT_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libgcrypt() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_libgcrypt_version" ] ; then
|
|
|
|
echo "Uninstalling libgcrypt:"
|
|
|
|
cd libgcrypt-$installed_libgcrypt_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm libgcrypt-$installed_libgcrypt_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf libgcrypt-$installed_libgcrypt_version
|
|
|
|
rm -rf libgcrypt-$installed_libgcrypt_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_libgcrypt_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
install_gmp() {
|
|
|
|
if [ "$GMP_VERSION" -a ! -f gmp-$GMP_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing GMP:"
|
2017-06-22 06:10:46 +00:00
|
|
|
[ -f gmp-$GMP_VERSION.tar.lz ] || curl -L -O https://gmplib.org/download/gmp/gmp-$GMP_VERSION.tar.lz || exit 1
|
2017-06-16 07:19:53 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
lzip -c -d gmp-$GMP_VERSION.tar.lz | tar xf - || exit 1
|
|
|
|
cd gmp-$GMP_VERSION
|
2019-02-25 22:40:54 +00:00
|
|
|
# Create a fat binary: https://gmplib.org/manual/Notes-for-Package-Builds.html
|
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --enable-fat || exit 1
|
2017-06-16 07:19:53 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch gmp-$GMP_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_gmp() {
|
|
|
|
if [ ! -z "$installed_gmp_version" ] ; then
|
|
|
|
#
|
|
|
|
# Nettle depends on this, so uninstall it.
|
|
|
|
#
|
|
|
|
uninstall_nettle "$@"
|
|
|
|
|
|
|
|
echo "Uninstalling GMP:"
|
|
|
|
cd gmp-$installed_gmp_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm gmp-$installed_gmp_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf gmp-$installed_gmp_version
|
|
|
|
rm -rf gmp-$installed_gmp_version.tar.lz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_gmp_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-11-26 06:10:34 +00:00
|
|
|
install_libtasn1() {
|
|
|
|
if [ "$LIBTASN1_VERSION" -a ! -f libtasn1-$LIBTASN1_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing libtasn1:"
|
|
|
|
[ -f libtasn1-$LIBTASN1_VERSION.tar.gz ] || curl -L -O https://ftpmirror.gnu.org/libtasn1/libtasn1-$LIBTASN1_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat libtasn1-$LIBTASN1_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd libtasn1-$LIBTASN1_VERSION
|
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libtasn1-$LIBTASN1_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libtasn1() {
|
|
|
|
if [ ! -z "$installed_libtasn1_version" ] ; then
|
|
|
|
#
|
|
|
|
# p11-kit depends on this, so uninstall it.
|
|
|
|
#
|
|
|
|
uninstall_p11_kit "$@"
|
|
|
|
|
|
|
|
echo "Uninstalling libtasn1:"
|
2020-12-16 19:54:53 +00:00
|
|
|
cd libtasn1-$installed_libtasn1_version
|
2020-11-26 06:10:34 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm libtasn1-$installed_libtasn1_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf libtasn1-$installed_libtasn1_version
|
|
|
|
rm -rf libtasn1-$installed_libtasn1_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_libtasn1_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_p11_kit() {
|
|
|
|
if [ "$P11KIT_VERSION" -a ! -f p11-kit-$P11KIT_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing p11-kit:"
|
|
|
|
[ -f p11-kit-$P11KIT_VERSION.tar.xz ] || curl -L -O https://github.com/p11-glue/p11-kit/releases/download/$P11KIT_VERSION/p11-kit-$P11KIT_VERSION.tar.xz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
xzcat p11-kit-$P11KIT_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd p11-kit-$P11KIT_VERSION
|
2020-12-17 21:21:38 +00:00
|
|
|
#
|
|
|
|
# Prior to Catalina, the libffi that's supplied with macOS
|
|
|
|
# doesn't support ffi_closure_alloc() or ffi_prep_closure_loc(),
|
|
|
|
# both of which are required by p11-kit if built with libffi.
|
|
|
|
#
|
|
|
|
# According to
|
|
|
|
#
|
|
|
|
# https://p11-glue.github.io/p11-glue/p11-kit/manual/devel-building.html
|
|
|
|
#
|
|
|
|
# libffi is used "for sharing of PKCS#11 modules between
|
|
|
|
# multiple callers in the same process. It is highly recommended
|
|
|
|
# that this dependency be treated as a required dependency.",
|
|
|
|
# but it's not clear that this matters to us, so we just
|
|
|
|
# configure p11-kit not to use libffi.
|
|
|
|
#
|
|
|
|
CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --without-libffi --without-trust-paths || exit 1
|
2020-11-26 06:10:34 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch p11-kit-$P11KIT_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_p11_kit() {
|
|
|
|
if [ ! -z "$installed_p11_kit_version" ] ; then
|
|
|
|
#
|
|
|
|
# Nettle depends on this, so uninstall it.
|
|
|
|
#
|
|
|
|
uninstall_nettle "$@"
|
|
|
|
|
|
|
|
echo "Uninstalling p11-kit:"
|
|
|
|
cd p11-kit-$installed_p11_kit_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm p11-kit-$installed_p11_kit_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf p11-kit-$installed_p11_kit_version
|
|
|
|
rm -rf p11-kit-$installed_p11_kit_version.tar.xz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_p11_kit_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
install_nettle() {
|
|
|
|
if [ "$NETTLE_VERSION" -a ! -f nettle-$NETTLE_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing Nettle:"
|
|
|
|
[ -f nettle-$NETTLE_VERSION.tar.gz ] || curl -L -O https://ftp.gnu.org/gnu/nettle/nettle-$NETTLE_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat nettle-$NETTLE_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd nettle-$NETTLE_VERSION
|
2020-11-26 06:10:34 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2017-06-16 07:19:53 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch nettle-$NETTLE_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_nettle() {
|
|
|
|
if [ ! -z "$installed_nettle_version" ] ; then
|
|
|
|
#
|
|
|
|
# GnuTLS depends on this, so uninstall it.
|
|
|
|
#
|
|
|
|
uninstall_gnutls "$@"
|
|
|
|
|
|
|
|
echo "Uninstalling Nettle:"
|
|
|
|
cd nettle-$installed_nettle_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm nettle-$installed_nettle_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf nettle-$installed_nettle_version
|
|
|
|
rm -rf nettle-$installed_nettle_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_nettle_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-01-22 00:17:07 +00:00
|
|
|
install_gnutls() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$GNUTLS_VERSION" -a ! -f gnutls-$GNUTLS_VERSION-done ] ; then
|
|
|
|
#
|
2017-06-16 07:19:53 +00:00
|
|
|
# GnuTLS requires Nettle.
|
2015-01-22 02:09:30 +00:00
|
|
|
#
|
2017-06-16 07:19:53 +00:00
|
|
|
if [ -z $NETTLE_VERSION ]
|
2015-01-22 02:09:30 +00:00
|
|
|
then
|
2017-06-16 07:19:53 +00:00
|
|
|
echo "GnuTLS requires Nettle, but you didn't install Nettle" 1>&2
|
2015-01-22 02:09:30 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
echo "Downloading, building, and installing GnuTLS:"
|
2017-06-16 07:19:53 +00:00
|
|
|
if [[ $GNUTLS_MAJOR_VERSION -ge 3 ]]
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# Starting with GnuTLS 3.x, the tarballs are compressed with
|
|
|
|
# xz rather than bzip2.
|
|
|
|
#
|
|
|
|
[ -f gnutls-$GNUTLS_VERSION.tar.xz ] || curl -L -O https://www.gnupg.org/ftp/gcrypt/gnutls/v$GNUTLS_MAJOR_VERSION.$GNUTLS_MINOR_VERSION/gnutls-$GNUTLS_VERSION.tar.xz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
xzcat gnutls-$GNUTLS_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
else
|
|
|
|
[ -f gnutls-$GNUTLS_VERSION.tar.bz2 ] || curl -L -O https://www.gnupg.org/ftp/gcrypt/gnutls/v$GNUTLS_MAJOR_VERSION.$GNUTLS_MINOR_VERSION/gnutls-$GNUTLS_VERSION.tar.bz2 || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
bzcat gnutls-$GNUTLS_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
fi
|
2015-01-22 02:09:30 +00:00
|
|
|
cd gnutls-$GNUTLS_VERSION
|
2020-11-26 06:10:34 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --with-included-unistring --disable-guile || exit 1
|
2015-01-22 02:09:30 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch gnutls-$GNUTLS_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_gnutls() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_gnutls_version" ] ; then
|
|
|
|
echo "Uninstalling GnuTLS:"
|
|
|
|
cd gnutls-$installed_gnutls_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm gnutls-$installed_gnutls_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf gnutls-$installed_gnutls_version
|
|
|
|
rm -rf gnutls-$installed_gnutls_version.tar.bz2
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_gnutls_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_lua() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$LUA_VERSION" -a ! -f lua-$LUA_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing Lua:"
|
|
|
|
[ -f lua-$LUA_VERSION.tar.gz ] || curl -L -O http://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
gzcat lua-$LUA_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd lua-$LUA_VERSION
|
2015-10-14 05:19:27 +00:00
|
|
|
make MYCFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" MYLDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" $MAKE_BUILD_OPTS macosx || exit 1
|
2015-01-22 02:09:30 +00:00
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch lua-$LUA_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_lua() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_lua_version" ] ; then
|
|
|
|
echo "Uninstalling Lua:"
|
|
|
|
#
|
|
|
|
# Lua has no "make uninstall", so just remove stuff manually.
|
|
|
|
# There's no configure script, so there's no need for
|
|
|
|
# "make distclean", either; just do "make clean".
|
|
|
|
#
|
|
|
|
(cd /usr/local/bin; $DO_RM -f lua luac)
|
|
|
|
(cd /usr/local/include; $DO_RM -f lua.h luaconf.h lualib.h lauxlib.h lua.hpp)
|
|
|
|
(cd /usr/local/lib; $DO_RM -f liblua.a)
|
|
|
|
(cd /usr/local/man/man1; $DO_RM -f lua.1 luac.1)
|
|
|
|
cd lua-$installed_lua_version
|
|
|
|
make clean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm lua-$installed_lua_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf lua-$installed_lua_version
|
|
|
|
rm -rf lua-$installed_lua_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_lua_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
2017-06-16 07:37:58 +00:00
|
|
|
install_snappy() {
|
|
|
|
if [ "$SNAPPY_VERSION" -a ! -f snappy-$SNAPPY_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing snappy:"
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
[ -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
|
2017-06-16 07:37:58 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat snappy-$SNAPPY_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd snappy-$SNAPPY_VERSION
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
mkdir build_dir
|
|
|
|
cd build_dir
|
macos-setup: build snappy as a shared library.
The older versions of snappy apparently used autotools and build a
shared library by default; for example, Wireshark 3.2.6 for macOS is
built with snappy, and includes a snappy dynamic library in the app
bundle.
The current version uses CMake and does *not* build a shared library by
default. Instead, it builds a static library, which, when you try to
link it to a C-only shared library...
...does not work.
The linker sees that you're statically linking in a bunch of C++ .o
files and gets upset because it can't find C++ standard library routines
used by that code.
If it's a dynamic library, the library was itself already linked with
the C++ standard library, so the external references to that library
from the snappy library are already marked as having been resolved to
the extent that they're expected to be in the C++ standard library at
run time - and, when the dynamic snappy library is built, it's marked as
depending on the C++ standard library, so the run time linker will, when
it loads the snappy dynamic library, see that the C++ standard library
is required and will load it if it hasn't already been loaded.
2020-12-13 05:30:51 +00:00
|
|
|
#
|
|
|
|
# Build a shared library, because we'll be linking libwireshark,
|
|
|
|
# which is a C library, with libsnappy, and libsnappy is a C++
|
|
|
|
# library and requires the C++ run time; the shared library
|
|
|
|
# will carry that dependency with it, so linking with it should
|
|
|
|
# Just Work.
|
|
|
|
#
|
|
|
|
MACOSX_DEPLOYMENT_TARGET=$min_osx_target SDKROOT="$SDKPATH" cmake -DBUILD_SHARED_LIBS=YES ../ || exit 1
|
2017-06-16 07:37:58 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
cd ../..
|
2017-06-16 07:37:58 +00:00
|
|
|
touch snappy-$SNAPPY_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_snappy() {
|
|
|
|
if [ ! -z "$installed_snappy_version" ] ; then
|
|
|
|
echo "Uninstalling snappy:"
|
|
|
|
cd snappy-$installed_snappy_version
|
2020-12-12 23:51:10 +00:00
|
|
|
#
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
# snappy uses cmake and doesn't support "make uninstall";
|
|
|
|
# just remove what we know it installs.
|
2020-12-12 23:51:10 +00:00
|
|
|
#
|
|
|
|
# $DO_MAKE_UNINSTALL || exit 1
|
2020-12-13 07:47:27 +00:00
|
|
|
$DO_RM -f /usr/local/lib/libsnappy.1.1.8.dylib \
|
|
|
|
/usr/local/lib/libsnappy.1.dylib \
|
|
|
|
/usr/local/lib/libsnappy.dylib \
|
|
|
|
/usr/local/include/snappy-c.h \
|
|
|
|
/usr/local/include/snappy-sinksource.h \
|
|
|
|
/usr/local/include/snappy-stubs-public.h \
|
|
|
|
/usr/local/include/snappy.h \
|
|
|
|
/usr/local/lib/cmake/Snappy/SnappyConfig.cmake \
|
|
|
|
/usr/local/lib/cmake/Snappy/SnappyConfigVersion.cmake \
|
|
|
|
/usr/local/lib/cmake/Snappy/SnappyTargets-noconfig.cmake \
|
|
|
|
/usr/local/lib/cmake/Snappy/SnappyTargets.cmake || exit 1
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
#
|
|
|
|
# snappy uses cmake and doesn't support "make distclean";
|
|
|
|
#.just remove the entire build directory.
|
|
|
|
#
|
|
|
|
# make distclean || exit 1
|
|
|
|
rm -rf build_dir || exit 1
|
2017-06-16 07:37:58 +00:00
|
|
|
cd ..
|
|
|
|
rm snappy-$installed_snappy_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf snappy-$installed_snappy_version
|
|
|
|
rm -rf snappy-$installed_snappy_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_snappy_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-08-12 21:57:45 +00:00
|
|
|
install_zstd() {
|
|
|
|
if [ "$ZSTD_VERSION" -a ! -f zstd-$ZSTD_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing zstd:"
|
|
|
|
[ -f zstd-$ZSTD_VERSION.tar.gz ] || curl -L -O https://github.com/facebook/zstd/releases/download/v$ZSTD_VERSION/zstd-$ZSTD_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat zstd-$ZSTD_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd zstd-$ZSTD_VERSION
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch zstd-$ZSTD_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_zstd() {
|
|
|
|
if [ ! -z "$installed_zstd_version" ] ; then
|
|
|
|
echo "Uninstalling zstd:"
|
|
|
|
cd zstd-$installed_zstd_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
2020-12-19 07:19:12 +00:00
|
|
|
#
|
|
|
|
# zstd has no configure script, so there's no need for
|
|
|
|
# "make distclean", and the Makefile supplied with it
|
|
|
|
# has no "make distclean" rule; just do "make clean".
|
|
|
|
#
|
|
|
|
make clean || exit 1
|
2019-08-12 21:57:45 +00:00
|
|
|
cd ..
|
|
|
|
rm zstd-$installed_zstd_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf zstd-$installed_zstd_version
|
|
|
|
rm -rf zstd-$installed_zstd_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_zstd_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-06-16 07:37:58 +00:00
|
|
|
install_libxml2() {
|
|
|
|
if [ "$LIBXML2_VERSION" -a ! -f libxml2-$LIBXML2_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing libxml2:"
|
|
|
|
[ -f libxml2-$LIBXML2_VERSION.tar.gz ] || curl -L -O ftp://xmlsoft.org/libxml2/libxml2-$LIBXML2_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat libxml2-$LIBXML2_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd libxml2-$LIBXML2_VERSION
|
2019-02-22 20:36:04 +00:00
|
|
|
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
|
2017-06-16 07:37:58 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libxml2-$LIBXML2_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libxml2() {
|
|
|
|
if [ ! -z "$installed_libxml2_version" ] ; then
|
|
|
|
echo "Uninstalling libxml2:"
|
|
|
|
cd libxml2-$installed_libxml2_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm libxml2-$installed_libxml2_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf libxml2-$installed_libxml2_version
|
|
|
|
rm -rf libxml2-$installed_libxml2_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_libxml2_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_lz4() {
|
|
|
|
if [ "$LZ4_VERSION" -a ! -f lz4-$LZ4_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing lz4:"
|
2017-08-09 03:33:33 +00:00
|
|
|
#
|
|
|
|
# lz4 switched from sequentially numbered releases, named rN,
|
|
|
|
# to vX.Y.Z-numbered releases.
|
|
|
|
#
|
|
|
|
# The old sequentially-numbered releases were in tarballs
|
|
|
|
# at https://github.com/lz4/lz4/archive/rN.tar.gz, which
|
|
|
|
# extract into an lz4-rN directory.
|
|
|
|
#
|
|
|
|
# THe new vX.Y.Z-numbered releases are in tarballs at
|
|
|
|
# https://github.com/lz4/lz4/archive/vX.Y.Z.tar.gz, which
|
|
|
|
# extract into an lz4-X.Y.Z directory - no, not lz4-vX.Y.Z,
|
|
|
|
# just lz4-X.Y.Z.
|
|
|
|
#
|
|
|
|
# We expect LZ4_VERSION to be set to rN for the sequentially-
|
|
|
|
# numbered releases and X.Y.Z - not vX.Y.Z - for the vX.Y.Z-
|
|
|
|
# numbered releases. We also tell Curl to download the tarball
|
|
|
|
# with a name that corresponds to the name of the target
|
|
|
|
# directory, so that it begins with "lz4-" and ends with either
|
|
|
|
# "rN" or "X.Y.Z", to match what almost all of the other
|
|
|
|
# support libraries do.
|
|
|
|
#
|
|
|
|
if [[ "$LZ4_VERSION" == r* ]]
|
|
|
|
then
|
|
|
|
[ -f lz4-$LZ4_VERSION.tar.gz ] || curl -L -o lz4-$LZ4_VERSION.tar.gz https://github.com/lz4/lz4/archive/$LZ4_VERSION.tar.gz || exit 1
|
|
|
|
else
|
|
|
|
[ -f lz4-$LZ4_VERSION.tar.gz ] || curl -L -o lz4-$LZ4_VERSION.tar.gz https://github.com/lz4/lz4/archive/v$LZ4_VERSION.tar.gz || exit 1
|
|
|
|
fi
|
2017-06-16 07:37:58 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat lz4-$LZ4_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd lz4-$LZ4_VERSION
|
2019-02-23 19:21:06 +00:00
|
|
|
#
|
|
|
|
# No configure script here, but it appears that if MOREFLAGS is
|
|
|
|
# set, that's added to CFLAGS, and those are combined with LDFLAGS
|
|
|
|
# and CXXFLAGS into FLAGS, which is used when building source
|
|
|
|
# files and libraries.
|
|
|
|
#
|
|
|
|
MOREFLAGS="-D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" make $MAKE_BUILD_OPTS || exit 1
|
2017-06-16 07:37:58 +00:00
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch lz4-$LZ4_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_lz4() {
|
|
|
|
if [ ! -z "$installed_lz4_version" ] ; then
|
|
|
|
echo "Uninstalling lz4:"
|
|
|
|
cd lz4-$installed_lz4_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
2017-06-26 21:46:47 +00:00
|
|
|
#
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
# lz4's Makefile doesn't support "make distclean"; just do
|
|
|
|
# "make clean". Perhaps not using autotools means that
|
|
|
|
# there's no need for "make distclean".
|
2017-06-26 21:46:47 +00:00
|
|
|
#
|
|
|
|
# make distclean || exit 1
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
make clean || exit 1
|
2017-06-16 07:37:58 +00:00
|
|
|
cd ..
|
|
|
|
rm lz4-$installed_lz4_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
2017-08-07 19:13:56 +00:00
|
|
|
# "make install" apparently causes some stuff to be
|
|
|
|
# modified in the build tree, so, as it's done as
|
|
|
|
# root, that leaves stuff owned by root in the build
|
|
|
|
# tree. Therefore, we have to remove the build tree
|
|
|
|
# as root.
|
|
|
|
#
|
|
|
|
sudo rm -rf lz4-$installed_lz4_version
|
2017-06-16 07:37:58 +00:00
|
|
|
rm -rf lz4-$installed_lz4_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_lz4_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_sbc() {
|
|
|
|
if [ "$SBC_VERSION" -a ! -f sbc-$SBC_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing sbc:"
|
|
|
|
[ -f sbc-$SBC_VERSION.tar.gz ] || curl -L -O https://www.kernel.org/pub/linux/bluetooth/sbc-$SBC_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat sbc-$SBC_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd sbc-$SBC_VERSION
|
2019-02-22 20:36:04 +00:00
|
|
|
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 --disable-tools --disable-tester --disable-shared || exit 1
|
2017-06-16 07:37:58 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch sbc-$SBC_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_sbc() {
|
|
|
|
if [ ! -z "$installed_sbc_version" ] ; then
|
|
|
|
echo "Uninstalling sbc:"
|
|
|
|
cd sbc-$installed_sbc_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm sbc-$installed_sbc_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf sbc-$installed_sbc_version
|
|
|
|
rm -rf sbc-$installed_sbc_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_sbc_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-02-09 01:20:26 +00:00
|
|
|
install_maxminddb() {
|
|
|
|
if [ "$MAXMINDDB_VERSION" -a ! -f maxminddb-$MAXMINDDB_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing MaxMindDB API:"
|
|
|
|
[ -f libmaxminddb-$MAXMINDDB_VERSION.tar.gz ] || curl -L -O https://github.com/maxmind/libmaxminddb/releases/download/$MAXMINDDB_VERSION/libmaxminddb-$MAXMINDDB_VERSION.tar.gz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2018-02-09 01:20:26 +00:00
|
|
|
gzcat libmaxminddb-$MAXMINDDB_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd libmaxminddb-$MAXMINDDB_VERSION
|
2015-01-22 02:09:30 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
2018-02-09 01:20:26 +00:00
|
|
|
touch maxminddb-$MAXMINDDB_VERSION-done
|
2015-01-22 02:09:30 +00:00
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
2018-02-09 01:20:26 +00:00
|
|
|
uninstall_maxminddb() {
|
|
|
|
if [ ! -z "$installed_maxminddb_version" ] ; then
|
|
|
|
echo "Uninstalling MaxMindDB API:"
|
|
|
|
cd libmaxminddb-$installed_maxminddb_version
|
2015-01-22 02:09:30 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2018-02-09 01:20:26 +00:00
|
|
|
rm maxminddb-$installed_maxminddb_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
2018-02-09 01:20:26 +00:00
|
|
|
rm -rf libmaxminddb-$installed_maxminddb_version
|
|
|
|
rm -rf libmaxminddb-$installed_maxminddb_version.tar.gz
|
2015-01-22 08:30:47 +00:00
|
|
|
fi
|
|
|
|
|
2018-02-09 01:20:26 +00:00
|
|
|
installed_maxminddb_version=""
|
2015-01-22 02:09:30 +00:00
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
install_c_ares() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ "$CARES_VERSION" -a ! -f c-ares-$CARES_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing C-Ares API:"
|
2016-09-29 15:33:24 +00:00
|
|
|
[ -f c-ares-$CARES_VERSION.tar.gz ] || curl -L -O https://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2015-01-22 02:09:30 +00:00
|
|
|
gzcat c-ares-$CARES_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd c-ares-$CARES_VERSION
|
2019-02-22 19:59:10 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2015-01-22 02:09:30 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch c-ares-$CARES_VERSION-done
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_c_ares() {
|
2015-01-22 02:09:30 +00:00
|
|
|
if [ ! -z "$installed_cares_version" ] ; then
|
|
|
|
echo "Uninstalling C-Ares API:"
|
|
|
|
cd c-ares-$installed_cares_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm c-ares-$installed_cares_version-done
|
2015-01-22 08:30:47 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf c-ares-$installed_cares_version
|
|
|
|
rm -rf c-ares-$installed_cares_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_cares_version=""
|
|
|
|
fi
|
2015-01-22 00:17:07 +00:00
|
|
|
}
|
|
|
|
|
2016-02-13 10:21:54 +00:00
|
|
|
install_libssh() {
|
|
|
|
if [ "$LIBSSH_VERSION" -a ! -f libssh-$LIBSSH_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing libssh:"
|
2018-09-21 05:20:48 +00:00
|
|
|
LIBSSH_MAJOR_VERSION="`expr $LIBSSH_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
LIBSSH_MINOR_VERSION="`expr $LIBSSH_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
LIBSSH_MAJOR_MINOR_VERSION=$LIBSSH_MAJOR_VERSION.$LIBSSH_MINOR_VERSION
|
|
|
|
[ -f libssh-$LIBSSH_VERSION.tar.xz ] || curl -L -O https://www.libssh.org/files/$LIBSSH_MAJOR_MINOR_VERSION/libssh-$LIBSSH_VERSION.tar.xz
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2016-02-13 10:21:54 +00:00
|
|
|
xzcat libssh-$LIBSSH_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd libssh-$LIBSSH_VERSION
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2019-02-23 19:21:06 +00:00
|
|
|
MACOSX_DEPLOYMENT_TARGET=$min_osx_target SDKROOT="$SDKPATH" cmake -DWITH_GCRYPT=1 ../ || exit 1
|
2016-02-13 10:21:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ../..
|
|
|
|
touch libssh-$LIBSSH_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libssh() {
|
|
|
|
if [ ! -z "$installed_libssh_version" ] ; then
|
2017-08-07 19:13:56 +00:00
|
|
|
echo "Uninstalling libssh:"
|
|
|
|
cd libssh-$installed_libssh_version
|
|
|
|
#
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
# libssh uses cmake and doesn't support "make uninstall";
|
|
|
|
# just remove what we know it installs.
|
2017-08-07 19:13:56 +00:00
|
|
|
#
|
|
|
|
# $DO_MAKE_UNINSTALL || exit 1
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
$DO_RM -rf /usr/local/lib/libssh* \
|
|
|
|
/usr/local/include/libssh \
|
|
|
|
/usr/local/lib/pkgconfig/libssh* \
|
|
|
|
/usr/local/lib/cmake/libssh || exit 1
|
2017-08-07 19:13:56 +00:00
|
|
|
#
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
# libssh uses cmake and doesn't support "make distclean";
|
|
|
|
# just remove the entire build directory.
|
2017-08-07 19:13:56 +00:00
|
|
|
#
|
|
|
|
# make distclean || exit 1
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
rm -rf build || exit 1
|
2017-08-07 19:13:56 +00:00
|
|
|
cd ..
|
|
|
|
rm libssh-$installed_libssh_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf libssh-$installed_libssh_version
|
|
|
|
rm -rf libssh-$installed_libssh_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_libssh_version=""
|
2016-02-13 10:21:54 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2016-08-26 13:18:29 +00:00
|
|
|
install_nghttp2() {
|
|
|
|
if [ "$NGHTTP2_VERSION" -a ! -f nghttp2-$NGHTTP2_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing nghttp2:"
|
|
|
|
[ -f nghttp2-$NGHTTP2_VERSION.tar.xz ] || curl -L -O https://github.com/nghttp2/nghttp2/releases/download/v$NGHTTP2_VERSION/nghttp2-$NGHTTP2_VERSION.tar.xz || exit 1
|
2017-04-19 15:40:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2016-08-26 13:18:29 +00:00
|
|
|
xzcat nghttp2-$NGHTTP2_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd nghttp2-$NGHTTP2_VERSION
|
2019-02-22 20:25:46 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2016-08-26 13:18:29 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch nghttp2-$NGHTTP2_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_nghttp2() {
|
|
|
|
if [ ! -z "$installed_nghttp2_version" ] ; then
|
|
|
|
echo "Uninstalling nghttp2:"
|
|
|
|
cd nghttp2-$installed_nghttp2_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm nghttp2-$installed_nghttp2_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf nghttp2-$installed_nghttp2_version
|
|
|
|
rm -rf nghttp2-$installed_nghttp2_version.tar.xz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_nghttp2_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-08-01 23:36:01 +00:00
|
|
|
install_libtiff() {
|
|
|
|
if [ "$LIBTIFF_VERSION" -a ! -f tiff-$LIBTIFF_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing libtiff:"
|
|
|
|
[ -f libtiff-$LIBTIFF_VERSION.tar.gz ] || curl -L -O http://dl.maptools.org/dl/libtiff/tiff-$LIBTIFF_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat tiff-$LIBTIFF_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd tiff-$LIBTIFF_VERSION
|
2019-02-22 20:25:46 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2017-08-01 23:36:01 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch tiff-$LIBTIFF_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_libtiff() {
|
|
|
|
if [ ! -z "$installed_libtiff_version" ] ; then
|
|
|
|
echo "Uninstalling libtiff:"
|
|
|
|
cd tiff-$installed_libtiff_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm tiff-$installed_libtiff_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf tiff-$installed_libtiff_version
|
|
|
|
rm -rf tiff-$installed_libtiff_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_libtiff_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
install_spandsp() {
|
|
|
|
if [ "$SPANDSP_VERSION" -a ! -f spandsp-$SPANDSP_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing SpanDSP:"
|
|
|
|
[ -f spandsp-$SPANDSP_VERSION.tar.gz ] || curl -L -O https://www.soft-switch.org/downloads/spandsp/spandsp-$SPANDSP_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat spandsp-$SPANDSP_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd spandsp-$SPANDSP_VERSION
|
2017-08-07 17:08:43 +00:00
|
|
|
#
|
|
|
|
# Don't use -Wunused-but-set-variable, as it's not supported
|
|
|
|
# by all the gcc versions in the versions of Xcode that we
|
|
|
|
# support.
|
|
|
|
#
|
2020-05-27 12:27:19 +00:00
|
|
|
patch -p0 <${topdir}/macosx-support-lib-patches/spandsp-configure-patch || exit 1
|
2019-02-22 20:25:46 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2017-08-01 23:36:01 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch spandsp-$SPANDSP_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_spandsp() {
|
|
|
|
if [ ! -z "$installed_spandsp_version" ] ; then
|
|
|
|
echo "Uninstalling SpanDSP:"
|
|
|
|
cd spandsp-$installed_spandsp_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm spandsp-$installed_spandsp_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf spandsp-$installed_spandsp_version
|
|
|
|
rm -rf spandsp-$installed_spandsp_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_spandsp_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-01-13 21:48:10 +00:00
|
|
|
install_speexdsp() {
|
|
|
|
if [ "$SPEEXDSP_VERSION" -a ! -f speexdsp-$SPEEXDSP_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing SpeexDSP:"
|
|
|
|
[ -f speexdsp-$SPEEXDSP_VERSION.tar.gz ] || curl -L -O http://downloads.us.xiph.org/releases/speex/speexdsp-$SPEEXDSP_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat speexdsp-$SPEEXDSP_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd speexdsp-$SPEEXDSP_VERSION
|
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch speexdsp-$SPEEXDSP_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_speexdsp() {
|
|
|
|
if [ ! -z "$installed_speexdsp_version" ] ; then
|
|
|
|
echo "Uninstalling SpeexDSP:"
|
|
|
|
cd speexdsp-$installed_speexdsp_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm speexdsp-$installed_speexdsp_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf speexdsp-$installed_speexdsp_version
|
|
|
|
rm -rf speexdsp-$installed_speexdsp_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_speexdsp_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-08-02 00:04:15 +00:00
|
|
|
install_bcg729() {
|
|
|
|
if [ "$BCG729_VERSION" -a ! -f bcg729-$BCG729_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing bcg729:"
|
|
|
|
[ -f bcg729-$BCG729_VERSION.tar.gz ] || curl -L -O http://download-mirror.savannah.gnu.org/releases/linphone/plugins/sources/bcg729-$BCG729_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat bcg729-$BCG729_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd bcg729-$BCG729_VERSION
|
2019-02-22 20:25:46 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2017-08-02 00:04:15 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch bcg729-$BCG729_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_bcg729() {
|
|
|
|
if [ ! -z "$installed_bcg729_version" ] ; then
|
|
|
|
echo "Uninstalling bcg729:"
|
|
|
|
cd bcg729-$installed_bcg729_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm bcg729-$installed_bcg729_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf bcg729-$installed_bcg729_version
|
|
|
|
rm -rf bcg729-$installed_bcg729_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_bcg729_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-06-01 22:21:57 +00:00
|
|
|
install_ilbc() {
|
|
|
|
if [ -n "$ILBC_VERSION" ] && [ ! -f ilbc-$ILBC_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing iLBC:"
|
|
|
|
[ -f libilbc-$ILBC_VERSION.tar.bz ] || curl --location --remote-name https://github.com/TimothyGu/libilbc/releases/download/v$ILBC_VERSION/libilbc-$ILBC_VERSION.tar.bz2 || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
bzcat libilbc-$ILBC_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
cd libilbc-$ILBC_VERSION || exit 1
|
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch ilbc-$ILBC_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_ilbc() {
|
|
|
|
if [ -n "$installed_ilbc_version" ] ; then
|
|
|
|
echo "Uninstalling iLBC:"
|
|
|
|
cd "libilbc-$installed_ilbc_version" || exit 1
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm "ilbc-$installed_ilbc_version-done"
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 ] && [ "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf "libilbc-$installed_ilbc_version"
|
|
|
|
rm -rf "libilbc-$installed_ilbc_version.tar.bz2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_ilbc_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-09-29 04:33:06 +00:00
|
|
|
install_opus() {
|
|
|
|
if [ "$OPUS_VERSION" -a ! -f opus-$OPUS_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing opus:"
|
|
|
|
[ -f opus-$OPUS_VERSION.tar.gz ] || curl -L -O https://archive.mozilla.org/pub/opus/opus-$OPUS_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat opus-$OPUS_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd opus-$OPUS_VERSION
|
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch opus-$OPUS_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_opus() {
|
|
|
|
if [ ! -z "$installed_opus_version" ] ; then
|
|
|
|
echo "Uninstalling opus:"
|
|
|
|
cd opus-$installed_opus_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm opus-$installed_opus_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf opus-$installed_opus_version
|
|
|
|
rm -rf opus-$installed_opus_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_opus_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-10-13 13:56:02 +00:00
|
|
|
install_python3() {
|
2021-01-03 18:09:34 +00:00
|
|
|
# The macos11.0 installer can be deployed to older versions, down to
|
|
|
|
# 10.9 (Mavericks), but is still considered experimental so continue
|
|
|
|
# to use the 64-bit installer (10.9) on earlier releases for now.
|
|
|
|
local macver=x10.9
|
|
|
|
if [[ $DARWIN_MAJOR_VERSION -gt 19 ]]; then
|
|
|
|
# The macos11.0 installer is required for arm-based macs, which require
|
|
|
|
# macOS 11 Big Sur. Note that the 'x' was removed from the package name.
|
|
|
|
macver=11.0
|
|
|
|
elif [[ $DARWIN_MAJOR_VERSION -lt 13 ]]; then
|
2018-11-08 16:39:53 +00:00
|
|
|
# The 64-bit installer requires 10.9 (Mavericks), use the 64-bit/32-bit
|
2021-01-03 18:09:34 +00:00
|
|
|
# variant for 10.6 (Snow Leopard) through 10.8 (Mountain Lion).
|
|
|
|
macver=x10.6
|
2018-11-08 16:39:53 +00:00
|
|
|
fi
|
2018-10-13 13:56:02 +00:00
|
|
|
if [ "$PYTHON3_VERSION" -a ! -f python3-$PYTHON3_VERSION-done ] ; then
|
|
|
|
echo "Downloading and installing python3:"
|
2021-01-03 18:09:34 +00:00
|
|
|
[ -f python-$PYTHON3_VERSION-macos$macver.pkg ] || curl -L -O https://www.python.org/ftp/python/$PYTHON3_VERSION/python-$PYTHON3_VERSION-macos$macver.pkg || exit 1
|
2018-10-13 13:56:02 +00:00
|
|
|
$no_build && echo "Skipping installation" && return
|
2021-01-03 18:09:34 +00:00
|
|
|
sudo installer -target / -pkg python-$PYTHON3_VERSION-macos$macver.pkg || exit 1
|
2018-10-13 13:56:02 +00:00
|
|
|
touch python3-$PYTHON3_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_python3() {
|
|
|
|
# Major version (e.g. "3.7")
|
|
|
|
local PYTHON_VERSION=${installed_python3_version%.*}
|
|
|
|
if [ ! -z "$installed_python3_version" ] ; then
|
|
|
|
echo "Uninstalling python3:"
|
|
|
|
frameworkdir="/Library/Frameworks/Python.framework/Versions/$PYTHON_VERSION"
|
|
|
|
sudo rm -rf "$frameworkdir"
|
|
|
|
sudo rm -rf "/Applications/Python $PYTHON_VERSION"
|
|
|
|
sudo find /usr/local/bin -maxdepth 1 -lname "*$frameworkdir/bin/*" -delete
|
|
|
|
# Remove three symlinks and empty directories. Removing directories
|
|
|
|
# might fail if for some reason multiple versions are installed.
|
|
|
|
sudo rm /Library/Frameworks/Python.framework/Headers
|
|
|
|
sudo rm /Library/Frameworks/Python.framework/Python
|
|
|
|
sudo rm /Library/Frameworks/Python.framework/Resources
|
|
|
|
sudo rmdir /Library/Frameworks/Python.framework/Versions
|
|
|
|
sudo rmdir /Library/Frameworks/Python.framework
|
|
|
|
sudo pkgutil --forget org.python.Python.PythonApplications-$PYTHON_VERSION
|
|
|
|
sudo pkgutil --forget org.python.Python.PythonDocumentation-$PYTHON_VERSION
|
|
|
|
sudo pkgutil --forget org.python.Python.PythonFramework-$PYTHON_VERSION
|
|
|
|
sudo pkgutil --forget org.python.Python.PythonUnixTools-$PYTHON_VERSION
|
|
|
|
rm python3-$installed_python3_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
2021-01-03 18:09:34 +00:00
|
|
|
rm -f python-$installed_python3_version-macos11.0.pkg
|
2018-10-13 13:56:02 +00:00
|
|
|
rm -f python-$installed_python3_version-macosx10.9.pkg
|
2018-11-08 16:39:53 +00:00
|
|
|
rm -f python-$installed_python3_version-macosx10.6.pkg
|
2018-10-13 13:56:02 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
installed_python3_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-04-10 10:52:52 +00:00
|
|
|
install_brotli() {
|
|
|
|
if [ "$BROTLI_VERSION" -a ! -f brotli-$BROTLI_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing brotli:"
|
|
|
|
[ -f brotli-$BROTLI_VERSION.tar.gz ] || curl -L -o brotli-$BROTLI_VERSION.tar.gz https://github.com/google/brotli/archive/v$BROTLI_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat brotli-$BROTLI_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd brotli-$BROTLI_VERSION
|
|
|
|
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 ../..
|
|
|
|
touch brotli-$BROTLI_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_brotli() {
|
|
|
|
if [ ! -z "$installed_brotli_version" ] ; then
|
|
|
|
echo "Uninstalling brotli:"
|
|
|
|
cd brotli-$installed_brotli_version
|
|
|
|
#
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
# brotli uses cmake on macOS and doesn't support "make uninstall";
|
|
|
|
# just remove what we know it installs.
|
2019-04-10 10:52:52 +00:00
|
|
|
#
|
|
|
|
# $DO_MAKE_UNINSTALL || exit 1
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
$DO_RM -rf /usr/local/bin/brotli \
|
|
|
|
/usr/local/lib/libbrotli* \
|
|
|
|
/usr/local/include/brotli \
|
|
|
|
/usr/local/lib/pkgconfig/libbrotli* || exit 1
|
2019-04-10 10:52:52 +00:00
|
|
|
#
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
# brotli uses cmake on macOS and doesn't support "make distclean";
|
|
|
|
# just remove the enire build directory.
|
2019-04-10 10:52:52 +00:00
|
|
|
#
|
|
|
|
# make distclean || exit 1
|
macos-setup: more cleanups.
Fix/update/expand some comments.
Do uninstalls for dependencies using CMake more similarly.
For LZ4, as it comes with a Makefile rather than any
autotools/CMake/etc. configuration, "make distclean" might not be
necessary, so, as it's not supported, just do "make clean".
For libssh, do all removes in the uninstall in a single command, and use
$DO_RM, so that it uses sudo iff /usr/local isn't writable by us. In
addition, remove the build directory as the equivalent of "make
distclean".
As with libssh, so with brotli.
2020-12-13 08:44:24 +00:00
|
|
|
rm -rf build_dir || exit 1
|
2019-04-10 10:52:52 +00:00
|
|
|
cd ..
|
|
|
|
rm brotli-$installed_brotli_version-done
|
|
|
|
|
|
|
|
if [ "$#" -eq 1 -a "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf brotli-$installed_brotli_version
|
|
|
|
rm -rf brotli-$installed_brotli_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_brotli_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-09-17 16:31:39 +00:00
|
|
|
install_minizip() {
|
|
|
|
if [ "$ZLIB_VERSION" ] && [ ! -f minizip-$ZLIB_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing zlib for minizip:"
|
|
|
|
[ -f zlib-$ZLIB_VERSION.tar.gz ] || curl -L -o zlib-$ZLIB_VERSION.tar.gz https://zlib.net/zlib-$ZLIB_VERSION.tar.gz || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
|
|
|
gzcat zlib-$ZLIB_VERSION.tar.gz | tar xf - || exit 1
|
2020-12-19 07:53:47 +00:00
|
|
|
#
|
|
|
|
# minizip ships both with a minimal Makefile that doesn't
|
|
|
|
# support "make install", "make uninstall", or "make distclean",
|
|
|
|
# and with a Makefile.am file that, if we do an autoreconf,
|
|
|
|
# gives us a configure script, and a Makefile.in that, if we run
|
|
|
|
# the configure script, gives us a Makefile that supports ll of
|
|
|
|
# those targets, and that installs a pkg-config .pc file for
|
|
|
|
# minizip.
|
|
|
|
#
|
|
|
|
# So that's what we do.
|
|
|
|
#
|
2019-09-17 16:31:39 +00:00
|
|
|
cd zlib-$ZLIB_VERSION/contrib/minizip || exit 1
|
|
|
|
LIBTOOLIZE=glibtoolize autoreconf --force --install
|
|
|
|
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
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ../../..
|
|
|
|
touch minizip-$ZLIB_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_minizip() {
|
|
|
|
if [ -n "$installed_minizip_version" ] ; then
|
|
|
|
echo "Uninstalling minizip:"
|
|
|
|
cd zlib-$installed_minizip_version/contrib/minizip
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ../../..
|
|
|
|
|
2020-12-19 07:45:28 +00:00
|
|
|
rm minizip-$installed_minizip_version-done
|
2019-09-17 16:31:39 +00:00
|
|
|
|
|
|
|
if [ "$#" -eq 1 ] && [ "$1" = "-r" ] ; then
|
|
|
|
#
|
|
|
|
# Get rid of the previously downloaded and unpacked version.
|
|
|
|
#
|
|
|
|
rm -rf zlib-$installed_minizip_version
|
|
|
|
rm -rf zlib-$installed_minizip_version.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_minizip_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2019-11-14 16:08:28 +00:00
|
|
|
install_sparkle() {
|
|
|
|
if [ "$SPARKLE_VERSION" ] && [ ! -f sparkle-$SPARKLE_VERSION-done ] ; then
|
|
|
|
echo "Downloading and installing Sparkle:"
|
|
|
|
#
|
|
|
|
# Download the tarball and unpack it in /usr/local/Sparkle-x.y.z
|
|
|
|
#
|
|
|
|
[ -f Sparkle-$SPARKLE_VERSION.tar.bz2 ] || curl -L -o Sparkle-$SPARKLE_VERSION.tar.bz2 https://github.com/sparkle-project/Sparkle/releases/download/$SPARKLE_VERSION/Sparkle-$SPARKLE_VERSION.tar.bz2 || exit 1
|
|
|
|
$no_build && echo "Skipping installation" && return
|
2019-11-17 21:47:22 +00:00
|
|
|
test -d "/usr/local/Sparkle-$SPARKLE_VERSION" || sudo mkdir "/usr/local/Sparkle-$SPARKLE_VERSION"
|
|
|
|
sudo tar -C "/usr/local/Sparkle-$SPARKLE_VERSION" -xpof Sparkle-$SPARKLE_VERSION.tar.bz2
|
2019-11-14 16:08:28 +00:00
|
|
|
touch sparkle-$SPARKLE_VERSION-done
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_sparkle() {
|
|
|
|
if [ -n "$installed_sparkle_version" ]; then
|
|
|
|
echo "Uninstalling Sparkle:"
|
|
|
|
sudo rm -rf "/usr/local/Sparkle-$installed_sparkle_version"
|
|
|
|
if [ "$#" -eq 1 ] && [ "$1" = "-r" ] ; then
|
|
|
|
rm -f "Sparkle-$installed_sparkle_version.tar.bz2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
installed_sparkle_version=""
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2015-01-22 00:27:09 +00:00
|
|
|
install_all() {
|
2015-01-22 08:30:47 +00:00
|
|
|
#
|
|
|
|
# Check whether the versions we have installed are the versions
|
|
|
|
# requested; if not, uninstall the installed versions.
|
|
|
|
#
|
2019-04-10 10:52:52 +00:00
|
|
|
if [ ! -z "$installed_brotli_version" -a \
|
|
|
|
"$installed_brotli_version" != "$BROTLI_VERSION" ] ; then
|
|
|
|
echo "Installed brotli version is $installed_brotli_version"
|
|
|
|
if [ -z "$BROTLI_VERSION" ] ; then
|
|
|
|
echo "brotli is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested brotli version is $BROTLI_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_brotli -r
|
|
|
|
fi
|
|
|
|
|
2018-10-13 13:56:02 +00:00
|
|
|
if [ ! -z "$installed_python3_version" -a \
|
|
|
|
"$installed_python3_version" != "$PYTHON3_VERSION" ] ; then
|
|
|
|
echo "Installed python3 version is $installed_python3_version"
|
|
|
|
if [ -z "$PYTHON3_VERSION" ] ; then
|
|
|
|
echo "python3 is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested python3 version is $PYTHON3_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_python3 -r
|
|
|
|
fi
|
|
|
|
|
2017-08-02 00:04:15 +00:00
|
|
|
if [ ! -z "$installed_bcg729_version" -a \
|
|
|
|
"$installed_bcg729_version" != "$BCG729_VERSION" ] ; then
|
2020-01-13 21:48:10 +00:00
|
|
|
echo "Installed bcg729 version is $installed_bcg729_version"
|
2017-08-02 00:04:15 +00:00
|
|
|
if [ -z "$BCG729_VERSION" ] ; then
|
|
|
|
echo "bcg729 is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested bcg729 version is $BCG729_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_bcg729 -r
|
|
|
|
fi
|
|
|
|
|
2020-06-01 22:21:57 +00:00
|
|
|
if [ -n "$installed_ilbc_version" ] \
|
|
|
|
&& [ "$installed_ilbc_version" != "$ILBC_VERSION" ] ; then
|
|
|
|
echo "Installed iLBC version is $installed_ilbc_version"
|
|
|
|
if [ -z "$ILBC_VERSION" ] ; then
|
|
|
|
echo "iLBC is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested iLBC version is $ILBC_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_ilbc -r
|
|
|
|
fi
|
|
|
|
|
2020-09-29 04:33:06 +00:00
|
|
|
if [ -n "$installed_opus_version" ] \
|
|
|
|
&& [ "$installed_opus_version" != "$OPUS_VERSION" ] ; then
|
|
|
|
echo "Installed opus version is $installed_opus_version"
|
|
|
|
if [ -z "$OPUS_VERSION" ] ; then
|
|
|
|
echo "opus is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested opus version is $OPUS_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_opus -r
|
|
|
|
fi
|
|
|
|
|
2017-08-01 23:36:01 +00:00
|
|
|
if [ ! -z "$installed_spandsp_version" -a \
|
|
|
|
"$installed_spandsp_version" != "$SPANDSP_VERSION" ] ; then
|
|
|
|
echo "Installed SpanDSP version is $installed_spandsp_version"
|
|
|
|
if [ -z "$SPANDSP_VERSION" ] ; then
|
|
|
|
echo "spandsp is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested SpanDSP version is $SPANDSP_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_spandsp -r
|
|
|
|
fi
|
|
|
|
|
2020-01-13 21:48:10 +00:00
|
|
|
if [ ! -z "$installed_speexdsp_version" -a \
|
|
|
|
"$installed_speexdsp_version" != "$SPEEXDSP_VERSION" ] ; then
|
|
|
|
echo "Installed SpeexDSP version is $installed_speexdsp_version"
|
|
|
|
if [ -z "$SPEEXDSP_VERSION" ] ; then
|
|
|
|
echo "speexdsp is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested SpeexDSP version is $SPEEXDSP_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_speexdsp -r
|
|
|
|
fi
|
|
|
|
|
2017-08-01 23:36:01 +00:00
|
|
|
if [ ! -z "$installed_libtiff_version" -a \
|
|
|
|
"$installed_libtiff_version" != "$LIBTIFF_VERSION" ] ; then
|
|
|
|
echo "Installed libtiff version is $installed_libtiff_version"
|
|
|
|
if [ -z "$LIBTIFF_VERSION" ] ; then
|
|
|
|
echo "libtiff is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested libtiff version is $LIBTIFF_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libtiff -r
|
|
|
|
fi
|
|
|
|
|
2016-08-26 13:18:29 +00:00
|
|
|
if [ ! -z "$installed_nghttp2_version" -a \
|
|
|
|
"$installed_nghttp2_version" != "$NGHTTP2_VERSION" ] ; then
|
2016-10-17 13:47:04 +00:00
|
|
|
echo "Installed nghttp2 version is $installed_nghttp2_version"
|
2016-08-26 13:18:29 +00:00
|
|
|
if [ -z "$NGHTTP2_VERSION" ] ; then
|
|
|
|
echo "nghttp2 is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested nghttp2 version is $NGHTTP2_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_nghttp2 -r
|
|
|
|
fi
|
|
|
|
|
2016-02-13 10:21:54 +00:00
|
|
|
if [ ! -z "$installed_libssh_version" -a \
|
|
|
|
"$installed_libssh_version" != "$LIBSSH_VERSION" ] ; then
|
|
|
|
echo "Installed libssh version is $installed_libssh_version"
|
|
|
|
if [ -z "$LIBSSH_VERSION" ] ; then
|
|
|
|
echo "libssh is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested libssh version is $LIBSSH_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libssh -r
|
|
|
|
fi
|
|
|
|
|
2015-01-22 08:30:47 +00:00
|
|
|
if [ ! -z "$installed_cares_version" -a \
|
|
|
|
"$installed_cares_version" != "$CARES_VERSION" ] ; then
|
|
|
|
echo "Installed C-Ares version is $installed_cares_version"
|
|
|
|
if [ -z "$CARES_VERSION" ] ; then
|
|
|
|
echo "C-Ares is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested C-Ares version is $CARES_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_c_ares -r
|
|
|
|
fi
|
|
|
|
|
2018-02-09 01:20:26 +00:00
|
|
|
if [ ! -z "$installed_maxminddb_version" -a \
|
|
|
|
"$installed_maxminddb_version" != "$MAXMINDDB_VERSION" ] ; then
|
|
|
|
echo "Installed MaxMindDB API version is $installed_maxminddb_version"
|
|
|
|
if [ -z "$MAXMINDDB_VERSION" ] ; then
|
|
|
|
echo "MaxMindDB is not requested"
|
2015-01-22 08:30:47 +00:00
|
|
|
else
|
2018-02-09 01:20:26 +00:00
|
|
|
echo "Requested MaxMindDB version is $MAXMINDDB_VERSION"
|
2015-01-22 08:30:47 +00:00
|
|
|
fi
|
2018-02-09 01:20:26 +00:00
|
|
|
uninstall_maxminddb -r
|
2015-01-22 08:30:47 +00:00
|
|
|
fi
|
|
|
|
|
2017-06-16 07:37:58 +00:00
|
|
|
if [ ! -z "$installed_sbc_version" -a \
|
|
|
|
"$installed_sbc_version" != "$SBC_VERSION" ] ; then
|
|
|
|
echo "Installed SBC version is $installed_sbc_version"
|
|
|
|
if [ -z "$SBC_VERSION" ] ; then
|
|
|
|
echo "SBC is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested SBC version is $SBC_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_sbc -r
|
|
|
|
fi
|
|
|
|
|
2016-11-02 00:47:00 +00:00
|
|
|
if [ ! -z "$installed_lz4_version" -a \
|
|
|
|
"$installed_lz4_version" != "$LZ4_VERSION" ] ; then
|
|
|
|
echo "Installed LZ4 version is $installed_lz4_version"
|
|
|
|
if [ -z "$LZ4_VERSION" ] ; then
|
|
|
|
echo "LZ4 is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested LZ4 version is $LZ4_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_lz4 -r
|
|
|
|
fi
|
|
|
|
|
2017-04-04 21:23:59 +00:00
|
|
|
if [ ! -z "$installed_libxml2_version" -a \
|
|
|
|
"$installed_libxml2_version" != "$LIBXML2_VERSION" ] ; then
|
|
|
|
echo "Installed libxml2 version is $installed_libxml2_version"
|
|
|
|
if [ -z "$LIBXML2_VERSION" ] ; then
|
|
|
|
echo "libxml2 is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested libxml2 version is $LIBXML2_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libxml2 -r
|
|
|
|
fi
|
|
|
|
|
2017-06-16 07:37:58 +00:00
|
|
|
if [ ! -z "$installed_snappy_version" -a \
|
|
|
|
"$installed_snappy_version" != "$SNAPPY_VERSION" ] ; then
|
|
|
|
echo "Installed SNAPPY version is $installed_snappy_version"
|
|
|
|
if [ -z "$SNAPPY_VERSION" ] ; then
|
|
|
|
echo "SNAPPY is not requested"
|
2016-10-20 08:36:36 +00:00
|
|
|
else
|
2017-06-16 07:37:58 +00:00
|
|
|
echo "Requested SNAPPY version is $SNAPPY_VERSION"
|
2016-10-20 08:36:36 +00:00
|
|
|
fi
|
2017-06-16 07:37:58 +00:00
|
|
|
uninstall_snappy -r
|
2016-10-20 08:36:36 +00:00
|
|
|
fi
|
|
|
|
|
2015-01-22 08:30:47 +00:00
|
|
|
if [ ! -z "$installed_lua_version" -a \
|
|
|
|
"$installed_lua_version" != "$LUA_VERSION" ] ; then
|
|
|
|
echo "Installed Lua version is $installed_lua_version"
|
|
|
|
if [ -z "$LUA_VERSION" ] ; then
|
|
|
|
echo "Lua is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested Lua version is $LUA_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_lua -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_gnutls_version" -a \
|
|
|
|
"$installed_gnutls_version" != "$GNUTLS_VERSION" ] ; then
|
|
|
|
echo "Installed GnuTLS version is $installed_gnutls_version"
|
|
|
|
if [ -z "$GNUTLS_VERSION" ] ; then
|
|
|
|
echo "GnuTLS is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested GnuTLS version is $GNUTLS_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_gnutls -r
|
|
|
|
fi
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
if [ ! -z "$installed_nettle_version" -a \
|
|
|
|
"$installed_nettle_version" != "$NETTLE_VERSION" ] ; then
|
|
|
|
echo "Installed Nettle version is $installed_nettle_version"
|
|
|
|
if [ -z "$NETTLE_VERSION" ] ; then
|
|
|
|
echo "Nettle is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested Nettle version is $NETTLE_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_nettle -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_gmp_version" -a \
|
|
|
|
"$installed_gmp_version" != "$GMP_VERSION" ] ; then
|
|
|
|
echo "Installed GMP version is $installed_gmp_version"
|
|
|
|
if [ -z "$GMP_VERSION" ] ; then
|
|
|
|
echo "GMP is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested GMP version is $GMP_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_gmp -r
|
|
|
|
fi
|
|
|
|
|
2020-11-26 06:10:34 +00:00
|
|
|
if [ ! -z "$installed_p11_kit_version" -a \
|
|
|
|
"$installed_p11_kit_version" != "$P11KIT_VERSION" ] ; then
|
|
|
|
echo "Installed p11-kit version is $installed_p11_kit_version"
|
|
|
|
if [ -z "$P11KIT_VERSION" ] ; then
|
|
|
|
echo "p11-kit is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested p11-kit version is $P11KIT_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_p11_kit -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_libtasn1_version" -a \
|
|
|
|
"$installed_libtasn1_version" != "$LIBTASN1_VERSION" ] ; then
|
|
|
|
echo "Installed libtasn1 version is $installed_libtasn1_version"
|
|
|
|
if [ -z "$LIBTASN1_VERSION" ] ; then
|
|
|
|
echo "libtasn1 is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested libtasn1 version is $LIBTASN1_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libtasn1 -r
|
|
|
|
fi
|
|
|
|
|
2015-01-22 08:30:47 +00:00
|
|
|
if [ ! -z "$installed_libgcrypt_version" -a \
|
|
|
|
"$installed_libgcrypt_version" != "$LIBGCRYPT_VERSION" ] ; then
|
|
|
|
echo "Installed libgcrypt version is $installed_libgcrypt_version"
|
|
|
|
if [ -z "$LIBGCRYPT_VERSION" ] ; then
|
|
|
|
echo "libgcrypt is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested libgcrypt version is $LIBGCRYPT_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libgcrypt -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_libgpg_error_version" -a \
|
|
|
|
"$installed_libgpg_error_version" != "$LIBGPG_ERROR_VERSION" ] ; then
|
|
|
|
echo "Installed libgpg-error version is $installed_libgpg_error_version"
|
|
|
|
if [ -z "$LIBGPG_ERROR_VERSION" ] ; then
|
|
|
|
echo "libgpg-error is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested libgpg-error version is $LIBGPG_ERROR_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libgpg_error -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_libsmi_version" -a \
|
|
|
|
"$installed_libsmi_version" != "$LIBSMI_VERSION" ] ; then
|
|
|
|
echo "Installed libsmi version is $installed_libsmi_version"
|
|
|
|
if [ -z "$LIBSMI_VERSION" ] ; then
|
|
|
|
echo "libsmi is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested libsmi version is $LIBSMI_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libsmi -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_qt_version" -a \
|
|
|
|
"$installed_qt_version" != "$QT_VERSION" ] ; then
|
|
|
|
echo "Installed Qt version is $installed_qt_version"
|
|
|
|
if [ -z "$QT_VERSION" ] ; then
|
|
|
|
echo "Qt is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested Qt version is $QT_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_qt -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_glib_version" -a \
|
|
|
|
"$installed_glib_version" != "$GLIB_VERSION" ] ; then
|
|
|
|
echo "Installed GLib version is $installed_glib_version"
|
|
|
|
if [ -z "$GLIB_VERSION" ] ; then
|
|
|
|
echo "GLib is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested GLib version is $GLIB_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_glib -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_pkg_config_version" -a \
|
|
|
|
"$installed_pkg_config_version" != "$PKG_CONFIG_VERSION" ] ; then
|
|
|
|
echo "Installed pkg-config version is $installed_pkg_config_version"
|
|
|
|
if [ -z "$PKG_CONFIG_VERSION" ] ; then
|
|
|
|
echo "pkg-config is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested pkg-config version is $PKG_CONFIG_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_pkg_config -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_gettext_version" -a \
|
|
|
|
"$installed_gettext_version" != "$GETTEXT_VERSION" ] ; then
|
|
|
|
echo "Installed GNU gettext version is $installed_gettext_version"
|
|
|
|
if [ -z "$GETTEXT_VERSION" ] ; then
|
|
|
|
echo "GNU gettext is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested GNU gettext version is $GETTEXT_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_gettext -r
|
|
|
|
fi
|
|
|
|
|
2018-05-15 03:42:32 +00:00
|
|
|
if [ ! -z "$installed_ninja_version" -a \
|
|
|
|
"$installed_ninja_version" != "$NINJA_VERSION" ] ; then
|
|
|
|
echo "Installed Ninja version is $installed_ninja_version"
|
|
|
|
if [ -z "$NINJA_VERSION" ] ; then
|
|
|
|
echo "Ninja is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested Ninja version is $NINJA_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_ninja -r
|
|
|
|
fi
|
|
|
|
|
2018-02-26 23:11:51 +00:00
|
|
|
if [ ! -z "$installed_asciidoctorpdf_version" -a \
|
|
|
|
"$installed_asciidoctorpdf_version" != "$ASCIIDOCTORPDF_VERSION" ] ; then
|
|
|
|
echo "Installed Asciidoctor-pdf version is $installed_asciidoctorpdf_version"
|
|
|
|
if [ -z "$ASCIIDOCTORPDF_VERSION" ] ; then
|
|
|
|
echo "Asciidoctor-pdf is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested Asciidoctor-pdf version is $ASCIIDOCTORPDF_VERSION"
|
|
|
|
fi
|
|
|
|
# XXX - really remove this?
|
|
|
|
# Or should we remember it as installed only if this script
|
|
|
|
# installed it?
|
|
|
|
#
|
|
|
|
uninstall_asciidoctorpdf -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_asciidoctor_version" -a \
|
|
|
|
"$installed_asciidoctor_version" != "$ASCIIDOCTOR_VERSION" ] ; then
|
|
|
|
echo "Installed Asciidoctor version is $installed_asciidoctor_version"
|
|
|
|
if [ -z "$ASCIIDOCTOR_VERSION" ] ; then
|
|
|
|
echo "Asciidoctor is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested Asciidoctor version is $ASCIIDOCTOR_VERSION"
|
|
|
|
fi
|
|
|
|
# XXX - really remove this?
|
|
|
|
# Or should we remember it as installed only if this script
|
|
|
|
# installed it?
|
|
|
|
#
|
|
|
|
uninstall_asciidoctor -r
|
|
|
|
fi
|
|
|
|
|
2015-01-22 08:30:47 +00:00
|
|
|
if [ ! -z "$installed_cmake_version" -a \
|
|
|
|
"$installed_cmake_version" != "$CMAKE_VERSION" ] ; then
|
|
|
|
echo "Installed CMake version is $installed_cmake_version"
|
|
|
|
if [ -z "$CMAKE_VERSION" ] ; then
|
|
|
|
echo "CMake is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested CMake version is $CMAKE_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_cmake -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_libtool_version" -a \
|
|
|
|
"$installed_libtool_version" != "$LIBTOOL_VERSION" ] ; then
|
|
|
|
echo "Installed GNU libtool version is $installed_libtool_version"
|
|
|
|
if [ -z "$LIBTOOL_VERSION" ] ; then
|
|
|
|
echo "GNU libtool is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested GNU libtool version is $LIBTOOL_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_libtool -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_automake_version" -a \
|
|
|
|
"$installed_automake_version" != "$AUTOMAKE_VERSION" ] ; then
|
|
|
|
echo "Installed GNU automake version is $installed_automake_version"
|
|
|
|
if [ -z "$AUTOMAKE_VERSION" ] ; then
|
|
|
|
echo "GNU automake is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested GNU automake version is $AUTOMAKE_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_automake -r
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z "$installed_autoconf_version" -a \
|
|
|
|
"$installed_autoconf_version" != "$AUTOCONF_VERSION" ] ; then
|
|
|
|
echo "Installed GNU autoconf version is $installed_autoconf_version"
|
|
|
|
if [ -z "$AUTOCONF_VERSION" ] ; then
|
|
|
|
echo "GNU autoconf is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested GNU autoconf version is $AUTOCONF_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_autoconf -r
|
|
|
|
fi
|
|
|
|
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
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
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
if [ ! -z "$installed_lzip_version" -a \
|
|
|
|
"$installed_lzip_version" != "$LZIP_VERSION" ] ; then
|
|
|
|
echo "Installed lzip version is $installed_lzip_version"
|
|
|
|
if [ -z "$LZIP_VERSION" ] ; then
|
|
|
|
echo "lzip is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested lzip version is $LZIP_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_lzip -r
|
|
|
|
fi
|
|
|
|
|
2015-01-22 08:30:47 +00:00
|
|
|
if [ ! -z "$installed_xz_version" -a \
|
|
|
|
"$installed_xz_version" != "$XZ_VERSION" ] ; then
|
|
|
|
echo "Installed xz version is $installed_xz_version"
|
|
|
|
if [ -z "$XZ_VERSION" ] ; then
|
|
|
|
echo "xz is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested xz version is $XZ_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_xz -r
|
|
|
|
fi
|
|
|
|
|
2018-05-19 00:29:25 +00:00
|
|
|
if [ ! -z "$installed_curl_version" -a \
|
|
|
|
"$installed_curl_version" != "$CURL_VERSION" ] ; then
|
|
|
|
echo "Installed curl version is $installed_curl_version"
|
|
|
|
if [ -z "$CURL_VERSION" ] ; then
|
|
|
|
echo "curl is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested curl version is $CURL_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_curl -r
|
|
|
|
fi
|
|
|
|
|
2019-09-17 16:31:39 +00:00
|
|
|
if [ ! -z "$installed_minizip_version" -a \
|
|
|
|
"$installed_minizip_version" != "$ZLIB_VERSION" ] ; then
|
|
|
|
echo "Installed minizip (zlib) version is $installed_minizip_version"
|
|
|
|
if [ -z "$ZLIB_VERSION" ] ; then
|
|
|
|
echo "minizip is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested minizip (zlib) version is $ZLIB_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_minizip -r
|
|
|
|
fi
|
|
|
|
|
2019-11-14 16:08:28 +00:00
|
|
|
if [ ! -z "$installed_sparkle_version" -a \
|
|
|
|
"$installed_sparkle_version" != "$SPARKLE_VERSION" ] ; then
|
|
|
|
echo "Installed Sparkle version is $installed_sparkle_version"
|
|
|
|
if [ -z "$SPARKLE_VERSION" ] ; then
|
|
|
|
echo "Sparkle is not requested"
|
|
|
|
else
|
|
|
|
echo "Requested Sparkle version is $SPARKLE_VERSION"
|
|
|
|
fi
|
|
|
|
uninstall_sparkle -r
|
|
|
|
fi
|
|
|
|
|
2018-05-19 00:29:25 +00:00
|
|
|
#
|
|
|
|
# Start with curl: we may need it to download and install xz.
|
2015-01-22 00:27:09 +00:00
|
|
|
#
|
2018-05-19 00:29:25 +00:00
|
|
|
install_curl
|
|
|
|
|
|
|
|
#
|
|
|
|
# Now intall xz: it is the sole download format of glib later than 2.31.2.
|
2015-01-22 00:27:09 +00:00
|
|
|
#
|
2015-01-22 02:09:30 +00:00
|
|
|
install_xz
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
install_lzip
|
|
|
|
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
install_pcre
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_autoconf
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_automake
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_libtool
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_cmake
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2018-05-15 03:42:32 +00:00
|
|
|
install_ninja
|
|
|
|
|
2018-02-26 23:11:51 +00:00
|
|
|
install_asciidoctor
|
|
|
|
|
|
|
|
install_asciidoctorpdf
|
|
|
|
|
2015-01-22 00:27:09 +00:00
|
|
|
#
|
2017-04-05 17:50:53 +00:00
|
|
|
# Start with GNU gettext; GLib requires it, and macOS doesn't have it
|
2015-01-22 00:27:09 +00:00
|
|
|
# or a BSD-licensed replacement.
|
|
|
|
#
|
|
|
|
# At least on Lion with Xcode 4, _FORTIFY_SOURCE gets defined as 2
|
|
|
|
# by default, which causes, for example, stpncpy to be defined as
|
|
|
|
# a hairy macro that collides with the GNU gettext configure script's
|
|
|
|
# attempts to workaround AIX's lack of a declaration for stpncpy,
|
|
|
|
# with the result being a huge train wreck. Define _FORTIFY_SOURCE
|
|
|
|
# as 0 in an attempt to keep the trains on separate tracks.
|
|
|
|
#
|
2015-01-22 02:09:30 +00:00
|
|
|
install_gettext
|
2015-01-22 00:27:09 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# GLib depends on pkg-config.
|
|
|
|
# By default, pkg-config depends on GLib; we break the dependency cycle
|
|
|
|
# by configuring pkg-config to use its own internal version of GLib.
|
|
|
|
#
|
2015-01-22 02:09:30 +00:00
|
|
|
install_pkg_config
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_glib
|
2015-01-22 00:27:09 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Now we have reached a point where we can build everything but
|
|
|
|
# the GUI (Wireshark).
|
|
|
|
#
|
2015-01-22 02:09:30 +00:00
|
|
|
install_qt
|
2015-01-22 00:27:09 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Now we have reached a point where we can build everything including
|
|
|
|
# the GUI (Wireshark), but not with any optional features such as
|
|
|
|
# SNMP OID resolution, some forms of decryption, Lua scripting, playback
|
2018-02-09 01:20:26 +00:00
|
|
|
# of audio, or MaxMindDB mapping of IP addresses.
|
2015-01-22 00:27:09 +00:00
|
|
|
#
|
|
|
|
# We now conditionally download optional libraries to support them;
|
|
|
|
# the default is to download them all.
|
|
|
|
#
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_libsmi
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_libgpg_error
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_libgcrypt
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
install_gmp
|
|
|
|
|
2020-11-26 06:10:34 +00:00
|
|
|
install_libtasn1
|
|
|
|
|
|
|
|
install_p11_kit
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
install_nettle
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_gnutls
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_lua
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2016-11-02 05:56:30 +00:00
|
|
|
install_snappy
|
|
|
|
|
2019-08-12 21:57:45 +00:00
|
|
|
install_zstd
|
|
|
|
|
2017-04-04 21:23:59 +00:00
|
|
|
install_libxml2
|
|
|
|
|
2016-11-02 00:47:00 +00:00
|
|
|
install_lz4
|
|
|
|
|
2016-10-20 08:36:36 +00:00
|
|
|
install_sbc
|
|
|
|
|
2018-02-09 01:20:26 +00:00
|
|
|
install_maxminddb
|
2015-01-22 00:27:09 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
install_c_ares
|
2016-02-13 10:21:54 +00:00
|
|
|
|
|
|
|
install_libssh
|
2016-08-26 13:18:29 +00:00
|
|
|
|
|
|
|
install_nghttp2
|
2017-08-01 23:36:01 +00:00
|
|
|
|
|
|
|
install_libtiff
|
|
|
|
|
|
|
|
install_spandsp
|
2017-08-02 00:04:15 +00:00
|
|
|
|
2020-01-13 21:48:10 +00:00
|
|
|
install_speexdsp
|
|
|
|
|
2017-08-02 00:04:15 +00:00
|
|
|
install_bcg729
|
2018-08-03 21:19:09 +00:00
|
|
|
|
2020-06-01 22:21:57 +00:00
|
|
|
install_ilbc
|
|
|
|
|
2020-09-29 04:33:06 +00:00
|
|
|
install_opus
|
|
|
|
|
2018-10-13 13:56:02 +00:00
|
|
|
install_python3
|
2019-04-10 10:52:52 +00:00
|
|
|
|
|
|
|
install_brotli
|
2019-09-17 16:31:39 +00:00
|
|
|
|
|
|
|
install_minizip
|
2019-11-14 16:08:28 +00:00
|
|
|
|
|
|
|
install_sparkle
|
2015-01-22 00:27:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
uninstall_all() {
|
2018-04-15 09:44:18 +00:00
|
|
|
if [ -d "${MACOSX_SUPPORT_LIBS}" ]
|
2013-07-05 23:26:15 +00:00
|
|
|
then
|
2018-04-15 09:44:18 +00:00
|
|
|
cd "${MACOSX_SUPPORT_LIBS}"
|
2013-07-05 23:26:15 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Uninstall items in the reverse order from the order in which they're
|
2013-07-09 04:41:34 +00:00
|
|
|
# installed. Only uninstall if the download/build/install process
|
|
|
|
# completed; uninstall the version that appears in the name of
|
|
|
|
# the -done file.
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
|
|
|
# We also do a "make distclean", so that we don't have leftovers from
|
|
|
|
# old configurations.
|
|
|
|
#
|
2019-11-14 16:08:28 +00:00
|
|
|
uninstall_sparkle
|
|
|
|
|
2019-09-17 16:31:39 +00:00
|
|
|
uninstall_minizip
|
|
|
|
|
2019-04-10 10:52:52 +00:00
|
|
|
uninstall_brotli
|
|
|
|
|
2018-10-13 13:56:02 +00:00
|
|
|
uninstall_python3
|
|
|
|
|
2020-09-29 04:33:06 +00:00
|
|
|
uninstall_opus
|
|
|
|
|
2020-06-01 22:21:57 +00:00
|
|
|
uninstall_ilbc
|
|
|
|
|
2018-04-15 09:44:18 +00:00
|
|
|
uninstall_bcg729
|
2017-08-02 00:04:15 +00:00
|
|
|
|
2020-01-13 21:48:10 +00:00
|
|
|
uninstall_speexdsp
|
|
|
|
|
2018-04-15 09:44:18 +00:00
|
|
|
uninstall_spandsp
|
2017-08-01 23:36:01 +00:00
|
|
|
|
2018-04-15 09:44:18 +00:00
|
|
|
uninstall_libtiff
|
2017-08-01 23:36:01 +00:00
|
|
|
|
2016-08-26 13:18:29 +00:00
|
|
|
uninstall_nghttp2
|
|
|
|
|
2016-02-13 10:21:54 +00:00
|
|
|
uninstall_libssh
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_c_ares
|
2013-10-28 22:38:23 +00:00
|
|
|
|
2018-02-09 01:20:26 +00:00
|
|
|
uninstall_maxminddb
|
2013-10-28 22:38:23 +00:00
|
|
|
|
2016-11-02 05:56:30 +00:00
|
|
|
uninstall_snappy
|
|
|
|
|
2019-08-12 21:57:45 +00:00
|
|
|
uninstall_zstd
|
|
|
|
|
2017-04-04 21:23:59 +00:00
|
|
|
uninstall_libxml2
|
|
|
|
|
2016-11-02 00:47:00 +00:00
|
|
|
uninstall_lz4
|
|
|
|
|
2016-10-20 08:36:36 +00:00
|
|
|
uninstall_sbc
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_lua
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_gnutls
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
uninstall_nettle
|
|
|
|
|
2020-11-26 06:10:34 +00:00
|
|
|
uninstall_p11_kit
|
|
|
|
|
|
|
|
uninstall_libtasn1
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
uninstall_gmp
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_libgcrypt
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_libgpg_error
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_libsmi
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_qt
|
2013-10-29 01:49:59 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_glib
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_pkg_config
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_gettext
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2018-05-15 03:42:32 +00:00
|
|
|
uninstall_ninja
|
|
|
|
|
2014-07-26 22:33:47 +00:00
|
|
|
#
|
|
|
|
# XXX - really remove this?
|
|
|
|
# Or should we remember it as installed only if this script
|
|
|
|
# installed it?
|
|
|
|
#
|
2018-06-27 23:21:34 +00:00
|
|
|
uninstall_asciidoctorpdf
|
2018-02-26 23:11:51 +00:00
|
|
|
|
2018-06-27 23:21:34 +00:00
|
|
|
uninstall_asciidoctor
|
2018-02-26 23:11:51 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_cmake
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_libtool
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_automake
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_autoconf
|
2013-07-05 23:26:15 +00:00
|
|
|
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
uninstall_pcre
|
|
|
|
|
2017-06-16 07:19:53 +00:00
|
|
|
uninstall_lzip
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
uninstall_xz
|
2018-05-19 00:29:25 +00:00
|
|
|
|
|
|
|
uninstall_curl
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Do we have permission to write in /usr/local?
|
|
|
|
#
|
|
|
|
# If so, assume we have permission to write in its subdirectories.
|
|
|
|
# (If that's not the case, this test needs to check the subdirectories
|
|
|
|
# as well.)
|
|
|
|
#
|
2020-12-13 07:47:27 +00:00
|
|
|
# If not, do "make install", "make uninstall", the removes for
|
|
|
|
# dependencies that don't support "make uninstall", and the renames
|
|
|
|
# of [g]libtool* with sudo.
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
|
|
|
if [ -w /usr/local ]
|
|
|
|
then
|
2013-07-06 21:21:54 +00:00
|
|
|
DO_MAKE_INSTALL="make install"
|
|
|
|
DO_MAKE_UNINSTALL="make uninstall"
|
|
|
|
DO_RM="rm"
|
2014-09-26 06:05:20 +00:00
|
|
|
DO_MV="mv"
|
2013-07-05 23:26:15 +00:00
|
|
|
else
|
2013-07-06 21:21:54 +00:00
|
|
|
DO_MAKE_INSTALL="sudo make install"
|
|
|
|
DO_MAKE_UNINSTALL="sudo make uninstall"
|
|
|
|
DO_RM="sudo rm"
|
2014-09-26 06:05:20 +00:00
|
|
|
DO_MV="sudo mv"
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2017-10-23 12:44:12 +00:00
|
|
|
# This script is meant to be run in the source root. The following
|
|
|
|
# code will attempt to get you there, but is not perfect (particulary
|
|
|
|
# if someone copies the script).
|
|
|
|
|
2018-04-15 09:44:18 +00:00
|
|
|
topdir=`pwd`/`dirname $0`/..
|
|
|
|
cd $topdir
|
|
|
|
|
|
|
|
# Preference of the support libraries directory:
|
|
|
|
# ${MACOSX_SUPPORT_LIBS}
|
|
|
|
# ../macosx-support-libs
|
|
|
|
# ./macosx-support-libs (default if none exists)
|
|
|
|
if [ ! -d "${MACOSX_SUPPORT_LIBS}" ]; then
|
|
|
|
unset MACOSX_SUPPORT_LIBS
|
|
|
|
fi
|
|
|
|
if [ -d ../macosx-support-libs ]; then
|
|
|
|
MACOSX_SUPPORT_LIBS=${MACOSX_SUPPORT_LIBS-../macosx-support-libs}
|
|
|
|
else
|
|
|
|
MACOSX_SUPPORT_LIBS=${MACOSX_SUPPORT_LIBS-./macosx-support-libs}
|
|
|
|
fi
|
2017-10-23 12:44:12 +00:00
|
|
|
|
2013-07-31 05:00:28 +00:00
|
|
|
#
|
2013-08-23 23:27:07 +00:00
|
|
|
# If we have SDKs available, the default target OS is the major version
|
2014-12-20 17:47:01 +00:00
|
|
|
# of the one we're running; get that and strip off the third component
|
|
|
|
# if present.
|
2013-07-31 05:00:28 +00:00
|
|
|
#
|
2013-08-23 23:27:07 +00:00
|
|
|
for i in /Developer/SDKs \
|
|
|
|
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
|
|
|
|
/Library/Developer/CommandLineTools/SDKs
|
|
|
|
do
|
|
|
|
if [ -d "$i" ]
|
|
|
|
then
|
2014-12-20 17:47:01 +00:00
|
|
|
min_osx_target=`sw_vers -productVersion | sed 's/\([0-9]*\)\.\([0-9]*\)\.[0-9]*/\1.\2/'`
|
2013-08-23 23:27:07 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2013-07-31 05:00:28 +00:00
|
|
|
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
|
|
|
# Parse command-line flags:
|
|
|
|
#
|
|
|
|
# -h - print help.
|
2013-07-06 06:16:06 +00:00
|
|
|
# -t <target> - build libraries so that they'll work on the specified
|
2017-04-05 17:50:53 +00:00
|
|
|
# version of macOS and later versions.
|
2013-07-05 23:26:15 +00:00
|
|
|
# -u - do an uninstall.
|
2017-04-19 15:40:02 +00:00
|
|
|
# -n - download all packages, but don't build or install.
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
2017-04-19 15:40:02 +00:00
|
|
|
|
|
|
|
no_build=false
|
|
|
|
|
|
|
|
while getopts ht:un name
|
2013-07-05 23:26:15 +00:00
|
|
|
do
|
|
|
|
case $name in
|
|
|
|
u)
|
|
|
|
do_uninstall=yes
|
|
|
|
;;
|
2017-04-19 15:40:02 +00:00
|
|
|
n)
|
|
|
|
no_build=true
|
|
|
|
;;
|
2013-07-06 06:16:06 +00:00
|
|
|
t)
|
|
|
|
min_osx_target="$OPTARG"
|
|
|
|
;;
|
2013-07-05 23:26:15 +00:00
|
|
|
h|?)
|
2017-08-02 07:39:58 +00:00
|
|
|
echo "Usage: macos-setup.sh [ -t <target> ] [ -u ] [ -n ]" 1>&1
|
2013-07-05 23:26:15 +00:00
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2015-01-22 02:09:30 +00:00
|
|
|
#
|
|
|
|
# Get the version numbers of installed packages, if any.
|
|
|
|
#
|
2018-04-15 09:44:18 +00:00
|
|
|
if [ -d "${MACOSX_SUPPORT_LIBS}" ]
|
2015-01-22 02:09:30 +00:00
|
|
|
then
|
2018-04-15 09:44:18 +00:00
|
|
|
cd "${MACOSX_SUPPORT_LIBS}"
|
2015-01-22 02:09:30 +00:00
|
|
|
|
|
|
|
installed_xz_version=`ls xz-*-done 2>/dev/null | sed 's/xz-\(.*\)-done/\1/'`
|
2017-06-16 07:19:53 +00:00
|
|
|
installed_lzip_version=`ls lzip-*-done 2>/dev/null | sed 's/lzip-\(.*\)-done/\1/'`
|
macos-setup.sh: Update various software versions
Update versions of xz, lzip, gettext, libgpg, libgpg-error, libgcrypt, gnutls and gmp
to newest releases.
Also update glib but only to last version with autotools support - meson build is left
for another time.
Current versions of glib require a libpcre with unicode enabled which the Catalina system
version does not provide, so install the current version of libpcre as well.
Update some additional tools to commit 3a42bf0de2b9e35efcc3cea38153ab95cb71b352:
brotli, libmaxminddb, lz4, and snappy
2020-12-01 16:44:13 +00:00
|
|
|
installed_pcre_version=`ls pcre-*-done 2>/dev/null | sed 's/pcre-\(.*\)-done/\1/'`
|
2015-01-22 02:09:30 +00:00
|
|
|
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/'`
|
|
|
|
installed_cmake_version=`ls cmake-*-done 2>/dev/null | sed 's/cmake-\(.*\)-done/\1/'`
|
2018-05-15 03:42:32 +00:00
|
|
|
installed_ninja_version=`ls ninja-*-done 2>/dev/null | sed 's/ninja-\(.*\)-done/\1/'`
|
2018-02-26 23:11:51 +00:00
|
|
|
installed_asciidoctor_version=`ls asciidoctor-*-done 2>/dev/null | sed 's/asciidoctor-\(.*\)-done/\1/'`
|
|
|
|
installed_asciidoctorpdf_version=`ls asciidoctorpdf-*-done 2>/dev/null | sed 's/asciidoctorpdf-\(.*\)-done/\1/'`
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_gettext_version=`ls gettext-*-done 2>/dev/null | sed 's/gettext-\(.*\)-done/\1/'`
|
|
|
|
installed_pkg_config_version=`ls pkg-config-*-done 2>/dev/null | sed 's/pkg-config-\(.*\)-done/\1/'`
|
|
|
|
installed_glib_version=`ls glib-*-done 2>/dev/null | sed 's/glib-\(.*\)-done/\1/'`
|
|
|
|
installed_qt_version=`ls qt-*-done 2>/dev/null | sed 's/qt-\(.*\)-done/\1/'`
|
|
|
|
installed_libsmi_version=`ls libsmi-*-done 2>/dev/null | sed 's/libsmi-\(.*\)-done/\1/'`
|
|
|
|
installed_libgpg_error_version=`ls libgpg-error-*-done 2>/dev/null | sed 's/libgpg-error-\(.*\)-done/\1/'`
|
|
|
|
installed_libgcrypt_version=`ls libgcrypt-*-done 2>/dev/null | sed 's/libgcrypt-\(.*\)-done/\1/'`
|
2017-06-16 07:19:53 +00:00
|
|
|
installed_gmp_version=`ls gmp-*-done 2>/dev/null | sed 's/gmp-\(.*\)-done/\1/'`
|
2020-11-26 06:10:34 +00:00
|
|
|
installed_libtasn1_version=`ls libtasn1-*-done 2>/dev/null | sed 's/libtasn1-\(.*\)-done/\1/'`
|
|
|
|
installed_p11_kit_version=`ls p11-kit-*-done 2>/dev/null | sed 's/p11-kit-\(.*\)-done/\1/'`
|
2017-06-16 07:19:53 +00:00
|
|
|
installed_nettle_version=`ls nettle-*-done 2>/dev/null | sed 's/nettle-\(.*\)-done/\1/'`
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_gnutls_version=`ls gnutls-*-done 2>/dev/null | sed 's/gnutls-\(.*\)-done/\1/'`
|
|
|
|
installed_lua_version=`ls lua-*-done 2>/dev/null | sed 's/lua-\(.*\)-done/\1/'`
|
2016-11-02 05:56:30 +00:00
|
|
|
installed_snappy_version=`ls snappy-*-done 2>/dev/null | sed 's/snappy-\(.*\)-done/\1/'`
|
2019-08-12 21:57:45 +00:00
|
|
|
installed_zstd_version=`ls zstd-*-done 2>/dev/null | sed 's/zstd-\(.*\)-done/\1/'`
|
2017-04-04 21:23:59 +00:00
|
|
|
installed_libxml2_version=`ls libxml2-*-done 2>/dev/null | sed 's/libxml2-\(.*\)-done/\1/'`
|
2016-11-02 00:47:00 +00:00
|
|
|
installed_lz4_version=`ls lz4-*-done 2>/dev/null | sed 's/lz4-\(.*\)-done/\1/'`
|
2016-10-20 08:36:36 +00:00
|
|
|
installed_sbc_version=`ls sbc-*-done 2>/dev/null | sed 's/sbc-\(.*\)-done/\1/'`
|
2018-02-09 01:20:26 +00:00
|
|
|
installed_maxminddb_version=`ls maxminddb-*-done 2>/dev/null | sed 's/maxminddb-\(.*\)-done/\1/'`
|
2015-01-22 02:09:30 +00:00
|
|
|
installed_cares_version=`ls c-ares-*-done 2>/dev/null | sed 's/c-ares-\(.*\)-done/\1/'`
|
2016-02-13 10:21:54 +00:00
|
|
|
installed_libssh_version=`ls libssh-*-done 2>/dev/null | sed 's/libssh-\(.*\)-done/\1/'`
|
2016-08-26 13:18:29 +00:00
|
|
|
installed_nghttp2_version=`ls nghttp2-*-done 2>/dev/null | sed 's/nghttp2-\(.*\)-done/\1/'`
|
2017-08-01 23:36:01 +00:00
|
|
|
installed_libtiff_version=`ls tiff-*-done 2>/dev/null | sed 's/tiff-\(.*\)-done/\1/'`
|
2018-10-13 21:00:23 +00:00
|
|
|
installed_spandsp_version=`ls spandsp-*-done 2>/dev/null | sed 's/spandsp-\(.*\)-done/\1/'`
|
2020-01-13 21:48:10 +00:00
|
|
|
installed_speexdsp_version=`ls speexdsp-*-done 2>/dev/null | sed 's/speexdsp-\(.*\)-done/\1/'`
|
2018-10-13 21:00:23 +00:00
|
|
|
installed_bcg729_version=`ls bcg729-*-done 2>/dev/null | sed 's/bcg729-\(.*\)-done/\1/'`
|
2020-06-01 22:21:57 +00:00
|
|
|
installed_ilbc_version=`ls ilbc-*-done 2>/dev/null | sed 's/ilbc-\(.*\)-done/\1/'`
|
2020-09-29 04:33:06 +00:00
|
|
|
installed_opus_version=`ls opus-*-done 2>/dev/null | sed 's/opus-\(.*\)-done/\1/'`
|
2018-10-13 13:56:02 +00:00
|
|
|
installed_python3_version=`ls python3-*-done 2>/dev/null | sed 's/python3-\(.*\)-done/\1/'`
|
2019-04-10 10:52:52 +00:00
|
|
|
installed_brotli_version=`ls brotli-*-done 2>/dev/null | sed 's/brotli-\(.*\)-done/\1/'`
|
2019-09-17 16:31:39 +00:00
|
|
|
installed_minizip_version=`ls minizip-*-done 2>/dev/null | sed 's/minizip-\(.*\)-done/\1/'`
|
2019-11-14 16:08:28 +00:00
|
|
|
installed_sparkle_version=`ls sparkle-*-done 2>/dev/null | sed 's/sparkle-\(.*\)-done/\1/'`
|
2015-01-22 02:09:30 +00:00
|
|
|
|
2018-04-15 09:44:18 +00:00
|
|
|
cd $topdir
|
2015-01-22 02:09:30 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-05 23:26:15 +00:00
|
|
|
if [ "$do_uninstall" = "yes" ]
|
|
|
|
then
|
2015-01-22 00:27:09 +00:00
|
|
|
uninstall_all
|
2013-07-05 23:26:15 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
#
|
|
|
|
# Configure scripts tend to set CFLAGS and CXXFLAGS to "-g -O2" if
|
|
|
|
# invoked without CFLAGS or CXXFLAGS being set in the environment.
|
|
|
|
#
|
|
|
|
# However, we *are* setting them in the environment, for our own
|
|
|
|
# nefarious purposes, so start them out as "-g -O2".
|
|
|
|
#
|
|
|
|
CFLAGS="-g -O2"
|
|
|
|
CXXFLAGS="-g -O2"
|
|
|
|
|
2013-06-19 23:52:54 +00:00
|
|
|
# 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
|
|
|
|
MAKE_BUILD_OPTS="-j $(( $(sysctl -n hw.logicalcpu) * 3 / 2))"
|
|
|
|
fi
|
2013-06-17 23:30:56 +00:00
|
|
|
|
2013-07-06 06:16:06 +00:00
|
|
|
#
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
# If we have a target release, look for the oldest SDK that's for an
|
|
|
|
# OS equal to or later than that one, and build libraries against it
|
|
|
|
# rather than against the headers and, more importantly, libraries
|
|
|
|
# that come with the OS, so that we don't end up with support libraries
|
|
|
|
# that only work on the OS version on which we built them, not earlier
|
|
|
|
# versions of the same release, or earlier releases if the minimum is
|
|
|
|
# earlier.
|
2013-07-06 06:16:06 +00:00
|
|
|
#
|
2013-08-23 23:27:07 +00:00
|
|
|
if [ ! -z "$min_osx_target" ]
|
|
|
|
then
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
#
|
2020-11-26 02:23:06 +00:00
|
|
|
# Get the major and minor version of the target release.
|
|
|
|
# We assume it'll be a while before there's a macOS 100. :-)
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
#
|
2020-11-26 02:23:06 +00:00
|
|
|
case "$min_osx_target" in
|
|
|
|
|
|
|
|
[1-9][0-9].*)
|
|
|
|
#
|
|
|
|
# major.minor.
|
|
|
|
#
|
|
|
|
min_osx_target_major=`echo "$min_osx_target" | sed -n 's/\([1-9][0-9]*\)\..*/\1/p'`
|
|
|
|
min_osx_target_minor=`echo "$min_osx_target" | sed -n 's/[1-9][0-9]*\.\(.*\)/\1/p'`
|
|
|
|
;;
|
|
|
|
|
|
|
|
[1-9][0-9])
|
|
|
|
#
|
|
|
|
# Just a major version number was specified; make the minor
|
|
|
|
# version 0.
|
|
|
|
#
|
|
|
|
min_osx_target_major="$min_osx_target"
|
|
|
|
min_osx_target_minor=0
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "macosx-setup.sh: Invalid target release $min_osx_target" 1>&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Search each directory that might contain SDKs.
|
|
|
|
#
|
|
|
|
sdkpath=""
|
|
|
|
for sdksdir in /Developer/SDKs \
|
2013-08-23 23:27:07 +00:00
|
|
|
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
|
|
|
|
/Library/Developer/CommandLineTools/SDKs
|
|
|
|
do
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
#
|
|
|
|
# Get a list of all the SDKs.
|
|
|
|
#
|
|
|
|
if ! test -d "$sdksdir"
|
2013-08-23 23:27:07 +00:00
|
|
|
then
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
#
|
|
|
|
# There is no directory with that name.
|
|
|
|
# Move on to the next one in the list, if any.
|
|
|
|
#
|
|
|
|
continue
|
2013-08-23 23:27:07 +00:00
|
|
|
fi
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Get a list of all the SDKs in that directory, if any.
|
2020-11-26 02:23:06 +00:00
|
|
|
# We assume it'll be a while before there's a macOS 100. :-)
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
#
|
2020-11-26 02:23:06 +00:00
|
|
|
sdklist=`(cd "$sdksdir"; ls -d MacOSX[1-9][0-9].[0-9]*.sdk 2>/dev/null)`
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
|
|
|
|
for sdk in $sdklist
|
|
|
|
do
|
|
|
|
#
|
2020-11-26 02:23:06 +00:00
|
|
|
# Get the major and minor version for this SDK.
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
#
|
2020-11-26 02:23:06 +00:00
|
|
|
sdk_major=`echo "$sdk" | sed -n 's/MacOSX\([1-9][0-9]*\)\..*\.sdk/\1/p'`
|
|
|
|
sdk_minor=`echo "$sdk" | sed -n 's/MacOSX[1-9][0-9]*\.\(.*\)\.sdk/\1/p'`
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Is it for the deployment target or some later release?
|
|
|
|
#
|
2020-11-26 02:23:06 +00:00
|
|
|
if test "$sdk_major" -gt "$min_osx_target_major" -o \
|
|
|
|
\( "$sdk_major" -eq "$min_osx_target_major" -a \
|
|
|
|
"$sdk_minor" -ge "$min_osx_target_minor" \)
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
then
|
|
|
|
#
|
|
|
|
# Yes, use it.
|
|
|
|
#
|
|
|
|
sdkpath="$sdksdir/$sdk"
|
|
|
|
break 2
|
|
|
|
fi
|
|
|
|
done
|
2013-08-23 23:27:07 +00:00
|
|
|
done
|
|
|
|
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
if [ -z "$sdkpath" ]
|
2013-07-06 06:16:06 +00:00
|
|
|
then
|
2017-08-02 07:39:58 +00:00
|
|
|
echo "macos-setup.sh: Couldn't find an SDK for macOS $min_osx_target or later" 1>&2
|
2013-08-23 23:27:07 +00:00
|
|
|
exit 1
|
2013-07-06 06:16:06 +00:00
|
|
|
fi
|
2013-07-31 05:00:28 +00:00
|
|
|
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
SDKPATH="$sdkpath"
|
2020-11-26 02:23:06 +00:00
|
|
|
echo "Using the $sdk_major.$sdk_minor SDK"
|
For OS X, don't rigidly tie the SDK version to the minimum target version.
According to
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/cross_development/Configuring/configuring.html#//apple_ref/doc/uid/10000163i-CH1-SW1
the deployment target (minimum target OS version) and SDK version aren't
necessarily the same and, in fact, Apple typically only ship two SDKs
with each Xcode release, so if you want to build for 10.6 with the 10.6
SDK, you have to use a version of Xcode sufficiently old to have the
10.6 SDK.
Here, we instead search for the oldest SDK for an OS whose version is
greater than or equal to the deployment target. Note that this may not
work for X11-based Wireshark, as the X11 libraries can change
incompatibly between releases. (Fortunately, our plan is to kick
X11-based Wireshark to the curb for OS X, removing a large pile of
aggravation for users.)
This also requires some fixes when building Qt and gdk-pixbuf, as some
cases where we were using the minimum OS target version we needed to be
using the SDK version.
For CMake, we're using its native "deployment target" support for OS X,
and hope that it will somehow do the right thing.
Change-Id: Ie8f42c5e4719e7ebdc56b9ba5a330665bee06280
Reviewed-on: https://code.wireshark.org/review/5031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-31 19:11:22 +00:00
|
|
|
|
2013-08-23 23:27:07 +00:00
|
|
|
#
|
|
|
|
# Make sure there are links to /usr/local/include and /usr/local/lib
|
|
|
|
# in the SDK's usr/local.
|
|
|
|
#
|
|
|
|
if [ ! -e $SDKPATH/usr/local/include ]
|
2013-07-06 06:16:06 +00:00
|
|
|
then
|
2013-08-23 23:27:07 +00:00
|
|
|
if [ ! -d $SDKPATH/usr/local ]
|
|
|
|
then
|
|
|
|
sudo mkdir $SDKPATH/usr/local
|
|
|
|
fi
|
|
|
|
sudo ln -s /usr/local/include $SDKPATH/usr/local/include
|
2013-07-06 06:16:06 +00:00
|
|
|
fi
|
2013-08-23 23:27:07 +00:00
|
|
|
if [ ! -e $SDKPATH/usr/local/lib ]
|
2013-07-06 06:16:06 +00:00
|
|
|
then
|
2013-08-23 23:27:07 +00:00
|
|
|
if [ ! -d $SDKPATH/usr/local ]
|
|
|
|
then
|
|
|
|
sudo mkdir $SDKPATH/usr/local
|
|
|
|
fi
|
|
|
|
sudo ln -s /usr/local/lib $SDKPATH/usr/local/lib
|
2013-07-06 06:16:06 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#
|
2013-08-23 23:27:07 +00:00
|
|
|
# Set the minimum OS version for which to build to the specified
|
|
|
|
# minimum target OS version, so we don't, for example, end up using
|
|
|
|
# linker features supported by the OS verson on which we're building
|
|
|
|
# but not by the target version.
|
2013-07-06 06:16:06 +00:00
|
|
|
#
|
2013-08-23 23:27:07 +00:00
|
|
|
VERSION_MIN_FLAGS="-mmacosx-version-min=$min_osx_target"
|
2013-07-06 06:16:06 +00:00
|
|
|
|
|
|
|
#
|
2013-08-23 23:27:07 +00:00
|
|
|
# Compile and link against the SDK.
|
2013-07-31 05:00:28 +00:00
|
|
|
#
|
2013-08-23 23:27:07 +00:00
|
|
|
SDKFLAGS="-isysroot $SDKPATH"
|
2013-07-09 04:41:34 +00:00
|
|
|
|
2013-07-06 06:16:06 +00:00
|
|
|
fi
|
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
export CFLAGS
|
|
|
|
export CXXFLAGS
|
|
|
|
|
2011-07-15 21:48:02 +00:00
|
|
|
#
|
2013-10-23 01:39:54 +00:00
|
|
|
# You need Xcode or the command-line tools installed to get the compilers.
|
2011-07-15 21:48:02 +00:00
|
|
|
#
|
|
|
|
if [ ! -x /usr/bin/xcodebuild ]; then
|
2016-09-22 10:11:17 +00:00
|
|
|
echo "Please install Xcode first (should be available on DVD or from the Mac App Store)."
|
2013-07-06 21:21:54 +00:00
|
|
|
exit 1
|
2011-08-24 10:18:25 +00:00
|
|
|
fi
|
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
if [ "$QT_VERSION" ]; then
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
|
|
|
# We need Xcode, not just the command-line tools, installed to build
|
|
|
|
# Qt.
|
|
|
|
#
|
2016-09-22 09:59:53 +00:00
|
|
|
# At least with Xcode 8, /usr/bin/xcodebuild --help fails if only
|
|
|
|
# the command-line tools are installed and succeeds if Xcode is
|
2016-09-22 20:54:13 +00:00
|
|
|
# installed. Unfortunately, it fails *with* Xcode 3, but
|
|
|
|
# /usr/bin/xcodebuild -version works with that and with Xcode 8.
|
|
|
|
# Hopefully it fails with only the command-line tools installed.
|
2016-09-15 00:05:26 +00:00
|
|
|
#
|
2016-09-22 20:54:13 +00:00
|
|
|
if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
2016-09-22 09:59:53 +00:00
|
|
|
:
|
|
|
|
else
|
2016-09-22 10:11:17 +00:00
|
|
|
echo "Please install Xcode first (should be available on DVD or from the Mac App Store)."
|
2013-10-23 01:39:54 +00:00
|
|
|
echo "The command-line build tools are not sufficient to build Qt."
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-10-29 01:49:59 +00:00
|
|
|
fi
|
2011-07-15 21:48:02 +00:00
|
|
|
|
2018-04-10 04:58:26 +00:00
|
|
|
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
2011-07-15 21:48:02 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Do all the downloads and untarring in a subdirectory, so all that
|
|
|
|
# stuff can be removed once we've installed the support libraries.
|
2018-04-15 09:44:18 +00:00
|
|
|
|
|
|
|
if [ ! -d "${MACOSX_SUPPORT_LIBS}" ]
|
2011-07-15 21:48:02 +00:00
|
|
|
then
|
2018-04-15 09:44:18 +00:00
|
|
|
mkdir "${MACOSX_SUPPORT_LIBS}" || exit 1
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
2018-04-15 09:44:18 +00:00
|
|
|
cd "${MACOSX_SUPPORT_LIBS}"
|
2011-07-15 21:48:02 +00:00
|
|
|
|
2015-01-22 00:27:09 +00:00
|
|
|
install_all
|
2013-10-28 22:38:23 +00:00
|
|
|
|
2011-07-15 21:48:02 +00:00
|
|
|
echo ""
|
|
|
|
|
2015-04-17 06:18:57 +00:00
|
|
|
#
|
2015-06-24 02:22:16 +00:00
|
|
|
# Indicate what paths to use for pkg-config and cmake.
|
2015-04-17 06:18:57 +00:00
|
|
|
#
|
|
|
|
pkg_config_path=/usr/local/lib/pkgconfig
|
|
|
|
if [ "$QT_VERSION" ]; then
|
2018-12-10 00:00:50 +00:00
|
|
|
qt_base_path=$HOME/Qt$QT_VERSION/$QT_VERSION/clang_64
|
2016-01-02 00:09:33 +00:00
|
|
|
pkg_config_path="$pkg_config_path":"$qt_base_path/lib/pkgconfig"
|
2015-06-24 02:22:16 +00:00
|
|
|
CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH":"$qt_base_path/lib/cmake"
|
2015-04-17 06:18:57 +00:00
|
|
|
fi
|
|
|
|
|
2017-04-19 15:40:02 +00:00
|
|
|
if $no_build; then
|
|
|
|
echo "All required dependencies downloaded. Run without -n to install them."
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2015-06-26 00:16:51 +00:00
|
|
|
echo "You are now prepared to build Wireshark."
|
|
|
|
echo
|
2018-05-14 22:07:25 +00:00
|
|
|
echo "To build:"
|
|
|
|
echo
|
|
|
|
echo "export PKG_CONFIG_PATH=$pkg_config_path"
|
|
|
|
echo "export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH"
|
|
|
|
echo "export PATH=$PATH:$qt_base_path/bin"
|
|
|
|
echo
|
|
|
|
echo "mkdir build; cd build"
|
2018-05-15 06:32:47 +00:00
|
|
|
if [ ! -z "$NINJA_VERSION" ]; then
|
2019-03-14 04:07:01 +00:00
|
|
|
echo "cmake -G Ninja .."
|
2018-05-15 06:32:47 +00:00
|
|
|
echo "ninja app_bundle"
|
|
|
|
echo "ninja install/strip"
|
|
|
|
else
|
2019-03-14 04:07:01 +00:00
|
|
|
echo "cmake .."
|
2018-05-15 06:32:47 +00:00
|
|
|
echo "make $MAKE_BUILD_OPTS app_bundle"
|
|
|
|
echo "make install/strip"
|
|
|
|
fi
|
2018-05-14 22:07:25 +00:00
|
|
|
echo
|
2011-07-15 21:48:02 +00:00
|
|
|
echo "Make sure you are allowed capture access to the network devices"
|
2020-10-03 02:17:00 +00:00
|
|
|
echo "See: https://gitlab.com/wireshark/wireshark/-/wikis/CaptureSetup/CapturePrivileges"
|
2015-06-26 00:16:51 +00:00
|
|
|
echo
|
2011-07-15 21:48:02 +00:00
|
|
|
|
|
|
|
exit 0
|