commit b853d3b8ca3610c5be2e65d74a05dbce76713d34
Author: Richard Shaw <hobbes1069(a)gmail.com>
Date: Sat Jan 13 12:19:11 2018 -0600
Add patch for configure problems with QT 5.10.x
mythtv-qmake.patch | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 115 insertions(+)
---
diff --git a/mythtv-qmake.patch b/mythtv-qmake.patch
new file mode 100644
index 0000000..d0740e6
--- /dev/null
+++ b/mythtv-qmake.patch
@@ -0,0 +1,115 @@
+diff --git a/mythplugins/configure b/mythplugins/configure
+index 9ba22c8956..3b6cc3f914 100755
+--- a/mythplugins/configure
++++ b/mythplugins/configure
+@@ -527,14 +527,6 @@ EOF
+ die "Sanity test failed."
+ fi
+
+-is_qmake5(){
+- $1 --version 2>&1 | egrep -q -e "Qt version 5\.[0-9]\.[0-9]"
+-}
+-
+-is_qmake4(){
+- $1 --version 2>&1 | egrep -q -e "Qt version 4\.[8-9]\.[0-9]"
+-}
+-
+ # bring in mythtv config
+ if [ -e $prefix/include/mythtv/mythconfig.mak ] ; then
+ rm mythconfig.mak 2> /dev/null
+@@ -570,30 +562,40 @@ OPENGLES=$(cat mythconfig.mak | grep -e
"^HAVE_GLES2_GL2_H=yes")
+ EXTRALIBS=$(cat mythconfig.mak | grep -e "^EXTRALIBS=")
+ EXTRALIBS=${EXTRALIBS#EXTRALIBS=}
+
++version2string(){
++ # accepts version as in 1.10.4 and turns it into 0001.0010.0004.0000.0000 which can
be compared as a string
++ echo $1 | awk -F. '{ printf("%04d.%04d.%04d.%04d.%04d", $1, $2, $3,
$4, $5); };'
++}
++
++# Minimum supported Qt version
++qt_minimum_version="5.2"
++
+ # qmake-qt5 /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
+ if [ x"$qmake" = "xqmake" ]; then
+- 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"
++ 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`"
+ else
+- 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"
++ 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"
+ fi
+ # try to find a qt5 qmake to use
+ found_qmake=''
+ for i in $CHECK_QMAKE; do
+- if is_qmake5 $i; then
+- found_qmake=$i
+- break;
+- elif is_qmake4 $i; then
+- found_qmake=$i
+- break;
++ if test -e $i ; then
++ qmake_version=`$i --version | sed -n "s/.*Qt version
\([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/p"`
++ if ! [ $(version2string $qmake_version) \< $(version2string
$qt_minimum_version) ]; then
++ found_qmake=$i
++ break;
++ else
++ echo "found qmake at $i but version failed"
++ echo "got version: " `$i --version`
++ fi
+ fi
+ done
+ if [ x"$found_qmake" = "x" ]; then
+- die "qmake for Qt4.8 or newer not found.\nPlease specify the correct qmake with
--qmake="
++ die "qmake for Qt version $qt_minimum_version or newer not found. Please
specify the correct qmake with --qmake="
+ else
+ qmake=$found_qmake
+ fi
+
+-
+ # rely on what was discover during MythTV configure
+ if enabled opengl && test "$OPENGLV" !=
"CONFIG_OPENGL_VIDEO=yes"; then
+ disable opengl
+diff --git a/mythtv/configure b/mythtv/configure
+index 8b7ba2ed6f..32fbe2bf60 100755
+--- a/mythtv/configure
++++ b/mythtv/configure
+@@ -6099,21 +6099,26 @@ enable_weak_pic() {
+
+ enabled pic && enable_weak_pic
+
+-is_qmake5(){
+- $1 --version 2>&1 | egrep -q -e "Qt version 5\.[2-9]\.[0-9]"
++version2string(){
++ # accepts version as in 1.10.4 and turns it into 0001.0010.0004.0000.0000 which can
be compared as a string
++ echo $1 | awk -F. '{ printf("%04d.%04d.%04d.%04d.%04d", $1, $2, $3,
$4, $5); };'
+ }
+
++# Minimum supported Qt version
++qt_minimum_version="5.2"
++
+ # qmake-qt5 /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake
+ if [ x"$qmake" = "xqmake" ]; then
+- 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`"
++ 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`"
+ else
+- 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"
++ 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"
+ fi
+ # try to find a qt5 qmake to use
+ found_qmake=''
+ for i in $CHECK_QMAKE; do
+ if test -e $i ; then
+- if is_qmake5 $i; then
++ qmake_version=`$i --version | sed -n "s/.*Qt version
\([0-9]*\.[0-9]*\.[0-9]*\) .*/\1/p"`
++ if ! [ $(version2string $qmake_version) \< $(version2string
$qt_minimum_version) ]; then
+ found_qmake=$i
+ check_cxxflags -DQT_DISABLE_DEPRECATED_BEFORE=0x050000
+ break;
+@@ -6124,7 +6129,7 @@ for i in $CHECK_QMAKE; do
+ fi
+ done
+ if [ x"$found_qmake" = "x" ]; then
+- die "qmake for Qt5.2 or newer not found.\nPlease specify the correct qmake with
--qmake="
++ die "qmake for Qt version $qt_minimum_version or newer not found. Please
specify the correct qmake with --qmake="
+ else
+ qmake=$found_qmake
+ fi
Show replies by date