From f1a5c04957f1401f0d39cc78162537383fcfb6267d25341ddcb7098444237dcf Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 1 Jul 2019 11:46:51 +0000 Subject: [PATCH 1/3] Accepting request 712815 from home:jirislaby:branches:openSUSE:Factory - add fix-for-opensuse-lrelease-qt5.patch Fixes build of other projects as our lrelease is called lrelease-qt5. OBS-URL: https://build.opensuse.org/request/show/712815 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.13/libqt5-qttools?expand=0&rev=9 --- fix-for-opensuse-lrelease-qt5.patch | 14 ++++++++++++++ libqt5-qttools.changes | 6 ++++++ libqt5-qttools.spec | 9 ++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 fix-for-opensuse-lrelease-qt5.patch diff --git a/fix-for-opensuse-lrelease-qt5.patch b/fix-for-opensuse-lrelease-qt5.patch new file mode 100644 index 0000000..e2f202b --- /dev/null +++ b/fix-for-opensuse-lrelease-qt5.patch @@ -0,0 +1,14 @@ +--- + src/linguist/lrelease-pro/main.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/linguist/lrelease-pro/main.cpp ++++ b/src/linguist/lrelease-pro/main.cpp +@@ -145,6 +145,6 @@ int main(int argc, char **argv) + projectDescription->setAutoRemove(false); + lreleaseOptions << QStringLiteral("-project") << projectDescription->fileName(); + +- runQtTool(QStringLiteral("lrelease"), lreleaseOptions); ++ runQtTool(QStringLiteral("lrelease-qt5"), lreleaseOptions); + return 0; + } diff --git a/libqt5-qttools.changes b/libqt5-qttools.changes index 75fd6a2..bb862ca 100644 --- a/libqt5-qttools.changes +++ b/libqt5-qttools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 1 11:18:26 UTC 2019 - Jiri Slaby + +- add fix-for-opensuse-lrelease-qt5.patch + Fixes build of other projects as our lrelease is called lrelease-qt5. + ------------------------------------------------------------------- Wed Jun 19 11:24:38 UTC 2019 - fabian@ritter-vogt.de diff --git a/libqt5-qttools.spec b/libqt5-qttools.spec index f8bab11..5b76f5f 100644 --- a/libqt5-qttools.spec +++ b/libqt5-qttools.spec @@ -1,7 +1,7 @@ # # spec file for package libqt5-qttools # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,9 +12,10 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %if 0%{?suse_version} >= 1330 %bcond_without qdoc %else @@ -28,7 +29,7 @@ Name: libqt5-qttools Version: 5.13.0 Release: 0 Summary: Qt 5 QtTools Module -License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only +License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 OR LGPL-3.0-only Group: Development/Libraries/X11 Url: https://www.qt.io %define base_name libqt5 @@ -44,6 +45,8 @@ Source14: qdbusviewer5.desktop Source99: libqt5-qttools-rpmlintrc # PATCH-FIX-OPENSUSE fix-for-opensuse-qmake-qt5.patch [rh#1009893] liujianfeng1994@gmail.com Patch0: fix-for-opensuse-qmake-qt5.patch +# PATCH-FIX-OPENSUSE fix-for-opensuse-lrelease-qt5.patch jslaby@suse.cz +Patch1: fix-for-opensuse-lrelease-qt5.patch BuildRequires: fdupes %if %{with qdoc} BuildRequires: clang-devel >= 3.9.0 From c72a8754eb98119811a9df92312f383a3630cec36086707285656249ebccb9f8 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 1 Jul 2019 11:56:21 +0000 Subject: [PATCH 2/3] - Merge fix-for-opensuse-lrelease-qt5.patch and fix-for-opensuse-qmake-qt5.patch into add-qt5-suffix.patch OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.13/libqt5-qttools?expand=0&rev=10 --- add-qt5-suffix.patch | 34 +++++++++++++++++++++++++++++ fix-for-opensuse-lrelease-qt5.patch | 14 ------------ fix-for-opensuse-qmake-qt5.patch | 13 ----------- libqt5-qttools.changes | 6 +++++ libqt5-qttools.spec | 6 ++--- 5 files changed, 42 insertions(+), 31 deletions(-) create mode 100644 add-qt5-suffix.patch delete mode 100644 fix-for-opensuse-lrelease-qt5.patch delete mode 100644 fix-for-opensuse-qmake-qt5.patch diff --git a/add-qt5-suffix.patch b/add-qt5-suffix.patch new file mode 100644 index 0000000..31b7185 --- /dev/null +++ b/add-qt5-suffix.patch @@ -0,0 +1,34 @@ +From: Fabian Vogt +Subject: Add -qt5 suffix to executables + +To allow parallel installation of different versions of Qt, binaries in $PATH +are suffixed. + +Original authors are liujianfeng1994@gmail.com and jslaby@suse.cz. + +--- +Index: qttools-everywhere-src-5.13.0/src/linguist/lrelease-pro/main.cpp +=================================================================== +--- qttools-everywhere-src-5.13.0.orig/src/linguist/lrelease-pro/main.cpp ++++ qttools-everywhere-src-5.13.0/src/linguist/lrelease-pro/main.cpp +@@ -145,6 +145,6 @@ int main(int argc, char **argv) + projectDescription->setAutoRemove(false); + lreleaseOptions << QStringLiteral("-project") << projectDescription->fileName(); + +- runQtTool(QStringLiteral("lrelease"), lreleaseOptions); ++ runQtTool(QStringLiteral("lrelease-qt5"), lreleaseOptions); + return 0; + } +Index: qttools-everywhere-src-5.13.0/src/linguist/lprodump/main.cpp +=================================================================== +--- qttools-everywhere-src-5.13.0.orig/src/linguist/lprodump/main.cpp ++++ qttools-everywhere-src-5.13.0/src/linguist/lprodump/main.cpp +@@ -438,7 +438,7 @@ int main(int argc, char **argv) + ProFileGlobals option; + option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE")); + if (option.qmake_abslocation.isEmpty()) +- option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake"); ++ option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake-qt5"); + option.debugLevel = proDebug; + option.initProperties(); + option.setCommandLineArguments(QDir::currentPath(), diff --git a/fix-for-opensuse-lrelease-qt5.patch b/fix-for-opensuse-lrelease-qt5.patch deleted file mode 100644 index e2f202b..0000000 --- a/fix-for-opensuse-lrelease-qt5.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- - src/linguist/lrelease-pro/main.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/linguist/lrelease-pro/main.cpp -+++ b/src/linguist/lrelease-pro/main.cpp -@@ -145,6 +145,6 @@ int main(int argc, char **argv) - projectDescription->setAutoRemove(false); - lreleaseOptions << QStringLiteral("-project") << projectDescription->fileName(); - -- runQtTool(QStringLiteral("lrelease"), lreleaseOptions); -+ runQtTool(QStringLiteral("lrelease-qt5"), lreleaseOptions); - return 0; - } diff --git a/fix-for-opensuse-qmake-qt5.patch b/fix-for-opensuse-qmake-qt5.patch deleted file mode 100644 index dec7910..0000000 --- a/fix-for-opensuse-qmake-qt5.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: qttools-everywhere-src-5.13.0-beta1/src/linguist/lprodump/main.cpp -=================================================================== ---- qttools-everywhere-src-5.13.0-beta1.orig/src/linguist/lprodump/main.cpp -+++ qttools-everywhere-src-5.13.0-beta1/src/linguist/lprodump/main.cpp -@@ -438,7 +438,7 @@ int main(int argc, char **argv) - ProFileGlobals option; - option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE")); - if (option.qmake_abslocation.isEmpty()) -- option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake"); -+ option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake-qt5"); - option.debugLevel = proDebug; - option.initProperties(); - option.setCommandLineArguments(QDir::currentPath(), diff --git a/libqt5-qttools.changes b/libqt5-qttools.changes index bb862ca..0690987 100644 --- a/libqt5-qttools.changes +++ b/libqt5-qttools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 1 11:55:43 UTC 2019 - Fabian Vogt + +- Merge fix-for-opensuse-lrelease-qt5.patch and + fix-for-opensuse-qmake-qt5.patch into add-qt5-suffix.patch + ------------------------------------------------------------------- Mon Jul 1 11:18:26 UTC 2019 - Jiri Slaby diff --git a/libqt5-qttools.spec b/libqt5-qttools.spec index 5b76f5f..23bc2f6 100644 --- a/libqt5-qttools.spec +++ b/libqt5-qttools.spec @@ -43,10 +43,8 @@ Source12: linguist5.desktop Source13: assistant5.desktop Source14: qdbusviewer5.desktop Source99: libqt5-qttools-rpmlintrc -# PATCH-FIX-OPENSUSE fix-for-opensuse-qmake-qt5.patch [rh#1009893] liujianfeng1994@gmail.com -Patch0: fix-for-opensuse-qmake-qt5.patch -# PATCH-FIX-OPENSUSE fix-for-opensuse-lrelease-qt5.patch jslaby@suse.cz -Patch1: fix-for-opensuse-lrelease-qt5.patch +# PATCH-FIX-OPENSUSE +Patch100: add-qt5-suffix.patch BuildRequires: fdupes %if %{with qdoc} BuildRequires: clang-devel >= 3.9.0 From a0fbe1b948f35a691c6ba6ddac08b731438811c76795ce6d41163354a3a079c9 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Thu, 4 Jul 2019 08:38:07 +0000 Subject: [PATCH 3/3] Accepting request 713202 from home:Vogtinator:qt5.13 - Link from Qt bindir into %_bindir, not the other way around to fix applicationDirPath called from Qt binaries - Add -qt5 suffix to all binaries in %_bindir - Drop add-qt5-suffix.patch, no longer necessary OBS-URL: https://build.opensuse.org/request/show/713202 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.13/libqt5-qttools?expand=0&rev=11 --- add-qt5-suffix.patch | 34 ---------------------------------- libqt5-qttools.changes | 8 ++++++++ libqt5-qttools.spec | 18 +++++++----------- 3 files changed, 15 insertions(+), 45 deletions(-) delete mode 100644 add-qt5-suffix.patch diff --git a/add-qt5-suffix.patch b/add-qt5-suffix.patch deleted file mode 100644 index 31b7185..0000000 --- a/add-qt5-suffix.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Fabian Vogt -Subject: Add -qt5 suffix to executables - -To allow parallel installation of different versions of Qt, binaries in $PATH -are suffixed. - -Original authors are liujianfeng1994@gmail.com and jslaby@suse.cz. - ---- -Index: qttools-everywhere-src-5.13.0/src/linguist/lrelease-pro/main.cpp -=================================================================== ---- qttools-everywhere-src-5.13.0.orig/src/linguist/lrelease-pro/main.cpp -+++ qttools-everywhere-src-5.13.0/src/linguist/lrelease-pro/main.cpp -@@ -145,6 +145,6 @@ int main(int argc, char **argv) - projectDescription->setAutoRemove(false); - lreleaseOptions << QStringLiteral("-project") << projectDescription->fileName(); - -- runQtTool(QStringLiteral("lrelease"), lreleaseOptions); -+ runQtTool(QStringLiteral("lrelease-qt5"), lreleaseOptions); - return 0; - } -Index: qttools-everywhere-src-5.13.0/src/linguist/lprodump/main.cpp -=================================================================== ---- qttools-everywhere-src-5.13.0.orig/src/linguist/lprodump/main.cpp -+++ qttools-everywhere-src-5.13.0/src/linguist/lprodump/main.cpp -@@ -438,7 +438,7 @@ int main(int argc, char **argv) - ProFileGlobals option; - option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE")); - if (option.qmake_abslocation.isEmpty()) -- option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake"); -+ option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake-qt5"); - option.debugLevel = proDebug; - option.initProperties(); - option.setCommandLineArguments(QDir::currentPath(), diff --git a/libqt5-qttools.changes b/libqt5-qttools.changes index 0690987..5ee88bc 100644 --- a/libqt5-qttools.changes +++ b/libqt5-qttools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jul 2 13:47:14 UTC 2019 - Fabian Vogt + +- Link from Qt bindir into %_bindir, not the other way around to fix + applicationDirPath called from Qt binaries +- Add -qt5 suffix to all binaries in %_bindir +- Drop add-qt5-suffix.patch, no longer necessary + ------------------------------------------------------------------- Mon Jul 1 11:55:43 UTC 2019 - Fabian Vogt diff --git a/libqt5-qttools.spec b/libqt5-qttools.spec index 23bc2f6..eec8106 100644 --- a/libqt5-qttools.spec +++ b/libqt5-qttools.spec @@ -43,8 +43,6 @@ Source12: linguist5.desktop Source13: assistant5.desktop Source14: qdbusviewer5.desktop Source99: libqt5-qttools-rpmlintrc -# PATCH-FIX-OPENSUSE -Patch100: add-qt5-suffix.patch BuildRequires: fdupes %if %{with qdoc} BuildRequires: clang-devel >= 3.9.0 @@ -221,19 +219,18 @@ find %{buildroot}/%{_libdir} -type f -name '*pc' -print -exec perl -pi -e "s, -L # kill .la files rm -f %{buildroot}%{_libqt5_libdir}/lib*.la -# put all the binaries to %_bindir, add -qt5 suffix, and symlink them back to %_qt5_bindir +# Link all the binaries with -qt5 suffix to %{_bindir} mkdir -p %{buildroot}%{_bindir} pushd %{buildroot}%{_libqt5_bindir} for i in * ; do case "${i}" in assistant|designer|lconvert|linguist|lrelease|lupdate|pixeltool|qcollectiongenerator|qdbus|qdbusviewer|qdoc|qhelpgenerator) - mv $i ../../../bin/${i}-qt5 - ln -s ../../../bin/${i}-qt5 . - ln -s ../../../bin/${i}-qt5 $i + ln -s %{_libqt5_bindir}/$i %{buildroot}%{_bindir}/${i}-qt5 ;; *) - mv $i ../../../bin/ - ln -s ../../../bin/$i . + # No conflict with Qt4, so keep the original name for compatibility + ln -s %{_libqt5_bindir}/$i %{buildroot}%{_bindir}/${i} + ln -s %{_libqt5_bindir}/$i %{buildroot}%{_bindir}/${i}-qt5 ;; esac done @@ -262,7 +259,7 @@ install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer-128.png %{buildroot}%{ %{_bindir}/qtdiag* %{_bindir}/qtplugininfo* %{_bindir}/qtattributionsscanner* -%{_bindir}/qdistancefieldgenerator +%{_bindir}/qdistancefieldgenerator* %{_bindir}/qcollectiongenerator* %{_libqt5_bindir}/assistant* %{_libqt5_bindir}/designer* @@ -324,11 +321,10 @@ install -D -m644 src/qdbus/qdbusviewer/images/qdbusviewer-128.png %{buildroot}%{ %license LICENSE.* %{_bindir}/qdbus-qt5 %{_libqt5_bindir}/qdbus -%{_libqt5_bindir}/qdbus-qt5 %files -n libqt5-qtpaths %license LICENSE.* -%{_bindir}/qtpaths +%{_bindir}/qtpaths* %{_libqt5_bindir}/qtpaths %if %{with qdoc}