From 9992063c6faadb7027335e95fefcf5f6688b6ba0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 16 Apr 2015 23:18:57 -0700 Subject: Download the Qt dmg and just do a binary installation. That's a *lot* faster than building from source. That means we should suggest adding the Qt pkg-config directory to PKG_CONFIG_PATH; do so. Change-Id: I9a70ea73fbace1f736cad8a4da11b62df8e5818e Reviewed-on: https://code.wireshark.org/review/8105 Reviewed-by: Guy Harris --- macosx-setup.sh | 81 +++++++++++++++++++++++++++------------------------------ 1 file changed, 39 insertions(+), 42 deletions(-) (limited to 'macosx-setup.sh') diff --git a/macosx-setup.sh b/macosx-setup.sh index c4739db0e4..6694ffab93 100755 --- a/macosx-setup.sh +++ b/macosx-setup.sh @@ -72,7 +72,7 @@ PKG_CONFIG_VERSION=0.28 # # If you don't want to build with GTK+ at all, comment out both lines. # -QT_VERSION=5.2.1 +QT_VERSION=5.3.2 GTK_VERSION=2.24.17 #GTK_VERSION=3.5.2 if [ "$GTK_VERSION" ]; then @@ -90,6 +90,12 @@ if [ "$GTK_VERSION" ]; then CAIRO_VERSION=1.12.2 GDK_PIXBUF_VERSION=2.28.0 fi +if [ "$QT_VERSION" ]; then + QT_MAJOR_VERSION="`expr $QT_VERSION : '\([0-9][0-9]*\).*'`" + QT_MINOR_VERSION="`expr $QT_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*\).*'`" + QT_DOTDOT_VERSION="`expr $QT_VERSION : '[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*'`" + QT_MAJOR_MINOR_VERSION=$QT_MAJOR_VERSION.$QT_MINOR_VERSION +fi # 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 @@ -514,43 +520,33 @@ uninstall_glib() { install_qt() { 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 + [ -f qt-opensource-mac-x64-clang-$QT_VERSION.dmg ] || curl -L -O http://download.qt.io/archive/qt/$QT_MAJOR_MINOR_VERSION/$QT_VERSION/qt-opensource-mac-x64-clang-$QT_VERSION.dmg || exit 1 + sudo hdiutil attach qt-opensource-mac-x64-clang-$QT_VERSION.dmg || exit 1 + # - # 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. + # Run the executable directly, so that we wait for it to finish. # - # Qt 5.2.0 beta1 fails to build on OS X without -no-xcb due to bug - # QTBUG-34382. + /Volumes/qt-opensource-mac-x64-clang-$QT_VERSION/qt-opensource-mac-x64-clang-$QT_VERSION.app/Contents/MacOS/qt-opensource-mac-x64-clang-$QT_VERSION + sudo hdiutil detach /Volumes/qt-opensource-mac-x64-clang-$QT_VERSION + # - # Qt 5.x fails to build on OS X with -no-opengl due to bug - # QTBUG-31151. + # The 5.3.x versions, at least, have bogus .pc files. + # Fix them. # - ./configure -v $qt_sdk_arg -platform $TARGET_PLATFORM \ - -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 .. + for i in $HOME/Qt$QT_VERSION/$QT_MAJOR_MINOR_VERSION/clang_64/lib/pkgconfig/*.pc + do + ed - $i <