2011-07-15 21:48:02 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Setup development environment on Mac OS X (tested with 10.6.8 and Xcode 3.2.6)
|
|
|
|
#
|
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
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2011-07-15 21:48:02 +00:00
|
|
|
|
2013-07-31 06:25:40 +00:00
|
|
|
#
|
2014-07-26 22:33:47 +00:00
|
|
|
# To install cmake
|
|
|
|
#
|
2014-03-16 23:05:43 +00:00
|
|
|
CMAKE=1
|
2013-07-31 06:25:40 +00:00
|
|
|
#
|
|
|
|
# To build all libraries as 32-bit libraries uncomment the following three lines.
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
2013-07-31 06:25:40 +00:00
|
|
|
# export CFLAGS="$CFLAGS -arch i386"
|
|
|
|
# export CXXFLAGS="$CXXFLAGS -arch i386"
|
|
|
|
# export LDFLAGS="$LDFLAGS -arch i386"
|
|
|
|
#
|
2013-10-23 01:39:54 +00:00
|
|
|
# and change "macx-clang" to "macx-clang-32" in the line below.
|
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# Note: when building against the 10.6 SDK, clang fails, because there's
|
|
|
|
# a missing libstdc++.dylib in the SDK; this does not bother g++, however.
|
|
|
|
#
|
|
|
|
#TARGET_PLATFORM=macx-g++
|
2013-10-23 01:39:54 +00:00
|
|
|
TARGET_PLATFORM=macx-clang
|
2013-07-06 19:32:07 +00:00
|
|
|
|
2013-07-05 23:26:15 +00:00
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# Versions of packages to download and install.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Some packages need xz to unpack their current source.
|
|
|
|
# xz is not yet provided with OS X.
|
|
|
|
#
|
|
|
|
XZ_VERSION=5.0.4
|
|
|
|
|
|
|
|
#
|
|
|
|
# In case we want to build with cmake.
|
|
|
|
#
|
2014-03-16 23:05:43 +00:00
|
|
|
CMAKE_VERSION=2.8.12.2
|
2013-10-29 01:49:59 +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
|
|
|
#
|
|
|
|
GETTEXT_VERSION=0.18.2
|
|
|
|
GLIB_VERSION=2.36.0
|
|
|
|
PKG_CONFIG_VERSION=0.28
|
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.
|
|
|
|
#
|
|
|
|
# If you don't want to build with Qt, comment out the QT_VERSION= line.
|
|
|
|
#
|
|
|
|
# If you want to build with GTK+ 2, comment out the GTK_VERSION=3.* line
|
|
|
|
# and un-comment the GTK_VERSION=2.* line.
|
|
|
|
#
|
|
|
|
# If you don't want to build with GTK+ at all, comment out both lines.
|
|
|
|
#
|
2014-10-31 19:27:30 +00:00
|
|
|
QT_VERSION=5.2.1
|
2013-10-29 01:49:59 +00:00
|
|
|
GTK_VERSION=2.24.17
|
|
|
|
#GTK_VERSION=3.5.2
|
|
|
|
if [ "$GTK_VERSION" ]; then
|
|
|
|
#
|
|
|
|
# We'll be building GTK+, so we need some additional libraries.
|
|
|
|
#
|
|
|
|
GTK_MAJOR_VERSION="`expr $GTK_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
GTK_MINOR_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
GTK_DOTDOT_VERSION="`expr $GTK_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
|
2013-10-23 01:39:54 +00:00
|
|
|
ATK_VERSION=2.8.0
|
|
|
|
PANGO_VERSION=1.30.1
|
|
|
|
PNG_VERSION=1.5.17
|
|
|
|
PIXMAN_VERSION=0.26.0
|
|
|
|
CAIRO_VERSION=1.12.2
|
|
|
|
GDK_PIXBUF_VERSION=2.28.0
|
2013-10-29 01:49:59 +00:00
|
|
|
fi
|
2013-07-05 23:26:15 +00:00
|
|
|
|
2014-03-16 23:07:10 +00:00
|
|
|
# In case we want to build GTK *and* we don't have Apple's X11 SDK installed
|
|
|
|
# we may want to install XQuartz. The version will only be used in the printing
|
|
|
|
# of a URL, the package will not be installed.
|
|
|
|
#
|
|
|
|
XQUARTZ_VERSION=2.7.5
|
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
|
|
|
|
#
|
|
|
|
# libgpg-error is required for libgcrypt.
|
|
|
|
#
|
|
|
|
LIBGPG_ERROR_VERSION=1.10
|
|
|
|
#
|
|
|
|
# libgcrypt is required for GnuTLS.
|
|
|
|
# XXX - the link for "Libgcrypt source code" at
|
|
|
|
# http://www.gnupg.org/download/#libgcrypt is for 1.5.0, and is a bzip2
|
|
|
|
# file, but http://directory.fsf.org/project/libgcrypt/ lists only
|
|
|
|
# 1.4.6.
|
|
|
|
#
|
|
|
|
LIBGCRYPT_VERSION=1.5.0
|
|
|
|
GNUTLS_VERSION=2.12.19
|
2014-02-25 14:17:00 +00:00
|
|
|
# Default to 5.2 now, unless user overrides it later
|
|
|
|
LUA_VERSION=5.2.3
|
2013-07-05 23:26:15 +00:00
|
|
|
PORTAUDIO_VERSION=pa_stable_v19_20111121
|
|
|
|
#
|
|
|
|
# XXX - they appear to have an unversioned gzipped tarball for the
|
|
|
|
# current version; should we just download that, with some other
|
|
|
|
# way of specifying whether to download the GeoIP API?
|
|
|
|
#
|
|
|
|
GEOIP_VERSION=1.4.8
|
|
|
|
|
2013-10-28 22:38:23 +00:00
|
|
|
CARES_VERSION=1.10.0
|
|
|
|
|
2013-07-31 06:25:40 +00:00
|
|
|
DARWIN_MAJOR_VERSION=`uname -r | sed 's/\([0-9]*\).*/\1/'`
|
|
|
|
|
2013-07-06 19:32:07 +00:00
|
|
|
#
|
|
|
|
# GNU autotools; they're provided with releases up to Snow Leopard, but
|
|
|
|
# not in later releases.
|
|
|
|
#
|
|
|
|
if [[ $DARWIN_MAJOR_VERSION -gt 10 ]]; then
|
|
|
|
AUTOCONF_VERSION=2.69
|
|
|
|
AUTOMAKE_VERSION=1.13.3
|
|
|
|
LIBTOOL_VERSION=2.4.2
|
|
|
|
fi
|
2013-07-05 23:26:15 +00:00
|
|
|
|
|
|
|
uninstall() {
|
|
|
|
if [ -d macosx-support-libs ]
|
|
|
|
then
|
|
|
|
cd macosx-support-libs
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2013-10-28 22:38:23 +00:00
|
|
|
|
2014-10-31 08:50:43 +00:00
|
|
|
installed_cares_version=`ls c-ares-*-done 2>/dev/null | sed 's/c-ares-\(.*\)-done/\1/'`
|
2013-10-28 22:38:23 +00:00
|
|
|
if [ ! -z "$installed_cares_version" ] ; then
|
|
|
|
echo "Uninstalling C-Ares API:"
|
2014-10-31 08:50:43 +00:00
|
|
|
cd c-ares-$installed_cares_version
|
2013-10-28 22:38:23 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2014-10-31 08:50:43 +00:00
|
|
|
rm c-ares-$installed_cares_version-done
|
2013-10-28 22:38:23 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_geoip_version=`ls geoip-*-done 2>/dev/null | sed 's/geoip-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_geoip_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling GeoIP API:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd GeoIP-$installed_geoip_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 09:31:45 +00:00
|
|
|
rm geoip-$installed_geoip_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$PORTAUDIO_VERSION" -a -f portaudio-done ] ; then
|
|
|
|
echo "Uninstalling PortAudio:"
|
|
|
|
cd portaudio
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm portaudio-done
|
|
|
|
fi
|
|
|
|
|
2013-07-09 09:31:45 +00:00
|
|
|
installed_lua_version=`ls lua-*-done 2>/dev/null | sed 's/lua-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_lua_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
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)
|
2013-07-09 08:47:05 +00:00
|
|
|
(cd /usr/local/man/man1; $DO_RM -f lua.1 luac.1)
|
2013-07-09 09:31:45 +00:00
|
|
|
cd lua-$installed_lua_version
|
2013-07-05 23:26:15 +00:00
|
|
|
make clean || exit 1
|
|
|
|
cd ..
|
2013-07-09 09:31:45 +00:00
|
|
|
rm lua-$installed_lua_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_gnutls_version=`ls gnutls-*-done 2>/dev/null | sed 's/gnutls-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_gnutls_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling GnuTLS:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd gnutls-$installed_gnutls_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm gnutls-$installed_gnutls_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_libgcrypt_version=`ls libgcrypt-*-done 2>/dev/null | sed 's/libgcrypt-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_libgcrypt_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling libgcrypt:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd libgcrypt-$installed_libgcrypt_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm libgcrypt-$installed_libgcrypt_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_libgpg_error_version=`ls libgpg-error-*-done 2>/dev/null | sed 's/libgpg-error-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_libgpg_error_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling libgpg-error:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd libgpg-error-$installed_libgpg_error_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm libgpg-error-$installed_libgpg_error_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_libsmi_version=`ls libsmi-*-done 2>/dev/null | sed 's/libsmi-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_libsmi_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling libsmi:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd libsmi-$installed_libsmi_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm libsmi-$installed_libsmi_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_gtk_version=`ls gtk+-*-done 2>/dev/null | sed 's/gtk+-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_gtk_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling GTK+:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd gtk+-$installed_gtk_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm gtk+-$installed_gtk_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_gdk_pixbuf_version=`ls gdk-pixbuf-*-done 2>/dev/null | sed 's/gdk-pixbuf-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_gdk_pixbuf_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling gdk-pixbuf:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd gdk-pixbuf-$installed_gdk_pixbuf_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm gdk-pixbuf-$installed_gdk_pixbuf_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_pango_version=`ls pango-*-done 2>/dev/null | sed 's/pango-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_pango_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling Pango:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd pango-$installed_pango_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm pango-$installed_pango_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_atk_version=`ls atk-*-done 2>/dev/null | sed 's/atk-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_atk_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling ATK:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd atk-$installed_atk_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm atk-$installed_atk_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_cairo_version=`ls cairo-*-done 2>/dev/null | sed 's/cairo-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_cairo_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling Cairo:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd cairo-$installed_cairo_version
|
2013-07-09 09:54:19 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
2013-07-05 23:26:15 +00:00
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm cairo-$installed_cairo_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_pixman_version=`ls pixman-*-done 2>/dev/null | sed 's/pixman-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_pixman_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling pixman:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd pixman-$installed_pixman_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm pixman-$installed_pixman_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_libpng_version=`ls libpng-*-done 2>/dev/null | sed 's/libpng-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_libpng_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling libpng:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd libpng-$installed_libpng_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm libpng-$installed_libpng_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
installed_qt_version=`ls qt-*-done 2>/dev/null | sed 's/qt-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_qt_version" ] ; then
|
|
|
|
echo "Uninstalling Qt:"
|
|
|
|
cd qt-everywhere-opensource-src-$installed_qt_version
|
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
#
|
|
|
|
# XXX - "make distclean" doesn't work. qmake sure does a
|
|
|
|
# good job of constructing Makefiles that work correctly....
|
|
|
|
#
|
|
|
|
#make distclean || exit 1
|
|
|
|
cd ..
|
|
|
|
rm qt-$installed_qt_version-done
|
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_glib_version=`ls glib-*-done 2>/dev/null | sed 's/glib-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_glib_version" ] ; then
|
2013-07-08 22:56:55 +00:00
|
|
|
echo "Uninstalling GLib:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd glib-$installed_glib_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm glib-$installed_glib_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_pkg_config_version=`ls pkg-config-*-done 2>/dev/null | sed 's/pkg-config-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_pkg_config_version" ] ; then
|
2013-07-08 22:56:55 +00:00
|
|
|
echo "Uninstalling pkg-config:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd pkg-config-$installed_pkg_config_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm pkg-config-$installed_pkg_config_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_gettext_version=`ls gettext-*-done 2>/dev/null | sed 's/gettext-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_gettext_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling GNU gettext:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd gettext-$installed_gettext_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm gettext-$installed_gettext_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
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?
|
|
|
|
#
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_cmake_version=`ls cmake-*-done 2>/dev/null | sed 's/cmake-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_cmake_version" ]; then
|
|
|
|
echo "Uninstalling CMake:"
|
2014-07-26 22:33:47 +00:00
|
|
|
sudo rm -rf "/Applications/CMake "`echo "$installed_cmake_version" | sed 's/\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1.\2-\3/'`.app
|
|
|
|
sudo rm /usr/bin/ccmake
|
|
|
|
sudo rm /usr/bin/cmake
|
|
|
|
sudo rm /usr/bin/cmake-gui
|
|
|
|
sudo rm /usr/bin/cmakexbuild
|
|
|
|
sudo rm /usr/bin/cpack
|
|
|
|
sudo rm /usr/bin/ctest
|
|
|
|
sudo pkgutil --forget com.Kitware.CMake
|
2013-07-09 04:41:34 +00:00
|
|
|
rm cmake-$installed_cmake_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_libtool_version=`ls libtool-*-done 2>/dev/null | sed 's/libtool-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_libtool_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling GNU libtool:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd libtool-$installed_libtool_version
|
2014-09-26 06:05:20 +00:00
|
|
|
$DO_MV /usr/local/bin/glibtool /usr/local/bin/libtool
|
|
|
|
$DO_MV /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm libtool-$installed_libtool_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_automake_version=`ls automake-*-done 2>/dev/null | sed 's/automake-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_automake_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling GNU automake:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd automake-$installed_automake_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm automake-$installed_automake_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_autoconf_version=`ls autoconf-*-done 2>/dev/null | sed 's/autoconf-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_autoconf_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling GNU autoconf:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd autoconf-$installed_autoconf_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm autoconf-$installed_autoconf_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-09 04:41:34 +00:00
|
|
|
installed_xz_version=`ls xz-*-done 2>/dev/null | sed 's/xz-\(.*\)-done/\1/'`
|
|
|
|
if [ ! -z "$installed_xz_version" ] ; then
|
2013-07-05 23:26:15 +00:00
|
|
|
echo "Uninstalling xz:"
|
2013-07-09 04:41:34 +00:00
|
|
|
cd xz-$installed_xz_version
|
2013-07-05 23:26:15 +00:00
|
|
|
$DO_MAKE_UNINSTALL || exit 1
|
|
|
|
make distclean || exit 1
|
|
|
|
cd ..
|
2013-07-09 04:41:34 +00:00
|
|
|
rm xz-$installed_xz_version-done
|
2013-07-05 23:26:15 +00:00
|
|
|
fi
|
|
|
|
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.)
|
|
|
|
#
|
2014-09-26 06:11:34 +00:00
|
|
|
# If not, do "make install", "make uninstall", the removes for Lua,
|
|
|
|
# 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
|
|
|
|
|
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/'`
|
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
|
|
|
|
|
|
|
#
|
|
|
|
# That's also the OS whose SDK we'd be using.
|
|
|
|
#
|
|
|
|
sdk_target=$min_osx_target
|
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
|
|
|
|
# version of OS X and later versions.
|
2013-07-05 23:26:15 +00:00
|
|
|
# -u - do an uninstall.
|
|
|
|
#
|
2013-07-06 06:16:06 +00:00
|
|
|
while getopts ht:u name
|
2013-07-05 23:26:15 +00:00
|
|
|
do
|
|
|
|
case $name in
|
|
|
|
u)
|
|
|
|
do_uninstall=yes
|
|
|
|
;;
|
2013-07-06 06:16:06 +00:00
|
|
|
t)
|
|
|
|
min_osx_target="$OPTARG"
|
|
|
|
;;
|
2013-07-05 23:26:15 +00:00
|
|
|
h|?)
|
2013-07-06 06:16:06 +00:00
|
|
|
echo "Usage: macosx-setup.sh [ -t <target> ] [ -u ]" 1>&1
|
2013-07-05 23:26:15 +00:00
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$do_uninstall" = "yes" ]
|
|
|
|
then
|
|
|
|
uninstall
|
|
|
|
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-01-22 05:07:23 +00:00
|
|
|
#
|
2013-07-09 04:41:34 +00:00
|
|
|
# To make this work on Leopard (rather than working *on* Snow Leopard
|
|
|
|
# when building *for* Leopard) will take more work.
|
2013-01-22 05:07:23 +00:00
|
|
|
#
|
2013-07-09 04:41:34 +00:00
|
|
|
# For one thing, Leopard's /usr/X11/lib/libXdamage.la claims, at least
|
2013-01-22 05:07:23 +00:00
|
|
|
# with all software updates applied, that the Xdamage shared library
|
|
|
|
# is libXdamage.1.0.0.dylib, but it is, in fact, libXdamage.1.1.0.dylib.
|
|
|
|
# This causes problems when building GTK+, so the script would have to
|
|
|
|
# fix that file.
|
|
|
|
#
|
|
|
|
if [[ $DARWIN_MAJOR_VERSION -le 9 ]]; then
|
2013-07-06 21:21:54 +00:00
|
|
|
echo "This script does not support any versions of OS X before Snow Leopard" 1>&2
|
|
|
|
exit 1
|
2013-01-22 05:07:23 +00:00
|
|
|
fi
|
2012-08-13 11:54:37 +00:00
|
|
|
|
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
|
|
|
#
|
|
|
|
# Get the real version - strip off the "10.".
|
|
|
|
# We'll worry about that if, as, and when there's ever
|
|
|
|
# an OS XI.
|
|
|
|
#
|
|
|
|
deploy_real_version=`echo "$min_osx_target" | sed -n 's/10\.\(.*\)/\1/p'`
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
sdklist=`(cd "$sdksdir"; ls -d MacOSX10.[0-9]*.sdk 2>/dev/null)`
|
|
|
|
|
|
|
|
for sdk in $sdklist
|
|
|
|
do
|
|
|
|
#
|
|
|
|
# Get the real version for this SDK.
|
|
|
|
#
|
|
|
|
sdk_real_version=`echo "$sdk" | sed -n 's/MacOSX10\.\(.*\)\.sdk/\1/p'`
|
|
|
|
|
|
|
|
#
|
|
|
|
# Is it for the deployment target or some later release?
|
|
|
|
#
|
|
|
|
if test "$sdk_real_version" -ge "$deploy_real_version"
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# Yes, use it.
|
|
|
|
#
|
|
|
|
sdkpath="$sdksdir/$sdk"
|
|
|
|
qt_sdk_arg="-sdk $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
|
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
|
|
|
echo "macosx-setup.sh: Couldn't find an SDK for OS X $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"
|
|
|
|
sdk_target=10.$sdk_real_version
|
|
|
|
echo "Using the 10.$sdk_real_version SDK"
|
|
|
|
|
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-08-23 23:27:07 +00:00
|
|
|
if [[ "$min_osx_target" == "10.5" ]]
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# Cairo is part of Mac OS X 10.6 and later.
|
|
|
|
# The *headers* are supplied by 10.5, but the *libraries*
|
|
|
|
# aren't, so we have to build it if we're building for 10.5.
|
|
|
|
#
|
|
|
|
cairo_not_in_the_os=yes
|
2013-07-09 04:41:34 +00:00
|
|
|
|
2013-08-23 23:27:07 +00:00
|
|
|
#
|
|
|
|
# Build with older versions of the support libraries, as
|
|
|
|
# were used on the Wireshark Leopard buildbot at one
|
|
|
|
# point. (Most of these versions come from the About page
|
|
|
|
# from Wireshark 1.8.6, the last build done on that buildbot;
|
|
|
|
# the ATK version isn't reported, so this is a guess.)
|
|
|
|
#
|
|
|
|
# If you want to try building with newer versions of
|
|
|
|
# the libraries, note that:
|
|
|
|
#
|
|
|
|
# The version of fontconfig that comes with Leopard doesn't
|
|
|
|
# support FC_WEIGHT_EXTRABLACK, so we can't use any version
|
|
|
|
# of Pango newer than 1.22.4.
|
|
|
|
#
|
|
|
|
# However, Pango 1.22.4 doesn't work with versions of GLib
|
|
|
|
# after 2.29.6, because Pango 1.22.4 uses G_CONST_RETURN and
|
|
|
|
# GLib 2.29.8 and later deprecate it (there doesn't appear to
|
|
|
|
# be a GLib 2.29.7). That means we'd either have to patch
|
|
|
|
# Pango not to use it (just use "const"; G_CONST_RETURN was
|
|
|
|
# there to allow code to choose whether to use "const" or not),
|
|
|
|
# or use GLib 2.29.6 or earlier.
|
|
|
|
#
|
|
|
|
# GLib 2.29.6 includes an implementation of g_bit_lock() that,
|
|
|
|
# on x86 (32-bit and 64-bit), uses asms in a fashion
|
|
|
|
# ("asm volatile goto") that requires GCC 4.5 or later, which
|
|
|
|
# is later than the compilers that come with Leopard and Snow
|
|
|
|
# Leopard. Recent versions of GLib check for that, but 2.29.6
|
|
|
|
# doesn't, so, if you want to build GLib 2.29.6 on Leopard or
|
|
|
|
# Snow Leopard, you would have to patch glib/gbitlock.c to do
|
|
|
|
# what the newer versions of GLib do:
|
|
|
|
#
|
|
|
|
# define a USE_ASM_GOTO macro that indicates whether "asm goto"
|
|
|
|
# can be used:
|
|
|
|
# #if (defined (i386) || defined (__amd64__))
|
|
|
|
# #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
|
|
|
# #define USE_ASM_GOTO 1
|
|
|
|
# #endif
|
|
|
|
# #endif
|
|
|
|
#
|
|
|
|
# replace all occurrences of
|
|
|
|
#
|
|
|
|
# #if defined (__GNUC__) && (defined (i386) || defined (__amd64__))
|
|
|
|
#
|
|
|
|
# with
|
|
|
|
#
|
|
|
|
# #ifdef USE_ASM_GOTO
|
|
|
|
#
|
|
|
|
# Using GLib 2.29.6 or earlier, however, means that we can't
|
|
|
|
# use a version of ATK later than 2.3.93, as those versions
|
|
|
|
# don't work with GLib 2.29.6. The same applies to gdk-pixbuf;
|
|
|
|
# versions of gdk-pixbuf after 2.24.1 won't work with GLib
|
|
|
|
# 2.29.6.
|
|
|
|
#
|
|
|
|
# Then you have to make sure that what you've build doesn't
|
|
|
|
# cause the X server that comes with Leopard to crash; at
|
|
|
|
# least one attempt at building for Leopard did.
|
|
|
|
#
|
|
|
|
# At least if building on Leopard, you might also find
|
|
|
|
# that, with various older versions of Cairo, including
|
|
|
|
# 1.6.4 and at least some 1.8.x versions, when you try to
|
|
|
|
# build it, the build fails because it can't find
|
|
|
|
# png_set_longjmp_fn(). I vaguely remember dealing with that,
|
|
|
|
# ages ago, but don't remember what I did.
|
|
|
|
#
|
|
|
|
GLIB_VERSION=2.16.3
|
|
|
|
CAIRO_VERSION=1.6.4
|
|
|
|
ATK_VERSION=1.24.0
|
|
|
|
PANGO_VERSION=1.20.2
|
|
|
|
GTK_VERSION=2.12.9
|
2013-07-09 04:41:34 +00:00
|
|
|
|
2013-08-23 23:27:07 +00:00
|
|
|
#
|
|
|
|
# That version of GTK+ includes gdk-pixbuf.
|
|
|
|
# XXX - base this on the version of GTK+ requested.
|
|
|
|
#
|
|
|
|
GDK_PIXBUF_VERSION=
|
|
|
|
|
|
|
|
#
|
|
|
|
# Libgcrypt 1.5.0 fails to compile due to some problem with an
|
|
|
|
# asm in rijndael.c, at least with i686-apple-darwin10-gcc-4.2.1
|
|
|
|
# (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) when building
|
|
|
|
# 32-bit.
|
|
|
|
#
|
|
|
|
# We try libgcrypt 1.4.3 instead, as that's what shows up in
|
|
|
|
# the version from the Leopard buildbot.
|
|
|
|
LIBGCRYPT_VERSION=1.4.3
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build 32-bit while we're at it; Leopard has a bug that
|
|
|
|
# causes some BPF functions not to work with 64-bit userland
|
|
|
|
# code, so capturing won't work.
|
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
CFLAGS="$CFLAGS -arch i386"
|
|
|
|
CXXFLAGS="$CXXFLAGS -arch i386"
|
2013-08-23 23:27:07 +00:00
|
|
|
export LDFLAGS="$LDFLAGS -arch i386"
|
|
|
|
fi
|
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
|
2013-07-06 21:21:54 +00:00
|
|
|
echo "Please install Xcode first (should be available on DVD or from http://developer.apple.com/xcode/index.php)."
|
|
|
|
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.
|
|
|
|
#
|
|
|
|
if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
|
|
|
|
echo "Please install Xcode first (should be available on DVD or from http://developer.apple.com/xcode/index.php)."
|
|
|
|
echo "The command-line build tools are not sufficient to build Qt."
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-10-29 01:49:59 +00:00
|
|
|
fi
|
|
|
|
if [ "$GTK_VERSION" ]; then
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
|
|
|
# If we're building with GTK+, you also need the X11 SDK; with at least
|
|
|
|
# some versions of OS X and Xcode, that is, I think, an optional install.
|
|
|
|
# (Or it might be installed with X11, but I think *that* is an optional
|
|
|
|
# install on at least some versions of OS X.)
|
|
|
|
#
|
|
|
|
if [ ! -d /usr/X11/include ]; then
|
|
|
|
echo "Please install X11 and the X11 SDK first."
|
2014-03-16 23:07:10 +00:00
|
|
|
echo " You can either use http://xquartz.macosforge.org/, e.g."
|
|
|
|
echo " http://xquartz-dl.macosforge.org/SL/XQuartz-$XQUARTZ_VERSION.dmg"
|
|
|
|
echo " or the native Apple packages if you are on Lion or below."
|
2013-10-23 01:39:54 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig
|
|
|
|
|
|
|
|
#
|
|
|
|
# Do all the downloads and untarring in a subdirectory, so all that
|
|
|
|
# stuff can be removed once we've installed the support libraries.
|
|
|
|
#
|
|
|
|
if [ ! -d macosx-support-libs ]
|
|
|
|
then
|
2013-07-06 21:21:54 +00:00
|
|
|
mkdir macosx-support-libs || exit 1
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
cd macosx-support-libs
|
|
|
|
|
2012-01-14 14:40:58 +00:00
|
|
|
# Start with xz: It is the sole download format of glib later than 2.31.2
|
2011-12-31 16:20:47 +00:00
|
|
|
#
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$XZ_VERSION" -a ! -f xz-$XZ_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing xz:"
|
|
|
|
[ -f xz-$XZ_VERSION.tar.bz2 ] || curl -O http://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 || exit 1
|
|
|
|
bzcat xz-$XZ_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
cd xz-$XZ_VERSION
|
|
|
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0" ./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch xz-$XZ_VERSION-done
|
|
|
|
fi
|
2011-12-31 16:20:47 +00:00
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$AUTOCONF_VERSION" -a ! -f autoconf-$AUTOCONF_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building and installing GNU autoconf..."
|
|
|
|
[ -f autoconf-$AUTOCONF_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.xz || exit 1
|
|
|
|
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
|
|
|
|
|
|
|
|
if [ "$AUTOMAKE_VERSION" -a ! -f automake-$AUTOMAKE_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building and installing GNU automake..."
|
|
|
|
[ -f automake-$AUTOMAKE_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/automake/automake-$AUTOMAKE_VERSION.tar.xz || exit 1
|
|
|
|
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
|
|
|
|
|
|
|
|
if [ "$LIBTOOL_VERSION" -a ! -f libtool-$LIBTOOL_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building and installing GNU libtool..."
|
|
|
|
[ -f libtool-$LIBTOOL_VERSION.tar.xz ] || curl -O ftp://ftp.gnu.org/gnu/libtool/libtool-$LIBTOOL_VERSION.tar.xz || exit 1
|
|
|
|
xzcat libtool-$LIBTOOL_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd libtool-$LIBTOOL_VERSION
|
|
|
|
./configure || exit 1
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
2014-09-26 06:05:20 +00:00
|
|
|
$DO_MV /usr/local/bin/libtool /usr/local/bin/glibtool
|
|
|
|
$DO_MV /usr/local/bin/libtoolize /usr/local/bin/glibtoolize
|
2013-06-17 23:30:56 +00:00
|
|
|
cd ..
|
|
|
|
touch libtool-$LIBTOOL_VERSION-done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$CMAKE" -a ! -f cmake-$CMAKE_VERSION-done ]; then
|
2014-07-26 22:33:47 +00:00
|
|
|
echo "Downloading and installing CMake:"
|
2012-01-14 14:40:58 +00:00
|
|
|
cmake_dir=`expr $CMAKE_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
|
2014-07-26 22:33:47 +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.
|
|
|
|
#
|
|
|
|
[ -f cmake-$CMAKE_VERSION-Darwin64-universal.dmg ] || curl -O http://www.cmake.org/files/v$cmake_dir/cmake-$CMAKE_VERSION-Darwin64-universal.dmg || exit 1
|
|
|
|
sudo hdiutil attach http://www.cmake.org/files/v2.8/cmake-$CMAKE_VERSION-Darwin64-universal.dmg || exit 1
|
|
|
|
sudo installer -target / -pkg /Volumes/cmake-$CMAKE_VERSION-Darwin64-universal/cmake-$CMAKE_VERSION-Darwin64-universal.pkg || exit 1
|
2014-07-27 20:30:44 +00:00
|
|
|
sudo hdiutil detach /Volumes/cmake-$CMAKE_VERSION-Darwin64-universal
|
2013-06-17 23:30:56 +00:00
|
|
|
touch cmake-$CMAKE_VERSION-done
|
2012-01-14 14:40:58 +00:00
|
|
|
fi
|
|
|
|
|
2011-07-15 21:48:02 +00:00
|
|
|
#
|
|
|
|
# Start with GNU gettext; GLib requires it, and OS X doesn't have it
|
|
|
|
# or a BSD-licensed replacement.
|
|
|
|
#
|
2011-07-19 02:29:31 +00:00
|
|
|
# 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.
|
|
|
|
#
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ ! -f gettext-$GETTEXT_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing GNU gettext:"
|
|
|
|
[ -f gettext-$GETTEXT_VERSION.tar.gz ] || curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-$GETTEXT_VERSION.tar.gz || exit 1
|
|
|
|
gzcat gettext-$GETTEXT_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd gettext-$GETTEXT_VERSION
|
2013-07-06 06:16:06 +00:00
|
|
|
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0 $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-06-17 23:30:56 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch gettext-$GETTEXT_VERSION-done
|
|
|
|
fi
|
|
|
|
|
2013-07-08 22:56:55 +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.
|
|
|
|
#
|
|
|
|
if [ ! -f pkg-config-$PKG_CONFIG_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing pkg-config:"
|
|
|
|
[ -f pkg-config-$PKG_CONFIG_VERSION.tar.gz ] || curl -O http://pkgconfig.freedesktop.org/releases/pkg-config-$PKG_CONFIG_VERSION.tar.gz || exit 1
|
|
|
|
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
|
|
|
|
|
2013-06-17 23:30:56 +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]*\).*'`
|
2013-07-09 04:41:34 +00:00
|
|
|
GLIB_MAJOR_VERSION="`expr $GLIB_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
GLIB_MINOR_VERSION="`expr $GLIB_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
GLIB_DOTDOT_VERSION="`expr $GLIB_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
if [[ $GLIB_MAJOR_VERSION -gt 2 ||
|
|
|
|
$GLIB_MINOR_VERSION -gt 28 ||
|
|
|
|
($GLIB_MINOR_VERSION -eq 28 && $GLIB_DOTDOT_VERSION -ge 8) ]]
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
xzcat glib-$GLIB_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
else
|
|
|
|
[ -f glib-$GLIB_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/glib/$glib_dir/glib-$GLIB_VERSION.tar.bz2 || exit 1
|
|
|
|
bzcat glib-$GLIB_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
fi
|
2013-06-17 23:30:56 +00:00
|
|
|
cd glib-$GLIB_VERSION
|
|
|
|
#
|
|
|
|
# OS X ships with libffi, but doesn't provide its pkg-config file;
|
|
|
|
# explicitly specify LIBFFI_CFLAGS and LIBFFI_LIBS, so the configure
|
|
|
|
# script doesn't try to use pkg-config to get the appropriate
|
2013-07-05 23:19:58 +00:00
|
|
|
# C flags and loader flags.
|
2013-06-17 23:30:56 +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
|
2013-12-23 15:53:13 +00:00
|
|
|
# "#define.*MACOSX" in /usr/include/ffi/fficonfig.h, explicitly
|
2013-06-17 23:30:56 +00:00
|
|
|
# define it.
|
|
|
|
#
|
2013-06-27 19:14:41 +00:00
|
|
|
# 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:
|
|
|
|
#
|
2014-07-26 22:33:47 +00:00
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=691608#c25
|
2013-06-26 19:38:47 +00:00
|
|
|
#
|
2013-06-27 10:30:33 +00:00
|
|
|
# First, determine where the system include files are. (It's not
|
2013-07-04 23:16:23 +00:00
|
|
|
# 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).
|
2013-06-27 10:30:33 +00:00
|
|
|
#
|
2013-07-04 23:16:23 +00:00
|
|
|
includedir=`xcrun --show-sdk-path 2>/dev/null`/usr/include
|
2013-06-27 10:30:33 +00:00
|
|
|
if grep -qs '#define.*MACOSX' $includedir/ffi/fficonfig.h
|
2013-06-17 23:30:56 +00:00
|
|
|
then
|
2013-07-06 21:21:54 +00:00
|
|
|
# It's defined, nothing to do
|
2014-11-01 02:50:42 +00:00
|
|
|
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
|
2013-06-17 23:30:56 +00:00
|
|
|
else
|
2014-11-01 02:50:42 +00:00
|
|
|
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
|
2013-06-17 23:30:56 +00:00
|
|
|
fi
|
2013-07-09 04:41:34 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Apply the fix to GNOME bug 529806:
|
|
|
|
#
|
|
|
|
# https://bugzilla.gnome.org/show_bug.cgi?id=529806
|
|
|
|
#
|
|
|
|
# if we have a version of GLib prior to 2.30.
|
|
|
|
#
|
|
|
|
if [[ $GLIB_MAJOR_VERSION -eq 2 && $GLIB_MINOR_VERSION -le 30 ]]
|
|
|
|
then
|
|
|
|
patch -p0 <../../macosx-support-lib-patches/glib-gconvert.c.patch || exit 1
|
|
|
|
fi
|
2013-06-17 23:30:56 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch glib-$GLIB_VERSION-done
|
|
|
|
fi
|
|
|
|
|
2011-07-15 21:48:02 +00:00
|
|
|
#
|
|
|
|
# Now we have reached a point where we can build everything but
|
|
|
|
# the GUI (Wireshark).
|
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
if [ "$QT_VERSION" -a ! -f qt-$QT_VERSION-done ]; then
|
|
|
|
echo "Downloading, building, and installing Qt:"
|
|
|
|
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
|
|
|
|
#
|
|
|
|
# What you get for this URL might just be a 302 Found reply, so use
|
|
|
|
# -L so we get redirected.
|
|
|
|
#
|
|
|
|
curl -L -O http://download.qt-project.org/official_releases/qt/$QT_MAJOR_MINOR_VERSION/$QT_VERSION/single/qt-everywhere-opensource-src-$QT_VERSION.tar.gz
|
|
|
|
#
|
|
|
|
# Qt 5.1.x sets QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
|
|
|
|
# in qtbase/mkspecs/$TARGET_PLATFORM/qmake.conf
|
|
|
|
# We may need to adjust this manually in the future.
|
|
|
|
#
|
|
|
|
# The -no-c++11 flag is needed to work around
|
|
|
|
# https://bugreports.qt-project.org/browse/QTBUG-30487
|
|
|
|
#
|
|
|
|
tar xf qt-everywhere-opensource-src-$QT_VERSION.tar.gz
|
|
|
|
cd qt-everywhere-opensource-src-$QT_VERSION
|
|
|
|
#
|
|
|
|
# We don't build Qt in its Full Shining Glory, as we don't need all
|
|
|
|
# of its components, and it takes *forever* to build in that form.
|
|
|
|
#
|
|
|
|
# Qt 5.2.0 beta1 fails to build on OS X without -no-xcb due to bug
|
|
|
|
# QTBUG-34382.
|
|
|
|
#
|
|
|
|
# Qt 5.x fails to build on OS X with -no-opengl due to bug
|
|
|
|
# QTBUG-31151.
|
|
|
|
#
|
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
|
|
|
./configure -v $qt_sdk_arg -platform $TARGET_PLATFORM \
|
2013-10-29 01:49:59 +00:00
|
|
|
-opensource -confirm-license -no-c++11 -no-dbus \
|
|
|
|
-no-sql-sqlite -no-xcb -nomake examples \
|
|
|
|
-skip qtdoc -skip qtquickcontrols -skip qtwebkit \
|
|
|
|
-skip qtwebkit-examples -skip qtxmlpatterns
|
|
|
|
make || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch qt-$QT_VERSION-done
|
|
|
|
fi
|
2013-10-23 01:39:54 +00:00
|
|
|
|
2013-10-29 01:49:59 +00:00
|
|
|
if [ "$GTK_VERSION" ]; then
|
2013-07-06 21:21:54 +00:00
|
|
|
#
|
2013-10-23 01:39:54 +00:00
|
|
|
# GTK+ 3 requires a newer Cairo build than the one that comes with
|
|
|
|
# 10.6, so we build Cairo if we are using GTK+ 3.
|
2013-07-06 21:21:54 +00:00
|
|
|
#
|
2013-10-23 01:39:54 +00:00
|
|
|
# In 10.6 and 10.7, it's an X11 library; if we build with "native" GTK+
|
|
|
|
# rather than X11 GTK+, we might have to build and install Cairo.
|
|
|
|
# In 10.8 and later, there is no X11, but it's included in Xquartz;
|
|
|
|
# again, if we build with "native" GTK+, we'd have to build and install
|
|
|
|
# it.
|
2013-07-06 21:21:54 +00:00
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
if [[ "$GTK_MAJOR_VERSION" -eq 3 || "$cairo_not_in_the_os" = yes ]]; then
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
|
|
|
# Requirements for Cairo first
|
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# The libpng that comes with the X11 for Leopard has a bogus
|
2013-10-23 01:39:54 +00:00
|
|
|
# pkg-config file that lies about where the header files are,
|
|
|
|
# which causes other packages not to be able to find its
|
|
|
|
# headers.
|
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# The libpng in later versions is not what the version of
|
|
|
|
# libpixman we build below wants - it wants libpng15.
|
|
|
|
#
|
|
|
|
if [ ! -f libpng-$PNG_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing libpng:"
|
|
|
|
#
|
|
|
|
# The FTP site puts libpng x.y.* into a libpngxy directory.
|
|
|
|
#
|
|
|
|
subdir=`echo $PNG_VERSION | sed 's/\([1-9][0-9]*\)\.\([1-9][0-9]*\).*/libpng\1\2'/`
|
|
|
|
[ -f libpng-$PNG_VERSION.tar.xz ] || curl -O ftp://ftp.simplesystems.org/pub/libpng/png/src/$subdir/libpng-$PNG_VERSION.tar.xz
|
|
|
|
xzcat libpng-$PNG_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd libpng-$PNG_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-10-29 01:49:59 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libpng-$PNG_VERSION-done
|
|
|
|
fi
|
2013-07-06 21:21:54 +00:00
|
|
|
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# The libpixman versions that come with the X11s for Leopard,
|
|
|
|
# Snow Leopard, and Lion is too old to support Cairo's image
|
|
|
|
# surface backend feature (which requires pixman-1 >= 0.22.0).
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
2013-10-29 01:49:59 +00:00
|
|
|
# XXX - what about the one that comes with the latest version
|
|
|
|
# of Xquartz?
|
|
|
|
#
|
|
|
|
if [ ! -f pixman-$PIXMAN_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing pixman:"
|
|
|
|
[ -f pixman-$PIXMAN_VERSION.tar.gz ] || curl -O http://www.cairographics.org/releases/pixman-$PIXMAN_VERSION.tar.gz
|
|
|
|
gzcat pixman-$PIXMAN_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd pixman-$PIXMAN_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2014-10-31 20:08:11 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
2013-10-29 01:49:59 +00:00
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch pixman-$PIXMAN_VERSION-done
|
|
|
|
fi
|
2011-12-31 16:20:47 +00:00
|
|
|
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
|
|
|
# And now Cairo itself.
|
2013-10-29 01:49:59 +00:00
|
|
|
# XXX - with the libxcb that comes with 10.6,
|
|
|
|
#
|
|
|
|
# xcb_discard_reply() is missing, and the build fails.
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
|
|
|
if [ ! -f cairo-$CAIRO_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing Cairo:"
|
|
|
|
CAIRO_MAJOR_VERSION="`expr $CAIRO_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
CAIRO_MINOR_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
CAIRO_DOTDOT_VERSION="`expr $CAIRO_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
if [[ $CAIRO_MAJOR_VERSION -gt 1 ||
|
|
|
|
$CAIRO_MINOR_VERSION -gt 12 ||
|
|
|
|
($CAIRO_MINOR_VERSION -eq 12 && $CAIRO_DOTDOT_VERSION -ge 2) ]]
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# Starting with Cairo 1.12.2, the tarballs are compressed with
|
|
|
|
# xz rather than gzip.
|
|
|
|
#
|
|
|
|
[ -f cairo-$CAIRO_VERSION.tar.xz ] || curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.xz || exit 1
|
|
|
|
xzcat cairo-$CAIRO_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
else
|
|
|
|
[ -f cairo-$CAIRO_VERSION.tar.gz ] || curl -O http://cairographics.org/releases/cairo-$CAIRO_VERSION.tar.gz || exit 1
|
|
|
|
gzcat cairo-$CAIRO_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
fi
|
|
|
|
cd cairo-$CAIRO_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
# CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --enable-quartz=no || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
# Maybe follow http://cairographics.org/end_to_end_build_for_mac_os_x/
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --enable-quartz=yes || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
#
|
|
|
|
# We must avoid the version of libpng that comes with X11; the
|
|
|
|
# only way I've found to force that is to forcibly set INCLUDES
|
|
|
|
# when we do the build, so that this comes before CAIRO_CFLAGS,
|
|
|
|
# which has -I/usr/X11/include added to it before anything
|
|
|
|
# connected to libpng is.
|
|
|
|
#
|
|
|
|
INCLUDES="-I/usr/local/include/libpng15" make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch cairo-$CAIRO_VERSION-done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f atk-$ATK_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing ATK:"
|
|
|
|
atk_dir=`expr $ATK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
|
|
|
|
ATK_MAJOR_VERSION="`expr $ATK_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
ATK_MINOR_VERSION="`expr $ATK_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
ATK_DOTDOT_VERSION="`expr $ATK_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
if [[ $ATK_MAJOR_VERSION -gt 2 ||
|
|
|
|
($ATK_MAJOR_VERSION -eq 2 && $ATK_MINOR_VERSION -gt 0) ||
|
|
|
|
($ATK_MANOR_VERSION -eq 2 && $ATK_MINOR_VERSION -eq 0 && $ATK_DOTDOT_VERSION -ge 1) ]]
|
2013-07-06 21:21:54 +00:00
|
|
|
then
|
|
|
|
#
|
2013-10-23 01:39:54 +00:00
|
|
|
# Starting with ATK 2.0.1, xz-compressed tarballs are available.
|
2013-07-06 21:21:54 +00:00
|
|
|
#
|
2013-10-23 01:39:54 +00:00
|
|
|
[ -f atk-$ATK_VERSION.tar.xz ] || curl -O http://ftp.gnome.org/pub/gnome/sources/atk/$atk_dir/atk-$ATK_VERSION.tar.xz || exit 1
|
|
|
|
xzcat atk-$ATK_VERSION.tar.xz | tar xf - || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
else
|
2013-10-23 01:39:54 +00:00
|
|
|
[ -f atk-$ATK_VERSION.tar.bz2 ] || curl -O http://ftp.gnome.org/pub/gnome/sources/atk/$atk_dir/atk-$ATK_VERSION.tar.bz2 || exit 1
|
|
|
|
bzcat atk-$ATK_VERSION.tar.bz2 | tar xf - || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
fi
|
2013-10-23 01:39:54 +00:00
|
|
|
cd atk-$ATK_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
2013-10-23 01:39:54 +00:00
|
|
|
touch atk-$ATK_VERSION-done
|
2013-07-06 21:21:54 +00:00
|
|
|
fi
|
2011-07-15 21:48:02 +00:00
|
|
|
|
2013-10-23 01:39:54 +00:00
|
|
|
if [ ! -f pango-$PANGO_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing Pango:"
|
|
|
|
pango_dir=`expr $PANGO_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
|
|
|
|
PANGO_MAJOR_VERSION="`expr $PANGO_VERSION : '\([0-9][0-9]*\).*'`"
|
|
|
|
PANGO_MINOR_VERSION="`expr $PANGO_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`"
|
|
|
|
if [[ $PANGO_MAJOR_VERSION -gt 1 ||
|
|
|
|
$PANGO_MINOR_VERSION -ge 29 ]]
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# Starting with Pango 1.29, the tarballs are compressed with
|
|
|
|
# xz rather than bzip2.
|
|
|
|
#
|
|
|
|
[ -f pango-$PANGO_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/pango/$pango_dir/pango-$PANGO_VERSION.tar.xz || exit 1
|
|
|
|
xzcat pango-$PANGO_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
else
|
|
|
|
[ -f pango-$PANGO_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/pango/$pango_dir/pango-$PANGO_VERSION.tar.bz2 || exit 1
|
|
|
|
bzcat pango-$PANGO_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
fi
|
|
|
|
cd pango-$PANGO_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch pango-$PANGO_VERSION-done
|
2013-07-09 04:41:34 +00:00
|
|
|
fi
|
2013-06-17 23:30:56 +00:00
|
|
|
|
2013-10-23 01:39:54 +00:00
|
|
|
if [ "$GDK_PIXBUF_VERSION" -a ! -f gdk-pixbuf-$GDK_PIXBUF_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing gdk-pixbuf:"
|
|
|
|
gdk_pixbuf_dir=`expr $GDK_PIXBUF_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
|
|
|
|
[ -f gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$gdk_pixbuf_dir/gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz || exit 1
|
|
|
|
xzcat gdk-pixbuf-$GDK_PIXBUF_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
cd gdk-pixbuf-$GDK_PIXBUF_VERSION
|
2013-07-06 21:21:54 +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're building using the 10.6 SDK, force the use of libpng12.
|
|
|
|
#
|
|
|
|
# The OS's X11, and corresponding SDK, didn't introduce libpng15,
|
|
|
|
# or pkg-config files, until 10.7, so, for 10.6 have to explicitly
|
|
|
|
# set LIBPNG to override the configure script, and also force the
|
|
|
|
# CFLAGS to look for the header files for libpng12 (note that
|
|
|
|
# -isysroot doesn't affect the arguments to -I, so we need to
|
|
|
|
# include the SDK path explicitly).
|
2013-07-06 21:21:54 +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 [[ "$sdk_target" = 10.6 ]]
|
2013-10-23 01:39:54 +00:00
|
|
|
then
|
2014-11-01 02:50:42 +00:00
|
|
|
LIBPNG="-L/usr/X11/lib -lpng12" CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS -I$SDKPATH/usr/X11/include/libpng12" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS -I$SDKPATH/usr/X11/include/libpng12" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --without-libtiff --without-libjpeg || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
else
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --without-libtiff --without-libjpeg || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
fi
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch gdk-pixbuf-$GDK_PIXBUF_VERSION-done
|
2013-07-12 19:19:09 +00:00
|
|
|
fi
|
2013-06-17 23:30:56 +00:00
|
|
|
|
2013-10-23 01:39:54 +00:00
|
|
|
if [ ! -f gtk+-$GTK_VERSION-done ] ; then
|
|
|
|
echo "Downloading, building, and installing GTK+:"
|
|
|
|
gtk_dir=`expr $GTK_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
|
|
|
|
if [[ $GTK_MAJOR_VERSION -gt 2 ||
|
|
|
|
$GTK_MINOR_VERSION -gt 24 ||
|
|
|
|
($GTK_MINOR_VERSION -eq 24 && $GTK_DOTDOT_VERSION -ge 5) ]]
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# Starting with GTK+ 2.24.5, the tarballs are compressed with
|
|
|
|
# xz rather than gzip, in addition to bzip2; use xz, as we've
|
|
|
|
# built and installed it, and as xz compresses better than
|
|
|
|
# bzip2 so the tarballs take less time to download.
|
|
|
|
#
|
|
|
|
[ -f gtk+-$GTK_VERSION.tar.xz ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/gtk+/$gtk_dir/gtk+-$GTK_VERSION.tar.xz || exit 1
|
|
|
|
xzcat gtk+-$GTK_VERSION.tar.xz | tar xf - || exit 1
|
|
|
|
else
|
|
|
|
[ -f gtk+-$GTK_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnome.org/pub/gnome/sources/gtk+/$gtk_dir/gtk+-$GTK_VERSION.tar.bz2 || exit 1
|
|
|
|
bzcat gtk+-$GTK_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
fi
|
|
|
|
cd gtk+-$GTK_VERSION
|
|
|
|
if [ $DARWIN_MAJOR_VERSION -ge "12" ]
|
|
|
|
then
|
|
|
|
#
|
|
|
|
# GTK+ 2.24.10, at least, doesn't build on Mountain Lion with the
|
|
|
|
# CUPS printing backend - either the CUPS API changed incompatibly
|
|
|
|
# or the backend was depending on non-API implementation details.
|
|
|
|
#
|
|
|
|
# Configure it out, on Mountain Lion and later, for now.
|
|
|
|
# (12 is the Darwin major version number in Mountain Lion.)
|
|
|
|
#
|
|
|
|
# Also, configure out libtiff and libjpeg; configure scripts
|
|
|
|
# just ignore unknown --enable/--disable and --with/--without
|
|
|
|
# options (at least they've always do so up to now).
|
|
|
|
#
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-cups --without-libtiff --without-libjpeg || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
else
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --without-libtiff --without-libjpeg || exit 1
|
2013-10-23 01:39:54 +00:00
|
|
|
fi
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch gtk+-$GTK_VERSION-done
|
2013-06-17 23:30:56 +00:00
|
|
|
fi
|
2013-10-29 01:49:59 +00:00
|
|
|
fi
|
2011-07-15 21:48:02 +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
|
|
|
|
# of audio, or GeoIP mapping of IP addresses.
|
|
|
|
#
|
|
|
|
# We now conditionally download optional libraries to support them;
|
|
|
|
# the default is to download them all.
|
|
|
|
#
|
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$LIBSMI_VERSION" -a ! -f libsmi-$LIBSMI_VERSION-done ] ; then
|
2013-07-06 21:21:54 +00:00
|
|
|
echo "Downloading, building, and installing libsmi:"
|
2014-02-25 14:17:00 +00:00
|
|
|
[ -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
|
2013-07-06 21:21:54 +00:00
|
|
|
gzcat libsmi-$LIBSMI_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd libsmi-$LIBSMI_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libsmi-$LIBSMI_VERSION-done
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$LIBGPG_ERROR_VERSION" -a ! -f libgpg-error-$LIBGPG_ERROR_VERSION-done ] ; then
|
2013-07-06 21:21:54 +00:00
|
|
|
echo "Downloading, building, and installing libgpg-error:"
|
|
|
|
[ -f libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 ] || curl -L -O ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 || exit 1
|
|
|
|
bzcat libgpg-error-$LIBGPG_ERROR_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
cd libgpg-error-$LIBGPG_ERROR_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libgpg-error-$LIBGPG_ERROR_VERSION-done
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$LIBGCRYPT_VERSION" -a ! -f libgcrypt-$LIBGCRYPT_VERSION-done ] ; then
|
2013-07-06 21:21:54 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
|
|
|
echo "Downloading, building, and installing libgcrypt:"
|
|
|
|
[ -f libgcrypt-$LIBGCRYPT_VERSION.tar.gz ] || curl -L -O ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-$LIBGCRYPT_VERSION.tar.gz || exit 1
|
|
|
|
gzcat libgcrypt-$LIBGCRYPT_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd libgcrypt-$LIBGCRYPT_VERSION
|
|
|
|
#
|
|
|
|
# The assembler language code is not compatible with the OS X
|
|
|
|
# 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
|
|
|
|
#
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS -std=gnu89 $VERSION_MIN_FLAGS $SDKFLAGS" 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
|
2013-07-06 21:21:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch libgcrypt-$LIBGCRYPT_VERSION-done
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$GNUTLS_VERSION" -a ! -f gnutls-$GNUTLS_VERSION-done ] ; then
|
2013-07-06 21:21:54 +00:00
|
|
|
#
|
|
|
|
# GnuTLS requires libgcrypt (or nettle, in newer versions).
|
|
|
|
#
|
|
|
|
if [ -z $LIBGCRYPT_VERSION ]
|
|
|
|
then
|
|
|
|
echo "GnuTLS requires libgcrypt, but you didn't install libgcrypt" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Downloading, building, and installing GnuTLS:"
|
|
|
|
[ -f gnutls-$GNUTLS_VERSION.tar.bz2 ] || curl -L -O http://ftp.gnu.org/gnu/gnutls/gnutls-$GNUTLS_VERSION.tar.bz2 || exit 1
|
|
|
|
bzcat gnutls-$GNUTLS_VERSION.tar.bz2 | tar xf - || exit 1
|
|
|
|
cd gnutls-$GNUTLS_VERSION
|
|
|
|
#
|
|
|
|
# Use libgcrypt, not nettle.
|
|
|
|
# XXX - is there some reason to prefer nettle? Or does
|
|
|
|
# Wireshark directly use libgcrypt routines?
|
|
|
|
#
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --with-libgcrypt --without-p11-kit || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
#
|
|
|
|
# The pkgconfig file for GnuTLS says "requires zlib", but OS X,
|
|
|
|
# while it supplies zlib, doesn't supply a pkgconfig file for
|
|
|
|
# it.
|
|
|
|
#
|
|
|
|
# Patch the GnuTLS pkgconfig file not to require zlib.
|
|
|
|
# (If the capabilities of GnuTLS that Wireshark uses don't
|
|
|
|
# depend on building GnuTLS with zlib, an alternative would be
|
|
|
|
# to configure it not to use zlib.)
|
|
|
|
#
|
|
|
|
patch -p0 lib/gnutls.pc.in <../../macosx-support-lib-patches/gnutls-pkgconfig.patch || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch gnutls-$GNUTLS_VERSION-done
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$LUA_VERSION" -a ! -f lua-$LUA_VERSION-done ] ; then
|
2013-07-06 21:21:54 +00:00
|
|
|
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
|
|
|
|
gzcat lua-$LUA_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd lua-$LUA_VERSION
|
|
|
|
make $MAKE_BUILD_OPTS macosx || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch lua-$LUA_VERSION-done
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$PORTAUDIO_VERSION" -a ! -f portaudio-done ] ; then
|
2013-07-06 21:21:54 +00:00
|
|
|
echo "Downloading, building, and installing PortAudio:"
|
|
|
|
[ -f $PORTAUDIO_VERSION.tgz ] || curl -L -O http://www.portaudio.com/archives/$PORTAUDIO_VERSION.tgz || exit 1
|
|
|
|
gzcat $PORTAUDIO_VERSION.tgz | tar xf - || exit 1
|
|
|
|
cd portaudio
|
|
|
|
#
|
|
|
|
# Un-comment an include that's required on Lion.
|
|
|
|
#
|
|
|
|
patch -p0 include/pa_mac_core.h <../../macosx-support-lib-patches/portaudio-pa_mac_core.h.patch
|
|
|
|
#
|
|
|
|
# Fix a bug that showed up with clang (but is a bug with any
|
|
|
|
# compiler).
|
|
|
|
#
|
|
|
|
patch -p0 src/hostapi/coreaudio/pa_mac_core.c <../../macosx-support-lib-patches/portaudio-pa_mac_core.c.patch
|
|
|
|
#
|
|
|
|
# Disable fat builds - the configure script doesn't work right
|
|
|
|
# with Xcode 4 if you leave them enabled, and we don't build
|
|
|
|
# any other libraries fat (GLib, for example, would be very
|
|
|
|
# hard to build fat), so there's no advantage to having PortAudio
|
|
|
|
# built fat.
|
|
|
|
#
|
|
|
|
# Set the minimum OS X version to 10.4, to suppress some
|
|
|
|
# deprecation warnings. (Good luck trying to make any of
|
|
|
|
# this build on an OS+Xcode with a pre-10.4 SDK; we don't
|
|
|
|
# worry about the user requesting that.)
|
|
|
|
#
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS -mmacosx-version-min=10.4 $SDKFLAGS" CXXFLAGS="$CXXFLAGS -mmacosx-version-min=10.4 $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure --disable-mac-universal || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch portaudio-done
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
2013-06-17 23:30:56 +00:00
|
|
|
if [ "$GEOIP_VERSION" -a ! -f geoip-$GEOIP_VERSION-done ]
|
2011-07-15 21:48:02 +00:00
|
|
|
then
|
2013-07-06 21:21:54 +00:00
|
|
|
echo "Downloading, building, and installing GeoIP API:"
|
|
|
|
[ -f GeoIP-$GEOIP_VERSION.tar.gz ] || curl -L -O http://geolite.maxmind.com/download/geoip/api/c/GeoIP-$GEOIP_VERSION.tar.gz || exit 1
|
|
|
|
gzcat GeoIP-$GEOIP_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd GeoIP-$GEOIP_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-07-06 21:21:54 +00:00
|
|
|
#
|
|
|
|
# Grr. Their man pages "helpfully" have an ISO 8859-1
|
|
|
|
# copyright symbol in the copyright notice, but OS X's
|
|
|
|
# default character encoding is UTF-8. sed on Mountain
|
|
|
|
# Lion barfs at the "illegal character sequence" represented
|
|
|
|
# by an ISO 8859-1 copyright symbol, as it's not a valid
|
|
|
|
# UTF-8 sequence.
|
|
|
|
#
|
|
|
|
# iconv the relevant man pages into UTF-8.
|
|
|
|
#
|
|
|
|
for i in geoipupdate.1.in geoiplookup6.1.in geoiplookup.1.in
|
|
|
|
do
|
|
|
|
iconv -f iso8859-1 -t utf-8 man/"$i" >man/"$i".tmp &&
|
|
|
|
mv man/"$i".tmp man/"$i"
|
|
|
|
done
|
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
|
|
|
touch geoip-$GEOIP_VERSION-done
|
2011-07-15 21:48:02 +00:00
|
|
|
fi
|
|
|
|
|
2014-10-31 08:50:43 +00:00
|
|
|
if [ "$CARES_VERSION" -a ! -f c-ares-$CARES_VERSION-done ]
|
2013-10-28 22:38:23 +00:00
|
|
|
then
|
|
|
|
echo "Downloading, building, and installing C-Ares API:"
|
|
|
|
[ -f c-ares-$CARES_VERSION.tar.gz ] || curl -L -O http://c-ares.haxx.se/download/c-ares-$CARES_VERSION.tar.gz || exit 1
|
|
|
|
gzcat c-ares-$CARES_VERSION.tar.gz | tar xf - || exit 1
|
|
|
|
cd c-ares-$CARES_VERSION
|
2014-11-01 02:50:42 +00:00
|
|
|
CFLAGS="$CFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" CXXFLAGS="$CXXFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" LDFLAGS="$LDFLAGS $VERSION_MIN_FLAGS $SDKFLAGS" ./configure || exit 1
|
2013-10-28 22:38:23 +00:00
|
|
|
make $MAKE_BUILD_OPTS || exit 1
|
|
|
|
$DO_MAKE_INSTALL || exit 1
|
|
|
|
cd ..
|
2014-10-31 08:50:43 +00:00
|
|
|
touch c-ares-$CARES_VERSION-done
|
2013-10-28 22:38:23 +00:00
|
|
|
fi
|
|
|
|
|
2011-07-15 21:48:02 +00:00
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "You are now prepared to build Wireshark. To do so do:"
|
2012-01-16 00:05:14 +00:00
|
|
|
echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
|
|
|
|
echo ""
|
|
|
|
if [ -n "$CMAKE" ]; then
|
2013-07-06 21:21:54 +00:00
|
|
|
echo "mkdir build; cd build"
|
|
|
|
echo "cmake .."
|
|
|
|
echo
|
|
|
|
echo "or"
|
|
|
|
echo
|
2012-01-16 00:05:14 +00:00
|
|
|
fi
|
2011-07-15 21:48:02 +00:00
|
|
|
echo "./autogen.sh"
|
2012-01-16 00:05:14 +00:00
|
|
|
echo "mkdir build; cd build"
|
|
|
|
echo "../configure"
|
|
|
|
echo ""
|
2013-06-17 23:30:56 +00:00
|
|
|
echo "make $MAKE_BUILD_OPTS"
|
2011-07-15 21:48:02 +00:00
|
|
|
echo "make install"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "Make sure you are allowed capture access to the network devices"
|
|
|
|
echo "See: http://wiki.wireshark.org/CaptureSetup/CapturePrivileges"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
exit 0
|