File mingw64-libqt5-qtwebkit.spec of Package mingw64-libqt5-qtwebkit
#
# spec file for package mingw64-libqt5-qtwebkit
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#
%define qt5_snapshot 1
%global qt_module qtwebkit
# first two digits of version
%global release_version %(echo %version | awk -F. '{print $1"."$2}')
%if 0%{?snapshot_date}
%global source_folder qt-%{qt_module}
%else
%global source_folder %{qt_module}-everywhere-src-%{version}%{?pre:-%pre}
%endif
Name: mingw64-libqt5-%{qt_module}
Version: 5.15.14+kde0
Release: 0
Summary: Qt5 for Windows - QtWebKit component
License: GPL-3.0 or SUSE-LGPL-2.1-with-digia-exception-1.1
Group: Development/Libraries
Url: http://qt-project.org/
Source0: %{source_folder}.tar.xz
Source1: mingw64-libqt5-qtwebkit-rpmlintrc
Patch0: qtwebkit-everywhere-src-5.15.14+kde0-gcc-13-fix.patch
Patch1: 0001-Use-Qt5-provided-EGL-and-GLESv2-import-libraries.patch
Patch2: qt5-qtwebkit-use-lib-prefix-for-mingw.patch
Patch3: 0001-Fix-compiling-on-Tumbleweed.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: gperf
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-fontconfig-devel
BuildRequires: mingw64-libicu-devel
BuildRequires: mingw64-libjpeg-devel
BuildRequires: mingw64-libpng-devel
BuildRequires: mingw64-libqt5-qtbase-devel >= 5.15
BuildRequires: mingw64-libqt5-qtdeclarative-private-headers-devel >= 5.15
BuildRequires: mingw64-libqt5-qtlocation-devel >= 5.15
BuildRequires: mingw64-libqt5-qtmultimedia-devel >= 5.15
BuildRequires: mingw64-libqt5-qtsensors-devel >= 5.15
BuildRequires: mingw64-libqt5-qtwebchannel-devel >= 5.15
BuildRequires: mingw64-libwebp-devel
BuildRequires: mingw64-libxml2-devel
BuildRequires: mingw64-libxslt-devel
BuildRequires: mingw64-pcre-devel
BuildRequires: mingw64-sqlite
BuildRequires: mingw64-sqlite-devel
BuildRequires: mingw64-zlib-devel
BuildRequires: perl perl(version) perl(Digest::MD5) perl(Text::ParseWords) perl(Getopt::Long)
BuildRequires: python
BuildRequires: python-xml
BuildRequires: ruby
BuildRequires: xz
# for the compatibility with the Unix version
Provides: mingw64-libQt5WebKit
Provides: mingw64-libQt5WebKitWidgets
%_mingw64_package_header_debug
# Make sure the bundled copy of the ANGLE library isn't used
BuildArch: noarch
%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 cross-compiler.
%package devel
Summary: Qt5 for Windows - QtWebKit component (development)
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
# for the compatibility with the Unix version
Provides: mingw64-libQt5WebKit-devel
Provides: mingw64-libQt5WebKit-private-headers-devel
Provides: mingw64-libQt5WebKitWidgets-private-headers-devel
%description 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 cross-compiler.
%_mingw64_debug_package
%prep
%autosetup -p1 -n %{source_folder}
%build
%if %{qt5_snapshot}
#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
mkdir .git
%endif
# use -g1 instead of -g to avoid https://sourceware.org/bugzilla/show_bug.cgi?id=31929
%_mingw64_cmake -DPORT=Qt -DCMAKE_SYSTEM_PROCESSOR=i586 -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-O2 -g1 -DNDEBUG" -DCMAKE_CXX_FLAGS="-O2 -g1 -DNDEBUG"
%if %suse_version >= 1600
# On Tumbleweed bison/yacc generates .h files but expect *.hpp in associated *.cpp files
# we are in the build dir
ln -s XPathGrammar.h DerivedSources/WebCore/XPathGrammar.hpp
ln -s CSSGrammar.h DerivedSources/WebCore/CSSGrammar.hpp
%endif
%_mingw64_cmake_build
%install
%_mingw64_cmake_install
# .prl files aren't interesting for us
find %{buildroot} -name "*.prl" -delete
# The .dll's are installed in both %%{_mingw64_bindir} and %%{_mingw64_libdir}
# One copy of the .dll's is sufficient
rm -f %{buildroot}%{_mingw64_libdir}/*.dll
# The QtWeb*Process executables are placed in the wrong folder, move it manually
mv %{buildroot}%{_mingw64_libdir}/qt5/bin/QtWeb*Process.exe %{buildroot}%{_mingw64_bindir}/
%files
%defattr(-, root, root)
%doc Source/WebCore/LICENSE*
%{_mingw64_bindir}/QtWebNetworkProcess.exe
%{_mingw64_bindir}/QtWebProcess.exe
%{_mingw64_bindir}/QtWebStorageProcess.exe
%{_mingw64_bindir}/libQt5WebKit.dll
%{_mingw64_bindir}/libQt5WebKitWidgets.dll
# Caution: the directory pull below must not include debug files:
# /usr/i686-w64-mingw64/sys-root/mingw/share/qt5/qml/QtWebKit/experimental/qmlwebkitexperimentalplugin.dll.debug
# /usr/i686-w64-mingw64/sys-root/mingw/share/qt5/qml/QtWebKit/qmlwebkitplugin.dll.debug
%exclude %{_mingw64_libqt5_qmldir}/QtWebKit/experimental/*.debug
%exclude %{_mingw64_libqt5_qmldir}/QtWebKit/*.debug
%dir %{_mingw64_libqt5_qmldir}/
%{_mingw64_libqt5_qmldir}/QtWebKit/
%files devel
%defattr(-, root, root)
%{_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_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