2015-01-08 23:01:48 +01:00
#
# spec file for package libqt5-qtwebengine
#
2019-09-19 10:36:35 +02:00
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
2018-03-28 10:27:58 +02:00
# Copyright © 2017 Kevin Kofler <Kevin@tigcc.ticalc.org>
2015-01-08 23:01:48 +01:00
#
2018-04-16 12:46:29 +02:00
# 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.
2019-01-21 10:07:52 +01:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2018-06-02 11:53:21 +02:00
#
2015-01-08 23:01:48 +01:00
%define qt5_snapshot 0
2019-06-28 16:32:13 +02:00
%if %{?suse_version} > 1500 || 0%{?sle_version} > 150100
%bcond_without system_vpx
2017-06-13 16:05:23 +02:00
%else
2017-12-23 12:14:44 +01:00
%bcond_with system_vpx
2017-06-13 16:05:23 +02:00
%endif
2019-06-28 16:32:13 +02:00
%if 0%{?suse_version} > 1500
# Needs ICU >= 63
2018-07-02 23:28:40 +02:00
%bcond_without system_icu
2019-06-28 16:32:13 +02:00
%else
%bcond_with system_icu
2017-06-13 16:05:23 +02:00
%endif
2017-12-23 12:14:44 +01:00
%if %{?suse_version} >= 1330 || (0%{?is_opensuse} && 0%{?sle_version} >= 120200)
2017-09-29 11:50:16 +02:00
%bcond_without system_ffmpeg
%else
%bcond_with system_ffmpeg
%endif
2017-12-23 12:14:44 +01:00
%if %{?suse_version} >= 1320 || (0%{?suse_version} == 1315 && 0%{?sle_version} >= 120200)
2017-06-13 16:05:23 +02:00
%bcond_without system_minizip
%else
%bcond_with system_minizip
%endif
2019-06-28 16:32:13 +02:00
# Not even in Tumbleweed as of 2019-03-22
%bcond_with system_harfbuzz
2017-06-13 16:05:23 +02:00
# This is just overall condition to contain everything we can't provide on SLE12
%if 0%{?suse_version} >= 1320 || 0%{?is_opensuse}
%bcond_with sle_bundles
%else
%bcond_without sle_bundles
%endif
2018-03-28 10:27:58 +02:00
# spellchecking dictionary directory
%global _qtwebengine_dictionaries_dir %{_libqt5_datadir}/qtwebengine_dictionaries
2017-06-13 16:05:23 +02:00
2015-01-08 23:01:48 +01:00
Name : libqt5-qtwebengine
2019-10-05 18:00:59 +02:00
Version : 5.14.0~alpha
2015-01-08 23:01:48 +01:00
Release : 0
2015-06-06 09:53:01 +02:00
Summary : Qt 5 WebEngine Library
2019-01-21 10:07:52 +01:00
License : LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
2015-01-08 23:01:48 +01:00
Group : Development/Libraries/X11
2017-06-13 16:05:23 +02:00
Url : https://www.qt.io
2015-01-08 23:01:48 +01:00
%define base_name libqt5
2019-10-05 18:00:59 +02:00
%define real_version 5.14.0-alpha
%define so_version 5.14.0
%define tar_version qtwebengine-everywhere-src-5.14.0-alpha
Source : https://download.qt.io/development_releases/qt/5.14/%{real_version} /submodules/%{tar_version} .tar.xz
2015-01-08 23:01:48 +01:00
Source1 : baselibs.conf
2016-10-01 23:50:33 +02:00
# PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6
2017-07-08 12:24:53 +02:00
Patch1 : armv6-ffmpeg-no-thumb.patch
2018-01-16 09:38:51 +01:00
# PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff
2017-07-08 12:24:53 +02:00
Patch2 : disable-gpu-when-using-nouveau-boo-1005323.diff
2019-07-11 10:13:53 +02:00
# PATCH-FIX-UPSTREAM 0001-fix-build-after-y2038-changes-in-glibc.patch
Patch3 : 0001-fix-build-after-y2038-changes-in-glibc.patch
2017-10-13 14:02:58 +02:00
# PATCH-FIX-UPSTREAM harmony-fix.diff -- Show the patent-free LCD rendering. Without this patch, only grayscale rendering is used. (for freetype-2.8.1) boo#1061344
2017-12-23 12:14:44 +01:00
Patch5 : harmony-fix.diff
2019-10-05 18:00:59 +02:00
# PATCH-FIX_UPSTREAM https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/271538
Patch6 : fix-system-icu.patch
2015-09-27 08:37:48 +02:00
# http://www.chromium.org/blink not ported to PowerPC
2015-12-09 19:50:57 +01:00
ExcludeArch : ppc ppc64 ppc64le s390 s390x
2016-10-01 23:50:33 +02:00
# Try to fix i586 MemoryErrors with rpmlint
#!BuildIgnore: rpmlint
2015-01-08 23:01:48 +01:00
BuildRequires : bison
BuildRequires : fdupes
BuildRequires : flac-devel
BuildRequires : flex
BuildRequires : gperf
2017-06-13 16:05:23 +02:00
# It really wants a commit hash, even if it's not in a .git checkout...
2019-01-21 10:07:52 +01:00
BuildRequires : binutils-gold
2017-06-13 16:05:23 +02:00
BuildRequires : git-core
2015-01-08 23:01:48 +01:00
BuildRequires : krb5
BuildRequires : krb5-devel
2019-01-21 10:07:52 +01:00
BuildRequires : libQt5QuickControls2-devel
2015-01-08 23:01:48 +01:00
BuildRequires : libcap-devel
BuildRequires : libgcrypt-devel
BuildRequires : libicu-devel
BuildRequires : libjpeg-devel
BuildRequires : libpng-devel
2018-03-24 16:13:06 +01:00
BuildRequires : libqt5-qtbase-private-headers-devel >= 5.9
BuildRequires : libqt5-qtdeclarative-private-headers-devel >= 5.9
BuildRequires : libqt5-qtlocation-private-headers-devel >= 5.9
2019-01-21 10:07:52 +01:00
BuildRequires : libqt5-qttools-private-headers-devel >= 5.9
2018-03-24 16:13:06 +01:00
BuildRequires : libqt5-qtwebchannel-private-headers-devel >= 5.9
BuildRequires : libqt5-qtxmlpatterns-private-headers-devel >= 5.9
2019-06-28 16:32:13 +02:00
BuildRequires : memory-constraints
2019-01-26 22:18:05 +01:00
BuildRequires : ninja
2015-01-08 23:01:48 +01:00
BuildRequires : pam-devel
BuildRequires : pciutils-devel
BuildRequires : perl-JSON
BuildRequires : pkg-config
BuildRequires : python
BuildRequires : python-devel
BuildRequires : python-xml
2017-12-23 12:14:44 +01:00
BuildRequires : re2-devel
2019-01-21 10:07:52 +01:00
BuildRequires : re2c
2018-03-24 16:13:06 +01:00
BuildRequires : sed
2015-06-06 09:53:01 +02:00
BuildRequires : snappy-devel
2015-01-08 23:01:48 +01:00
BuildRequires : sqlite3-devel
BuildRequires : update-desktop-files
BuildRequires : usbutils
BuildRequires : util-linux
BuildRequires : valgrind-devel
BuildRequires : wdiff
BuildRequires : xz
BuildRequires : yasm
BuildRequires : perl(Switch)
BuildRequires : pkgconfig(alsa)
2016-05-19 12:14:13 +02:00
BuildRequires : pkgconfig(atk)
2015-01-08 23:01:48 +01:00
BuildRequires : pkgconfig(bzip2)
BuildRequires : pkgconfig(cairo)
BuildRequires : pkgconfig(dbus-1)
BuildRequires : pkgconfig(fontconfig)
BuildRequires : pkgconfig(freetype2)
BuildRequires : pkgconfig(gio-2.0)
BuildRequires : pkgconfig(glib-2.0)
BuildRequires : pkgconfig(gmodule-2.0)
BuildRequires : pkgconfig(gobject-2.0)
BuildRequires : pkgconfig(gthread-2.0)
2015-06-06 09:53:01 +02:00
BuildRequires : pkgconfig(jsoncpp)
2018-06-02 11:53:21 +02:00
%if 0%{?suse_version} < 1330
# It does not build with the default compiler (GCC 4.8) on Leap 42.x
BuildRequires : gcc7-c++
%endif
2015-01-08 23:01:48 +01:00
BuildRequires : pkgconfig(libcrypto)
BuildRequires : pkgconfig(libdrm)
BuildRequires : pkgconfig(libevent)
BuildRequires : pkgconfig(libexif)
BuildRequires : pkgconfig(libmtp)
BuildRequires : pkgconfig(libpci)
BuildRequires : pkgconfig(libpng)
BuildRequires : pkgconfig(libpulse)
BuildRequires : pkgconfig(libsrtp)
BuildRequires : pkgconfig(libudev)
BuildRequires : pkgconfig(libusb-1.0)
BuildRequires : pkgconfig(libwebp)
2015-06-06 09:53:01 +02:00
BuildRequires : pkgconfig(libxml-2.0)
2015-01-08 23:01:48 +01:00
BuildRequires : pkgconfig(libxslt)
BuildRequires : pkgconfig(nspr)
BuildRequires : pkgconfig(nss)
BuildRequires : pkgconfig(opus)
BuildRequires : pkgconfig(pangocairo)
BuildRequires : pkgconfig(pangoft2)
BuildRequires : pkgconfig(protobuf)
BuildRequires : pkgconfig(speex)
BuildRequires : pkgconfig(x11)
BuildRequires : pkgconfig(xcomposite)
BuildRequires : pkgconfig(xcursor)
BuildRequires : pkgconfig(xdamage)
BuildRequires : pkgconfig(xext)
BuildRequires : pkgconfig(xfixes)
BuildRequires : pkgconfig(xi)
BuildRequires : pkgconfig(xrandr)
BuildRequires : pkgconfig(xrender)
BuildRequires : pkgconfig(xscrnsaver)
BuildRequires : pkgconfig(xt)
BuildRequires : pkgconfig(xtst)
BuildRequires : pkgconfig(zlib)
2017-06-13 16:05:23 +02:00
%if !%{with sle_bundles}
BuildRequires : yasm-devel
%endif
%if %{with system_minizip}
BuildRequires : pkgconfig(minizip)
%endif
%if %{with system_harfbuzz}
2019-06-28 16:32:13 +02:00
BuildRequires : pkgconfig(harfbuzz) >= 2.0.0
2017-06-13 16:05:23 +02:00
%endif
%if %{with system_icu}
2019-06-28 16:32:13 +02:00
BuildRequires : pkgconfig(icu-i18n) >= 63.0
2017-06-13 16:05:23 +02:00
%endif
%if %{with system_vpx}
2019-06-28 16:32:13 +02:00
BuildRequires : pkgconfig(vpx) >= 1.8.0
2017-06-13 16:05:23 +02:00
%endif
2017-09-29 11:50:16 +02:00
%if %{with system_ffmpeg}
2018-10-01 08:13:02 +02:00
BuildRequires : pkgconfig(libavcodec)
2019-01-21 10:07:52 +01:00
BuildRequires : pkgconfig(libavformat)
2018-10-01 08:13:02 +02:00
BuildRequires : pkgconfig(libavutil)
2017-09-29 11:50:16 +02:00
%endif
2015-01-08 23:01:48 +01:00
%if %qt5_snapshot
#to create the forwarding headers
BuildRequires : perl
%endif
2015-03-01 15:27:02 +01:00
%requires_ge libQt5Network5
%requires_ge libQtQuick5
%requires_ge libQt5Widgets5
2015-01-08 23:01:48 +01:00
%description
2017-06-13 16:05:23 +02:00
Qt WebEngine provides functionality for rendering regions of dynamic
web content.
2015-01-08 23:01:48 +01:00
2017-06-13 16:05:23 +02:00
The functionality in Qt WebEngine is divided into the following
modules:
* QtWebEngineCore: Provides public API shared by both QtWebEngine and
QtWebEngineWidgets
* QtWebEngine: Provides QML types for rendering web content within a
QML application
* QtWebEngineWidgets: Provides a web browser engine as well as C++
classes to render and interact with web content
2015-01-08 23:01:48 +01:00
%package devel
2017-06-13 16:05:23 +02:00
Summary : Development files for the Qt5 WebEngine library
2015-01-08 23:01:48 +01:00
Group : Development/Libraries/X11
Requires : %{name} = %{version}
%description devel
2017-12-23 12:14:44 +01:00
You need this package if you want to compile programs with Qt WebEngine.
2015-01-08 23:01:48 +01:00
%package private-headers-devel
2017-06-13 16:05:23 +02:00
Summary : Non-ABI stable experimental API for the Qt5 WebEngine library
2015-01-08 23:01:48 +01:00
Group : Development/Libraries/C and C++
BuildArch : noarch
Requires : %{name} -devel = %{version}
2018-03-24 16:13:06 +01:00
%requires_ge libqt5-qtbase-private-headers-devel
%requires_ge libqt5-qtdeclarative-private-headers-devel
2015-01-08 23:01:48 +01:00
%description private-headers-devel
2017-12-23 12:14:44 +01:00
This package provides private headers of libqt5-qtwebengine that are normally
2015-01-08 23:01:48 +01:00
not used by application development and that do not have any ABI or
API guarantees. The packages that build against these have to require
the exact Qt version.
%package examples
Summary : Qt5 location examples
Group : Development/Libraries/X11
2017-12-23 12:14:44 +01:00
Requires : libqt5-qtquickcontrols2
2015-01-08 23:01:48 +01:00
Recommends: %{name} -devel
%description examples
2017-06-13 16:05:23 +02:00
Examples for the libqt5-qtwebengine module.
2015-01-08 23:01:48 +01:00
2017-06-13 16:05:23 +02:00
%prep
2017-12-23 12:14:44 +01:00
%setup -q -n %{tar_version}
2017-06-13 16:05:23 +02:00
sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro
2018-06-02 11:53:21 +02:00
%autopatch -p1
2017-06-18 13:49:13 +02:00
# QTBUG-61128
sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \
src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
2015-01-08 23:01:48 +01:00
%build
%if %qt5_snapshot
#force the configure script to generate the forwarding headers (it checks whether .git directory exists)
mkdir .git
%endif
2015-06-06 09:53:01 +02:00
2018-06-02 11:53:21 +02:00
%if 0%{?suse_version} < 1330
# WE checks the version of GCC qtbase was built with, not the version it's building with.
# ARGH!
echo " Q T _ G C C _ M A J O R _ V E R S I O N = 7 " > qtwebengine_new.pro
echo " Q T _ G C C _ M I N O R _ V E R S I O N = 2 " >> qtwebengine_new.pro
2019-03-21 09:41:52 +01:00
echo " Q T _ C O N F I G + = c + + 1 4 " >> qtwebengine_new.pro
2018-06-02 11:53:21 +02:00
cat qtwebengine.pro >> qtwebengine_new.pro
mv qtwebengine{_new,}.pro
%endif
2015-09-27 08:37:48 +02:00
%ifnarch x86_64
2016-11-05 21:23:52 +01:00
RPM_OPT_FLAGS=" $RPM_OPT_FLAGS "
2015-09-27 08:37:48 +02:00
export RPM_OPT_FLAGS=${RPM_OPT_FLAGS /-g / }
%endif
2017-06-18 13:49:13 +02:00
# It does not actually include proprietary codecs, it only makes it attempt to use ffmpeg
2019-09-19 10:36:35 +02:00
# Link pulseaudio to work around QTBUG-77037
2016-05-19 12:14:13 +02:00
%qmake5 QMAKE_CFLAGS=" $RPM_OPT_FLAGS " \
2017-12-23 12:14:44 +01:00
QMAKE_LFLAGS+=" - W l , - - n o - k e e p - m e m o r y - W l , - - h a s h - s i z e = 3 1 - W l , - - r e d u c e - m e m o r y - o v e r h e a d s " \
2019-09-19 10:36:35 +02:00
gn_args+=" l i n k _ p u l s e a u d i o = t r u e " \
2018-06-02 11:53:21 +02:00
%if 0%{?suse_version} < 1330
QMAKE_CC=gcc-7 QMAKE_CXX=g++-7 CONFIG+=c++14 \
%endif
2017-12-23 12:14:44 +01:00
qtwebengine.pro -- \
2019-09-19 10:36:35 +02:00
-webengine-alsa -webengine-kerberos -no-webengine-embedded-build \
2017-06-13 16:05:23 +02:00
%if %{with system_icu}
2017-12-23 12:14:44 +01:00
-system-webengine-icu \
2017-06-13 16:05:23 +02:00
%endif
2017-12-23 12:14:44 +01:00
%if %{with system_ffmpeg}
-system-webengine-ffmpeg \
-webengine-proprietary-codecs \
%endif
-system-webengine-opus -system-webengine-webp -webengine-pepper-plugins -webengine-printing-and-pdf
2015-09-27 08:37:48 +02:00
2019-06-28 16:32:13 +02:00
# Determine the right number of parallel processes based on the available memory
2019-07-12 09:26:12 +02:00
%limit_build -m 2500
2017-12-23 12:14:44 +01:00
2019-06-28 16:32:13 +02:00
# Ensure that also the internal chromium build follows the right number of parallel
# processes instead of its defaults.
export NINJAFLAGS=" % { _ s m p _ m f l a g s } "
2017-12-23 12:14:44 +01:00
2018-06-02 11:53:21 +02:00
%if 0%{?suse_version} < 1330
export CC=gcc-7
export CXX=g++-7
%endif
2019-06-28 16:32:13 +02:00
make %{_smp_mflags} VERBOSE=1
2015-01-08 23:01:48 +01:00
%install
%qmake5_install
#cat %{buildroot}/%{_libdir}/pkgconfig/Qt*Web*.pc
2017-06-13 16:05:23 +02:00
find %{buildroot} /%{_libdir} -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} +
find %{buildroot} /%{_libdir} -type f -name '*pc' -print -exec perl -pi -e " s , - L $RPM_BUILD_DIR / ? \ S + , , g " {} + -exec sed -i -e " s , ^ m o c _ l o c a t i o n = . * , m o c _ l o c a t i o n = % l i b q t 5 _ b i n d i r / m o c , " -e " s , u i c _ l o c a t i o n = . * , u i c _ l o c a t i o n = % l i b q t 5 _ b i n d i r / u i c , " {} +
find %{buildroot} /%{_libdir} -type f -name '*pc' -exec sed -i -e " / ^ R P M _ B U I L D _ D I R / d " {} +
2015-01-08 23:01:48 +01:00
sed -i '/^Libs.private/d' %{buildroot} %{_libdir} /pkgconfig/Qt*Web*.pc
# kill .la files
2019-09-07 19:41:44 +02:00
rm -f %{buildroot} %{_libqt5_libdir}/*.la
2015-06-06 09:53:01 +02:00
# webenginecore expects icudatl.dat at this location
2016-05-19 12:14:13 +02:00
# ln -sf %{_datadir}/icu/*/icudt*l.dat %{buildroot}%{_datadir}/qt5/icudtl.dat
2015-01-08 23:01:48 +01:00
2018-03-28 10:27:58 +02:00
# Workaround to allow using QtWE with older Qt versions
2018-03-24 16:13:06 +01:00
sed -i -r '/ EXACT\)/d' \
%{buildroot} %{_libqt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake
2018-06-02 11:53:21 +02:00
sed -i '/find_package/!b;n;s/' %{so_version} /$(rpm -q --qf %%{version} libQt5Core5 | sed 's/~.*$//' )/ \
2018-03-24 16:13:06 +01:00
%{buildroot} %{_libqt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake
2018-03-28 10:27:58 +02:00
# Hunspell dictionaries will be converted and put here on package installation
mkdir -p %{buildroot} %{_qtwebengine_dictionaries_dir}
2018-03-24 16:13:06 +01:00
2017-06-13 16:05:23 +02:00
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
2018-04-16 12:46:29 +02:00
%if 0%{?suse_version} >= 1500
2018-03-28 10:27:58 +02:00
%filetriggerin -- %{_datadir} /hunspell
2018-06-02 11:53:21 +02:00
# Convert Hunspell dictionaries on package installation
2018-03-28 10:27:58 +02:00
while read filename ; do
case " $ f i l e n a m e " in
*.dic)
bdicname=%{_qtwebengine_dictionaries_dir} /`basename -s .dic " $ f i l e n a m e " `.bdic
%{_libqt5_bindir}/qwebengine_convert_dict " $ f i l e n a m e " " $ b d i c n a m e " &> /dev/null || :
;;
esac
done
2018-04-16 12:46:29 +02:00
%endif
2018-03-28 10:27:58 +02:00
2015-01-08 23:01:48 +01:00
%files
%defattr (-,root,root,755)
2018-06-02 11:53:21 +02:00
%license LICENSE.*
2015-01-08 23:01:48 +01:00
%{_libqt5_libdir}/libQt*Web*.so.*
%{_datadir} /qt5/
%dir %{_libqt5_libexecdir}
2018-03-28 10:27:58 +02:00
%dir %{_qtwebengine_dictionaries_dir}
2015-01-08 23:01:48 +01:00
%{_libqt5_libexecdir}/QtWebEngineProcess
%{_libqt5_archdatadir}/qml/QtWebEngine/
2016-06-29 15:10:40 +02:00
%{_libqt5_plugindir}/designer/
2017-06-13 16:05:23 +02:00
%{_libqt5_bindir}/qwebengine_convert_dict
2015-01-08 23:01:48 +01:00
%files private-headers-devel
%defattr (-,root,root,755)
2018-06-02 11:53:21 +02:00
%license LICENSE.*
2015-01-08 23:01:48 +01:00
%{_libqt5_includedir}/*/%{so_version}
%files devel
%defattr (-,root,root,755)
2018-06-02 11:53:21 +02:00
%license LICENSE.*
2015-01-08 23:01:48 +01:00
%exclude %{_libqt5_includedir}/*/%{so_version}
%{_libqt5_includedir}/*/
2016-06-29 15:10:40 +02:00
%{_libqt5_libdir}/cmake/Qt5*/
2015-01-08 23:01:48 +01:00
%{_libqt5_libdir}/libQt*Web*.so
%{_libqt5_libdir}/libQt*Web*.prl
%{_libqt5_libdir}/qt5/mkspecs/modules/qt_lib_*.pri
%{_libqt5_libdir}/pkgconfig/Qt*Web*.pc
%files examples
%defattr (-,root,root,755)
2018-06-02 11:53:21 +02:00
%license LICENSE.*
2015-01-08 23:01:48 +01:00
%{_libqt5_examplesdir}/
%changelog