[mingw-qt5-qtbase] Update to 5.2.0 and various packaging fixes
Erik van Pienbroek
epienbro at fedoraproject.org
Sat Jan 4 23:26:38 UTC 2014
commit 21f26211090e0a035badf335213cc275a0d99ffd
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date: Sun Jan 5 00:25:55 2014 +0100
Update to 5.2.0 and various packaging fixes
- Update to 5.2.0
- Use the generic win32-g++ mkspecs profile instead of win32-g++-cross
and win32-g++-cross-x64 (as is preferred by upstream)
- Add support for qtchooser
- Moved the native tools to /usr/$target/bin/qt5 (qtchooser requires the
tools to be in an unique folder with their original file names)
All symlinks in %{_bindir} are updated to reflect this as well
- Prevent invalid Libs.private references in generated pkg-config files
- Prevent patch backups from ending up in the mkspecs folders
- Reorganized and cleaned up the patches
.gitignore | 1 +
mingw-qt5-qtbase.spec | 205 ++++++++++++--------
qt5-cmake-use-correct-tool-names.patch | 52 +++++
...fine-qt-needs-qmain-for-win32-g++-targets.patch | 11 -
qt5-dont-add-resource-files-to-qmake-libs.patch | 11 +
qt5-dont-build-debug-qtmain-library.patch | 11 +
qt5-dont-build-host-libs-static.patch | 2 +-
...-segfault-when-platform-dll-cant-be-found.patch | 22 --
qt5-fix-cmake-support.patch | 61 ------
qt5-merge-static-and-shared-library-trees.patch | 27 +---
...nt-debug-library-names-in-pkgconfig-files.patch | 12 ++
qt5-use-win32-g++-mkspecs-profile.patch | 56 ++++++
sources | 2 +-
13 files changed, 276 insertions(+), 197 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 204c25f..d1c6908 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/qtbase-opensource-src-5.1.1.tar.xz
/qtbase-opensource-src-5.2.0-beta1.tar.xz
/qtbase-opensource-src-5.2.0-rc1.tar.xz
+/qtbase-opensource-src-5.2.0.tar.xz
diff --git a/mingw-qt5-qtbase.spec b/mingw-qt5-qtbase.spec
index edf9292..cb087f4 100644
--- a/mingw-qt5-qtbase.spec
+++ b/mingw-qt5-qtbase.spec
@@ -4,14 +4,11 @@
# contains both native as well as cross compiled binaries
%global __debug_install_post %%{mingw_debug_install_post}; %{_rpmconfigdir}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%%{?buildsubdir}" %{nil}
-%global pre rc1
+#%%global pre rc1
#%%global snapshot_date 20121110
#%%global snapshot_rev d725239c
-%global platform_win32 win32-g++-cross
-%global platform_win64 win32-g++-cross-x64
-
%if 0%{?snapshot_date}
%global source_folder qt-qtbase
%else
@@ -23,7 +20,7 @@
Name: mingw-qt5-qtbase
Version: 5.2.0
-Release: 0.4%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
+Release: 1%{?pre:.%{pre}}%{?snapshot_date:.git%{snapshot_date}.%{snapshot_rev}}%{?dist}
Summary: Qt5 for Windows - QtBase component
License: GPLv3 with exceptions or LGPLv2 with exceptions
@@ -42,35 +39,14 @@ Source0: http://download.qt-project.org/official_releases/qt/%{release_ve
%endif
%endif
-# Special cross-compilation qmake target.
-Source1: qmake.conf.win32
-Source2: qmake.conf.win64
-
-# Fix CMake support (RHBZ #1019952, RHBZ #1019947)
-Patch0: qt5-fix-cmake-support.patch
-
-# When building Qt as static library some files have a different content
-# when compared to the static library. Merge those changes manually.
-# This patch also applies some additional changes which are required to make
-# linking against the static version of Qt work without any manual fiddling
-Patch3: qt5-merge-static-and-shared-library-trees.patch
-
-# Add support for Angle
-Patch9: qt5-add-angle-support.patch
-
-# Make sure our external Angle package is used instead of the bundled one
-Patch10: qt5-use-external-angle-library.patch
-
-# Prevent a segfault when no suitable platform plugin could be detected
-Patch11: qt5-dont-segfault-when-platform-dll-cant-be-found.patch
-
-# Make sure QT_NEEDS_QMAIN is defined for our mkspecs profiles
-Patch12: qt5-define-qt-needs-qmain-for-win32-g++-targets.patch
+######################################
+# Patches which should be upstreamed #
+######################################
# Workaround cross-compilation issue when using a non-x86 host
# https://bugzilla.redhat.com/show_bug.cgi?id=905863
# https://bugreports.qt-project.org/browse/QTBUG-29426
-Patch13: qt5-workaround-qtbug-29426.patch
+Patch0: qt5-workaround-qtbug-29426.patch
# Make sure the .pc files of the Qt5 modules are installed correctly
# This should prevent (silent) failures like:
@@ -80,18 +56,58 @@ Patch13: qt5-workaround-qtbug-29426.patch
#
# This issue was discovered during the review of mingw-qt5-qttools:
# https://bugzilla.redhat.com/show_bug.cgi?id=858080
-Patch15: qt5-workaround-pkgconfig-install-issue.patch
+Patch1: qt5-workaround-pkgconfig-install-issue.patch
+
+# Prevents resource files from being added to the LIBS parameter
+# This solves an issue where the generated pkg-config files contained
+# invalid Libs.private references like .obj/debug/Qt5Cored_resource_res.o
+Patch2: qt5-dont-add-resource-files-to-qmake-libs.patch
+
+# qmake generates the pkgconfig .pc files two times, once for the
+# release build and once for the debug build (which we're not actually
+# building in this package). For both generations the exact same
+# pkgconfig file name is used. This causes references to the debug
+# build ending up in the .pc files which are unwanted
+# Prevent this from happening by giving the pkgconfig .pc
+# files for the debug build an unique file name
+Patch3: qt5-prevent-debug-library-names-in-pkgconfig-files.patch
+
+###########################
+# Fedora specific patches #
+###########################
+
+# Patch the win32-g++ mkspecs profile to match our environment
+Patch100: qt5-use-win32-g++-mkspecs-profile.patch
+
+# Fix CMake support (RHBZ #1019952, RHBZ #1019947)
+# This patch is Fedora specific as we're renaming various tools
+# and libraries in order to be non-conflicting with Qt4
+Patch101: qt5-fix-cmake-support.patch
+
+# When building Qt as static library some files have a different content
+# when compared to the static library. Merge those changes manually.
+# This patch also applies some additional changes which are required to make
+# linking against the static version of Qt work without any manual fiddling
+Patch102: qt5-merge-static-and-shared-library-trees.patch
+
+# Add support for Angle
+# It makes no sense to upstream this yet as upstream
+# Angle only supports using static libraries
+Patch103: qt5-add-angle-support.patch
+
+# Make sure our external Angle package is used instead of the bundled one
+Patch104: qt5-use-external-angle-library.patch
# The bundled pcre is built as static library by default
# As we're not using the bundled copy but our own copy
# we need to do some fiddling to fix compilation issues
# when trying to build static qmake projects
-Patch18: qt5-qtbase-fix-linking-against-static-pcre.patch
+Patch105: qt5-qtbase-fix-linking-against-static-pcre.patch
# Upstream always wants the host libraries to be static instead of
# shared libraries. This causes issues and is against the Fedora
# packaging guidelines so disable this 'feature'
-Patch19: qt5-dont-build-host-libs-static.patch
+Patch106: qt5-dont-build-host-libs-static.patch
# Build host tools with rpath enabled
# We have to use rpath here as the library which the
@@ -99,7 +115,7 @@ Patch19: qt5-dont-build-host-libs-static.patch
# in the folder /usr/{i686,x86_64}-w64-mingw32/lib
# We can't use the regular %%_libdir for this as we
# want to avoid conflicts with the native qt5 packages
-Patch20: qt5-enable-rpath-for-host-tools.patch
+Patch107: qt5-enable-rpath-for-host-tools.patch
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
@@ -168,6 +184,7 @@ Fedora Windows cross-compiler.
%package -n mingw32-qt5-qmake
Summary: Qt5 for Windows build environment
Requires: mingw32-qt5-qttools-lrelease
+Requires: qtchooser
%description -n mingw32-qt5-qmake
This package contains the build environment for cross compiling
@@ -206,6 +223,7 @@ Fedora Windows cross-compiler.
%package -n mingw64-qt5-qmake
Summary: Qt for Windows build environment
Requires: mingw64-qt5-qttools-lrelease
+Requires: qtchooser
%description -n mingw64-qt5-qmake
This package contains the build environment for cross compiling
@@ -234,25 +252,25 @@ Static version of the mingw64-qt5-qtbase library.
%prep
%setup -q -n %{source_folder}
-%patch0 -p0 -b .cmake
-%patch3 -p0 -b .merge_static_shared
-%patch9 -p0 -b .angle
-%patch10 -p0 -b .external_angle
-%patch11 -p0 -b .platform_segv
-%patch12 -p0 -b .qt_needs_qmain
-%patch13 -p0 -b .non_x86
-%patch15 -p0 -b .pkgconfig
-%patch18 -p1 -b .pcre
-%patch19 -p0 -b .bootstrap_shared
-%patch20 -p1 -b .rpath_tools
-
-# Cross-compilation qmake target.
-mkdir mkspecs/%{platform_win32}
-mkdir mkspecs/%{platform_win64}
-cp %{SOURCE1} mkspecs/%{platform_win32}/qmake.conf
-cp %{SOURCE2} mkspecs/%{platform_win64}/qmake.conf
-cp mkspecs/win32-g++/qplatformdefs.h mkspecs/%{platform_win32}
-cp mkspecs/win32-g++/qplatformdefs.h mkspecs/%{platform_win64}
+# Note: some patches don't have a -b argument here
+# This was done on purpose as the Qt build infrastructure
+# automatically copies the entire mkspecs folder to
+# the RPM_BUILD_ROOT. To prevent patch backups from
+# appearing in the resulting RPMs we have to avoid
+# using the -b argument here while applying patches
+%patch0 -p0 -b .non_x86
+%patch1 -p0 -b .pkgconfig
+%patch2 -p1 -b .res
+%patch3 -p1 -b .pkgconfig_debug
+
+%patch100 -p0
+%patch101 -p0
+%patch102 -p0
+%patch103 -p0 -b .angle
+%patch104 -p0 -b .external_angle
+%patch105 -p1 -b .pcre
+%patch106 -p0
+%patch107 -p1
# Make sure the Qt5 build system uses our external ANGLE library
rm -rf src/3rdparty/angle include/QtANGLE/{EGL,GLES2,KHR}
@@ -264,6 +282,7 @@ rm -rf src/3rdparty/pcre
%build
# Generic configure arguments
qt_configure_args_generic="\
+ -xplatform win32-g++
-optimized-qmake \
-verbose \
-opensource \
@@ -286,8 +305,14 @@ qt_configure_args_generic="\
-nomake examples \
-make tools"
+# The odd paths for the -hostbindir argument are on purpose
+# The qtchooser tool assumes that the tools 'qmake', 'moc' and others
+# are all available in the same folder with these exact file names
+# To prevent conflicts with the mingw-qt (Qt4) package we have
+# to put these tools in a dedicated folder
qt_configure_args_win32="\
-hostprefix %{_prefix}/%{mingw32_target} \
+ -hostbindir %{_prefix}/%{mingw32_target}/bin/qt5 \
-hostdatadir %{mingw32_datadir}/qt5 \
-prefix %{mingw32_prefix} \
-bindir %{mingw32_bindir} \
@@ -300,10 +325,11 @@ qt_configure_args_win32="\
-plugindir %{mingw32_libdir}/qt5/plugins \
-sysconfdir %{mingw32_sysconfdir} \
-translationdir %{mingw32_datadir}/qt5/translations \
- -xplatform %{platform_win32}"
+ -device-option CROSS_COMPILE=%{mingw32_target}-"
qt_configure_args_win64="\
-hostprefix %{_prefix}/%{mingw64_target} \
+ -hostbindir %{_prefix}/%{mingw64_target}/bin/qt5 \
-hostdatadir %{mingw64_datadir}/qt5 \
-prefix %{mingw64_prefix} \
-bindir %{mingw64_bindir} \
@@ -316,7 +342,7 @@ qt_configure_args_win64="\
-plugindir %{mingw64_libdir}/qt5/plugins \
-sysconfdir %{mingw64_sysconfdir} \
-translationdir %{mingw64_datadir}/qt5/translations \
- -xplatform %{platform_win64}"
+ -device-option CROSS_COMPILE=%{mingw64_target}-"
# RPM automatically sets the environment variable PKG_CONFIG_PATH
# to point to the native pkg-config files, but while cross compiling
@@ -431,6 +457,7 @@ rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.dll
rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/*.prl
rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.prl
+# Remove various unneeded files belonging to the Qt5Bootstrap library
rm -f $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libQt5Bootstrap.la
rm -f $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/libQt5Bootstrap.prl
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/lib/pkgconfig
@@ -439,6 +466,13 @@ rm -f $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libQt5Bootstrap.la
rm -f $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/libQt5Bootstrap.prl
rm -rf $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/lib/pkgconfig
+# Add qtchooser support
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xdg/qtchooser
+echo "%{_prefix}/%{mingw32_target}/bin/qt5" > $RPM_BUILD_ROOT%{_sysconfdir}/xdg/qtchooser/mingw32-qt5.conf
+echo "%{mingw32_prefix}" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/qtchooser/mingw32-qt5.conf
+echo "%{_prefix}/%{mingw64_target}/bin/qt5" > $RPM_BUILD_ROOT%{_sysconfdir}/xdg/qtchooser/mingw64-qt5.conf
+echo "%{mingw64_prefix}" >> $RPM_BUILD_ROOT%{_sysconfdir}/xdg/qtchooser/mingw64-qt5.conf
+
# Manually install qmake and other native tools so we don't depend anymore on
# the version of the native Fedora Qt and also fix issues as illustrated at
# http://stackoverflow.com/questions/6592931/building-for-windows-under-linux-using-qt-creator
@@ -449,19 +483,16 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/bin
mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/bin
for tool in qmake moc rcc uic qdbuscpp2xml qdbusxml2cpp qdoc syncqt.pl; do
- mv $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/bin/$tool $RPM_BUILD_ROOT%{_prefix}/%{mingw32_target}/bin/$tool-qt5
- ln -s ../%{mingw32_target}/bin/$tool-qt5 $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-$tool-qt5
-
- mv $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/bin/$tool $RPM_BUILD_ROOT%{_prefix}/%{mingw64_target}/bin/$tool-qt5
- ln -s ../%{mingw64_target}/bin/$tool-qt5 $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-$tool-qt5
+ ln -s ../%{mingw32_target}/bin/qt5/$tool $RPM_BUILD_ROOT%{_bindir}/%{mingw32_target}-$tool-qt5
+ ln -s ../%{mingw64_target}/bin/qt5/$tool $RPM_BUILD_ROOT%{_bindir}/%{mingw64_target}-$tool-qt5
done
ln -s %{mingw32_target}-qmake-qt5 $RPM_BUILD_ROOT%{_bindir}/mingw32-qmake-qt5
ln -s %{mingw64_target}-qmake-qt5 $RPM_BUILD_ROOT%{_bindir}/mingw64-qmake-qt5
# Make sure that all Qt projects use the tools which are provided by this package
-sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw32_datadir}/qt5/mkspecs/%{platform_win32}/qmake.conf
-sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw64_datadir}/qt5/mkspecs/%{platform_win64}/qmake.conf
+#sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw32_datadir}/qt5/mkspecs/%{platform_win32}/qmake.conf
+#sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw64_datadir}/qt5/mkspecs/%{platform_win64}/qmake.conf
# Win32
@@ -564,16 +595,19 @@ sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw64_datadir}/qt5/mkspecs/%{p
%{_bindir}/%{mingw32_target}-syncqt.pl-qt5
%{_bindir}/%{mingw32_target}-uic-qt5
%{_bindir}/mingw32-qmake-qt5
-%{_prefix}/%{mingw32_target}/bin/moc-qt5
-%{_prefix}/%{mingw32_target}/bin/qdbuscpp2xml-qt5
-%{_prefix}/%{mingw32_target}/bin/qdbusxml2cpp-qt5
-%{_prefix}/%{mingw32_target}/bin/qdoc-qt5
-%{_prefix}/%{mingw32_target}/bin/qmake-qt5
-%{_prefix}/%{mingw32_target}/bin/rcc-qt5
-%{_prefix}/%{mingw32_target}/bin/syncqt.pl-qt5
-%{_prefix}/%{mingw32_target}/bin/uic-qt5
+%dir %{_prefix}/%{mingw32_target}/bin/qt5/
+%{_prefix}/%{mingw32_target}/bin/qt5/moc
+%{_prefix}/%{mingw32_target}/bin/qt5/qdbuscpp2xml
+%{_prefix}/%{mingw32_target}/bin/qt5/qdbusxml2cpp
+%{_prefix}/%{mingw32_target}/bin/qt5/qdoc
+%{_prefix}/%{mingw32_target}/bin/qt5/qmake
+%{_prefix}/%{mingw32_target}/bin/qt5/rcc
+%{_prefix}/%{mingw32_target}/bin/qt5/syncqt.pl
+%{_prefix}/%{mingw32_target}/bin/qt5/uic
%{_prefix}/%{mingw32_target}/lib/libQt5Bootstrap.so.5*
%{mingw32_datadir}/qt5/
+# not editable config files, so not using %%config here
+%{_sysconfdir}/xdg/qtchooser/mingw32-qt5.conf
%files -n mingw32-qt5-qtbase-devel
%{_prefix}/%{mingw32_target}/lib/libQt5Bootstrap.so
@@ -693,16 +727,19 @@ sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw64_datadir}/qt5/mkspecs/%{p
%{_bindir}/%{mingw64_target}-syncqt.pl-qt5
%{_bindir}/%{mingw64_target}-uic-qt5
%{_bindir}/mingw64-qmake-qt5
-%{_prefix}/%{mingw64_target}/bin/moc-qt5
-%{_prefix}/%{mingw64_target}/bin/qdbuscpp2xml-qt5
-%{_prefix}/%{mingw64_target}/bin/qdbusxml2cpp-qt5
-%{_prefix}/%{mingw64_target}/bin/qdoc-qt5
-%{_prefix}/%{mingw64_target}/bin/qmake-qt5
-%{_prefix}/%{mingw64_target}/bin/rcc-qt5
-%{_prefix}/%{mingw64_target}/bin/syncqt.pl-qt5
-%{_prefix}/%{mingw64_target}/bin/uic-qt5
+%dir %{_prefix}/%{mingw64_target}/bin/qt5/
+%{_prefix}/%{mingw64_target}/bin/qt5/moc
+%{_prefix}/%{mingw64_target}/bin/qt5/qdbuscpp2xml
+%{_prefix}/%{mingw64_target}/bin/qt5/qdbusxml2cpp
+%{_prefix}/%{mingw64_target}/bin/qt5/qdoc
+%{_prefix}/%{mingw64_target}/bin/qt5/qmake
+%{_prefix}/%{mingw64_target}/bin/qt5/rcc
+%{_prefix}/%{mingw64_target}/bin/qt5/syncqt.pl
+%{_prefix}/%{mingw64_target}/bin/qt5/uic
%{_prefix}/%{mingw64_target}/lib/libQt5Bootstrap.so.5*
%{mingw64_datadir}/qt5/
+# not editable config files, so not using %%config here
+%{_sysconfdir}/xdg/qtchooser/mingw64-qt5.conf
%files -n mingw64-qt5-qtbase-devel
%{_prefix}/%{mingw64_target}/lib/libQt5Bootstrap.so
@@ -724,6 +761,18 @@ sed -i s@'#QT_TOOL'@'QT_TOOL'@ $RPM_BUILD_ROOT%{mingw64_datadir}/qt5/mkspecs/%{p
%changelog
+* Sun Jan 5 2014 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.2.0-1
+- Update to 5.2.0
+- Use the generic win32-g++ mkspecs profile instead of win32-g++-cross
+ and win32-g++-cross-x64 (as is preferred by upstream)
+- Add support for qtchooser
+- Moved the native tools to /usr/$target/bin/qt5 (qtchooser requires the
+ tools to be in an unique folder with their original file names)
+ All symlinks in %%{_bindir} are updated to reflect this as well
+- Prevent invalid Libs.private references in generated pkg-config files
+- Prevent patch backups from ending up in the mkspecs folders
+- Reorganized and cleaned up the patches
+
* Fri Nov 29 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 5.2.0-0.4.rc1
- Update to 5.2.0 RC 1
diff --git a/qt5-cmake-use-correct-tool-names.patch b/qt5-cmake-use-correct-tool-names.patch
new file mode 100644
index 0000000..5d8c96a
--- /dev/null
+++ b/qt5-cmake-use-correct-tool-names.patch
@@ -0,0 +1,52 @@
+--- src/corelib/Qt5CoreConfigExtras.cmake.in.orig 2013-10-22 21:30:10.286264251 +0200
++++ src/corelib/Qt5CoreConfigExtras.cmake.in 2013-10-22 21:30:44.931584318 +0200
+@@ -3,9 +3,9 @@
+ add_executable(Qt5::qmake IMPORTED)
+
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"$${CMAKE_BIN_DIR}qmake-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+@@ -18,9 +18,9 @@
+ add_executable(Qt5::moc IMPORTED)
+
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"$${CMAKE_BIN_DIR}moc-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+@@ -35,9 +35,9 @@
+ add_executable(Qt5::rcc IMPORTED)
+
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"$${CMAKE_BIN_DIR}rcc-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Core_check_file_exists(${imported_location})
+
+--- src/widgets/Qt5WidgetsConfigExtras.cmake.in.orig 2013-11-26 19:48:08.588107974 +0100
++++ src/widgets/Qt5WidgetsConfigExtras.cmake.in 2013-11-26 19:48:20.603107472 +0100
+@@ -3,9 +3,9 @@
+ add_executable(Qt5::uic IMPORTED)
+
+ !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
+- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ELSE
+- set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
++ set(imported_location \"$${CMAKE_BIN_DIR}uic-qt5$$CMAKE_BIN_SUFFIX\")
+ !!ENDIF
+ _qt5_Widgets_check_file_exists(${imported_location})
+
diff --git a/qt5-dont-add-resource-files-to-qmake-libs.patch b/qt5-dont-add-resource-files-to-qmake-libs.patch
new file mode 100644
index 0000000..b348429
--- /dev/null
+++ b/qt5-dont-add-resource-files-to-qmake-libs.patch
@@ -0,0 +1,11 @@
+--- qtbase-opensource-src-5.2.0/qmake/generators/win32/mingw_make.cpp.orig 2014-01-04 21:18:07.413328813 +0100
++++ qtbase-opensource-src-5.2.0/qmake/generators/win32/mingw_make.cpp 2014-01-04 21:18:55.740126515 +0100
+@@ -254,7 +254,7 @@
+ processVars();
+
+ if (!project->values("RES_FILE").isEmpty()) {
+- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE"));
++ project->values("OBJECTS") += escapeFilePaths(project->values("RES_FILE"));
+ }
+
+ ProStringList &configs = project->values("CONFIG");
diff --git a/qt5-dont-build-debug-qtmain-library.patch b/qt5-dont-build-debug-qtmain-library.patch
new file mode 100644
index 0000000..9ad3f68
--- /dev/null
+++ b/qt5-dont-build-debug-qtmain-library.patch
@@ -0,0 +1,11 @@
+--- src/winmain/winmain.pro.orig 2014-01-02 17:13:10.862810479 +0100
++++ src/winmain/winmain.pro 2014-01-02 17:21:15.892820401 +0100
+@@ -8,8 +8,6 @@
+ CONFIG += static
+ QT = core
+
+-contains(QT_CONFIG, build_all):CONFIG += build_all
+-
+ win32-msvc*:QMAKE_CFLAGS_DEBUG -= -Zi
+ win32-msvc*:QMAKE_CXXFLAGS_DEBUG -= -Zi
+ win32-msvc*:QMAKE_CFLAGS_DEBUG *= -Z7
diff --git a/qt5-dont-build-host-libs-static.patch b/qt5-dont-build-host-libs-static.patch
index 42c9872..4ea6262 100644
--- a/qt5-dont-build-host-libs-static.patch
+++ b/qt5-dont-build-host-libs-static.patch
@@ -5,7 +5,7 @@
# Compile as shared/DLL or static according to the option given to configure
# unless overridden. Host builds are always static
-host_build|staticlib: CONFIG += static
-+#host_build|staticlib: CONFIG += static
++staticlib: CONFIG += static
host_build {
QT -= gui # no host module will ever use gui
diff --git a/qt5-fix-cmake-support.patch b/qt5-fix-cmake-support.patch
index 3e9b21d..7a4226e 100644
--- a/qt5-fix-cmake-support.patch
+++ b/qt5-fix-cmake-support.patch
@@ -1,55 +1,3 @@
---- src/corelib/Qt5CoreConfigExtras.cmake.in.orig 2013-10-22 21:30:10.286264251 +0200
-+++ src/corelib/Qt5CoreConfigExtras.cmake.in 2013-10-22 21:30:44.931584318 +0200
-@@ -3,9 +3,9 @@
- add_executable(Qt5::qmake IMPORTED)
-
- !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
-- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}qmake-qt5$$CMAKE_BIN_SUFFIX\")
- !!ELSE
-- set(imported_location \"$${CMAKE_BIN_DIR}qmake$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"$${CMAKE_BIN_DIR}qmake-qt5$$CMAKE_BIN_SUFFIX\")
- !!ENDIF
- _qt5_Core_check_file_exists(${imported_location})
-
-@@ -18,9 +18,9 @@
- add_executable(Qt5::moc IMPORTED)
-
- !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
-- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}moc-qt5$$CMAKE_BIN_SUFFIX\")
- !!ELSE
-- set(imported_location \"$${CMAKE_BIN_DIR}moc$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"$${CMAKE_BIN_DIR}moc-qt5$$CMAKE_BIN_SUFFIX\")
- !!ENDIF
- _qt5_Core_check_file_exists(${imported_location})
-
-@@ -35,9 +35,9 @@
- add_executable(Qt5::rcc IMPORTED)
-
- !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
-- set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"${_qt5Core_install_prefix}/$${CMAKE_BIN_DIR}rcc-qt5$$CMAKE_BIN_SUFFIX\")
- !!ELSE
-- set(imported_location \"$${CMAKE_BIN_DIR}rcc$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"$${CMAKE_BIN_DIR}rcc-qt5$$CMAKE_BIN_SUFFIX\")
- !!ENDIF
- _qt5_Core_check_file_exists(${imported_location})
-
---- src/widgets/Qt5WidgetsConfigExtras.cmake.in.orig 2013-11-26 19:48:08.588107974 +0100
-+++ src/widgets/Qt5WidgetsConfigExtras.cmake.in 2013-11-26 19:48:20.603107472 +0100
-@@ -3,9 +3,9 @@
- add_executable(Qt5::uic IMPORTED)
-
- !!IF isEmpty(CMAKE_BIN_DIR_IS_ABSOLUTE)
-- set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"${_qt5Widgets_install_prefix}/$${CMAKE_BIN_DIR}uic-qt5$$CMAKE_BIN_SUFFIX\")
- !!ELSE
-- set(imported_location \"$${CMAKE_BIN_DIR}uic$$CMAKE_BIN_SUFFIX\")
-+ set(imported_location \"$${CMAKE_BIN_DIR}uic-qt5$$CMAKE_BIN_SUFFIX\")
- !!ENDIF
- _qt5_Widgets_check_file_exists(${imported_location})
-
--- src/gui/Qt5GuiConfigExtras.cmake.in.orig 2013-10-22 23:56:20.562965370 +0200
+++ src/gui/Qt5GuiConfigExtras.cmake.in 2013-10-22 23:57:16.142476851 +0200
@@ -2,9 +2,9 @@
@@ -94,15 +42,6 @@
} else {
--- mkspecs/features/create_cmake.prf.cmake 2013-10-22 10:49:28.000000000 +0200
+++ mkspecs/features/create_cmake.prf 2013-10-23 21:38:02.959762089 +0200
-@@ -195,7 +195,7 @@
- CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}d.dll
- CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll
-
-- win32-g++ {
-+ win32-g++* {
- CMAKE_WINMAIN_FILE_LOCATION_DEBUG = libqtmain$${QT_LIBINFIX}d.a
- CMAKE_WINMAIN_FILE_LOCATION_RELEASE = libqtmain$${QT_LIBINFIX}.a
-
@@ -207,8 +207,8 @@
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}d.prl
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
diff --git a/qt5-merge-static-and-shared-library-trees.patch b/qt5-merge-static-and-shared-library-trees.patch
index 5b3d5be..4fc9c83 100644
--- a/qt5-merge-static-and-shared-library-trees.patch
+++ b/qt5-merge-static-and-shared-library-trees.patch
@@ -1,6 +1,6 @@
--- mkspecs/features/qt_functions.prf.orig 2012-09-05 23:30:01.612735271 +0200
+++ mkspecs/features/qt_functions.prf 2012-09-05 23:32:40.030869399 +0200
-@@ -134,6 +134,21 @@
+@@ -134,6 +134,19 @@
}
$$2 += $$LINKAGE
@@ -8,8 +8,6 @@
+ win32:CONFIG(static) {
+ isEqual(MODULE_NAME, Qt5Core) {
+ $$2 += $$QMAKE_LIBS_CORE
-+ } else:isEqual(MODULE_NAME, Qt5Widgets) {
-+ $$2 += $$QMAKE_LIBS_WIDGETS
+ } else:isEqual(MODULE_NAME, Qt5Gui) {
+ $$2 += $$QMAKE_LIBS_GUI
+ } else:isEqual(MODULE_NAME, Qt5Network) {
@@ -24,32 +22,15 @@
!isEmpty(QMAKE_LSB) {
--- mkspecs/features/default_post.prf.orig 2012-09-05 23:28:56.827501401 +0200
+++ mkspecs/features/default_post.prf 2012-09-05 23:29:31.617923080 +0200
-@@ -47,3 +50,7 @@
+@@ -47,3 +50,8 @@
QMAKE_INCDIR += $$QMAKE_INCDIR_POST
QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST
+
+win32:contains(CONFIG, static) {
++ DEFINES += QT_STATIC
+ QMAKE_LFLAGS += -static
+}
---- mkspecs/features/qt.prf.orig 2012-09-07 20:35:43.711572661 +0200
-+++ mkspecs/features/qt.prf 2012-09-07 20:35:48.794607868 +0200
-@@ -2,12 +2,14 @@
-
- #handle defines
- win32 {
-- contains(QT_CONFIG, shared) {
-+ contains(CONFIG, shared) {
- # this variable is read by qmake in qmake/generators/win32/msvc_vcproj.cpp
- # function VcprojGenerator::initDeploymentTool(), which contains some hardcoded
- # library names (the ones that were static in Qt 4)
- # it probably doesn't work anymore and should not be in this file
- QMAKE_QT_DLL = 1
-+ } else {
-+ DEFINES += QT_STATIC
- }
- }
- CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG
--- configure.orig 2012-12-10 23:51:02.920255366 +0100
+++ configure 2012-12-10 23:55:58.101753703 +0100
@@ -6032,6 +6032,12 @@
@@ -57,9 +38,9 @@
QT_CONFIG += $QT_CONFIG
+contains(CONFIG, static) {
++ CONFIG -= shared
+ QT_CONFIG += static jpeg gif
+ QT_CONFIG -= shared
-+ QT_DEFINES += QT_STATIC
+}
+
#versioning
diff --git a/qt5-prevent-debug-library-names-in-pkgconfig-files.patch b/qt5-prevent-debug-library-names-in-pkgconfig-files.patch
new file mode 100644
index 0000000..7d6836d
--- /dev/null
+++ b/qt5-prevent-debug-library-names-in-pkgconfig-files.patch
@@ -0,0 +1,12 @@
+--- qtbase-opensource-src-5.2.0/qmake/generators/makefile.cpp.orig 2014-01-03 01:30:23.631353708 +0100
++++ qtbase-opensource-src-5.2.0/qmake/generators/makefile.cpp 2014-01-03 01:32:37.888625966 +0100
+@@ -3168,6 +3168,9 @@
+ if (dot != -1)
+ ret = ret.left(dot);
+ }
++ if (project->isActiveConfig("debug")) {
++ ret += "d";
++ }
+ ret += Option::pkgcfg_ext;
+ QString subdir = project->first("QMAKE_PKGCONFIG_DESTDIR").toQString();
+ if(!subdir.isEmpty()) {
diff --git a/qt5-use-win32-g++-mkspecs-profile.patch b/qt5-use-win32-g++-mkspecs-profile.patch
new file mode 100644
index 0000000..954c3bb
--- /dev/null
+++ b/qt5-use-win32-g++-mkspecs-profile.patch
@@ -0,0 +1,56 @@
+--- mkspecs/win32-g++/qmake.conf.orig 2014-01-02 13:50:16.123910873 +0100
++++ mkspecs/win32-g++/qmake.conf 2014-01-02 13:58:21.294935571 +0100
+@@ -25,7 +25,7 @@
+ QMAKE_LEXFLAGS =
+ QMAKE_YACC = byacc
+ QMAKE_YACCFLAGS = -d
+-QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
++QMAKE_CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 --param=ssp-buffer-size=4 -fno-keep-inline-dllexport
+ QMAKE_CFLAGS_DEPS = -M
+ QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
+ QMAKE_CFLAGS_WARN_OFF = -w
+@@ -66,10 +66,10 @@
+
+ QMAKE_LINK = $${CROSS_COMPILE}g++
+ QMAKE_LINK_C = $${CROSS_COMPILE}gcc
+-QMAKE_LFLAGS =
++QMAKE_LFLAGS = -g
+ QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
+ QMAKE_LFLAGS_EXCEPTIONS_OFF =
+-QMAKE_LFLAGS_RELEASE = -Wl,-s
++QMAKE_LFLAGS_RELEASE =
+ QMAKE_LFLAGS_DEBUG =
+ QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
+ QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
+@@ -81,14 +81,14 @@
+ QMAKE_EXTENSION_STATICLIB = a
+
+ QMAKE_LIBS =
+-QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
+-QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
++QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz -lpcre16
++QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -ljpeg -lpng
+ QMAKE_LIBS_NETWORK = -lws2_32
+ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
+-QMAKE_LIBS_OPENGL_ES2 = -llibEGL -llibGLESv2 -lgdi32 -luser32
+-QMAKE_LIBS_OPENGL_ES2_DEBUG = -llibEGLd -llibGLESv2d -lgdi32 -luser32
++QMAKE_LIBS_OPENGL_ES2 = -lEGL -lGLESv2 -lgdi32 -luser32
++QMAKE_LIBS_OPENGL_ES2_DEBUG = $(QMAKE_LIBS_OPENGL_ES2)
+ QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
+-QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
++QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqt5main
+
+ !isEmpty(QMAKE_SH) {
+ MINGW_IN_SHELL = 1
+@@ -102,9 +102,10 @@
+ include(../common/shell-win32.conf)
+ }
+
+-QMAKE_IDL = midl
++QMAKE_IDL = $${CROSS_COMPILE}widl
+ QMAKE_LIB = $${CROSS_COMPILE}ar -ru
+ QMAKE_RC = $${CROSS_COMPILE}windres
++QMAKE_DLLTOOL = $${CROSS_COMPILE}dlltool
+
+ QMAKE_STRIP = $${CROSS_COMPILE}strip
+ QMAKE_STRIPFLAGS_LIB += --strip-unneeded
diff --git a/sources b/sources
index ab6862d..873df0e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a86dc4cc3aa6443f1ca4b35f826ec240 qtbase-opensource-src-5.2.0-rc1.tar.xz
+c94bbaf1bb7f0f4a32d2caa7501416e1 qtbase-opensource-src-5.2.0.tar.xz
More information about the scm-commits
mailing list