5.2.0-0.1.alpha

- 5.2.0-alpha
- -doc subpkg
This commit is contained in:
Rex Dieter 2013-10-02 09:33:44 -05:00
parent 52fdccf8a6
commit edc5b4a2e4
5 changed files with 73 additions and 132 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
/qttools-opensource-src-5.0.2.tar.xz
/qttools-opensource-src-5.1.1.tar.xz
/qttools-opensource-src-5.2.0-alpha.tar.xz

View File

@ -1,101 +0,0 @@
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

View File

@ -1,29 +1,36 @@
%global qt_module qttools
%global system_clucene 1
%define pre alpha
# define to build docs, need to undef this for bootstrapping
# where qt5-qttools builds are not yet available
%define docs 1
Summary: Qt5 - QtTool components
Name: qt5-qttools
Version: 5.1.1
Release: 6%{?dist}
Version: 5.2.0
Release: 0.1.%{pre}%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
Url: http://qt-project.org/
Source0: http://download.qt-project.org/official_releases/qt/5.1/%{version}/submodules/%{qt_module}-opensource-src-%{version}.tar.xz
%if 0%{?pre:1}
Source0: http://download.qt-project.org/development_releases/qt/5.2/%{version}-%{pre}/submodules/%{qt_module}-opensource-src-%{version}-%{pre}.tar.xz
%else
Source0: http://download.qt-project.org/official_releases/qt/5.2/%{version}/submodules/%{qt_module}-opensource-src-%{version}.tar.xz
%endif
# qt5-qtjsbackend (and qt5-declarative) supports only ix86, x86_64 and arm , and so do we here
ExclusiveArch: %{ix86} x86_64 %{arm}
# http://bugzilla.redhat.com/1005482
ExcludeArch: ppc64 ppc
Patch1: qttools-system_clucene.patch
# help lrelease/lupdate use/prefer qmake-qt5
# https://bugzilla.redhat.com/show_bug.cgi?id=1009893
Patch2: qttools-opensource-src-5.1.1-qmake-qt5.patch
Patch2: qttools-opensource-src-5.2.0-alpha-qmake-qt5.patch
## upstream patches
# https://bugreports.qt-project.org/browse/QTBUG-32570
Patch100: CMake-Use-path-manipulation-features-from-qtbase.patch
Source20: assistant.desktop
Source21: designer.desktop
@ -88,6 +95,17 @@ Summary: D-Bus debugger and viewer
QDbusviewer can be used to inspect D-Bus objects of running programs
and invoke methods on those objects.
%if 0%{?docs}
%package doc
Summary: API documentation for %{name}
Requires: %{name} = %{version}-%{release}
# for qhelpgenerator
BuildRequires: qt5-qttools-devel
BuildArch: noarch
%description doc
%{summary}.
%endif
%prep
%setup -q -n qttools-opensource-src-%{version}%{?pre:-%{pre}}
@ -100,18 +118,24 @@ and invoke methods on those objects.
%endif
%patch2 -p1 -b .qmake-qt5
%patch100 -p1 -b .Qt5LinguistToolsConfig
%build
%{_qt5_qmake}
make %{?_smp_mflags}
%if 0%{?docs}
make %{?_smp_mflags} docs
%endif
%install
make install INSTALL_ROOT=%{buildroot}
%if 0%{?docs}
make install_docs INSTALL_ROOT=%{buildroot}
%endif
# Add desktop files, --vendor=qt4 helps avoid possible conflicts with qt3/qt4
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications \
@ -130,19 +154,17 @@ for icon in src/linguist/linguist/images/icons/linguist-*-32.png ; do
install -p -m644 -D ${icon} %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/linguist.png
done
# put non-conflicting binaries with -qt5 postfix in %%{_bindir}
# hardlink files to %{_bindir}, add -qt5 postfix to not conflict
mkdir %{buildroot}%{_bindir}
pushd %{buildroot}%{_qt5_bindir}
for i in * ; do
case "${i}" in
assistant|designer|lconvert|linguist|lrelease|lupdate|pixeltool|qcollectiongenerator|qdbus|qdbusviewer|qhelpconverter|qhelpgenerator)
mv $i ../../../bin/${i}-qt5
ln -s ../../../bin/${i}-qt5 .
ln -s ../../../bin/${i}-qt5 $i
ln -v ${i} %{buildroot}%{_bindir}/${i}-qt5
ln -sv ${i} ${i}-qt5
;;
*)
mv $i ../../../bin/
ln -s ../../../bin/$i .
*)
ln -v ${i} %{buildroot}%{_bindir}/${i}
;;
esac
done
@ -190,8 +212,9 @@ fi
%files
%{_bindir}/qdbus-qt5
%{_qt5_bindir}/qdbus
%{_qt5_bindir}/qdbus-qt5
%{_bindir}/qtpaths
%{_qt5_bindir}/qdbus*
%{_qt5_bindir}/qtpaths
%{_qt5_libdir}/libQt5CLucene.so.5*
%{_qt5_libdir}/libQt5Designer.so.5*
%{_qt5_libdir}/libQt5DesignerComponents.so.5*
@ -299,7 +322,26 @@ fi
%{_qt5_libdir}/cmake/Qt5UiTools/
%{_qt5_libdir}/pkgconfig/Qt5UiTools.pc
%if 0%{?docs}
%files doc
%{_qt5_docdir}/qtassistant.qch
%{_qt5_docdir}/qtassistant/
%{_qt5_docdir}/qtdesigner.qch
%{_qt5_docdir}/qtdesigner/
%{_qt5_docdir}/qthelp.qch
%{_qt5_docdir}/qthelp/
%{_qt5_docdir}/qtlinguist.qch
%{_qt5_docdir}/qtlinguist/
%{_qt5_docdir}/qtuitools.qch
%{_qt5_docdir}/qtuitools/
%endif
%changelog
* Tue Oct 01 2013 Rex Dieter <rdieter@fedoraproject.org> 5.2.0-0.1.alpha
- 5.2.0-alpha
- -doc subpkg
* Sat Sep 21 2013 Rex Dieter <rdieter@fedoraproject.org> 5.1.1-6
- lupdate can't find qmake configuration file default (#1009893)

