%{?mingw_package_header}
%global qt_module qtwebkit
#%%global pre rc1
%global commit bd0657f98aff85b9f06d85a8cf4da6a27f61a56e
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%if 0%{?commit:1}
%global source_folder %{qt_module}-%{commit}
%else
%global source_folder %{qt_module}-opensource-src-%{version}%{?pre:-%{pre}}
%endif
# first two digits of version
%global release_version %(echo %{version} | awk -F. '{print $1"."$2}')
Name: mingw-qt5-%{qt_module}
Version: 5.9.4
Release: 0.13%{?pre:.%pre}%{?commit:.git%{shortcommit}}%{?dist}
Summary: Qt5 for Windows - QtWebKit component
License: GPLv3 with exceptions or LGPLv2 with exceptions
URL: http://qt.io/
%if 0%{?commit:1}
Source0: https://github.com/qt/%{qt_module}/archive/%{commit}/%{qt_module}-opensource-src-%{commit}.tar.gz
%else
Source0: http://download.qt.io/community_releases/%{release_version}/%{version}%{?pre:-%pre}%{?!pre:-final}/%{qt_module}-opensource-src-%{version}%{?pre:-%pre}.tar.xz
%endif
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 96
BuildRequires: mingw32-qt5-qtbase >= %{version}
BuildRequires: mingw32-qt5-qtdeclarative >= %{version}
BuildRequires: mingw32-qt5-qtsensors >= %{version}
BuildRequires: mingw32-qt5-qtlocation >= %{version}
BuildRequires: mingw32-qt5-qtmultimedia >= %{version}
BuildRequires: mingw32-angleproject >= 0-0.11.git.30d6c2.20141113
BuildRequires: mingw32-fontconfig
BuildRequires: mingw32-libpng
BuildRequires: mingw32-libjpeg-turbo
BuildRequires: mingw32-libxslt
BuildRequires: mingw32-zlib
BuildRequires: mingw32-icu
BuildRequires: mingw32-pkg-config
BuildRequires: mingw32-sqlite
BuildRequires: mingw32-libwebp
BuildRequires: mingw64-filesystem >= 96
BuildRequires: mingw64-qt5-qtbase >= %{version}
BuildRequires: mingw64-qt5-qtdeclarative >= %{version}
BuildRequires: mingw64-qt5-qtsensors >= %{version}
BuildRequires: mingw64-qt5-qtlocation >= %{version}
BuildRequires: mingw64-qt5-qtmultimedia >= %{version}
BuildRequires: mingw64-angleproject >= 0-0.11.git.30d6c2.20141113
BuildRequires: mingw64-fontconfig
BuildRequires: mingw64-libpng
BuildRequires: mingw64-libjpeg-turbo
BuildRequires: mingw64-libxslt
BuildRequires: mingw64-zlib
BuildRequires: mingw64-icu
BuildRequires: mingw64-pkg-config
BuildRequires: mingw64-sqlite
BuildRequires: mingw64-libwebp
BuildRequires: python2
BuildRequires: ruby
BuildRequires: rubygems
BuildRequires: gperf
BuildRequires: bison
BuildRequires: flex
BuildRequires: perl-interpreter perl(version) perl(Digest::MD5) perl(Text::ParseWords) perl(Getopt::Long)
# See also https://github.com/Martchus/PKGBUILDs/tree/master/qt5-webkit/mingw-w64
# The ICU libraries used for cross-compilation are named exactly the same as their native Linux counterpart
Patch0: qt5-qtwebkit-use-correct-icu-libs.patch
# By default the build system assumes that pkg-config isn't used for the win32 target
# However, we're using it in the Fedora MinGW toolchain so make sure it is used automatically
Patch1: qt5-qtwebkit-enable-pkgconfig-support-for-win32-target.patch
# Make sure the bundled copy of the ANGLE library isn't used
Patch2: qtwebkit-dont-use-bundled-angle-libraries.patch
# qtwebkit depends on qtbase with ICU support.
# As ICU support in qtbase also introduces over 20MB of additional dependency
# bloat (and the qtbase libraries itself are only 13MB) the decision was made
# to build qtbase without ICU support.
# Make sure qtwebkit doesn't depend on a qtbase with ICU support any more
Patch3: qt5-qtwebkit-dont-depend-on-icu.patch
# Undo the removal of the old Qt4 based unicode support
# as we want to use it instead of the bloated ICU
Patch4: revert-qt4-unicode-removal.patch
# WebKit svn commit 136242 implemented a split into QtWebKit and QtWebKitWidgets
# Due to this change a static library named WebKit1.a is created first.
# After this a shared library is created named Qt5WebKit.dll which contains
# the contents of this static library and some other object files.
# However, various symbols in the static library are expected to be exported
# in the Qt5WebKit.dll shared library. As static libraries normally don't care
# about exported symbols (everything is exported after all) the decoration
# attribute Q_DECL_EXPORT won't be set.
# This results in undefined references when trying to link the QtWebKitWidgets
# shared library (which depends on various symbols which aren't exported properly
# in the Qt5WebKit.dll shared library)
Patch5: qt5-qtwebkit-workaround-build-breakage-after-svn-commit-136242.patch
# Fix compatibility issue when using the latest ANGLE
Patch6: 0006-Establish-compatibility-with-latest-ANGLE.patch
# Fix build failure
Patch7: qt5-qtwebkit-build.patch
# Ensure versioned python2 interpreter is used throughout
Patch8: qt5-qtwebkit-python2.patch
%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
Fedora Windows cross-compiler.
# Win32
%package -n mingw32-qt5-%{qt_module}
Summary: Qt5 for Windows - QtWebkit component
%description -n mingw32-qt5-%{qt_module}
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
Fedora Windows cross-compiler.
# Win64
%package -n mingw64-qt5-%{qt_module}
Summary: Qt5 for Windows - QtWebkit component
%description -n mingw64-qt5-%{qt_module}
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
Fedora Windows cross-compiler.
%{?mingw_debug_package}
%prep
%autosetup -p1 -n %{source_folder}
%if 0%{?commit:1}
# Make sure the syncqt tool is run when using a git snapshot
mkdir .git
%endif
# Make sure the bundled copy of the ANGLE libraries isn't used
rm -rf Source/ThirdParty/ANGLE
%build
# Make sure the native pkg-config files aren't used (RPM sets this environment variable automatically)
unset PKG_CONFIG_PATH
# QMAKE_CXXFLAGS overrides:
# - Prevent flood of warnigns like "identifier 'nullptr' is a keyword in C++11"
# - Prevent flood of warnigns like "this use of "defined" may not be portable"
# - Reduce debuginfo verbosity to avoid hitting size limits
%mingw_qmake_qt5 \
QMAKE_CXXFLAGS+=-Wno-c++0x-compat \
QMAKE_CXXFLAGS+=-Wno-expansion-to-defined \
QMAKE_CXXFLAGS-=-g \
QMAKE_CXXFLAGS_DEBUG-=-g \
QMAKE_CXXFLAGS_RELEASE-=-g \
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO-=-g \
QMAKE_CXXFLAGS+=-g1 \
../WebKit.pro
%mingw_make %{?_smp_mflags}
%install
%mingw_make install INSTALL_ROOT=%{buildroot}
# .prl files aren't interesting for us
find %{buildroot} -name "*.prl" -delete
# The QtWebProcess executable is placed in the wrong folder, move it manually
mv %{buildroot}%{mingw32_libdir}/qt5/bin/QtWebProcess.exe %{buildroot}%{mingw32_bindir}/
mv %{buildroot}%{mingw64_libdir}/qt5/bin/QtWebProcess.exe %{buildroot}%{mingw64_bindir}/
rmdir %{buildroot}%{mingw32_libdir}/qt5/bin/
rmdir %{buildroot}%{mingw64_libdir}/qt5/bin/
# Exclude debug files from the main files (note: the debug files are only created after %%install, so we can't search for them directly)
find %{buildroot}%{mingw32_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw32-qt5-%{qt_module}.debugfiles
find %{buildroot}%{mingw64_prefix} | grep -E '.(exe|dll|pyd)$' | sed 's|^%{buildroot}\(.*\)$|%%exclude \1.debug|' > mingw64-qt5-%{qt_module}.debugfiles
# Win32
%files -n mingw32-qt5-%{qt_module} -f mingw32-qt5-%{qt_module}.debugfiles
%license Source/WebCore/LICENSE*
%{mingw32_bindir}/QtWebProcess.exe
%{mingw32_bindir}/Qt5WebKit.dll
%{mingw32_bindir}/Qt5WebKitWidgets.dll
%{mingw32_includedir}/qt5/QtWebKit/
%{mingw32_includedir}/qt5/QtWebKitWidgets/
%{mingw32_libdir}/libQt5WebKit.dll.a
%{mingw32_libdir}/libQt5WebKitWidgets.dll.a
%{mingw32_libdir}/cmake/Qt5WebKit/
%{mingw32_libdir}/cmake/Qt5WebKitWidgets/
%{mingw32_libdir}/pkgconfig/Qt5WebKit.pc
%{mingw32_libdir}/pkgconfig/Qt5WebKitWidgets.pc
%{mingw32_libdir}/qt5/qml/QtWebKit/
%{mingw32_datadir}/qt5/mkspecs/modules/qt_lib_webkit.pri
%{mingw32_datadir}/qt5/mkspecs/modules/qt_lib_webkit_private.pri
%{mingw32_datadir}/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri
%{mingw32_datadir}/qt5/mkspecs/modules/qt_lib_webkitwidgets_private.pri
# Win64
%files -n mingw64-qt5-%{qt_module} -f mingw64-qt5-%{qt_module}.debugfiles
%license Source/WebCore/LICENSE*
%{mingw64_bindir}/QtWebProcess.exe
%{mingw64_bindir}/Qt5WebKit.dll
%{mingw64_bindir}/Qt5WebKitWidgets.dll
%{mingw64_includedir}/qt5/QtWebKit/
%{mingw64_includedir}/qt5/QtWebKitWidgets/
%{mingw64_libdir}/libQt5WebKit.dll.a
%{mingw64_libdir}/libQt5WebKitWidgets.dll.a
%{mingw64_libdir}/cmake/Qt5WebKit/
%{mingw64_libdir}/cmake/Qt5WebKitWidgets/
%{mingw64_libdir}/pkgconfig/Qt5WebKit.pc
%{mingw64_libdir}/pkgconfig/Qt5WebKitWidgets.pc
%{mingw64_libdir}/qt5/qml/QtWebKit/
%{mingw64_datadir}/qt5/mkspecs/modules/qt_lib_webkit.pri
%{mingw64_datadir}/qt5/mkspecs/modules/qt_lib_webkit_private.pri
%{mingw64_datadir}/qt5/mkspecs/modules/qt_lib_webkitwidgets.pri
%{mingw64_datadir}/qt5/mkspecs/modules/qt_lib_webkitwidgets_private.pri
%changelog
* Thu Sep 26 2019 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.13.gitbd0657f
- Rebuild (qt5)
* Tue Aug 27 2019 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.12.gitbd0657f
- Rebuild to fix pkg-config files (#1745257)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.4-0.11.gitbd0657f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Apr 19 2019 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.10.gitbd0657f
- Rebuild for mingw-qt5-5.12.3
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.4-0.9.gitbd0657f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 14 2019 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.8.gitbd0657f
- Rebuild for mingw-qt5-5.11.3
* Sun Sep 23 2018 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.7.gitbd0657f
- Rebuild for mingw-qt5-5.11.2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.4-0.6.gitbd0657f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu May 31 2018 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.5.gitbd0657f
- Rebuild for mingw-qt5-5.11.0
* Thu Mar 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 5.9.4-0.4.gitbd0657f
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 16 2018 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.3.gitbd0657f
- Rebuild for mingw-qt5-5.10.1
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.4-0.2.gitbd0657f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Jan 29 2018 Sandro Mani <manisandro@gmail.com> - 5.9.4-0.1.gitbd0657f
- Update to git bd0657f
* Wed Dec 20 2017 Sandro Mani <manisandro@gmail.com> - 5.9.3-0.2.gitfdafce4
- Rebuild for mingw-qt5-5.10.0
* Mon Nov 27 2017 Sandro Mani <manisandro@gmail.com> - 5.9.3-0.1.gitfdafce4
- Update to latest git
* Wed Oct 11 2017 Sandro Mani <manisandro@gmail.com> - 5.9.2-2
- Fix huge Qt5WebKit.dll due to debuginfo extraction failure
* Wed Oct 11 2017 Sandro Mani <manisandro@gmail.com> - 5.9.2-1
- Update to 5.9.2
* Sat Sep 09 2017 Sandro Mani <manisandro@gmail.com> - 5.9.1-3
- Fix debug files in main package
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jul 11 2017 Sandro Mani <manisandro@gmail.com> - 5.9.1-1
- Update to 5.9.1
* Fri Jun 30 2017 Sandro Mani <manisandro@gmail.com> - 5.9.0-1
- Update to 5.9.0
* Tue May 09 2017 Sandro Mani <manisandro@gmail.com> - 5.8.0-2
- Rebuild for dropped 0022-Allow-usage-of-static-version-with-CMake.patch in qtbase
* Thu May 04 2017 Sandro Mani <manisandro@gmail.com> - 5.8.0-1
- Update to 5.8.0
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Feb 04 2017 Sandro Mani <manisandro@gmail.com> - 5.7.1-1
- Update to 5.7.1
* Wed Feb 01 2017 Sandro Mani <manisandro@gmail.com> - 5.5.1-4
- Rebuild (libwebp)
* Sat May 7 2016 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.5.1-3
- Add BuildRequires: rubygems to fix FTBFS
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Dec 30 2015 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.5.1-1
- Update to 5.5.1
* Wed Dec 30 2015 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.5.0-2
- Rebuild against mingw-libwebp-0.5.0
* Fri Aug 7 2015 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.5.0-1
- Update to 5.5.0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.4.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Mar 22 2015 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4.1-1
- Update to 5.4.1
- Fix URLs visited during private browsing showing up in WebpageIcons.db (RHBZ #1204798 #1204799)
- Fix FTBFS against gcc 5 (QTBUG-44829)
* Mon Dec 29 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.4.0-1
- Update to 5.4.0
* Sat Sep 20 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.3.2-1
- Update to 5.3.2
* Tue Jul 8 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.3.1-1
- Update to 5.3.1
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun May 25 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.3.0-1
- Update to 5.3.0
* Thu May 22 2014 Kalev Lember <kalevlember@gmail.com> - 5.2.1-3
- Rebuilt with libwebp 0.4.0
* Thu Mar 6 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.2.1-2
- Use virtual BuildRequires for the perl requirements (fixes build on F19)
* Sat Feb 8 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.2.1-1
- Update to 5.2.1
* Sun Jan 5 2014 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.2.0-1
- Update to 5.2.0
- Dropped manual rename of import libraries
* Fri Nov 29 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.2.0-0.1.rc1
- Update to 5.2.0 RC1
* Sun Sep 22 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.1.1-1
- Update to 5.1.1
- Added license files
* Wed Jul 24 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.1.0-2
- Fix detection of native tools which started to fail as of QtWebkit 5.1.0
- Avoid 'too many sections' build failure
* Sun Jul 14 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.1.0-1
- Update to 5.1.0
* Sat May 18 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.0.2-2
- Bumped the BR: mingw{32,64}-angleproject to >= 0-0.5.svn2215.20130517
- Don't use the bundled ANGLE libraries any more
- Applied some upstream patches to prevent flooding the logs with
compiler warnings when using gcc 4.8
- Added BR: mingw32-qt5-qtmultimedia mingw64-qt5-qtmultimedia
- Added BR: mingw32-libwebp mingw64-libwebp
* Fri May 10 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.0.2-1
- Update to 5.0.2
- Added BR: flex perl-version perl-Digest-MD5
* Sun Jan 6 2013 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.0.0-1
- Update to QtWebKit 5.0.0 Final
- Workaround linker failure caused by recent QWebKit/QWebKitWidgets split
- Use the Qt4 unicode API as the mingw-qt5-qtbase currently doesn't use ICU
- Added BR: mingw32-pkg-config mingw64-pkg-config mingw32-sqlite mingw64-sqlite
- Added BR: mingw32-angleproject mingw64-angleproject
- Use the bundled ANGLE libraries for now as qtwebkit depends on non-public symbols
* Mon Nov 12 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.0.0-0.2.beta1.git20121112.23037105
- Update to 20121112 snapshot (rev 23037105)
- Rebuild against latest mingw-qt5-qtbase
- Dropped pkg-config rename hack as it's unneeded now
- Dropped upstreamed patch
- Added BR: python
- Added BR: ruby
* Wed Sep 12 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 5.0.0-0.1.beta1
- Initial release