Optionally build cmake, document why we need xz
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 14 Jan 2012 14:40:58 +0000 (14:40 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 14 Jan 2012 14:40:58 +0000 (14:40 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40498 f5534014-38df-0310-8fa8-9805f1628bb7

macosx-setup.sh

index 30fc728cc29ee2d7a39aa83e5aee4a1abad75115..cd7915e6b0ad55e27964b8ba432ddc8d9f5473c8 100755 (executable)
@@ -8,15 +8,17 @@
 # http://nplab.fh-muenster.de/groups/wiki/wiki/fb7a4/Building_Wireshark_on_SnowLeopard.html 
 #
 
-# To set up a GTK3 environment uncomment the line below
+# To set up a GTK3 environment
 # GTK3=1
+# To build cmake
+# CMAKE=1
 #
 # Versions to download and install.
 #
 # The following libraries are required.
 #
 GETTEXT_VERSION=0.18.1.1
-GLIB_VERSION=2.31.6
+GLIB_VERSION=2.31.8
 #
 # pkg-config 0.26 appears to have broken the "we have our own GLib"
 # stuff, even if you explicitly set GLIB_CFLAGS and GLIB_LIBS.
@@ -42,6 +44,9 @@ fi
 #
 XZ_VERSION=5.0.3
 
+# In case we want to build with cmake
+CMAKE_VERSION=2.8.7
+
 #
 # The following libraries are optional.
 # Comment them out if you don't want them, but note that some of
@@ -117,7 +122,7 @@ then
 fi
 cd macosx-support-libs
 
-# Start with xz. It's required to unpack the current version of glib.
+# Start with xz: It is the sole download format of glib later than 2.31.2
 #
 echo "Downloading, building, and installing xz:"
 curl -O http://tukaani.org/xz/xz-$XZ_VERSION.tar.bz2 || exit 1
@@ -128,6 +133,18 @@ make -j 3 || exit 1
 $DO_MAKE_INSTALL || exit 1
 cd ..
 
+if [ -n "$CMAKE" ]; then
+  echo "Downloading, building, and installing CMAKE:"
+  cmake_dir=`expr $CMAKE_VERSION : '\([0-9][0-9]*\.[0-9][0-9]*\).*'`
+  curl -O http://www.cmake.org/files/v$cmake_dir/cmake-$CMAKE_VERSION.tar.gz || exit 1
+  gzcat cmake-$CMAKE_VERSION.tar.gz | tar xf - || exit 1
+  cd cmake-$CMAKE_VERSION
+  ./bootstrap --system-libs || exit 1
+  make -j 3 || exit 1
+  $DO_MAKE_INSTALL || exit 1
+  cd ..
+fi
+
 #
 # Start with GNU gettext; GLib requires it, and OS X doesn't have it
 # or a BSD-licensed replacement.