View File

@ -1,7 +1,7 @@
diff -up qttools-opensource-src-5.1.1/src/linguist/lrelease/main.cpp.qmake-qt5 qttools-opensource-src-5.1.1/src/linguist/lrelease/main.cpp
--- qttools-opensource-src-5.1.1/src/linguist/lrelease/main.cpp.qmake-qt5 2013-08-25 13:04:37.000000000 -0500
+++ qttools-opensource-src-5.1.1/src/linguist/lrelease/main.cpp 2013-09-21 01:01:44.970539849 -0500
@@ -311,9 +311,9 @@ int main(int argc, char **argv)
diff -up qttools-opensource-src-5.2.0-alpha/src/linguist/lrelease/main.cpp.qmake-qt5 qttools-opensource-src-5.2.0-alpha/src/linguist/lrelease/main.cpp
--- qttools-opensource-src-5.2.0-alpha/src/linguist/lrelease/main.cpp.qmake-qt5 2013-10-01 22:55:03.530163172 -0500
+++ qttools-opensource-src-5.2.0-alpha/src/linguist/lrelease/main.cpp 2013-10-01 22:56:27.685283658 -0500
@@ -318,9 +318,9 @@ int main(int argc, char **argv)
option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE"));
if (option.qmake_abslocation.isEmpty())
#ifdef QT_BOOTSTRAPPED
@ -12,16 +12,16 @@ diff -up qttools-opensource-src-5.1.1/src/linguist/lrelease/main.cpp.qmake-qt5 q
+ option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake-qt5");
#endif
option.initProperties();
QMakeParser parser(0, &evalHandler);
diff -up qttools-opensource-src-5.1.1/src/linguist/lupdate/main.cpp.qmake-qt5 qttools-opensource-src-5.1.1/src/linguist/lupdate/main.cpp
--- qttools-opensource-src-5.1.1/src/linguist/lupdate/main.cpp.qmake-qt5 2013-08-25 13:04:37.000000000 -0500
+++ qttools-opensource-src-5.1.1/src/linguist/lupdate/main.cpp 2013-09-21 01:00:41.474204348 -0500
@@ -824,7 +824,7 @@ int main(int argc, char **argv)
QMakeVfs vfs;
diff -up qttools-opensource-src-5.2.0-alpha/src/linguist/lupdate/main.cpp.qmake-qt5 qttools-opensource-src-5.2.0-alpha/src/linguist/lupdate/main.cpp
--- qttools-opensource-src-5.2.0-alpha/src/linguist/lupdate/main.cpp.qmake-qt5 2013-10-01 22:55:03.531163161 -0500
+++ qttools-opensource-src-5.2.0-alpha/src/linguist/lupdate/main.cpp 2013-10-01 22:55:56.163613145 -0500
@@ -1055,7 +1055,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(),
QStringList() << QLatin1String("CONFIG+=lupdate_run"));

View File

@ -1 +1 @@
022073d32ff9d408de0182b5d1f01781 qttools-opensource-src-5.1.1.tar.xz
0585e523786c9fa3cc5d971397efd0f7 qttools-opensource-src-5.2.0-alpha.tar.xz