/[packages]/updates/7/qtwebengine5/current/SPECS/qtwebengine5.spec
ViewVC logotype

Contents of /updates/7/qtwebengine5/current/SPECS/qtwebengine5.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1461744 - (show annotations) (download)
Tue Nov 19 13:58:31 2019 UTC (4 years, 4 months ago) by daviddavid
File size: 15804 byte(s)
New version 5.12.6

1 %define snapshot 0
2 %define pre 0
3
4 # limit parallel builds to 4 on aarch64 and 2 on arm to not choke BS
5 %ifarch aarch64
6 %global _smp_ncpus_max 4
7 %endif
8 %ifarch %{arm}
9 %global _smp_ncpus_max 2
10 %endif
11
12 %ifarch %{arm} aarch64 x86_64
13 %global docs 0
14 %else
15 %global docs 1
16 %endif
17
18 %define qtmajor 5
19 %define qtminor 12
20 %define qtsubminor 6
21
22 # NEON support on ARM (detected at runtime) - disable this if you are hitting
23 # FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495
24 %global arm_neon 0
25
26 # the QMake CONFIG flags to force debugging information to be produced in
27 # release builds, and for all parts of the code
28 %ifarch %{arm} aarch64
29 # the ARM builder runs out of memory during linking with the full setting below,
30 # so omit debugging information for the parts upstream deems it dispensable for
31 # (webcore, v8base)
32 %global debug_config %{nil}
33 %else
34 %global debug_config force_debug_info
35 # webcore_debug v8base_debug
36 %endif
37
38 %define rel 1
39
40 %define major_private 1
41 %define qtversion %{qtmajor}.%{qtminor}.%{qtsubminor}
42
43 %define libwebengine %mklibname qt5webengine %qtmajor
44 %define libwebenginewidgets %mklibname qt5webenginewidgets %qtmajor
45 %define libwebenginecore %mklibname qt5webenginecore %qtmajor
46 %define libwebengine_d %mklibname qt5webengine -d
47
48 %if %snapshot
49 %define qttarballdir qtwebengine-everywhere-src-%{qtversion}-%pre
50 %else
51 %define qttarballdir qtwebengine-everywhere-src-%{qtversion}
52 %endif
53
54 # exclude plugins (all architectures) and libv8.so (i686, it's static everywhere
55 # else)
56 %global __provides_exclude ^lib.*plugin\\.so.*|libv8\\.so$
57 # exclude libv8.so (i686, it's static everywhere else)
58 %global __requires_exclude ^libv8\\.so$
59 # exclude devel(libv8)
60 %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}devel\\(libv8.*
61
62 Name: qtwebengine5
63 Version: %{qtversion}
64 Release: %mkrel %{rel}
65 Summary: Integrates chromium's fast moving web capabilities into Qt
66 Group: Development/KDE and Qt
67 # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
68 # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
69 # The other licenses are from Chromium and the code it bundles
70 License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
71 URL: http://www.qt.io
72 # cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg
73 # wget http://download.qt.io/official_releases/qt/5.12/5.12.6/submodules/qtwebengine-everywhere-src-5.12.6.tar.xz
74 # ./clean_qtwebengine.sh 5.12.6
75 Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz
76 # cleanup scripts used above
77 Source1: clean_qtwebengine.sh
78 Source2: clean_ffmpeg.sh
79 Source3: get_free_ffmpeg_source_files.py
80 # macros
81 Source10: macros.qt5-qtwebengine
82 # some tweaks to linux.pri (system yasm, link libpci, run unbundling script)
83 Patch0: qtwebengine-everywhere-src-5.10.0-linux-pri.patch
84 # quick hack to avoid checking for the nonexistent icudtl.dat and silence the
85 # resulting warnings - not upstreamable as is because it removes the fallback
86 # mechanism for the ICU data directory (which is not used in our builds because
87 # we use the system ICU, which embeds the data statically) completely
88 Patch1: qtwebengine-opensource-src-5.11.0-no-icudtl-dat.patch
89 # fix extractCFlag to also look in QMAKE_CFLAGS_RELEASE, needed to detect the
90 # ARM flags with our %%qmake_qt5 macro, including for the next patch
91 Patch2: qtwebengine-opensource-src-5.12.6-fix-extractcflag.patch
92 # disable NEON vector instructions on ARM where the NEON code FTBFS due to
93 # GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495
94 Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch
95 # use the system NSPR prtime (based on Debian patch)
96 # We already depend on NSPR, so it is useless to copy these functions here.
97 # Debian uses this just fine, and I don't see relevant modifications either.
98 Patch4: qtwebengine-everywhere-src-5.12.0-system-nspr-prtime.patch
99 # use the system ICU UTF functions
100 # We already depend on ICU, so it is useless to copy these functions here.
101 # I checked the history of that directory, and other than the renames I am
102 # undoing, there were no modifications at all. Must be applied after Patch4.
103 Patch5: qtwebengine-everywhere-src-5.10.0-system-icu-utf.patch
104 # do not require SSE2 on i686
105 # cumulative revert of Chromium reviews 187423002, 308003004, 511773002 (parts
106 # relevant to QtWebEngine only), 516543004, 1152053004 and 1161853008, Chromium
107 # Gerrit review 570351 and V8 Gerrit review 575756, along with some custom fixes
108 # and improvements
109 # also build V8 shared and twice on i686 (once for x87, once for SSE2)
110 Patch6: qtwebengine-everywhere-src-5.10.1-no-sse2.patch
111 # fix missing ARM -mfpu setting
112 Patch9: qtwebengine-opensource-src-5.9.2-arm-fpu-fix.patch
113 # remove Android dependencies from openmax_dl ARM NEON detection (detect.c)
114 Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch
115 # restore NEON runtime detection in Skia: revert upstream review 1952953004,
116 # restore the non-Android Linux NEON runtime detection code lost in upstream
117 # review 1890483002, also add VFPv4 runtime detection
118 Patch11: qtwebengine-everywhere-src-5.10.0-skia-neon.patch
119 # webrtc: enable the CPU feature detection for ARM Linux also for Chromium
120 Patch12: qtwebengine-opensource-src-5.9.0-webrtc-neon-detect.patch
121 # Force verbose output from the GN bootstrap process
122 Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch
123 # Forward-port missing parts of build fix with system ICU >= 59 from 5.9:
124 # https://codereview.qt-project.org/#/c/196922/
125 # see QTBUG-60886 and QTBUG-65090
126 Patch22: qtwebengine-everywhere-src-5.10.0-icu59.patch
127 # Fix/workaround FTBFS on aarch64 with newer glibc
128 Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch
129 # workaround FTBFS against kernel-headers-5.2.0+
130 Patch26: qtwebengine-SIOCGSTAMP.patch
131 ## Upstream patches:
132
133 BuildRequires: qtbase5-devel >= %{version}
134 BuildRequires: pkgconfig(Qt5Quick) >= %{version}
135 BuildRequires: pkgconfig(Qt5WebChannel) >= %{version}
136 BuildRequires: pkgconfig(Qt5QuickWidgets)
137 BuildRequires: pkgconfig(Qt5Location)
138 BuildRequires: pkgconfig(dbus-1)
139 BuildRequires: pkgconfig(flac)
140 BuildRequires: pkgconfig(fontconfig)
141 BuildRequires: pkgconfig(harfbuzz)
142 BuildRequires: pkgconfig(icu-i18n)
143 BuildRequires: pkgconfig(icu-uc)
144 BuildRequires: pkgconfig(lcms2)
145 BuildRequires: pkgconfig(libavcodec)
146 BuildRequires: pkgconfig(libavformat)
147 BuildRequires: pkgconfig(libavutil)
148 BuildRequires: pkgconfig(libcap)
149 BuildRequires: pkgconfig(libdrm)
150 BuildRequires: pkgconfig(libevent)
151 BuildRequires: pkgconfig(libpci)
152 BuildRequires: pkgconfig(libpng)
153 BuildRequires: pkgconfig(libpulse)
154 BuildRequires: pkgconfig(libsrtp)
155 BuildRequires: pkgconfig(libwebp) >= 0.6.0
156 BuildRequires: pkgconfig(libwebpdemux)
157 BuildRequires: pkgconfig(libxml-2.0)
158 BuildRequires: pkgconfig(libxslt)
159 BuildRequires: pkgconfig(minizip)
160 BuildRequires: pkgconfig(nss)
161 BuildRequires: pkgconfig(opus)
162 BuildRequires: pkgconfig(poppler-cpp)
163 BuildRequires: pkgconfig(protobuf)
164 BuildRequires: pkgconfig(re2)
165 BuildRequires: pkgconfig(speex)
166 BuildRequires: pkgconfig(vpx) >= 1.7.0
167 BuildRequires: pkgconfig(xcomposite)
168 BuildRequires: pkgconfig(xcursor)
169 BuildRequires: pkgconfig(xi)
170 BuildRequires: pkgconfig(xrandr)
171 BuildRequires: pkgconfig(xscrnsaver)
172 BuildRequires: pkgconfig(xtst)
173 BuildRequires: pkgconfig(zlib)
174 BuildRequires: pkgconfig(jsoncpp)
175 BuildRequires: pkgconfig(snappy)
176 BuildRequires: git
177 BuildRequires: gperf
178 BuildRequires: bison
179 BuildRequires: flex
180 %ifarch %{ix86} x86_64
181 BuildRequires: yasm
182 %endif
183 BuildRequires: re2c
184 BuildRequires: ninja
185 # gn links statically (for now)
186 BuildRequires: libstdc++-static-devel
187
188 #Branch Patchs
189
190 #Trunk Patchs
191
192 #Patch from Mageia
193
194 %description
195 The Qt WebEngine module provides the WebEngineView API which allows QML
196 applications to render regions of dynamic web content. A WebEngineView
197 component may share the screen with other QML components or encompass
198 the full screen as specified within the QML application.
199
200 It allows an application to load pages into the WebEngineView, either by
201 URL or with an HTML string, and navigate within session history. By
202 default, links to different pages load within the same WebEngineView, but
203 web sites may request them to be opened as a new tab, window or dialog.
204
205 %files
206 %{_qt5_translationdir}/qtwebengine_locales
207 %{_qt5_qml}/QtWebEngine/
208 %{_qt5_prefix}/resources/*.pak
209 %{_qt5_bindir}/qwebengine_convert_dict
210 #ifarch %%{ix86}
211 %if 0%{?sse2}
212 # shared V8 library and its SSE2 version
213 %{_qt5_libdir}/qtwebengine/
214 %endif
215 %{_qt5_prefix}/libexec/QtWebEngineProcess
216
217 #------------------------------------------------------------------------------
218
219 %if %{docs}
220 %package doc
221 Summary: QtWebEngine%{qtmajor} APIs and tools docs
222 Group: Documentation
223 BuildArch: noarch
224 BuildRequires: qttools5
225 # This one is required to build QCH-format documentation
226 # for APIs and tools in this package set
227 BuildRequires: qttools5-assistant
228 Recommends: qttools5-assistant
229
230 %description doc
231 Documentation for APIs and tools in QtWebEngine5 package for use with
232 Qt Assistant.
233
234 %files doc
235 %{_qt5_docdir}/qtwebengine.qch
236 %{_qt5_docdir}/qtwebengine/
237 %endif
238
239 #------------------------------------------------------------------------------
240
241 %package -n %{libwebengine}
242 Summary: Qt%{qtmajor} WebEngine Component Library
243 Group: System/Libraries
244
245 %description -n %{libwebengine}
246 Qt%{qtmajor} WebEngine Component Library.
247
248 %files -n %{libwebengine}
249 %{_qt5_libdir}/libQt5WebEngine.so.%{qtmajor}{,.*}
250
251 #------------------------------------------------------------------------------
252
253 %package -n %{libwebenginecore}
254 Summary: Qt%{qtmajor} WebEngineCore Component Library
255 Group: System/Libraries
256 Requires: %{name} = %{version}
257
258 %description -n %{libwebenginecore}
259 Qt%{qtmajor} WebEngineCore Component Library.
260
261 %files -n %{libwebenginecore}
262 %{_qt5_libdir}/libQt5WebEngineCore.so.%{qtmajor}{,.*}
263
264 #------------------------------------------------------------------------------
265
266 %package -n %{libwebenginewidgets}
267 Summary: Qt%{qtmajor} WebEngineWidgets Component Library
268 Group: System/Libraries
269
270 %description -n %{libwebenginewidgets}
271 Qt%{qtmajor} WebEngineWidgets Component Library.
272
273 %files -n %{libwebenginewidgets}
274 %{_qt5_libdir}/libQt5WebEngineWidgets.so.%{qtmajor}{,.*}
275
276 #------------------------------------------------------------------------------
277
278 %package -n %{libwebengine_d}
279 Summary: Devel files needed to build apps based on %{name}
280 Group: Development/KDE and Qt
281 Requires: %{name} = %{version}
282 Requires: %{libwebengine} = %{version}
283 Requires: %{libwebenginecore} = %{version}
284 Requires: %{libwebenginewidgets} = %{version}
285 Provides: libwebengine5-devel = %{version}
286 Provides: webengine5-devel = %{version}
287
288 %description -n %{libwebengine_d}
289 Devel files needed to build apps based on %{name}.
290
291 %files -n %{libwebengine_d}
292 %{_qt5_libdir}/*.so
293 %{_qt5_libdir}/*.prl
294 %{_qt5_libdir}/pkgconfig/*.pc
295 %{_qt5_includedir}/QtWebEngine/
296 %{_qt5_includedir}/QtWebEngineCore/
297 %{_qt5_includedir}/QtWebEngineWidgets/
298 %{_qt5_libdir}/cmake/Qt5WebEngine/
299 %{_qt5_libdir}/cmake/Qt5WebEngineCore/
300 %{_qt5_libdir}/cmake/Qt5WebEngineWidgets/
301 %{_qt5_datadir}/mkspecs/modules/*.pri
302 %{_qt5_examplesdir}/webenginewidgets/
303 %{_qt5_examplesdir}/webengine/
304
305 #------------------------------------------------------------------------------
306
307 %prep
308 %setup -q -n %{qttarballdir}
309
310 %patch0 -p1 -b .linux-pri
311 %patch1 -p1 -b .no-icudtl-dat
312 %patch2 -p1 -b .fix-extractcflag
313 %if !0%{?arm_neon}
314 %patch3 -p1 -b .no-neon
315 %endif
316 %patch4 -p1 -b .system-nspr-prtime
317
318 ## upstream patches
319
320 ##FIXME/TODO rebase
321 #patch5 -p1 -b .system-icu-utf
322 #patch6 -p1 -b .no-sse2
323 %ifarch %{ix86}
324 #global sse2 1
325 %endif
326 %patch9 -p1 -b .arm-fpu-fix
327 %patch10 -p1 -b .openmax-dl-neon
328 #patch11 -p1 -b .skia-neon
329 %patch12 -p1 -b .webrtc-neon-detect
330 #patch21 -p1 -b .gn-bootstrap-verbose
331 #patch22 -p1 -b .icu59
332 %patch24 -p1 -b .aarch64-new-stat
333 %patch26 -p1 -b .SIOCGSTAMP
334
335 # fix // in #include in content/renderer/gpu to avoid debugedit failure
336 #sed -i -e 's!gpu//!gpu/!g' \
337 # src/3rdparty/chromium/content/renderer/gpu/compositor_forwarding_message_filter.cc
338 # and another one in 2 files in WebRTC
339 sed -i -e 's!audio_processing//!audio_processing/!g' \
340 src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft.cc \
341 src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/utility/ooura_fft_sse2.cc
342 # remove ./ from #line commands in ANGLE to avoid debugedit failure (?)
343 sed -i -e 's!\./!!g' \
344 src/3rdparty/chromium/third_party/angle/src/compiler/preprocessor/Tokenizer.cpp \
345 src/3rdparty/chromium/third_party/angle/src/compiler/translator/glslang_lex.cpp
346 # delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we
347 # never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS
348 sed -i -e '/toolprefix = /d' -e 's/\${toolprefix}//g' \
349 src/3rdparty/chromium/build/toolchain/linux/BUILD.gn
350
351 # http://bugzilla.redhat.com/1337585
352 # can't just delete, but we'll overwrite with system headers to be on the safe side
353 cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/
354
355 %if 0
356 #ifarch x86_64
357 # enable this to force -g2 on x86_64 (most arches run out of memory with -g2)
358 # DISABLED BECAUSE OF:
359 # /usr/lib/rpm/find-debuginfo.sh: line 188: 3619 Segmentation fault
360 # (core dumped) eu-strip --remove-comment $r $g -f "$1" "$2"
361 sed -i -e 's/symbol_level=1/symbol_level=2/g' src/core/config/common.pri
362 %endif
363
364 # generate qtwebengine-3rdparty.qdoc, it is missing from the tarball
365 pushd src/3rdparty
366 python chromium/tools/licenses.py \
367 --file-template ../../tools/about_credits.tmpl \
368 --entry-template ../../tools/about_credits_entry.tmpl \
369 credits >../webengine/doc/src/qtwebengine-3rdparty.qdoc
370 popd
371
372 # copy the Chromium license so it is installed with the appropriate name
373 cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium
374
375 # fix missing files for armv7hl
376 cp -a src/3rdparty/chromium/base/numerics/{safe_conversions_arm_impl.h,safe_math_arm_impl.h} src/3rdparty/gn/base/numerics/
377
378 %build
379 export STRIP=strip
380 export NINJAFLAGS="%{__ninja_common_opts}"
381 export NINJA_PATH=%{__ninja}
382
383 %{qmake_qt5} \
384 %{?debug_config:CONFIG+="%{debug_config}}" \
385 QMAKE_EXTRA_ARGS+="-system-webengine-icu" \
386 .
387
388 %make_build
389
390 %if 0%{?docs}
391 %__make docs
392 %endif
393
394 %install
395 %make_install INSTALL_ROOT=%{buildroot}
396
397 %if 0%{?docs}
398 %make_install install_docs INSTALL_ROOT=%{buildroot}
399 %endif
400
401 # .la and .a files, die, die, die.
402 find %{buildroot} -name '*.la' -delete
403 find %{buildroot} -name '*.a' -delete
404
405 ## .prl/.la file love
406 # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
407 pushd %{buildroot}%{_qt5_libdir}
408 for prl_file in libQt5*.prl ; do
409 sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file}
410 if [ -f "$(basename ${prl_file} .prl).so" ]; then
411 rm -fv "$(basename ${prl_file} .prl).la"
412 sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file}
413 fi
414 done
415 popd
416
417 # adjust cmake dep(s) to allow for using the same Qt5 that was used to build it
418 # only if older... (I suppose what we really want is the lesser of %%version, %%_qt5_version)
419 #sed -i -e "s|%{version} \${_Qt5WebEngine|%{_qt5_version} \${_Qt5WebEngine|" \
420 # %{buildroot}%{_qt5_libdir}/cmake/Qt5WebEngine*/Qt5WebEngine*Config.cmake
421
422 %filetriggerin -- %{_datadir}/myspell
423 while read filename ; do
424 case "$filename" in
425 *.dic)
426 bdicname=%{_qtwebengine_dictionaries_dir}/`basename -s .dic "$filename"`.bdic
427 %{_qt5_bindir}/qwebengine_convert_dict "$filename" "$bdicname" &> /dev/null || :
428 ;;
429 esac
430 done
431

  ViewVC Help
Powered by ViewVC 1.1.30