1 |
%define snapshot 0 |
2 |
%define pre 0 |
3 |
|
4 |
%ifarch %{arm} |
5 |
%define build_docs 0 |
6 |
%else |
7 |
%define build_docs 1 |
8 |
%endif |
9 |
|
10 |
%define qtmajor 5 |
11 |
%define qtminor 6 |
12 |
%define qtsubminor 2 |
13 |
|
14 |
%define subrel 1 |
15 |
%define rel 6 |
16 |
|
17 |
%define major_private 1 |
18 |
%define qtversion %{qtmajor}.%{qtminor}.%{qtsubminor} |
19 |
|
20 |
%define libwebengine %mklibname qt5webengine %qtmajor |
21 |
%define libwebenginewidgets %mklibname qt5webenginewidgets %qtmajor |
22 |
%define libwebenginecore %mklibname qt5webenginecore %qtmajor |
23 |
%define libwebengine_d %mklibname qt5webengine -d |
24 |
|
25 |
%if %snapshot |
26 |
%define qttarballdir qtwebengine-opensource-src-%{qtversion}-%pre |
27 |
%else |
28 |
%define qttarballdir qtwebengine-opensource-src-%{qtversion} |
29 |
%endif |
30 |
|
31 |
# exclude plugins (all architectures) and libv8.so (i686, it's static everywhere else) |
32 |
%global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$ |
33 |
# exclude libv8.so and devel(libv8) (i686, it's static everywhere else) |
34 |
%global __requires_exclude ^(libv8\\.so|devel\\(libv8.*)$ |
35 |
|
36 |
Name: qtwebengine5 |
37 |
Version: %{qtversion} |
38 |
Release: %mkrel %{rel} |
39 |
Summary: Integrates chromium's fast moving web capabilities into Qt |
40 |
Group: Development/KDE and Qt |
41 |
License: LGPLv2 with exceptions or GPLv3 with exceptions and GFDL |
42 |
URL: http://www.qt.io |
43 |
Source0: http://download.qt.io/official_releases/qt/%{qtmajor}.%{qtminor}/%{version}/submodules/%{qttarballdir}.tar.gz |
44 |
#ExcludeArch: armv5tl |
45 |
# cleanup scripts used above |
46 |
Source1: clean_qtwebengine.sh |
47 |
Source2: clean_ffmpeg.sh |
48 |
Source3: process_ffmpeg_gyp.py |
49 |
# do not compile with -Wno-format, which also bypasses -Werror-format-security |
50 |
Patch0: qtwebengine-opensource-src-5.6.0-beta-no-format.patch |
51 |
# some tweaks to linux.pri (system libs, link libpci, run unbundling script) |
52 |
Patch1: qtwebengine-opensource-src-5.6.1-linux-pri.patch |
53 |
# quick hack to avoid checking for the nonexistent icudtl.dat and silence the |
54 |
# resulting warnings - not upstreamable as is because it removes the fallback |
55 |
# mechanism for the ICU data directory (which is not used in our builds because |
56 |
# we use the system ICU, which embeds the data statically) completely |
57 |
Patch2: qtwebengine-opensource-src-5.6.0-no-icudtl-dat.patch |
58 |
# fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the |
59 |
# ARM flags with our %%qmake_qt5 macro, including for the next patch |
60 |
Patch3: qtwebengine-opensource-src-5.6.0-beta-fix-extractcflag.patch |
61 |
# disable NEON vector instructions on ARM for now, the NEON code FTBFS due to |
62 |
# GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495 |
63 |
Patch4: qtwebengine-opensource-src-5.6.0-beta-no-neon.patch |
64 |
# use the system NSPR prtime (based on Debian patch) |
65 |
# We already depend on NSPR, so it is useless to copy these functions here. |
66 |
# Debian uses this just fine, and I don't see relevant modifications either. |
67 |
Patch5: qtwebengine-opensource-src-5.6.0-beta-system-nspr-prtime.patch |
68 |
# use the system ICU UTF functions |
69 |
# We already depend on ICU, so it is useless to copy these functions here. |
70 |
# I checked the history of that directory, and other than the renames I am |
71 |
# undoing, there were no modifications at all. Must be applied after Patch5. |
72 |
Patch6: qtwebengine-opensource-src-5.6.0-beta-system-icu-utf.patch |
73 |
# do not require SSE2 on i686 |
74 |
# cumulative revert of upstream reviews 187423002, 308003004, 511773002 (parts |
75 |
# relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, along |
76 |
# with some custom fixes and improvements |
77 |
# also build V8 shared and twice on i686 (once for x87, once for SSE2) |
78 |
Patch7: qtwebengine-opensource-src-5.6.1-no-sse2.patch |
79 |
|
80 |
BuildRequires: qtbase5-devel >= %{version} |
81 |
BuildRequires: qt5quick-devel >= %{version} |
82 |
BuildRequires: pkgconfig(Qt5WebChannel) >= %{version} |
83 |
BuildRequires: pkgconfig(dbus-1) |
84 |
BuildRequires: pkgconfig(flac) |
85 |
BuildRequires: pkgconfig(fontconfig) |
86 |
BuildRequires: pkgconfig(harfbuzz) |
87 |
BuildRequires: pkgconfig(icu-i18n) |
88 |
BuildRequires: pkgconfig(icu-uc) |
89 |
BuildRequires: pkgconfig(libavcodec) |
90 |
BuildRequires: pkgconfig(libavformat) |
91 |
BuildRequires: pkgconfig(libavutil) |
92 |
BuildRequires: pkgconfig(libcap) |
93 |
BuildRequires: pkgconfig(libdrm) |
94 |
BuildRequires: pkgconfig(libevent) |
95 |
BuildRequires: pkgconfig(libpci) |
96 |
BuildRequires: pkgconfig(libpng) |
97 |
BuildRequires: pkgconfig(libpulse) |
98 |
BuildRequires: pkgconfig(libsrtp) |
99 |
BuildRequires: pkgconfig(libwebp) |
100 |
BuildRequires: pkgconfig(libwebpdemux) |
101 |
BuildRequires: pkgconfig(libxml-2.0) |
102 |
BuildRequires: pkgconfig(libxslt) |
103 |
BuildRequires: pkgconfig(minizip) |
104 |
BuildRequires: pkgconfig(nss) |
105 |
BuildRequires: pkgconfig(opus) |
106 |
BuildRequires: pkgconfig(protobuf) |
107 |
BuildRequires: pkgconfig(re2) |
108 |
BuildRequires: pkgconfig(speex) |
109 |
BuildRequires: pkgconfig(vpx) >= 1.4 |
110 |
BuildRequires: pkgconfig(xcomposite) |
111 |
BuildRequires: pkgconfig(xcursor) |
112 |
BuildRequires: pkgconfig(xi) |
113 |
BuildRequires: pkgconfig(xrandr) |
114 |
BuildRequires: pkgconfig(xscrnsaver) |
115 |
BuildRequires: pkgconfig(xtst) |
116 |
BuildRequires: pkgconfig(zlib) |
117 |
BuildRequires: jsoncpp-devel |
118 |
BuildRequires: snappy-devel |
119 |
BuildRequires: git |
120 |
BuildRequires: gperf |
121 |
BuildRequires: bison |
122 |
%ifarch %{ix86} x86_64 |
123 |
BuildRequires: yasm |
124 |
%endif |
125 |
BuildRequires: re2c |
126 |
BuildRequires: ninja |
127 |
|
128 |
#Branch Patchs |
129 |
|
130 |
#Trunk Patchs |
131 |
|
132 |
#Patch from Mageia |
133 |
|
134 |
%description |
135 |
The Qt WebEngine module provides the WebEngineView API which allows QML |
136 |
applications to render regions of dynamic web content. A WebEngineView |
137 |
component may share the screen with other QML components or encompass |
138 |
the full screen as specified within the QML application. |
139 |
|
140 |
It allows an application to load pages into the WebEngineView, either by |
141 |
URL or with an HTML string, and navigate within session history. By |
142 |
default, links to different pages load within the same WebEngineView, but |
143 |
web sites may request them to be opened as a new tab, window or dialog. |
144 |
|
145 |
%files |
146 |
%{_qt5_translationdir}/qtwebengine_locales |
147 |
%{_qt5_qml}/QtWebEngine/ |
148 |
%{_qt5_prefix}/resources/*.pak |
149 |
%ifarch %{ix86} |
150 |
%{_libdir}/qtwebengine |
151 |
%endif |
152 |
%{_qt5_prefix}/libexec/QtWebEngineProcess |
153 |
|
154 |
#------------------------------------------------------------------------------ |
155 |
|
156 |
%if %{build_docs} |
157 |
%package doc |
158 |
Summary: QtWebEngine%{qtmajor} APIs and tools docs |
159 |
Group: Documentation |
160 |
BuildArch: noarch |
161 |
BuildRequires: qttools5 |
162 |
# This one is required to build QCH-format documentation |
163 |
# for APIs and tools in this package set |
164 |
BuildRequires: qttools5-assistant |
165 |
Recommends: qttools5-assistant |
166 |
|
167 |
%description doc |
168 |
Documentation for APIs and tools in QtWebEngine5 package for use with |
169 |
Qt Assistant. |
170 |
|
171 |
%files doc |
172 |
%{_qt5_docdir}/qtwebengine.qch |
173 |
%{_qt5_docdir}/qtwebengine/ |
174 |
%endif |
175 |
|
176 |
#------------------------------------------------------------------------------ |
177 |
|
178 |
%package -n %{libwebengine} |
179 |
Summary: Qt%{qtmajor} WebEngine Component Library |
180 |
Group: System/Libraries |
181 |
# Fix naming glitch in cauldron (mga6) |
182 |
Obsoletes: %{_lib}webengine5 < 5.6.0-5 |
183 |
|
184 |
%description -n %{libwebengine} |
185 |
Qt%{qtmajor} WebEngine Component Library. |
186 |
|
187 |
%files -n %{libwebengine} |
188 |
%{_qt5_libdir}/libQt5WebEngine.so.%{qtmajor}{,.*} |
189 |
|
190 |
#------------------------------------------------------------------------------ |
191 |
|
192 |
%package -n %{libwebenginecore} |
193 |
Summary: Qt%{qtmajor} WebEngineCore Component Library |
194 |
Group: System/Libraries |
195 |
Requires: %{name} = %{version} |
196 |
# Fix naming glitch in cauldron (mga6) |
197 |
Obsoletes: %{_lib}webenginecore5 < 5.6.0-5 |
198 |
|
199 |
%description -n %{libwebenginecore} |
200 |
Qt%{qtmajor} WebEngineCore Component Library. |
201 |
|
202 |
%files -n %{libwebenginecore} |
203 |
%{_qt5_libdir}/libQt5WebEngineCore.so.%{qtmajor}{,.*} |
204 |
|
205 |
#------------------------------------------------------------------------------ |
206 |
|
207 |
%package -n %{libwebenginewidgets} |
208 |
Summary: Qt%{qtmajor} WebEngineWidgets Component Library |
209 |
Group: System/Libraries |
210 |
# Fix naming glitch in cauldron (mga6) |
211 |
Obsoletes: %{_lib}webenginewidgets5 < 5.6.0-5 |
212 |
|
213 |
%description -n %{libwebenginewidgets} |
214 |
Qt%{qtmajor} WebEngineWidgets Component Library. |
215 |
|
216 |
%files -n %{libwebenginewidgets} |
217 |
%{_qt5_libdir}/libQt5WebEngineWidgets.so.%{qtmajor}{,.*} |
218 |
|
219 |
#------------------------------------------------------------------------------ |
220 |
|
221 |
%package -n %{libwebengine_d} |
222 |
Summary: Devel files needed to build apps based on %{name} |
223 |
Group: Development/KDE and Qt |
224 |
Requires: %{name} = %{version} |
225 |
Requires: %{libwebengine} = %{version} |
226 |
Requires: %{libwebenginecore} = %{version} |
227 |
Requires: %{libwebenginewidgets} = %{version} |
228 |
Provides: libwebengine5-devel = %{version} |
229 |
Provides: webengine5-devel = %{version} |
230 |
Obsoletes: libwebengine-private-devel < 5.6.0 |
231 |
Obsoletes: libwebengine5-private-devel < 5.6.0 |
232 |
Obsoletes: webengine-private-devel < 5.6.0 |
233 |
|
234 |
%description -n %{libwebengine_d} |
235 |
Devel files needed to build apps based on %{name}. |
236 |
|
237 |
%files -n %{libwebengine_d} |
238 |
%{_qt5_libdir}/*.so |
239 |
%{_qt5_libdir}/*.prl |
240 |
%{_qt5_libdir}/pkgconfig/*.pc |
241 |
%{_qt5_includedir}/QtWebEngine/ |
242 |
%{_qt5_includedir}/QtWebEngineCore/ |
243 |
%{_qt5_includedir}/QtWebEngineWidgets/ |
244 |
%{_qt5_libdir}/cmake/Qt5WebEngine/ |
245 |
%{_qt5_libdir}/cmake/Qt5WebEngineCore/ |
246 |
%{_qt5_libdir}/cmake/Qt5WebEngineWidgets/ |
247 |
%{_qt5_datadir}/mkspecs/modules/*.pri |
248 |
%{_qt5_examplesdir}/webenginewidgets/ |
249 |
%{_qt5_examplesdir}/webengine/ |
250 |
|
251 |
#------------------------------------------------------------------------------ |
252 |
|
253 |
%prep |
254 |
%setup -q -n %{qttarballdir} |
255 |
|
256 |
%patch0 -p1 -b .no-format |
257 |
%patch1 -p1 -b .linux-pri |
258 |
%patch2 -p1 -b .no-icudtl-dat |
259 |
%patch3 -p1 -b .fix-extractcflag |
260 |
%patch4 -p1 -b .no-neon |
261 |
%patch5 -p1 -b .system-nspr-prtime |
262 |
%patch6 -p1 -b .system-icu-utf |
263 |
%patch7 -p1 -b .no-sse2 |
264 |
|
265 |
# fix // in #include in content/renderer/gpu to avoid debugedit failure |
266 |
sed -i -e 's!gpu//!gpu/!g' \ |
267 |
src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc |
268 |
# remove ./ from #line commands in ANGLE to avoid debugedit failure (?) |
269 |
sed -i -e 's!\./!!g' \ |
270 |
src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \ |
271 |
src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp |
272 |
|
273 |
%ifnarch x86_64 |
274 |
# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 |
275 |
sed -i -e 's/=-g$/=-g1/g' src/core/gyp_run.pro |
276 |
%endif |
277 |
|
278 |
|
279 |
%build |
280 |
export STRIP=strip |
281 |
export NINJAFLAGS="-v %{_smp_mflags}" |
282 |
export NINJA_PATH=%{_bindir}/ninja |
283 |
export CXXFLAGS="%{optflags} -fno-delete-null-pointer-checks" |
284 |
%ifnarch x86_64 |
285 |
# most arches run out of memory with full debuginfo, so use -g1 on non-x86_64 |
286 |
export CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ -g / -g1 /g'` |
287 |
%endif |
288 |
|
289 |
%qmake_qt5 WEBENGINE_CONFIG+='use_system_icu use_system_ffmpeg' |
290 |
%make_build |
291 |
|
292 |
%if %{build_docs} |
293 |
%__make docs |
294 |
%endif |
295 |
|
296 |
%install |
297 |
%make_install INSTALL_ROOT=%{buildroot} |
298 |
|
299 |
%if %{build_docs} |
300 |
%make_install install_docs INSTALL_ROOT=%{buildroot} |
301 |
%endif |
302 |
|
303 |
# .la and .a files, die, die, die. |
304 |
find %{buildroot} -name '*.la' -delete |
305 |
find %{buildroot} -name '*.a' -delete |
306 |
|
307 |
## .prl/.la file love |
308 |
# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs |
309 |
pushd %{buildroot}%{_qt5_libdir} |
310 |
for prl_file in libQt5*.prl ; do |
311 |
sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} |
312 |
if [ -f "$(basename ${prl_file} .prl).so" ]; then |
313 |
rm -fv "$(basename ${prl_file} .prl).la" |
314 |
sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file} |
315 |
fi |
316 |
done |
317 |
popd |