Ticket #13122: qt510-configure-v2.patch

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

Revised configure patch

  • mythplugins/configure

    diff --git a/mythplugins/configure b/mythplugins/configure
    index 9ba22c8956..3b6cc3f914 100755
    a b EOF 
    527527    die "Sanity test failed."
    528528fi
    529529
    530 is_qmake5(){
    531     $1 --version 2>&1 | egrep -q -e "Qt version 5\.[0-9]\.[0-9]"
    532 }
    533 
    534 is_qmake4(){
    535     $1 --version 2>&1 | egrep -q -e "Qt version 4\.[8-9]\.[0-9]"
    536 }
    537 
    538530# bring in mythtv config
    539531if [ -e $prefix/include/mythtv/mythconfig.mak ] ; then
    540532    rm mythconfig.mak 2> /dev/null
    OPENGLES=$(cat mythconfig.mak | grep -e "^HAVE_GLES2_GL2_H=yes") 
    570562EXTRALIBS=$(cat mythconfig.mak | grep -e "^EXTRALIBS=")
    571563EXTRALIBS=${EXTRALIBS#EXTRALIBS=}
    572564
     565version2string(){
     566    # accepts version as in 1.10.4 and turns it into 0001.0010.0004.0000.0000 which can be compared as a string
     567    echo $1 | awk -F. '{ printf("%04d.%04d.%04d.%04d.%04d", $1, $2, $3, $4, $5); };'
     568}
     569
     570# Minimum supported Qt version
     571qt_minimum_version="5.2"
     572
    573573# qmake-qt5 /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
    574574if [ x"$qmake" = "xqmake" ]; then
    575     CHECK_QMAKE="qmake-qt5 /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 $qmake qmake-qt4"
     575    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`"
    576576else
    577     CHECK_QMAKE="$qmake qmake-qt5 /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 qmake-qt4"
     577    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"
    578578fi
    579579# try to find a qt5 qmake to use
    580580found_qmake=''
    581581for i in $CHECK_QMAKE; do
    582     if is_qmake5 $i; then
    583         found_qmake=$i
    584         break;
    585     elif is_qmake4 $i; then
    586         found_qmake=$i
    587         break;
     582    if test -e $i ; then
     583        qmake_version=`$i --version | sed -n  "s/.*Qt version \([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/p"`
     584        if ! [ $(version2string $qmake_version) \< $(version2string $qt_minimum_version) ]; then
     585            found_qmake=$i
     586            break;
     587        else
     588            echo "found qmake at $i but version failed"
     589            echo "got version: " `$i --version`
     590        fi
    588591    fi
    589592done
    590593if [ x"$found_qmake" = "x" ]; then
    591     die "qmake for Qt4.8 or newer not found.\nPlease specify the correct qmake with --qmake="
     594    die "qmake for Qt version $qt_minimum_version or newer not found.  Please specify the correct qmake with --qmake="
    592595else
    593596    qmake=$found_qmake
    594597fi
    595598
    596 
    597599# rely on what was discover during MythTV configure
    598600if enabled opengl && test "$OPENGLV" != "CONFIG_OPENGL_VIDEO=yes"; then
    599601    disable opengl
  • mythtv/configure

    diff --git a/mythtv/configure b/mythtv/configure
    index 8b7ba2ed6f..32fbe2bf60 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.2"
     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