File mingw32-cross-libqt4-qmake.spec of Package mingw32-libqt4
#
# spec file for package mingw32-libqt4
#
# Copyright (c) 2017 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# 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/
#
# keep in sync with mingw32-libqt4.spec
%define qmake_only 1
%define system_qmake 0
# define missing dir
%if 0%{?suse_version} <= 1315
%define _rpmmacrodir %{_sysconfdir}/rpm
%endif
%define _mingw32_qt4_platform win32-g++-cross
%define _openssl_soname 10
%define verbose_build 0
Name: mingw32-libqt4
Version: 4.8.7
Release: 0
Summary: Qt C++ Program Library, Core Components for Windows
License: GPL-3.0-only WITH Qt-GPL-exception-1.1 or LGPL-2.1-only WITH Qt-LGPL-exception-1.1
Group: System/Libraries
URL: https://www.qt.io/
Source0: qt-everywhere-opensource-src-%{version}.tar.gz
Source3: mingw32-qmake.conf
Source4: qplatformdefs.h
Source5: qt4.conf
Source1000: mingw32-libqt4-rpmlintrc
Source1001: macros.mingw32-qt4
Source1: mingw32-libqt4.changes
Source10: qt4config.desktop
Source11: designer4.desktop
Source12: linguist4.desktop
Source13: assistant4.desktop
Source14: assistant.png
Source15: designer.png
Source16: linguist.png
Source17: qt_lt.ts
Patch1: qt-4.8.0-no-webkit-tests.patch
Patch2: qt-dont-perform-ipc-checks-for-win32.patch
Patch3: qt-4.7.3-fix-loading-openssl.patch
Patch4: qt-4.8.0-fix-include-windows-h.patch
Patch5: qt-4.8.0-build-qtuitools-dynamically.patch
Patch6: qt-fix-javascript-jit-on-mingw-x86_64.patch
Patch7: qt-4.8.1-fix-activeqt-compilation.patch
Patch8: qt-everywhere-opensource-src-4.8.1-linguist_qmake-qt4.patch
Patch9: qt-automatically-set-shared-config-flag-for-lib-templates.patch
Patch10: qt-dont-set-qt-dll-define-for-static-builds.patch
#qsql-mysql library patch
Patch15: qt-mysql-client-lib-win32.patch
# gcc6 patch from Fedora
Patch16: qt-everywhere-opensource-src-4.8.7-gcc6.patch
# let qt use qt4.conf first if present
Patch17: 0001-If-present-load-qt4.conf-instead-of-qt.conf-to-avoid-i.patch
Patch18: 0001-Only-show-system-bus-tab-if-system-bus-is-present.txt
Patch19: 0001-hide-console-windows-on-startDetached.patch
# from windows:mingw/libqt4.spec
Patch22: qt-never-strip.diff
Patch23: plastik-default.diff
Patch26: use-freetype-default.diff
Patch28: link-tools-shared.diff
Patch39: 0191-listview-alternate-row-colors.diff
Patch40: 0188-fix-moc-parser-same-name-header.diff
Patch43: 0195-compositing-properties.diff
Patch60: 0180-window-role.diff
Patch61: qt4-fake-bold.patch
Patch70: 0225-invalidate-tabbar-geometry-on-refresh.patch
Patch75: qt-debug-timer.diff
Patch87: qfatal-noreturn.diff
Patch101: no-moc-date.diff
Patch107: webkit-ia64_s390x.patch
Patch109: libqt4-libtool-nodate.diff
Patch113: ppc64-webkit-link-fix.diff
Patch118: rcc-stable-dirlisting.diff
Patch119: hppa_ldcw_fix.diff
Patch120: hppa_unaligned_access_fix_458133.diff
Patch128: build-qvfb-tool.diff
Patch131: disable-im-for-password.diff
Patch136: handle-tga-files-properly.diff
Patch137: qdbusconnection-no-warning-output.patch
# PATCH-FIX-UPSTREAM fix_assistant_segfault_QTBUG-25324.patch [bnc#780763] [QTBUG#25324]
Patch140: fix_assistant_segfault_QTBUG-25324.patch
# PATCH-FIX-OPENSUSE fix build on s390x failing to link in qnetworkconfigmanager.o
Patch141: qt4-fix-s390x-build.diff
Patch149: qatomic-generic.patch
# PATCH-FEATURE-OPENSUSE QSystemTrayicon.diff -- adds support for sni-qt plugin, which allows Qt applications to communicate via KStatusNotifier spec -- needed for
# Plasma Next
Patch150: QSystemTrayicon.diff
Patch152: fix-moc-from-choking-on-boost-headers.patch
# PATCH-FIX-OPENSUSE qlocale_icu-no-warning-output.patch -- qWarnings about icu libraries and symbols are now only emmited in debug builds
Patch153: qlocale_icu-no-warning-output.patch
# PATCH-FIX-OPENSUSE kde4_qt_plugin_path.patch
Patch154: kde4_qt_plugin_path.patch
Patch160: ppc64le.diff
# LO filepicker integration (3 patches)
# PATCH-FIX-OPENSUSE exclude socket notifiers from the glib event loop - needed for LO KDE4 filepicker integration (1/3)
Patch162: glib-honor-ExcludeSocketNotifiers-flag.diff
# PATCH-FIX-OPENSUSE fix recursive repaint errors which lead to crashes - needed for LO KDE4 filepicker integration (2/3)
Patch163: qtcore-4.8.5-qeventdispatcher-recursive.patch
# PATCH-FIX-OPENSUSE fix clipboard delay when pasting with LO and KFileDialog open - needed for LO KDE4 filepicker integration (3/3)
Patch164: l-qclipboard_delay.patch
# PATCH-FIX-OPENSUSE fix_qrasterpixmapdata_bnc847880.diff -- fix image rect copy optimization that copied "garbage" when used in qemu/cirrus (bnc#847880)
Patch165: fix_qrasterpixmapdata_bnc847880.diff
# PATCH-FIX-UPSTREAM 0001-Fix-exclusion-of-anonymous-ciphers.patch -- Exclude more ciphers from being used by default
Patch166: 0001-Fix-exclusion-of-anonymous-ciphers.patch
# PATCH-FIX-OPENSUSE disable-insecure-ciphers-bnc865241.diff -- Disable insecure ciphers (rc4, aecdh, adh, exp-adh, <128 bits)
Patch167: disable-rc4-ciphers-bnc865241.diff
# PATCH-FIX-OPENSUSE fix-gcc6-detection.diff -- Fix GCC6 detection
Patch168: fix-gcc6-detection.diff
# PATCH-FIX-UPSTREAM fix-moc-parsing-with-glibc-2.25.patch -- Fixes moc parsing correctly glibc 2.25 system headers
Patch169: fix-moc-parsing-with-glibc-2.25.patch
# PATCH-FIX-OPENSUSE fix-build-icu59.patch -- Workaround C++11 requirement
Patch170: fix-build-icu59.patch
# PATCH-FIX-UPSTREAM fix bolder fonts in qt4 apps [boo#956357] [QTBUG#27301]
Patch171: fix-medium-font.diff
# PATCH-FIX-UPSTREAM
Patch172: 0001-Redo-the-Q_FOREACH-loop-control-without-GCC-statemen.patch
# PATCH-FIX-OPENSUSE no-ssl3.patch
Patch200: no-ssl3.patch
# PATCH-FIX-OPENSUSE qt4-openssl-1.1.0pre-3.patch
Patch201: qt4-openssl-1.1.0pre-3.patch
# PATCH-FIX-OPENSUSE qt-everywhere-opensource-src-4.8.7-openssl.patch
Patch202: qt-everywhere-opensource-src-4.8.7-openssl.patch
# PATCH-FIX-OPENSUSE libqt4-toplevel-asm.patch
Patch203: libqt4-toplevel-asm.patch
# From https://codereview.qt-project.org/c/qt/qtbase/+/236691
Patch204: CVE-2018-15518.patch
# from https://codereview.qt-project.org/c/qt/qtbase/+/238749
Patch205: CVE-2018-19873.patch
# From https://codereview.qt-project.org/#/c/234142/
Patch206: CVE-2018-19869.patch
# From https://codereview.qt-project.org/c/qt/qtbase/+/308436
Patch207: CVE-2020-17507.patch
# https://bugreports.qt.io/browse/QTBUG-91507
Patch208: CVE-2021-3481.patch
# mingw
Patch300: 0001-Do-not-create-qmake-if-already-present.patch
Patch301: 0001-Add-qmake-only-and-system-qmake-configure-option.patch
Patch302: 0001-Add-apply-button-to-unix-variant-of-QPrintDialog.patch
Patch303: 0001-designer-Add-command-line-option-refresh-to-update-u.patch
Patch304: qt-4.8.7-fix-gcc11-build.patch
# PATCH-FIX-UPSTREAM
Patch1000: GLib-dispatcher-use-default-priority-for-timers.patch
# PATCH-FIX-UPSTREAM -- https://github.com/qt/qttools/commit/7138c963f9d1258bc1b49cb4d63c3e2b7d0ccfda
Patch1001: fix-pointer-abuse.patch
BuildRequires: dos2unix
BuildRequires: gcc-c++
BuildRequires: mingw32-cross-filesystem
BuildRequires: mingw32-cross-gcc-c++
%if %system_qmake
BuildRequires: mingw32-cross-libqt4-qmake
%endif
BuildRequires: mingw32-cross-pkg-config
BuildRequires: mingw32-dbus-1-devel
BuildRequires: mingw32-filesystem >= 35
BuildRequires: mingw32-libjpeg-devel
BuildRequires: mingw32-libopenssl-1_1-devel
BuildRequires: mingw32-libpng-devel
BuildRequires: mingw32-libtiff-devel
BuildRequires: mingw32-libxml2-devel
BuildRequires: mingw32-mysql-connector-c-devel
BuildRequires: mingw32-sqlite-devel
BuildRequires: mingw32-win_iconv-devel
BuildRequires: mingw32-zlib-devel
BuildRequires: xz
%_mingw32_package_header_debug
#!BuildIgnore: post-build-checks
#!BuildIgnore: mingw32-libjpeg8-devel
%description
This package contains the Qt software toolkit for developing
cross-platform applications.
This is the Windows version of Qt, for use in conjunction with the
MinGW Windows cross-compiler.
%package -n mingw32-cross-libqt4-qmake
Summary: Qt for Windows tools (devel)
Group: Development/Libraries
Provides: mingw32-cross-qmake = %{version}
Obsoletes: mingw32-cross-qmake < %{version}
%description -n mingw32-cross-libqt4-qmake
This package contains the tools for developing with Qt.
%package -n mingw32-cross-libqt4-tools
Summary: Qt for Windows tools (devel)
Group: Development/Libraries
%description -n mingw32-cross-libqt4-tools
This package contains tools for developing with Qt.
%package -n mingw32-libqt4-devel
Summary: Qt for Windows (devel)
Group: Development/Libraries
Requires: mingw32-cross-gcc-c++
Requires: mingw32-cross-libqt4-qmake = %{version}
Requires: mingw32-cross-libqt4-tools = %{version}
BuildArch: noarch
%description -n mingw32-libqt4-devel
This package contains the Qt software toolkit for developing
cross-platform applications.
This is the Windows version of Qt, for use in conjunction with the
MinGW Windows cross-compiler.
%package -n mingw32-libqt4-devel-doc
Summary: Qt documentation
Group: Development/Libraries
BuildArch: noarch
%description -n mingw32-libqt4-devel-doc
The package contains documentation and examples to develop Qt
applications. The package includes also a tutorial and examples.
%package -n mingw32-libqt4-qt3support
Summary: Qt 3 compatibility library for Qt 4
Group: Development/Libraries
BuildArch: noarch
%description -n mingw32-libqt4-qt3support
This packages contains the Qt 3 compatibility library for Qt 4.
It allows applications designed to use deprecated Qt 3 classes and
functions to work with Qt 4, with help from the qt3to4 porting tool.
%package -n mingw32-libqt4-sql
Summary: Qt 4 SQL related libraries
Group: Development/Libraries
BuildArch: noarch
%description -n mingw32-libqt4-sql
Qt 4 libraries which are used for connection with an SQL server. You
will need also a plugin package for a supported SQL server.
%package -n mingw32-libqt4-sql-sqlite
Summary: Qt 4 sqlite plugin
Group: Development/Libraries
BuildArch: noarch
Requires: mingw32-libqt4-sql
%description -n mingw32-libqt4-sql-sqlite
Qt 4 sqlite plugin to be able to use database functionality with Qt
applications without the need to setup a SQL server.
%package -n mingw32-libqt4-sql-mysql
Summary: Qt 4 mysql plugin
Group: Development/Libraries
BuildArch: noarch
Requires: mingw32-libqt4-sql
%description -n mingw32-libqt4-sql-mysql
Qt 4 mysql plugin to be able to use database functionality with Qt
applications connected to MySQL servers.
%package -n mingw32-libqt4-win32
Summary: Qt 4 GUI related libraries
Group: Development/Libraries
BuildArch: noarch
%description -n mingw32-libqt4-win32
Qt 4 libraries which are used for drawing widgets and OpenGL items.
%package -n mingw32-libqtwebkit
Summary: Open source Web Browser engine based on Qt4
Group: Development/Libraries
BuildArch: noarch
%description -n mingw32-libqtwebkit
WebKit is an open source web browser engine. WebKit's HTML and JavaScript
code began as a branch of the KHTML and KJS libraries from KDE. As part of
KDE framework KHTML was based on Qt but during their porting efforts Apple's
engineers made WebKit toolkit independent. WebKit Qt is a project aiming at
porting this fabulous engine back to Qt.
%package -n mingw32-libqt4-tools
Summary: Tools components of Qt4
Group: Development/Libraries
BuildArch: noarch
Requires: mingw32-libqt4-tools-dbus
%description -n mingw32-libqt4-tools
-make tools
%package -n mingw32-libqt4-tools-devel
Summary: Tools components of Qt4 (devel)
Group: Development/Libraries
BuildArch: noarch
Requires: mingw32-libqt4-tools-dbus-devel
%description -n mingw32-libqt4-tools-devel
-make tools (devel)
%package -n mingw32-libqt4-tools-dbus
Summary: DBus tools components of Qt4
Group: Development/Libraries
BuildArch: noarch
%description -n mingw32-libqt4-tools-dbus
-dbus related tools
%package -n mingw32-libqt4-tools-dbus-devel
Summary: DBus tools components of Qt4 (devel)
Group: Development/Libraries
BuildArch: noarch
%description -n mingw32-libqt4-tools-dbus-devel
-dbus related make tools (devel)
%package -n mingw32-libqt4-filesystem
Summary: %%{_mingw32_cmake_qt4} macro
Group: Development/Libraries
Requires: mingw32-cross-libqt4-qmake
Requires: mingw32-cross-libqt4-tools
BuildArch: noarch
%description -n mingw32-libqt4-filesystem
Provides %%{_mingw32_cmake_qt4} macro
%_mingw32_debug_package
%prep
%setup -q -n qt-everywhere-opensource-src-%{version}
%patch -P 1 -p1
%patch -P 2
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
%patch -P 8 -p1
%patch -P 9
%patch -P 10 -p1
%patch -P 15 -p1
%patch -P 16 -p1
%patch -P 17 -p1
%patch -P 18 -p1
%patch -P 19 -p1
%patch -P 22
%patch -P 23
%patch -P 26
# needs rediffing
#%patch28
%patch -P 39
%patch -P 40
%patch -P 43
%patch -P 60
# bnc#374073 comment #8
#%patch61
%patch -P 70
%patch -P 75
%patch -P 87
%patch -P 101
# ### 48 rediff
#%patch107
%patch -P 109
# ### 48 rediff
#%patch113
%patch -P 118 -p1
%ifarch hppa
%patch -P 119
%patch -P 120
%endif
cp %{SOURCE17} translations/
#%patch128
%patch -P 131 -p1
%patch -P 136
%patch -P 137
%patch -P 140 -p1
%patch -P 141 -p0
%patch -P 149 -p1
%patch -P 150 -p1
%patch -P 152 -p1
%patch -P 153 -p1
%patch -P 154 -p1
%patch -P 160
%patch -P 162 -p1
%patch -P 163 -p0
%patch -P 164
%patch -P 165 -p1
%patch -P 166 -p1
%patch -P 167 -p1
%patch -P 168 -p1
%patch -P 169 -p1
%patch -P 170 -p1
%patch -P 171 -p1
%patch -P 172 -p1
%if 0%{?suse_version} >= 1330
%patch -P 200 -p1
%patch -P 201 -p1
%patch -P 202 -p1
%endif
%patch -P 203 -p1
%patch -P 204 -p1
%patch -P 205 -p1
%patch -P 206 -p1
%patch -P 207 -p1
%patch -P 208 -p1
%patch -P 300 -p1
%patch -P 301 -p1
%patch -P 302 -p1
%patch -P 303 -p1
%patch -P 304 -p1
%patch -P 1000 -p1
%patch -P 1001 -p1
for f in changes-%{version} LICENSE.LGPL LICENSE.GPL3 LGPL_EXCEPTION.txt README; do
dos2unix --keepdate $f
done
%if %system_qmake
echo qmake must use mkspecs from mingw32-cross-libqt4-qmake package
%endif
# Cross-compilation qmake target.
mkdir mkspecs/%{_mingw32_qt4_platform}
cp %{SOURCE3} mkspecs/%{_mingw32_qt4_platform}/qmake.conf
dos2unix mkspecs/%{_mingw32_qt4_platform}/qmake.conf
cp %{SOURCE4} mkspecs/%{_mingw32_qt4_platform}
# openssl
# qt loads openssl libraries (ssleay32, libeay32) at runtime, but they are called libssl-OPENSSL_SONAME
# and libcrypto-OPENSSL_SONAME in our cross build, so qt is patched to look for them additionally
sed -i "s/OPENSSL_SONAME/%{_openssl_soname}/" src/network/ssl/qsslsocket_openssl_symbols.cpp
%build
%define _lto_cflags %{nil}
# Generic configure arguments
# Phonon is disabled for now because we lack the directx headers
# The 'javascript-jit' argument causes a compile failure on the mingw32 toolchain
qt_configure_args_generic="\
-opensource \
-confirm-license \
-shared \
-exceptions \
-fast \
-optimized-qmake \
%if %qmake_only
-qmake-only -nomake"
%else
-qt3support \
%if %{verbose_build}
-verbose \
%else
-silent \
%endif
-force-pkg-config \
-xmlpatterns \
-multimedia \
-audio-backend \
-webkit \
-script \
-scripttools \
-declarative \
-no-phonon \
-javascript-jit \
-qt-libmng \
-plugin-sql-mysql
-system-zlib \
-system-libtiff \
-system-libpng \
-system-libjpeg \
-system-sqlite \
%if %system_qmake
-system-qmake \
%endif
-iconv \
-openssl \
-stl \
-v \
-make libs \
-make tools \
-make translations \
-nomake demos \
-nomake docs \
-nomake examples"
%endif
# -system-sqlite fails, readd it as soon as possible
qt_configure_args_win="\
-dbus-linked \
-little-endian \
-prefix %{_mingw32_prefix} \
-bindir %{_mingw32_bindir} \
-datadir %{_mingw32_datadir}/qt4 \
-demosdir %{_mingw32_libdir}/qt4/demos \
-docdir %{_mingw32_docdir}/qt4 \
-examplesdir %{_mingw32_datadir}/qt4/examples \
-headerdir %{_mingw32_includedir} \
-libdir %{_mingw32_libdir} \
-plugindir %{_mingw32_libdir}/qt4/plugins \
-sysconfdir %{_mingw32_sysconfdir} \
-translationdir %{_mingw32_datadir}/qt4/translations \
-platform linux-g++ \
-xplatform %{_mingw32_qt4_platform}"
rm -rf ../build_release
mkdir ../build_release
pushd ../build_release
export PKG_CONFIG_PATH=%{_mingw32_libdir}/pkgconfig
export CXXFLAGS="-std=gnu++98 -Wno-deprecated -Wno-expansion-to-defined -D_WIN32_WINNT=0x601 -DWINVER=0x601"
%if %system_qmake
export QMAKE=/usr/%_mingw32_target/bin/qmake
%endif
../qt-everywhere-opensource-src-%{version}/configure \
-release \
$qt_configure_args_generic $qt_configure_args_win
%if !%qmake_only
make %{?_smp_mflags}
%endif
%install
%if !%qmake_only
# install macros file
mkdir -p %{buildroot}%{_sysconfdir}/rpm
install -m 644 %{SOURCE1001} %{buildroot}%{_sysconfdir}/rpm/macros.mingw32-qt4
# make install -C ../build_debug INSTALL_ROOT=$RPM_BUILD_ROOT
make install -C ../build_release INSTALL_ROOT=%{buildroot}
# Also install the lrelease tool
make -C ../build_release/tools/linguist/lrelease install INSTALL_ROOT=%{buildroot}
# install qt4.conf required for using plugins in setup installers and portable installation
install -m 644 %{SOURCE5} %{buildroot}%{_mingw32_bindir}
# move QtUiTools4.dll from lib/ to bin/
mv %{buildroot}%{_mingw32_libdir}/QtUiTools4.dll %{buildroot}%{_mingw32_bindir}/
# The .dll's are installed in both %%{_mingw32_bindir} and %%{_mingw32_libdir}
# One copy of the .dll's is sufficient
rm -fv %{buildroot}%{_mingw32_libdir}/*.dll
# add links with version suffix for convenience
# fedora does this, do we want it too?
ln -s libqtmain.a %{buildroot}%{_mingw32_libdir}/libqtmain4.a
# This host-version of qmake is redundant, and in the wrong place
rm -rf %{buildroot}%{_mingw32_bindir}/qmake
# Drop all the prl files, the examples and the mkspecs files which we don't need
rm -fv %{buildroot}%{_mingw32_libdir}/*.prl
# rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/qt4/demos
# rm -rf $RPM_BUILD_ROOT%{_mingw32_datadir}/qt4/examples
# The Qt build system creates a folder called 'imports' but it isn't entirely sure
# what it's purpose is. Drop it for now
rm -rf %{buildroot}%{_mingw32_prefix}/imports
%endif
%if !%system_qmake || %qmake_only
# Install the Qt mkspecs
mkdir -p %{buildroot}/%{_mingw32_datadir}/qt4
cp -a mkspecs/ %{buildroot}/%{_mingw32_datadir}/qt4/
ln -fs %{_mingw32_qt4_platform} %{buildroot}/%{_mingw32_datadir}/qt4/mkspecs/default
cp ../build_release/mkspecs/qconfig.pri %{buildroot}/%{_mingw32_datadir}/qt4/mkspecs
%endif
%if %system_qmake
# Drop the installed Qt mkspecs
rm -rf %{buildroot}/%{_mingw32_datadir}/qt4/mkspecs
%endif
mkdir -p %{buildroot}%{_bindir}/
mkdir -p %{buildroot}%{_prefix}/%{_mingw32_target}/bin/
######################## REENABLE ##################################################################
# Manually install qmake and other native tools so we don't depend anymore on
# the version of the native Qt and also fix issues as illustrated at
# http://stackoverflow.com/questions/6592931/building-for-windows-under-linux-using-qt-creator
%if !%system_qmake
install -m0755 ../build_release/bin/qmake %{buildroot}%{_prefix}/%{_mingw32_target}/bin/qmake
ln -s ../%{_mingw32_target}/bin/qmake %{buildroot}%{_bindir}/%{_mingw32_target}-qmake
# An argument in the mkspecs profile needs to be un-commented in order to be
# useful for developers who wish to use the Qt libraries
sed -i s@'#QT_LIBINFIX'@'QT_LIBINFIX'@ %{buildroot}%{_mingw32_datadir}/qt4/mkspecs/%{_mingw32_qt4_platform}/qmake.conf
# Remove some duplicate mkspecs data
rm -rvf %{buildroot}%{_mingw32_datadir}/qt4/mkspecs/%{_mingw32_qt4_platform}/default
rm -rvf %{buildroot}%{_mingw32_datadir}/qt4/mkspecs/%{_mingw32_qt4_platform}/%{_mingw32_qt4_platform}
# Workaround a bug where building against the debug binaries will always fail:
# https://bugreports.qt.nokia.com/browse/QTBUG-14467
sed -i s@'$${QT_LIBINFIX}d'@'d$${QT_LIBINFIX}'@ %{buildroot}%{_mingw32_datadir}/qt4/mkspecs/features/win32/windows.prf
sed -i s@'$${QT_LIBINFIX}d'@'d$${QT_LIBINFIX}'@ %{buildroot}%{_mingw32_datadir}/qt4/mkspecs/features/qt_functions.prf
%endif
%if !%qmake_only
for tool in lrelease moc rcc uic ; do
mv %{buildroot}%{_mingw32_bindir}/$tool %{buildroot}%{_prefix}/%{_mingw32_target}/bin/$tool
ln -s ../%{_mingw32_target}/bin/$tool %{buildroot}%{_bindir}/%{_mingw32_target}-$tool
done
# Rename the .a files to .dll.a as they're actually import libraries and not static libraries
for FN in %{buildroot}%{_mingw32_libdir}/*.a ; do
# Ignore libqtmain*.a and libQAxContainer.a libQAxServer.a
echo $FN | grep -q qtmain && continue
echo $FN | grep -q QAxContainer && continue
echo $FN | grep -q QAxServer && continue
# Rename the file
FN_NEW=$(echo $FN | sed s/'.a$'/'.dll.a'/)
mv $FN $FN_NEW
done
%endif
%if !%qmake_only
%files -n mingw32-libqt4-filesystem
%defattr(-,root,root)
%{_sysconfdir}/rpm/macros.mingw32-qt4
%files -n mingw32-libqt4
%defattr(-,root,root)
%{_mingw32_bindir}/QtCLucene4.dll
%{_mingw32_bindir}/QtCore4.dll
%{_mingw32_bindir}/QtDBus4.dll
%{_mingw32_bindir}/QtNetwork4.dll
%{_mingw32_bindir}/QtTest4.dll
%{_mingw32_bindir}/QtXml4.dll
%{_mingw32_bindir}/QtXmlPatterns4.dll
%{_mingw32_bindir}/qt4.conf
%dir %{_mingw32_libdir}/qt4/
%dir %{_mingw32_libdir}/qt4/plugins
%dir %{_mingw32_libdir}/qt4/plugins/accessible
%{_mingw32_libdir}/qt4/plugins/accessible/qtaccessiblecompatwidgets4.dll
%{_mingw32_libdir}/qt4/plugins/accessible/qtaccessiblewidgets4.dll
%dir %{_mingw32_libdir}/qt4/plugins/bearer
%{_mingw32_libdir}/qt4/plugins/bearer/qgenericbearer4.dll
%{_mingw32_libdir}/qt4/plugins/bearer/qnativewifibearer4.dll
%dir %{_mingw32_libdir}/qt4/plugins/codecs
%{_mingw32_libdir}/qt4/plugins/codecs/qcncodecs4.dll
%{_mingw32_libdir}/qt4/plugins/codecs/qjpcodecs4.dll
%{_mingw32_libdir}/qt4/plugins/codecs/qkrcodecs4.dll
%{_mingw32_libdir}/qt4/plugins/codecs/qtwcodecs4.dll
%dir %{_mingw32_libdir}/qt4/plugins/graphicssystems
%{_mingw32_libdir}/qt4/plugins/graphicssystems/qglgraphicssystem4.dll
%{_mingw32_libdir}/qt4/plugins/graphicssystems/qtracegraphicssystem4.dll
%dir %{_mingw32_libdir}/qt4/plugins/iconengines
%{_mingw32_libdir}/qt4/plugins/iconengines/qsvgicon4.dll
%dir %{_mingw32_libdir}/qt4/plugins/imageformats
%{_mingw32_libdir}/qt4/plugins/imageformats/qgif4.dll
%{_mingw32_libdir}/qt4/plugins/imageformats/qico4.dll
%{_mingw32_libdir}/qt4/plugins/imageformats/qjpeg4.dll
%{_mingw32_libdir}/qt4/plugins/imageformats/qmng4.dll
%{_mingw32_libdir}/qt4/plugins/imageformats/qsvg4.dll
%{_mingw32_libdir}/qt4/plugins/imageformats/qtiff4.dll
%{_mingw32_libdir}/qt4/plugins/imageformats/qtga4.dll
%dir %{_mingw32_libdir}/qt4/plugins/qmltooling
%{_mingw32_libdir}/qt4/plugins/qmltooling/qmldbg_inspector4.dll
%{_mingw32_libdir}/qt4/plugins/qmltooling/qmldbg_tcp4.dll
%dir %{_mingw32_libdir}/qt4/plugins/script
%{_mingw32_libdir}/qt4/plugins/script/qtscriptdbus4.dll
%dir %{_mingw32_libdir}/qt4/plugins/sqldrivers
%{_mingw32_libdir}/qt4/plugins/sqldrivers/qsqlodbc4.dll
%dir %{_mingw32_datadir}/qt4/translations/
%{_mingw32_datadir}/qt4/translations/qt_*.qm
%endif
%if %qmake_only
%files -n mingw32-cross-libqt4-qmake
%defattr(-,root,root)
%{_bindir}/%{_mingw32_target}-qmake
%{_prefix}/%{_mingw32_target}/bin/qmake
%dir %{_mingw32_datadir}/qt4/
%{_mingw32_datadir}/qt4/mkspecs/
%endif
%if !%qmake_only
%files -n mingw32-cross-libqt4-tools
%defattr(-,root,root)
%{_bindir}/%{_mingw32_target}-lrelease
%{_prefix}/%{_mingw32_target}/bin/lrelease
%{_bindir}/%{_mingw32_target}-moc
%{_prefix}/%{_mingw32_target}/bin/moc
%{_bindir}/%{_mingw32_target}-rcc
%{_prefix}/%{_mingw32_target}/bin/rcc
%{_bindir}/%{_mingw32_target}-uic
%{_prefix}/%{_mingw32_target}/bin/uic
%endif
%if !%qmake_only
%files -n mingw32-libqt4-devel
%defattr(-,root,root)
#FIX this to be shared builds:
%{_mingw32_libdir}/libQAxContainer.a
%{_mingw32_libdir}/libQAxServer.a
%{_mingw32_libdir}/libQt3Support4.dll.a
%{_mingw32_libdir}/libQtCore4.dll.a
%{_mingw32_libdir}/libQtDBus4.dll.a
%{_mingw32_libdir}/libQtDeclarative4.dll.a
%{_mingw32_libdir}/libQtGui4.dll.a
%{_mingw32_libdir}/libQtHelp4.dll.a
%{_mingw32_libdir}/libqtmain.a
%{_mingw32_libdir}/libqtmain4.a
%{_mingw32_libdir}/libQtMultimedia4.dll.a
%{_mingw32_libdir}/libQtNetwork4.dll.a
%{_mingw32_libdir}/libQtOpenGL4.dll.a
%{_mingw32_libdir}/libQtScript4.dll.a
%{_mingw32_libdir}/libQtScriptTools4.dll.a
%{_mingw32_libdir}/libQtSql4.dll.a
%{_mingw32_libdir}/libQtSvg4.dll.a
%{_mingw32_libdir}/libQtTest4.dll.a
%{_mingw32_libdir}/libQtWebKit4.dll.a
%{_mingw32_libdir}/libQtXmlPatterns4.dll.a
%{_mingw32_libdir}/libQtXml4.dll.a
%{_mingw32_includedir}/Qt
# %%{_mingw32_includedir}/ActiveQt
%{_mingw32_includedir}/Qt3Support
%{_mingw32_includedir}/QtCore
%{_mingw32_includedir}/QtDBus
%{_mingw32_includedir}/QtDeclarative
%{_mingw32_includedir}/QtGui
%{_mingw32_includedir}/QtMultimedia
%{_mingw32_includedir}/QtNetwork
%{_mingw32_includedir}/QtOpenGL
%{_mingw32_includedir}/QtScript
%{_mingw32_includedir}/QtScriptTools
%{_mingw32_includedir}/QtSql
%{_mingw32_includedir}/QtSvg
%{_mingw32_includedir}/QtTest
%{_mingw32_includedir}/QtXml
%{_mingw32_includedir}/QtXmlPatterns
%{_mingw32_includedir}/QtWebKit
%{_mingw32_libdir}/pkgconfig/Qt3Support.pc
%{_mingw32_libdir}/pkgconfig/QtCore.pc
%{_mingw32_libdir}/pkgconfig/QtDBus.pc
%{_mingw32_libdir}/pkgconfig/QtDeclarative.pc
%{_mingw32_libdir}/pkgconfig/QtGui.pc
%{_mingw32_libdir}/pkgconfig/QtHelp.pc
%{_mingw32_libdir}/pkgconfig/qtmain.pc
%{_mingw32_libdir}/pkgconfig/QtMultimedia.pc
%{_mingw32_libdir}/pkgconfig/QtNetwork.pc
%{_mingw32_libdir}/pkgconfig/QtOpenGL.pc
%{_mingw32_libdir}/pkgconfig/QtScript.pc
%{_mingw32_libdir}/pkgconfig/QtScriptTools.pc
%{_mingw32_libdir}/pkgconfig/QtSql.pc
%{_mingw32_libdir}/pkgconfig/QtSvg.pc
%{_mingw32_libdir}/pkgconfig/QtTest.pc
%{_mingw32_libdir}/pkgconfig/QtWebKit.pc
%{_mingw32_libdir}/pkgconfig/QtXmlPatterns.pc
%{_mingw32_libdir}/pkgconfig/QtXml.pc
%files -n mingw32-libqt4-devel-doc
%defattr(-,root,root)
%doc changes-%{version}
%doc LICENSE.LGPL LICENSE.GPL3 LGPL_EXCEPTION.txt
%doc README
%files -n mingw32-libqt4-qt3support
%defattr(-,root,root)
%{_mingw32_bindir}/Qt3Support4.dll
%files -n mingw32-libqt4-win32
%defattr(-,root,root)
%{_mingw32_bindir}/QtDeclarative4.dll
%{_mingw32_bindir}/QtGui4.dll
%{_mingw32_bindir}/QtHelp4.dll
%{_mingw32_bindir}/QtOpenGL4.dll
%{_mingw32_bindir}/QtMultimedia4.dll
%{_mingw32_bindir}/QtScript4.dll
%{_mingw32_bindir}/QtScriptTools4.dll
%{_mingw32_bindir}/QtSvg4.dll
%{_mingw32_bindir}/QtUiTools4.dll
%files -n mingw32-libqt4-sql
%defattr(-,root,root)
%{_mingw32_bindir}/QtSql4.dll
%files -n mingw32-libqt4-sql-sqlite
%defattr(-,root,root)
%{_mingw32_libdir}/qt4/plugins/sqldrivers/qsqlite4.dll
%files -n mingw32-libqt4-sql-mysql
%defattr(-,root,root)
%{_mingw32_libdir}/qt4/plugins/sqldrivers/qsqlmysql4.dll
%files -n mingw32-libqtwebkit
%defattr(-,root,root)
%{_mingw32_bindir}/QtWebKit4.dll
%files -n mingw32-libqt4-tools
%defattr(-,root,root)
%{_mingw32_bindir}/assistant.exe
%{_mingw32_bindir}/designer.exe
%{_mingw32_bindir}/lconvert.exe
%{_mingw32_bindir}/linguist.exe
%{_mingw32_bindir}/lupdate.exe
%{_mingw32_bindir}/pixeltool.exe
%{_mingw32_bindir}/qcollectiongenerator.exe
%{_mingw32_bindir}/qhelpconverter.exe
%{_mingw32_bindir}/qhelpgenerator.exe
%{_mingw32_bindir}/qmlplugindump.exe
%{_mingw32_bindir}/qmlviewer.exe
%{_mingw32_bindir}/qt3to4.exe
%{_mingw32_bindir}/qttracereplay.exe
%{_mingw32_bindir}/xmlpatterns.exe
%{_mingw32_bindir}/xmlpatternsvalidator.exe
%dir %{_mingw32_libdir}/qt4/plugins/designer/
%{_mingw32_libdir}/qt4/plugins/designer/qdeclarativeview.dll
%{_mingw32_libdir}/qt4/plugins/designer/qt3supportwidgets.dll
%{_mingw32_libdir}/qt4/plugins/designer/qwebview.dll
%{_mingw32_libdir}/qt4/plugins/designer/qaxwidget.dll
%{_mingw32_datadir}/qt4/q3porting.xml
%{_mingw32_datadir}/qt4/phrasebooks/
%{_mingw32_bindir}/QtDesigner4.dll
%{_mingw32_bindir}/QtDesignerComponents4.dll
%dir %{_mingw32_datadir}/qt4/translations/
%{_mingw32_datadir}/qt4/translations/assistant_*.qm
%{_mingw32_datadir}/qt4/translations/designer_*.qm
%{_mingw32_datadir}/qt4/translations/linguist_*.qm
%{_mingw32_datadir}/qt4/translations/qt_help_*.qm
%{_mingw32_datadir}/qt4/translations/qtconfig_*.qm
%{_mingw32_datadir}/qt4/translations/qtscript_*.qm
%{_mingw32_datadir}/qt4/translations/qvfb_*.qm
%files -n mingw32-libqt4-tools-devel
%defattr(-,root,root)
%{_mingw32_includedir}/QtUiTools
%{_mingw32_includedir}/QtHelp
%{_mingw32_includedir}/QtDesigner
%{_mingw32_includedir}/ActiveQt
%{_mingw32_libdir}/libQtUiTools4.dll.a
%{_mingw32_libdir}/libQtCLucene4.dll.a
%{_mingw32_libdir}/libQtDesigner4.dll.a
%{_mingw32_libdir}/libQtDesignerComponents4.dll.a
%{_mingw32_libdir}/pkgconfig/QtUiTools.pc
%{_mingw32_libdir}/pkgconfig/QtCLucene.pc
%files -n mingw32-libqt4-tools-dbus
%{_mingw32_bindir}/qdbus.exe
%{_mingw32_bindir}/qdbusviewer.exe
%files -n mingw32-libqt4-tools-dbus-devel
%{_mingw32_bindir}/qdbuscpp2xml.exe
%{_mingw32_bindir}/qdbusxml2cpp.exe
%endif
%changelog