From 836b2d87c63241c9950a2d3fe1f55a5a64b95b9a Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Fri, 15 Dec 2017 08:56:17 -0600 Subject: [PATCH] use the lesser of %%version and %%_qt5_version using 'sort -V' --- qt5-qtwebengine.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec index 65674ba..f6670ac 100644 --- a/qt5-qtwebengine.spec +++ b/qt5-qtwebengine.spec @@ -466,8 +466,9 @@ popd mkdir -p %{buildroot}%{_qtwebengine_dictionaries_dir} # adjust cmake dep(s) to allow for using the same Qt5 that was used to build it -# otherwise, it assumes Qt5 is at least %%version -sed -i -e "s|%{version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ +# using the lesser of %%version, %%_qt5_version +%global lesser_version $(echo -e "%{version}\n%{_qt5_version}" | sort -V | head -1) +sed -i -e "s|%{lesser_version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \ %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake