Support setting up sbc on macOS.
Not tested with an actual capture file. Should not be too hard to get this working on Windows as well. Change-Id: Iae4b744361f0c4b62e919ad77e3d2b69ba45a8f3 Reviewed-on: https://code.wireshark.org/review/18331 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
This commit is contained in:
parent
afcbcdf272
commit
1e69a5e569
|
@ -127,6 +127,7 @@ GNUTLS_VERSION=2.12.19
|
||||||
# features present in all three versions)
|
# features present in all three versions)
|
||||||
LUA_VERSION=5.2.4
|
LUA_VERSION=5.2.4
|
||||||
PORTAUDIO_VERSION=pa_stable_v19_20111121
|
PORTAUDIO_VERSION=pa_stable_v19_20111121
|
||||||
|
SBC_VERSION=1.3
|
||||||
#
|
#
|
||||||
# XXX - they appear to have an unversioned gzipped tarball for the
|
# XXX - they appear to have an unversioned gzipped tarball for the
|
||||||
# current version; should we just download that, with some other
|
# current version; should we just download that, with some other
|
||||||
|
@ -186,6 +187,41 @@ uninstall_xz() {
|
||||||
fi
|
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 -O https://www.kernel.org/pub/linux/bluetooth/sbc-$SBC_VERSION.tar.gz || exit 1
|
||||||
|
gzcat sbc-$SBC_VERSION.tar.gz | tar xf - || exit 1
|
||||||
|
cd sbc-$SBC_VERSION
|
||||||
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0" ./configure --disable-tools --disable-tester --disable-shared || exit 1
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
install_autoconf() {
|
install_autoconf() {
|
||||||
if [ "$AUTOCONF_VERSION" -a ! -f autoconf-$AUTOCONF_VERSION-done ] ; then
|
if [ "$AUTOCONF_VERSION" -a ! -f autoconf-$AUTOCONF_VERSION-done ] ; then
|
||||||
echo "Downloading, building and installing GNU autoconf..."
|
echo "Downloading, building and installing GNU autoconf..."
|
||||||
|
@ -1555,6 +1591,17 @@ install_all() {
|
||||||
uninstall_geoip -r
|
uninstall_geoip -r
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
if [ ! -z "$installed_portaudio_version" -a \
|
if [ ! -z "$installed_portaudio_version" -a \
|
||||||
"$installed_portaudio_version" != "$PORTAUDIO_VERSION" ] ; then
|
"$installed_portaudio_version" != "$PORTAUDIO_VERSION" ] ; then
|
||||||
echo "Installed PortAudio version is $installed_portaudio_version"
|
echo "Installed PortAudio version is $installed_portaudio_version"
|
||||||
|
@ -1917,6 +1964,8 @@ install_all() {
|
||||||
|
|
||||||
install_portaudio
|
install_portaudio
|
||||||
|
|
||||||
|
install_sbc
|
||||||
|
|
||||||
install_geoip
|
install_geoip
|
||||||
|
|
||||||
install_c_ares
|
install_c_ares
|
||||||
|
@ -1950,6 +1999,8 @@ uninstall_all() {
|
||||||
|
|
||||||
uninstall_portaudio
|
uninstall_portaudio
|
||||||
|
|
||||||
|
uninstall_sbc
|
||||||
|
|
||||||
uninstall_lua
|
uninstall_lua
|
||||||
|
|
||||||
uninstall_gnutls
|
uninstall_gnutls
|
||||||
|
@ -2096,6 +2147,7 @@ then
|
||||||
installed_gnutls_version=`ls gnutls-*-done 2>/dev/null | sed 's/gnutls-\(.*\)-done/\1/'`
|
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/'`
|
installed_lua_version=`ls lua-*-done 2>/dev/null | sed 's/lua-\(.*\)-done/\1/'`
|
||||||
installed_portaudio_version=`ls portaudio-*-done 2>/dev/null | sed 's/portaudio-\(.*\)-done/\1/'`
|
installed_portaudio_version=`ls portaudio-*-done 2>/dev/null | sed 's/portaudio-\(.*\)-done/\1/'`
|
||||||
|
installed_sbc_version=`ls sbc-*-done 2>/dev/null | sed 's/sbc-\(.*\)-done/\1/'`
|
||||||
installed_geoip_version=`ls geoip-*-done 2>/dev/null | sed 's/geoip-\(.*\)-done/\1/'`
|
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_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_libssh_version=`ls libssh-*-done 2>/dev/null | sed 's/libssh-\(.*\)-done/\1/'`
|
||||||
|
|
Loading…
Reference in New Issue