From: Uwe Hermann Date: Sun, 19 Aug 2018 16:59:01 +0000 (+0200) Subject: macosx: Hardcode the Qt version to 5.5 for now. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=20e302a299c6b625aed33cc0865d8d8f31969697;p=sigrok-util.git macosx: Hardcode the Qt version to 5.5 for now. The latest Qt version available in Homebrew is 5.11.x currently, but this version no longer supports older Mac OS X versions: https://doc.qt.io/qt-5/supported-platforms-and-configurations.html In order for the DMG build to remain compatible with some more older Mac OS X versions, we hardcode the scripts to use Qt 5.5 for now. This requires the following on the build box: $ brew install qt@5.5 $ brew unlink qt $ brew link --force qt@5.5 With this change the DMG should work on at least Mac OS X 10.8, 10.9, and 10.10 according to Qt docs (only tested on 10.11.6 / El Capitan). The DMG also currently uses Python 3.7, which should work fine for Mac OS X 10.9 (Mavericks) and later, according to Python docs (again, only tested on 10.11.6 / El Capitan). --- diff --git a/cross-compile/macosx/README b/cross-compile/macosx/README index 23a4f87..342757f 100644 --- a/cross-compile/macosx/README +++ b/cross-compile/macosx/README @@ -23,6 +23,8 @@ Requirements available on your system (from Apple) but are required in newer versions built by Homebrew: autoconf, automake, libtool, libffi (maybe others). Without linking "libffi" for example, the check for pygobject3 will fail. + - We currently hardcode the build to use Qt 5.5 (not the latest available + version) in order to remain compatible with some older Mac OS X versions. Building diff --git a/cross-compile/macosx/create_dmg b/cross-compile/macosx/create_dmg index d08cd7e..f4b36b7 100755 --- a/cross-compile/macosx/create_dmg +++ b/cross-compile/macosx/create_dmg @@ -26,8 +26,11 @@ PREFIX=$HOME/sr_macosx # The path where to download files to and where to build packages. BUILDDIR=./build_app +# We use Qt 5.5 in order to remain compatible with more versions of Mac OS X. +QTVER=qt@5.5 + # Path to Qt5 binaries. -QTBINDIR=`brew list qt5 | grep bin | head -n 1 | xargs dirname` +QTBINDIR=`brew list $QTVER | grep bin | head -n 1 | xargs dirname` # Path to boost libraries. BOOSTLIBDIR=`brew list boost | grep libboost_system | head -n 1 | xargs dirname` diff --git a/cross-compile/macosx/sigrok-native-macosx b/cross-compile/macosx/sigrok-native-macosx index 5ba3de2..cb1435e 100755 --- a/cross-compile/macosx/sigrok-native-macosx +++ b/cross-compile/macosx/sigrok-native-macosx @@ -44,8 +44,11 @@ PARALLEL="-j "`sysctl -n hw.ncpu` export CC=gcc export CXX=g++ +# We use Qt 5.5 in order to remain compatible with more versions of Mac OS X. +QTVER=qt@5.5 + # Path to Qt5 binaries (needed for cmake to find the Qt5 libs). -export PATH=`brew list qt5 | grep bin | head -n 1 | xargs dirname`":$PATH" +export PATH=`brew list $QTVER | grep bin | head -n 1 | xargs dirname`":$PATH" # Path to Python 2/3 pkg-config files. # In Homebrew, pkg-config files of "keg-only" formulas (Python is one of them) @@ -57,7 +60,7 @@ PY3=`brew list python3 | grep pkgconfig | head -n 1 | xargs dirname` # ----------------------------------------------------------------------------- -P="$PREFIX/lib/pkgconfig:$PY2:$PY3" +P="$PREFIX/lib/pkgconfig:/usr/local/opt/$QTVER/lib/pkgconfig:$PY2:$PY3" C="$C --prefix=$PREFIX" # Remove build directory contents (if any) and create a new build dir.