2015-01-08 23:01:48 +01:00
#
# spec file for package libqt5-qtwebengine
#
2016-05-19 12:14:13 +02:00
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
2015-01-08 23:01:48 +01: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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define qt5_snapshot 0
Name : libqt5-qtwebengine
2016-12-22 16:08:05 +01:00
Version : 5.7.1
2015-01-08 23:01:48 +01:00
Release : 0
2015-06-06 09:53:01 +02:00
Summary : Qt 5 WebEngine Library
2015-01-08 23:01:48 +01:00
License : SUSE-LGPL-2.1-with-digia-exception-1.1 or GPL-3.0
Group : Development/Libraries/X11
Url : http://qt.digia.com
%define base_name libqt5
2016-12-22 16:08:05 +01:00
%define real_version 5.7.1
%define so_version 5.7.1
2015-01-08 23:01:48 +01:00
%define tar_version qtwebengine-opensource-src-%{real_version}
Source : %{tar_version} .tar.xz
Source1 : baselibs.conf
2016-06-29 15:10:40 +02:00
# PATCH-FIX-UPSTREAM: use-fno-delete-null-pointer-checks-with-gcc-6.diff - Fix crashes when using GCC6
Patch0 : use-fno-delete-null-pointer-checks-with-gcc-6.diff
2016-10-01 23:50:33 +02:00
# PATCH-FIX-UPSTREAM armv6-ffmpeg-no-thumb.patch - Fix ffmpeg configuration for armv6
Patch2 : armv6-ffmpeg-no-thumb.patch
# PATCH-FIX-UPSTREAM webrtc-build-with-neon.patch - Properly configure webrtc for neon support
Patch3 : webrtc-build-with-neon.patch
2016-10-31 11:08:30 +01:00
# PATCH-FIX-UPSTREAM disable-gpu-when-using-nouveau-boo-1005323.diff -- Detect nouveau opengl drivers and disable gpu usage to work around nouveau crashing
Patch5 : disable-gpu-when-using-nouveau-boo-1005323.diff
2017-05-27 13:06:39 +02:00
# PATCH-FIX-UPSTREAM fix-chromium-gcc7.patch -- Fix build failure with GCC 7
Patch6 : fix-chromium-gcc7.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
BuildRequires : hunspell-devel
BuildRequires : krb5
BuildRequires : krb5-devel
BuildRequires : libcap-devel
BuildRequires : libgcrypt-devel
BuildRequires : libicu-devel
BuildRequires : libjpeg-devel
BuildRequires : libpng-devel
BuildRequires : libqt5-qtbase-private-headers-devel >= %{version}
BuildRequires : libqt5-qtdeclarative-private-headers-devel >= %{version}
2016-06-29 15:10:40 +02:00
BuildRequires : libqt5-qttools-private-headers-devel >= %{version}
2015-09-27 08:37:48 +02:00
BuildRequires : libqt5-qtwebchannel-private-headers-devel >= %{version}
2015-01-08 23:01:48 +01:00
BuildRequires : libqt5-qtxmlpatterns-private-headers-devel >= %{version}
BuildRequires : pam-devel
BuildRequires : pciutils-devel
BuildRequires : perl-JSON
BuildRequires : pkg-config
BuildRequires : python
BuildRequires : python-devel
BuildRequires : python-xml
BuildRequires : re2c
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-09-27 08:37:48 +02:00
%if 0%{?suse_version} >= 1315
2015-06-06 09:53:01 +02:00
BuildRequires : pkgconfig(jsoncpp)
%endif
2016-05-19 12:14:13 +02:00
BuildRequires : binutils-gold
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(vpx)
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)
%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
BuildRoot : %{_tmppath} /%{name} -%{version} -build
%description
Qt is a set of libraries for developing applications.
%prep
%setup -q -n qtwebengine-opensource-src-%{real_version}
sed -i 's|$(STRIP)|strip|g' src/core/core_module.pro
2016-06-29 15:10:40 +02:00
%patch0 -p1
2016-10-01 23:50:33 +02:00
%patch2 -p1
%patch3 -p1
2016-10-31 11:08:30 +01:00
%patch5 -p1
2017-05-27 13:06:39 +02:00
%patch6 -p1
2015-01-08 23:01:48 +01:00
%package devel
Summary : Qt Development Kit
Group : Development/Libraries/X11
Requires : %{name} = %{version}
%description devel
You need this package, if you want to compile programs with qtsensors.
%package private-headers-devel
Summary : Non-ABI stable experimental API
Group : Development/Libraries/C and C++
BuildArch : noarch
Requires : %{name} -devel = %{version}
Requires : libqt5-qtbase-private-headers-devel >= %{version}
Requires : libqt5-qtdeclarative-private-headers-devel >= %{version}
%description private-headers-devel
This package provides private headers of libqt5-qtsensors that are normally
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
Recommends: %{name} -devel
%description examples
Examples for libqt5-qtwebengine module.
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%build
2016-05-19 12:14:13 +02:00
sed -i 's|contains(QT_CONFIG, system-jpeg): REQUIRED_PACKAGES += libjpeg||g' tools/qmake/mkspecs/features/configure.prf
2015-01-08 23:01:48 +01:00
%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
myconf+=" - D u s e _ s y s t e m _ e x p a t = 1
-Duse_system_flac=1
2015-09-27 08:37:48 +02:00
%if 0%{?suse_version} >= 1315
2015-06-06 09:53:01 +02:00
-Duse_system_jsoncpp=1
%endif
-Duse_system_libevent=1
-Duse_system_libjpeg=1
-Duse_system_libpng=1
-Duse_system_libusb=1
-Duse_system_libxml=1
-Duse_system_libxslt=1
-Duse_system_opus=1
-Duse_system_snappy=1
-Duse_system_speex=1"
# gyp files for these 2 system libs are using some magical chromium tool which doesn't exist in qtwebengine tarball
# building with system zlib needs system minizip, which we don't have in openSUSE (yet)
# gen/shim_headers/re2/target/third_party/re2/re2/re2.h:8:21: fatal error: re2/re2.h: No such file or directory
# ../../../src/3rdparty/chromium/media/filters/vpx_video_decoder.cc:270:58: error: 'vpx_codec_set_frame_buffer_functions' was not declared in this scope
# /home/abuild/rpmbuild/BUILD/qtwebengine-opensource-src-5.4.1/src/core/Release/../../../src/3rdparty/chromium/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp:79: undefined reference to `chromium_sqlite3_destroy_reusable_file_handle'
%if 0
myconf+=" - D u s e _ s y s t e m _ h a r f b u z z = 1
2015-09-27 08:37:48 +02:00
-Duse_system_icu=1
2015-06-06 09:53:01 +02:00
-Duse_system_libwebp=1
-Duse_system_libvpx=1
2015-09-27 08:37:48 +02:00
-Duse_system_openssl=1
2015-06-06 09:53:01 +02:00
-Duse_system_re2=1
-Duse_system_zlib=1
-Duse_system_sqlite=1"
%endif
2016-10-01 23:50:33 +02:00
%ifarch armv6l armv6hl
# Tell src/core/gyp_run.pro to configure for armv6, hard float, no neon
RPM_OPT_FLAGS+=" - m a r c h = a r m v 6 z k - m f l o a t - a b i = h a r d - m f p u = v f p "
%endif
2015-06-06 09:53:01 +02:00
pushd src/3rdparty/chromium/
build/linux/unbundle/replace_gyp_files.py $myconf
popd
2016-11-05 21:23:52 +01:00
export CXXFLAGS+=" - f n o - d e l e t e - n u l l - p o i n t e r - c h e c k s "
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
2016-05-19 12:14:13 +02:00
%qmake5 QMAKE_CFLAGS=" $RPM_OPT_FLAGS " \
QMAKE_CFLAGS+=" $RPM_OPT_FLAGS " \
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 "
2015-09-27 08:37:48 +02:00
2015-01-08 23:01:48 +01:00
%make_jobs
%install
%qmake5_install
#cat %{buildroot}/%{_libdir}/pkgconfig/Qt*Web*.pc
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 " {} \;
sed -i '/^Libs.private/d' %{buildroot} %{_libdir} /pkgconfig/Qt*Web*.pc
# kill .la files
rm -f %{buildroot} %{_libqt5_libdir}/lib*.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
%files
%defattr (-,root,root,755)
%doc LICENSE.*
%{_libqt5_libdir}/libQt*Web*.so.*
%{_datadir} /qt5/
%dir %{_libqt5_libexecdir}
%{_libqt5_libexecdir}/QtWebEngineProcess
%{_libqt5_archdatadir}/qml/QtWebEngine/
2016-06-29 15:10:40 +02:00
%{_libqt5_plugindir}/designer/
2015-01-08 23:01:48 +01:00
%files private-headers-devel
%defattr (-,root,root,755)
%doc LICENSE.*
%{_libqt5_includedir}/*/%{so_version}
%files devel
%defattr (-,root,root,755)
%doc LICENSE.*
%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)
%doc LICENSE.*
%{_libqt5_examplesdir}/
%changelog