summaryrefslogtreecommitdiff
path: root/macosx-setup.sh
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2016-08-26 15:18:29 +0200
committerMichael Mann <mmann78@netscape.net>2016-10-13 19:26:10 +0000
commitb1cc056b12702435f6ebdc6ba0a8e17a41e159a0 (patch)
treee03028577c61da59952dd3c319aff62faf917a14 /macosx-setup.sh
parentad0a016bd2f7f82e4db8bbac13f959ad3bc7ecf4 (diff)
downloadwireshark-b1cc056b12702435f6ebdc6ba0a8e17a41e159a0.tar.gz
Remove nghttp2 code and use system' nghttp2
Update debian, macos (setup / homebrew) download script Update testsuite (don't try HPACK when build without nghttp2) Change-Id: I365e5e17bc4fab4acd81b4c39ea7189a5d1ee112 Reviewed-on: https://code.wireshark.org/review/17347 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-xmacosx-setup.sh53
1 files changed, 53 insertions, 0 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh
index d86584c0a7..e5a0966973 100755
--- a/macosx-setup.sh
+++ b/macosx-setup.sh
@@ -138,6 +138,8 @@ CARES_VERSION=1.12.0
LIBSSH_VERSION=0.7.2
+NGHTTP2_VERSION=1.14.0
+
DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
#
@@ -1469,11 +1471,57 @@ uninstall_libssh() {
fi
}
+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
+ xzcat nghttp2-$NGHTTP2_VERSION.tar.xz | tar xf - || exit 1
+ cd nghttp2-$NGHTTP2_VERSION
+ ./configure || exit 1
+ 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
+}
+
install_all() {
#
# Check whether the versions we have installed are the versions
# requested; if not, uninstall the installed versions.
#
+ if [ ! -z "$installed_nghttp2_version" -a \
+ "$installed_nghttp2_version" != "$NGHTTP2_VERSION" ] ; then
+ echo "Installed libssh version is $installed_nghttp2_version"
+ if [ -z "$NGHTTP2_VERSION" ] ; then
+ echo "nghttp2 is not requested"
+ else
+ echo "Requested nghttp2 version is $NGHTTP2_VERSION"
+ fi
+ uninstall_nghttp2 -r
+ fi
+
if [ ! -z "$installed_libssh_version" -a \
"$installed_libssh_version" != "$LIBSSH_VERSION" ] ; then
echo "Installed libssh version is $installed_libssh_version"
@@ -1874,6 +1922,8 @@ install_all() {
install_c_ares
install_libssh
+
+ install_nghttp2
}
uninstall_all() {
@@ -1890,6 +1940,8 @@ uninstall_all() {
# We also do a "make distclean", so that we don't have leftovers from
# old configurations.
#
+ uninstall_nghttp2
+
uninstall_libssh
uninstall_c_ares
@@ -2047,6 +2099,7 @@ then
installed_geoip_version=`ls geoip-*-done 2>/dev/null | sed 's/geoip-\(.*\)-done/\1/'`
installed_cares_version=`ls c-ares-*-done 2>/dev/null | sed 's/c-ares-\(.*\)-done/\1/'`
installed_libssh_version=`ls libssh-*-done 2>/dev/null | sed 's/libssh-\(.*\)-done/\1/'`
+ installed_nghttp2_version=`ls nghttp2-*-done 2>/dev/null | sed 's/nghttp2-\(.*\)-done/\1/'`
#
# If we don't have a versioned -done file for portaudio, but do have