Ticket #13122: qt510-configure.patch

File qt510-configure.patch, 2.4 KB (added by Gary Buhrmaster <gary.buhrmaster@…>, 7 years ago)

patch for configure

  • mythtv/configure

    diff --git a/mythtv/configure b/mythtv/configure
    index 8b7ba2ed6f..2d6bb8af70 100755
    a b enable_weak_pic() { 
    60996099
    61006100enabled pic && enable_weak_pic
    61016101
    6102 is_qmake5(){
    6103     $1 --version 2>&1 | egrep -q -e "Qt version 5\.[2-9]\.[0-9]"
     6102version2string(){
     6103    # accepts version as in 1.10.4 and turns it into 0001.0010.0004.0000.0000 which can be compared as a string
     6104    echo $1 | awk -F. '{ printf("%04d.%04d.%04d.%04d.%04d", $1, $2, $3, $4, $5); };'
    61046105}
    61056106
     6107# Minimum supported Qt version
     6108qt_minimum_version="5.7.1"
     6109
    61066110# qmake-qt5 /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
    61076111if [ x"$qmake" = "xqmake" ]; then
    6108     CHECK_QMAKE=`which qmake-qt5 2>&1`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake `which $qmake 2>&1`"
     6112    CHECK_QMAKE=`which -a qmake-qt5 2>/dev/null`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake `which -a $qmake 2>/dev/null`"
    61096113else
    6110     CHECK_QMAKE=`which $qmake 2>&1`" "`which qmake-qt5 2>&1`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake"
     6114    CHECK_QMAKE=`which -a $qmake 2>/dev/null`" "`which -a qmake-qt5 2>/dev/null`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake"
    61116115fi
    61126116# try to find a qt5 qmake to use
    61136117found_qmake=''
    61146118for i in $CHECK_QMAKE; do
    61156119    if test -e $i ; then
    6116         if is_qmake5 $i; then
     6120        qmake_version=`$i --version | sed -n  "s/.*Qt version \([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/p"`
     6121        if ! [ $(version2string $qmake_version) \< $(version2string $qt_minimum_version) ]; then
    61176122            found_qmake=$i
    61186123            check_cxxflags -DQT_DISABLE_DEPRECATED_BEFORE=0x050000
    61196124            break;
    for i in $CHECK_QMAKE; do 
    61246129    fi
    61256130done
    61266131if [ x"$found_qmake" = "x" ]; then
    6127     die "qmake for Qt5.2 or newer not found.\nPlease specify the correct qmake with --qmake="
     6132    die "qmake for Qt version $qt_minimum_version or newer not found.  Please specify the correct qmake with --qmake="
    61286133else
    61296134    qmake=$found_qmake
    61306135fi