use upstream cmake fix(es) (QTBUG-32570, #1006254)
This commit is contained in:
parent
c85f868033
commit
609c408638
101
CMake-Use-path-manipulation-features-from-qtbase.patch
Normal file
101
CMake-Use-path-manipulation-features-from-qtbase.patch
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
From cf0b35e221797f20caf0f9904237dea9905aecc8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephen Kelly <stephen.kelly@kdab.com>
|
||||||
|
Date: Tue, 23 Jul 2013 09:22:17 +0200
|
||||||
|
Subject: [PATCH] CMake: Use path manipulation features from qtbase.
|
||||||
|
|
||||||
|
The qtbase commit 4ce32f66 (Use new path manipulation functions
|
||||||
|
from qmake., 2013-01-18) used new qmake functions for path manipulation,
|
||||||
|
and commits 7ac58d1f (Make cmake packages installed to /usr
|
||||||
|
non-relocatable., 2013-02-11) and 5aa34962 (Handle usr-move without
|
||||||
|
forcing absolute paths, 2013-04-17) added handling of symlinks which
|
||||||
|
would otherwise break relative path calculation.
|
||||||
|
|
||||||
|
Port those patches to the qttools cmake files.
|
||||||
|
|
||||||
|
Task-number: QTBUG-32570
|
||||||
|
Change-Id: I7d22609c3a03be4b9197dd030d7e9bd6c2e04731
|
||||||
|
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
|
||||||
|
---
|
||||||
|
src/linguist/Qt5LinguistToolsConfig.cmake.in | 26 ++++++++++++++++++++++++++
|
||||||
|
src/linguist/linguist.pro | 24 +++++++++++++-----------
|
||||||
|
2 files changed, 39 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/linguist/Qt5LinguistToolsConfig.cmake.in b/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
index 6584b56..fac7cc6 100644
|
||||||
|
--- a/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
+++ b/src/linguist/Qt5LinguistToolsConfig.cmake.in
|
||||||
|
@@ -1,5 +1,31 @@
|
||||||
|
|
||||||
|
+if (CMAKE_VERSION VERSION_LESS 2.8.3)
|
||||||
|
+ message(FATAL_ERROR \"Qt 5 requires at least CMake version 2.8.3\")
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
+!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
|
||||||
|
+!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
+set(_qt5_linguisttools_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
||||||
|
+!!ELSE
|
||||||
|
+get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
|
||||||
|
+# Use original install prefix when loaded through a
|
||||||
|
+# cross-prefix symbolic link such as /lib -> /usr/lib.
|
||||||
|
+get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
|
||||||
|
+get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5LinguistTools\" REALPATH)
|
||||||
|
+if(_realCurr STREQUAL _realOrig)
|
||||||
|
+ get_filename_component(_qt5_linguisttools_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR\" PATH)
|
||||||
|
+else()
|
||||||
|
+ get_filename_component(_qt5_linguisttools_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
||||||
|
+endif()
|
||||||
|
+unset(_realOrig)
|
||||||
|
+unset(_realCurr)
|
||||||
|
+unset(_IMPORT_PREFIX)
|
||||||
|
+!!ENDIF
|
||||||
|
+!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
|
||||||
|
get_filename_component(_qt5_linguisttools_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
|
||||||
|
+!!ELSE
|
||||||
|
+set(_qt5_linguisttools_install_prefix \"$$[QT_INSTALL_PREFIX]\")
|
||||||
|
+!!ENDIF
|
||||||
|
|
||||||
|
if (NOT TARGET Qt5::lrelease)
|
||||||
|
add_executable(Qt5::lrelease IMPORTED)
|
||||||
|
diff --git a/src/linguist/linguist.pro b/src/linguist/linguist.pro
|
||||||
|
index df3c0c7..2f7850e 100644
|
||||||
|
--- a/src/linguist/linguist.pro
|
||||||
|
+++ b/src/linguist/linguist.pro
|
||||||
|
@@ -11,22 +11,24 @@ qtNomakeTools( \
|
||||||
|
|
||||||
|
win32:CMAKE_BIN_SUFFIX = ".exe"
|
||||||
|
|
||||||
|
-CMAKE_QT_INSTALL_PREFIX_ESCAPED = "^$$re_escape($$[QT_INSTALL_PREFIX])/"
|
||||||
|
-win32:CMAKE_QT_INSTALL_PREFIX_ESCAPED ~= s,\\\\,/
|
||||||
|
+load(cmake_functions)
|
||||||
|
|
||||||
|
-CMAKE_LIB_DIR = $$replace($$list($$[QT_INSTALL_LIBS]), \\\\, /)/
|
||||||
|
-contains(CMAKE_LIB_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
|
||||||
|
- CMAKE_LIB_DIR = $$replace(CMAKE_LIB_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
|
||||||
|
- CMAKE_RELATIVE_INSTALL_DIR = $$replace(CMAKE_LIB_DIR, "[^/]+", ..)
|
||||||
|
+CMAKE_INSTALL_LIBS_DIR = $$cmakeTargetPath($$[QT_INSTALL_LIBS])
|
||||||
|
+contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND = $$CMAKE_INSTALL_LIBS_DIR
|
||||||
|
+
|
||||||
|
+CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
||||||
|
+!contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
|
||||||
|
+ CMAKE_RELATIVE_INSTALL_DIR = $$cmakeRelativePath($$[QT_INSTALL_PREFIX], $$[QT_INSTALL_LIBS])
|
||||||
|
# We need to go up another two levels because the CMake files are
|
||||||
|
# installed in $${CMAKE_LIB_DIR}/cmake/Qt5$${CMAKE_MODULE_NAME}
|
||||||
|
- CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_DIR}/../../"
|
||||||
|
+ CMAKE_RELATIVE_INSTALL_DIR = "$${CMAKE_RELATIVE_INSTALL_DIR}../../"
|
||||||
|
+} else {
|
||||||
|
+ CMAKE_LIB_DIR_IS_ABSOLUTE = True
|
||||||
|
}
|
||||||
|
|
||||||
|
-CMAKE_BIN_DIR = $$replace($$list($$[QT_INSTALL_BINS]), \\\\, /)/
|
||||||
|
-contains(CMAKE_BIN_DIR, "$${CMAKE_QT_INSTALL_PREFIX_ESCAPED}.*") {
|
||||||
|
- CMAKE_BIN_DIR = $$replace(CMAKE_BIN_DIR, "$$CMAKE_QT_INSTALL_PREFIX_ESCAPED", )
|
||||||
|
-} else {
|
||||||
|
+CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
|
||||||
|
+contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
|
||||||
|
+ CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
|
||||||
|
CMAKE_BIN_DIR_IS_ABSOLUTE = True
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -5,7 +5,7 @@
|
|||||||
Summary: Qt5 - QtTool components
|
Summary: Qt5 - QtTool components
|
||||||
Name: qt5-qttools
|
Name: qt5-qttools
|
||||||
Version: 5.1.1
|
Version: 5.1.1
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
|
|
||||||
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
|
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
|
||||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||||
@ -17,6 +17,10 @@ ExclusiveArch: %{ix86} x86_64 %{arm}
|
|||||||
|
|
||||||
Patch1: qttools-system_clucene.patch
|
Patch1: qttools-system_clucene.patch
|
||||||
|
|
||||||
|
## upstream patches
|
||||||
|
# https://bugreports.qt-project.org/browse/QTBUG-32570
|
||||||
|
Patch100: CMake-Use-path-manipulation-features-from-qtbase.patch
|
||||||
|
|
||||||
Source20: assistant.desktop
|
Source20: assistant.desktop
|
||||||
Source21: designer.desktop
|
Source21: designer.desktop
|
||||||
Source22: linguist.desktop
|
Source22: linguist.desktop
|
||||||
@ -91,9 +95,7 @@ and invoke methods on those objects.
|
|||||||
# src/assistant/3rdparty/clucene.BAK
|
# src/assistant/3rdparty/clucene.BAK
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# hack around invalid paths, http://bugzilla.redhat.com/1006254
|
%patch100 -p1 -b .Qt5LinguistToolsConfig
|
||||||
sed 's,\${_qt5_linguisttools_install_prefix}/,%{_qt5_archdatadir}/,' \
|
|
||||||
-i src/linguist/Qt5LinguistToolsConfig.cmake.in
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -293,6 +295,9 @@ fi
|
|||||||
%{_qt5_libdir}/pkgconfig/Qt5UiTools.pc
|
%{_qt5_libdir}/pkgconfig/Qt5UiTools.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Sep 21 2013 Rex Dieter <rdieter@fedoraproject.org> 5.1.1-4
|
||||||
|
- use upstream cmake fix(es) (QTBUG-32570, #1006254)
|
||||||
|
|
||||||
* Wed Sep 11 2013 Rex Dieter <rdieter@fedoraproject.org> 5.1.1-3
|
* Wed Sep 11 2013 Rex Dieter <rdieter@fedoraproject.org> 5.1.1-3
|
||||||
- wrong path to lrelease (#1006254)
|
- wrong path to lrelease (#1006254)
|
||||||
- %%check: first try
|
- %%check: first try
|
||||||
|
Loading…
x
Reference in New Issue
Block a user