1 |
# eu-strip crashes on chrome binary from this build |
2 |
%define _enable_debug_packages 0 |
3 |
%global debug_package %{nil} |
4 |
%global __debug_install_post %{nil} |
5 |
|
6 |
%global use_clang 0 |
7 |
%global use_gold 0 |
8 |
%global warnings_as_errors 1 |
9 |
%global system_icu 0 |
10 |
%global system_openjpeg 1 |
11 |
%global system_libtiff 1 |
12 |
%global system_libvpx 0 |
13 |
%global system_dav1d 1 |
14 |
%global system_re2 1 |
15 |
%global system_fontconfig 1 |
16 |
%global system_freetype 1 |
17 |
# system libevent causes the renderer to get stuck |
18 |
%global system_libevent 0 |
19 |
|
20 |
%if %{use_gold} |
21 |
%define gn_gold use_gold=true |
22 |
%else |
23 |
%define gn_gold use_gold=false |
24 |
%endif |
25 |
%if %{system_icu} |
26 |
%define gn_icu icu |
27 |
%endif |
28 |
%if %{system_libvpx} |
29 |
%define gn_libvpx libvpx |
30 |
%endif |
31 |
%if %{system_dav1d} |
32 |
%define gn_dav1d dav1d |
33 |
%endif |
34 |
%if %{system_re2} |
35 |
%define gn_re2 re2 |
36 |
%endif |
37 |
%if %{system_fontconfig} |
38 |
%define gn_fontconfig fontconfig |
39 |
%endif |
40 |
%if %{system_freetype} |
41 |
%define gn_freetype use_system_freetype=true |
42 |
%endif |
43 |
%if %{system_libevent} |
44 |
%define gn_libevent libevent |
45 |
%endif |
46 |
%if %{use_clang} |
47 |
%define gn_clang is_clang=true |
48 |
%else |
49 |
%define gn_clang is_clang=false |
50 |
%endif |
51 |
%if %{warnings_as_errors} |
52 |
%else |
53 |
%define gn_warnings_as_errors treat_warnings_as_errors=false |
54 |
%endif |
55 |
|
56 |
%define crname chromium-browser |
57 |
%define _crdir %{_libdir}/%{crname} |
58 |
%define __requires_exclude_from ^%{_crdir}/libwidevinecdmadapter.so$ |
59 |
|
60 |
# eol 'fix' corrupts some .bin |
61 |
%define dont_fix_eol 1 |
62 |
|
63 |
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
64 |
# Note: these are for Mageia use ONLY. |
65 |
# For your own builds, please get your own set of keys. |
66 |
%define google_api_key AIzaSyDhhIHB_kQZodiWr8yDAm8E3GwEyiXmuDU |
67 |
|
68 |
Name: chromium-browser-stable |
69 |
Version: 94.0.4606.71 |
70 |
Release: %mkrel 1 |
71 |
Summary: A fast webkit-based web browser |
72 |
Group: Networking/WWW |
73 |
License: BSD, LGPL |
74 |
URL: http://www.chromium.org/Home |
75 |
# http://omahaproxy.appspot.com/ |
76 |
# http://googlechromereleases.blogspot.com/ |
77 |
Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz |
78 |
Source1: chromium-wrapper |
79 |
Source2: chromium-browser.desktop |
80 |
Source3: pkg_resources.tar.gz |
81 |
# from gentoo: compiler setup |
82 |
Patch1: chromium-compiler-r4.patch |
83 |
# fix googleisms in man page |
84 |
Patch2: chromium-mageia.patch |
85 |
# (ns80) use a patch rather than a source file for widevine |
86 |
Patch3: chromium-71.0.3578.98-widevine-r3.patch |
87 |
# (ns80) remove unrar |
88 |
Patch4: chromium-norar.patch |
89 |
# (cjw) [1/4] Recognize mimetypes for matroska (.mkv) and AVI (.avi) formats (video/x-matroska and audio/x-matroska, video/x-msvideo) + handle A52 "AC3" and DTS compressed audio. |
90 |
Patch6: chromium-55-extra-media.patch |
91 |
# (cjw) [2/4] Recognize mimetypes for WMV (.wmv), FLV (.flv) and MPEG (.mpg) videos |
92 |
Patch7: chromium-40-wmvflvmpg.patch |
93 |
# (cjw) [3/4] Handle more video codecs. |
94 |
Patch8: chromium-40-sorenson-spark.patch |
95 |
# (cjw) [4/4] Add a profile for each added video codec |
96 |
Patch9: chromium-extra-media-video-profiles.patch |
97 |
# (cjw) disable external components -- this stops chromium from downloading hotword stuff, for example |
98 |
Patch10: chromium-45-no-external-components.patch |
99 |
# (debian) disable third party cookies by default |
100 |
Patch11: chromium-third-party-cookies-off-by-default.patch |
101 |
# (cjw) fix build error due to android-specific code |
102 |
Patch19: chromium-50-codec-warnings.patch |
103 |
# (cjw) remove assertion on "chromium" branding in combination with enabled "proprietary codecs" |
104 |
Patch22: chromium-54-proprietary-codecs-assert.patch |
105 |
# (cjw) disable werror for a compilation warning that causes the build to fail |
106 |
Patch23: chromium-53-bignum-werror-fix.patch |
107 |
# (cjw) add -Wno-error=depecated-declarations because ffmpeg deprecations cause the build to fail |
108 |
Patch24: chromium-53-ffmpeg-no-deprecation-errors.patch |
109 |
# (cjw) link several libraries directly instead of loading them using dlopen() |
110 |
Patch27: chromium-53-link-libgio-libpci-libudev-libbrlapi.patch |
111 |
# (cjw) add missing unbundle gn files (1) |
112 |
Patch28: chromium-53-gn-system-icu-jsoncpp.patch |
113 |
# (cjw) add missing unbundle gn files (2) |
114 |
Patch29: chromium-53-gn-system-opus.patch |
115 |
%if %{system_libtiff} |
116 |
# (cjw) build pdfium with system libtiff |
117 |
Patch30: chromium-52-pdfium-system-libtiff-libpng.patch |
118 |
%endif |
119 |
%if %{system_openjpeg} |
120 |
# (cjw) fix pdfium build with system openjpeg |
121 |
Patch31: chromium-74-pdfium-system-libopenjpeg2.patch |
122 |
%endif |
123 |
# (cjw) fix build with current glib... |
124 |
Patch36: chromium-58-glib.patch |
125 |
# (cjw) use system nodejs to fix build |
126 |
Patch37: chromium-58-system-nodejs.patch |
127 |
# (cjw) use system closure compiler |
128 |
Patch38: chromium-72-system-closure-compiler.patch |
129 |
# (cjw) fix build with system icu |
130 |
Patch39: chromium-77-system-icu.patch |
131 |
# (cjw) force use of python2, since python3 does not work |
132 |
Patch40: chromium-77-python2.patch |
133 |
# (cjw) support using system dav1d |
134 |
Patch41: chromium-79-system-dav1d.patch |
135 |
|
136 |
# (cjw) gcc errors: redefined macros |
137 |
Patch80: chromium-gcc-macro-redefined.patch |
138 |
# (cjw) gcc errors: include files |
139 |
Patch81: chromium-gcc-includes.patch |
140 |
# (cjw) gcc warnings: suggested parentheses |
141 |
Patch82: chromium-gcc-parentheses.patch |
142 |
# (cjw) gcc warnings: missing casts |
143 |
Patch84: chromium-gcc-type-errors.patch |
144 |
# (cjw) gcc errors: multiple character literals |
145 |
Patch85: chromium-gcc-character-literals.patch |
146 |
# (cjw) gcc constexpr problems |
147 |
Patch87: chromium-gcc-constexpr.patch |
148 |
# (cjw) gcc anonymous namespace problems |
149 |
Patch88: chromium-gcc-anonymous-namespace.patch |
150 |
# (cjw) gcc noexcept problems |
151 |
Patch89: chromium-gcc-noexcept.patch |
152 |
# (cjw) gcc warnings: variable assigned in own assignment rhs |
153 |
Patch90: chromium-gcc-double-assignment.patch |
154 |
# (cjw) gcc warnings: optional constructs |
155 |
Patch91: chromium-gcc-optional.patch |
156 |
# (cjw) gcc - unclear... |
157 |
Patch93: chromium-gcc-unsorted.patch |
158 |
# (cjw) gcc disabled warnings |
159 |
%if !%{use_clang} |
160 |
Patch94: chromium-gcc-disabled-warnings.patch |
161 |
Patch95: chromium-gcc-va_args.patch |
162 |
%endif |
163 |
# (cjw) gcc warnings: suggest explicit braces to avoid ambiguous else [-Werror=dangling-else] |
164 |
Patch97: chromium-gcc-braces.patch |
165 |
# (cjw) alignment problems |
166 |
Patch188: chromium-68-gcc8.patch |
167 |
# (cjw) fix gn bootstrapping with gcc |
168 |
Patch190: chromium-69-gn-bootstrap.patch |
169 |
# (cjw) gn bootstrap fix |
170 |
Patch195: chromium-72-gn-bootstrap.patch |
171 |
# (cjw) fix i586 build |
172 |
Patch198: chromium-72-i586.patch |
173 |
# (cjw) fix build with system zlib |
174 |
Patch240: chromium-85-system-zlib.patch |
175 |
# (cjw) fix angle-vulkan build with system zlib |
176 |
Patch243: chromium-87-system-zlib.patch |
177 |
# (cjw) fix broken system libvpx build |
178 |
Patch244: chromium-88-system-libvpx.patch |
179 |
# (cjw) fix i586 build |
180 |
#Patch248: chromium-87-i586.patch |
181 |
# (ns80) try to fix mga#28631 |
182 |
Patch250: chromium-89-EnumTable-crash.patch |
183 |
# (cjw) fix build with "old" system freetype |
184 |
Patch254: chromium-94-system-freetype.patch |
185 |
# (cjw) fix build with system ffmpeg |
186 |
Patch255: chromium-94-system-ffmpeg.patch |
187 |
# (cjw) fix crash in DCHECK() while logging metrics |
188 |
Patch256: chromium-94-GetNeverPromptSitesBetween-crash.patch |
189 |
|
190 |
# Patches from Arch Linux |
191 |
#Patch300: chromium-glibc-2.33.patch |
192 |
#Patch301: chromium-fix-libva-redef.patch |
193 |
|
194 |
Provides: %{crname} |
195 |
Obsoletes: chromium-browser-unstable < 26.0.1410.51 |
196 |
Obsoletes: chromium-browser-beta < 26.0.1410.51 |
197 |
Obsoletes: chromium-browser < 1:9.0.597.94 |
198 |
BuildRequires: bison |
199 |
BuildRequires: flex |
200 |
BuildRequires: gperf |
201 |
%if %{system_icu} |
202 |
BuildRequires: icu |
203 |
%endif |
204 |
BuildRequires: ninja |
205 |
BuildRequires: python2 |
206 |
#BuildRequires: yasm |
207 |
BuildRequires: bzip2-devel |
208 |
#BuildRequires: closure-compiler |
209 |
BuildRequires: cups-devel |
210 |
BuildRequires: elfutils-devel |
211 |
BuildRequires: ffmpeg-devel |
212 |
BuildRequires: glib2-devel |
213 |
BuildRequires: gtk3-devel |
214 |
BuildRequires: libatomic-devel |
215 |
%if %{system_libevent} |
216 |
BuildRequires: libevent-devel |
217 |
%endif |
218 |
BuildRequires: libmesagl-devel |
219 |
BuildRequires: libpam-devel |
220 |
BuildRequires: libpulseaudio-devel |
221 |
BuildRequires: mesaglesv2-devel |
222 |
%if %mgaver >= 6 |
223 |
BuildRequires: nodejs |
224 |
%endif |
225 |
BuildRequires: osmesa-devel |
226 |
#BuildRequires: protobuf-devel |
227 |
BuildRequires: snappy-devel |
228 |
BuildRequires: perl(Switch) |
229 |
BuildRequires: pkgconfig(alsa) |
230 |
BuildRequires: pkgconfig(atk) |
231 |
%if %{system_dav1d} |
232 |
BuildRequires: pkgconfig(dav1d) |
233 |
%endif |
234 |
BuildRequires: pkgconfig(dbus-glib-1) |
235 |
BuildRequires: pkgconfig(expat) |
236 |
BuildRequires: pkgconfig(flac) |
237 |
%if %{system_fontconfig} |
238 |
BuildRequires: pkgconfig(fontconfig) |
239 |
%endif |
240 |
BuildRequires: pkgconfig(freetype2) |
241 |
BuildRequires: pkgconfig(gbm) |
242 |
BuildRequires: pkgconfig(glu) |
243 |
BuildRequires: pkgconfig(gnome-keyring-1) |
244 |
BuildRequires: pkgconfig(gnutls) |
245 |
%if %mgaver >= 9 |
246 |
BuildRequires: pkgconfig(harfbuzz) |
247 |
%endif |
248 |
%if %{system_icu} |
249 |
BuildRequires: pkgconfig(icu-i18n) |
250 |
%endif |
251 |
BuildRequires: pkgconfig(jsoncpp) |
252 |
BuildRequires: pkgconfig(libcap) |
253 |
BuildRequires: pkgconfig(libdrm) |
254 |
BuildRequires: pkgconfig(libexif) |
255 |
BuildRequires: pkgconfig(libjpeg) |
256 |
BuildRequires: pkgconfig(libopenjp2) |
257 |
BuildRequires: pkgconfig(libpci) |
258 |
BuildRequires: pkgconfig(libpng) |
259 |
%if %{system_libtiff} |
260 |
BuildRequires: pkgconfig(libtiff-4) |
261 |
%endif |
262 |
BuildRequires: pkgconfig(libusb-1.0) |
263 |
%if %{system_libvpx} |
264 |
BuildRequires: pkgconfig(libvpx) |
265 |
%endif |
266 |
BuildRequires: pkgconfig(libwebp) |
267 |
BuildRequires: pkgconfig(libxml-2.0) |
268 |
BuildRequires: pkgconfig(libxslt) |
269 |
BuildRequires: pkgconfig(minizip) |
270 |
BuildRequires: pkgconfig(nspr) |
271 |
BuildRequires: pkgconfig(nss) |
272 |
BuildRequires: pkgconfig(opus) |
273 |
%if %{system_re2} |
274 |
BuildRequires: pkgconfig(re2) |
275 |
%endif |
276 |
BuildRequires: pkgconfig(speech-dispatcher) |
277 |
BuildRequires: pkgconfig(speex) |
278 |
BuildRequires: pkgconfig(udev) |
279 |
BuildRequires: pkgconfig(xscrnsaver) |
280 |
BuildRequires: pkgconfig(xt) |
281 |
BuildRequires: pkgconfig(xtst) |
282 |
BuildRequires: pkgconfig(zlib) |
283 |
%if %{use_clang} |
284 |
BuildRequires: clang |
285 |
%endif |
286 |
BuildRequires: clang-tools-extra |
287 |
|
288 |
# Unused but building gn wants it to be present |
289 |
BuildRequires: pkgconfig(gconf-2.0) |
290 |
BuildRequires: git |
291 |
ExclusiveArch: i586 x86_64 |
292 |
# aarch64 does not build without fewer than default parallel jobs config |
293 |
# armv5tl armv7hl |
294 |
|
295 |
%description |
296 |
Chromium is a browser that combines a minimal design with sophisticated |
297 |
technology to make the web faster, safer, and easier. |
298 |
|
299 |
For certain media playback features - AAC decoding - this package |
300 |
currently assumes decoder support is available, while that is only true if |
301 |
the 'tainted' variety of the libavcodec package is installed. When the 'core' |
302 |
variety of libavcodec is installed, chromium may output noise for AAC audio. |
303 |
|
304 |
%ifarch %{ix86} |
305 |
The i586 build of this package does not work on machines that do not |
306 |
support the SSE2 instruction set extension. |
307 |
%endif |
308 |
|
309 |
%package -n chromium-browser |
310 |
Summary: A fast webkit-based web browser (transition package) |
311 |
Epoch: 1 |
312 |
Group: Networking/WWW |
313 |
Requires: %{name} = %{version}-%{release} |
314 |
|
315 |
%description -n chromium-browser |
316 |
Chromium is a browser that combines a minimal design with sophisticated |
317 |
technology to make the web faster, safer, and easier. |
318 |
|
319 |
This is a transition package that installs the stable channel Chromium |
320 |
browser. |
321 |
|
322 |
%prep |
323 |
%setup -q -n chromium-%{version} |
324 |
%autopatch -p1 |
325 |
|
326 |
# files we do not want from upstream source bundles |
327 |
rm -r --interactive=never third_party/breakpad/breakpad/src/processor/testdata/ |
328 |
rm -r --interactive=never third_party/breakpad/breakpad/src/tools |
329 |
rm -r --interactive=never chrome/test/data/{android,app_shim,apptest,ash,autofill,automation,automation_proxy_snapshot,banners,bookmark_html_reader,bookmarks,captive_portal,chromedriver,chrome_endure,chromeos,click_modifier,components,constrained_files,content,content_setting_bubble,devtools,diagnostics,dom_automation,dom_checker,dom_distiller,downloads,drive_first_run,dromaeo,durable,edge_database_reader,edge_profile,encoding_tests,extensions,fast_shutdown,fast_tab_close,favicon,feeds,file_select_helper,find_in_page,focus,frame_dom_access,frame_tree,ftp,fullscreen_mouselock,geolocation,google,gpu,History,image_decoding,image_search,import,indexeddb,inspector,installer,interstitial_page,login,native_messaging,navigation_interception,notifications,page_cycler,page_load_metrics,password,pepper,perf,permissions,plugin_power_saver,policy,popup_blocker,predictor,prefs,pref_service,prerender,printing,profiles,push_messaging,referrer_policy,safe_browsing,save_page,scroll,session_history,session_restore,sessions,settings,speech,ssl,sunspider,sync,template_url_scraper,textinput,third_party,top_sites,translate,unit,viewsource,web_app_info,webrtc,websocket,webui_test_resources.grd,workers} |
330 |
rm -r --interactive=never chrome/test/data/nacl/{pnacl_error_handling,cross_origin,irt_exception,pnacl_request_header,nonsfi,pnacl_url_loader,pnacl_hw_eh_disabled,pnacl_nmf_options,pnacl_dyncode_syscall_disabled,extension_mime_handler,ppapi_test_lib,bad,ppapi,manifest,pnacl_debug_url,extension_validation_cache,exit_status,progress_events,manifest_file,sysconf_nprocessors_onln,crash} |
331 |
rmdir chrome/test/data/webui/{settings,extensions}/a11y |
332 |
rmdir chrome/test/data/webui/settings/chromeos/app_management |
333 |
rmdir chrome/test/data/webui/{engagement,extensions,history} |
334 |
rm -r --interactive=never components/test/data/update_client/jebgalgnebhfojomionfpkfelancnnkf/component1.dll |
335 |
rm -r --interactive=never content/test/data/ |
336 |
rm -r --interactive=never ppapi/native_client/tests/ |
337 |
rm -r --interactive=never third_party/apache-win32/ |
338 |
rm -r --interactive=never third_party/expat/{fuzz,include,src} |
339 |
%if %{system_freetype} |
340 |
rm -r --interactive=never third_party/freetype/{include,src} |
341 |
%endif |
342 |
rm -r --interactive=never third_party/ffmpeg/*/* |
343 |
rm -r --interactive=never third_party/flac/{include,src} |
344 |
%if %{system_icu} |
345 |
rm -r --interactive=never third_party/icu/{android,android_small,common,patches,source,chromeos,ios} |
346 |
%endif |
347 |
rm -r --interactive=never third_party/jsoncpp/source |
348 |
rm -r --interactive=never third_party/lcov |
349 |
%if %{system_libevent} |
350 |
rm -r --interactive=never base/third_party/libevent/*/* |
351 |
rm -r --interactive=never base/third_party/libevent/*.[ch] |
352 |
%endif |
353 |
%if %{system_libvpx} |
354 |
rm -r --interactive=never third_party/libvpx/source/{libvpx,config} |
355 |
%endif |
356 |
rm -r --interactive=never third_party/libaom/source |
357 |
%if %{system_dav1d} |
358 |
rm -r --interactive=never third_party/dav1d/{libdav1d,version} |
359 |
%endif |
360 |
rm -r --interactive=never third_party/libjpeg_turbo/*.[ch] |
361 |
rm -r --interactive=never third_party/libpng/*.[ch] |
362 |
rm -r --interactive=never third_party/libxslt/{linux,mac,src,win32} |
363 |
rm -r --interactive=never third_party/xdg-utils/tests/ |
364 |
rm -r --interactive=never third_party/zlib/{*.[ch],contrib/minizip} |
365 |
rm -r --interactive=never native_client_sdk/src/tools/lib/tests/data |
366 |
rm -r --interactive=never buildtools/third_party/eu-strip/bin |
367 |
rm --interactive=never third_party/pdfium/third_party/libopenjpeg20/*.[ch] |
368 |
rm -r --interactive=never third_party/pdfium/third_party/libpng16 |
369 |
%if %{system_libtiff} |
370 |
rm --interactive=never third_party/pdfium/third_party/libtiff/*.[ch] |
371 |
%endif |
372 |
%if %{system_re2} |
373 |
rm -r --interactive=never third_party/re2/src |
374 |
%endif |
375 |
%if %{system_fontconfig} |
376 |
rm -r --interactive=never third_party/fontconfig/{src,include,chromium} |
377 |
%endif |
378 |
rm --interactive=never native_client/tools/redirector.exe |
379 |
rm --interactive=never third_party/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe |
380 |
rm -r --interactive=never third_party/llvm |
381 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-Gerbera.exe |
382 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-PVRSDK.exe |
383 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/libGLES_CM.dll |
384 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/bob/bob |
385 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/glut/SanOGLES |
386 |
rm --interactive=never third_party/lzma_sdk/Executable/7za.exe |
387 |
rm --interactive=never third_party/lzma_sdk/7zr.exe |
388 |
rm --interactive=never third_party/breakpad/symupload.exe |
389 |
rm -r --interactive=never third_party/catapult/third_party/google-endpoints/setuptools |
390 |
rm -r --interactive=never third_party/catapult/third_party/vinn/third_party/v8 |
391 |
rm --interactive=never third_party/depot_tools/ninja.exe |
392 |
rm --interactive=never third_party/depot_tools/ninja-linux32 |
393 |
rm --interactive=never third_party/depot_tools/ninja-linux64 |
394 |
rm -r --interactive=never native_client/tools/hermetic_cygwin |
395 |
rm -r --interactive=never base/test/data/pe_image/ |
396 |
rm -r --interactive=never base/test/data/file_version_info_unittest |
397 |
rm -r --interactive=never chrome/chrome_cleaner/test/resources/signed_dll |
398 |
rm --interactive=never third_party/crashpad/crashpad/handler/win/z7_test.dll |
399 |
rm -r --interactive=never third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer_corpus |
400 |
rm -r --interactive=never third_party/boringssl/src/util/ar/testdata |
401 |
rm -r --interactive=never third_party/pyelftools/test/testfiles_for_unittests |
402 |
rm -r --interactive=never third_party/pyelftools/test/external_tools |
403 |
rm -r --interactive=never third_party/pyelftools/test/testfiles_for_readelf |
404 |
rm -r --interactive=never third_party/pyelftools/examples |
405 |
rm -r --interactive=never third_party/skia/platform_tools/android/bin |
406 |
rm --interactive=never third_party/nasm/travis/test/tmap.o.t |
407 |
rm -r --interactive=never components/test/data/update_client |
408 |
rm -r --interactive=never build/android/tests/symbolize |
409 |
|
410 |
rm --interactive=never third_party/skia/platform_tools/android/apps/gradle/wrapper/gradle-wrapper.jar |
411 |
rm --interactive=never third_party/libphonenumber/dist/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar |
412 |
rm --interactive=never third_party/libphonenumber/dist/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar |
413 |
rm -r --interactive=never third_party/libphonenumber/dist/java/demo/war/WEB-INF/lib |
414 |
rm -r --interactive=never third_party/libphonenumber/dist/java/lib |
415 |
rm --interactive=never third_party/webrtc/examples/androidapp/third_party/autobanh/lib/autobanh.jar |
416 |
rm --interactive=never third_party/closure_compiler/compiler/compiler.jar |
417 |
rm --interactive=never third_party/flatbuffers/src/android/gradle/wrapper/gradle-wrapper.jar |
418 |
rm --interactive=never third_party/flatbuffers/src/kotlin/gradle/wrapper/gradle-wrapper.jar |
419 |
rm --interactive=never third_party/gradle_wrapper/gradle/wrapper/gradle-wrapper.jar |
420 |
rm --interactive=never third_party/webgl/src/conformance-suites/2.0.0/deqp/compiler.jar |
421 |
rm --interactive=never third_party/grpc/src/examples/android/helloworld/gradle/wrapper/gradle-wrapper.jar |
422 |
rm --interactive=never third_party/grpc/src/src/android/test/interop/gradle/wrapper/gradle-wrapper.jar |
423 |
rm --interactive=never third_party/tflite/src/tensorflow/lite/java/ovic/demo/gradle/wrapper/gradle-wrapper.jar |
424 |
rm --interactive=never third_party/tflite/src/tensorflow/lite/java/demo/gradle/wrapper/gradle-wrapper.jar |
425 |
rm --interactive=never third_party/tflite/src/tensorflow/examples/android/gradle/wrapper/gradle-wrapper.jar |
426 |
rm --interactive=never third_party/checkstyle/checkstyle-all.jar |
427 |
rm --interactive=never build/android/stacktrace/java_deobfuscate.jar |
428 |
|
429 |
%if %{system_libevent} |
430 |
find base/third_party/libevent -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete |
431 |
%endif |
432 |
|
433 |
%if %{system_icu} |
434 |
# Remove bundled ICU; its header files appear to get picked up instead of |
435 |
# the system ones, leading to errors during the final link stage. |
436 |
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q |
437 |
find third_party/icu -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete |
438 |
%endif |
439 |
|
440 |
# Hard code extra version |
441 |
FILE=chrome/common/channel_info_posix.cc |
442 |
sed -i.orig -r -e 's/env = getenv\("CHROME_VERSION_EXTRA"\).*;/env = "%{product_vendor} %{product_version}";/' -e 's/return env \? (.*) : .*;/return \1;/' $FILE |
443 |
if diff -u $FILE $FILE.orig >/dev/null; then |
444 |
exit 1 |
445 |
fi |
446 |
|
447 |
# version taken from: strings opt/google/chrome-unstable/chrome | grep -C 1 " (version:" |
448 |
#define widevine_version 1.4.8.1008 |
449 |
#for chrome_arch in ia32 x64; do |
450 |
# mkdir -p third_party/widevine/cdm/linux/${chrome_arch} |
451 |
# sed -e "s/@WIDEVINE_VERSION@/%{widevine_version}/" %{SOURCE4} > third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h |
452 |
#done |
453 |
|
454 |
%build |
455 |
%define unbundle_list ffmpeg flac %{?gn_fontconfig} libwebp libxml libxslt snappy %{?gn_libvpx} libpng %{?gn_icu} zlib jsoncpp opus %{?gn_re2} libdrm %{?gn_dav1d} %{?gn_libevent} |
456 |
# handled by upstream regular build scripts: freetype harfbuzz-ng |
457 |
# mesa |
458 |
|
459 |
# v NO TABS IN HERE! |
460 |
%define gn_config use_sysroot=false \ |
461 |
system_libdir="%{_lib}" \ |
462 |
icu_use_data_file=true \ |
463 |
enable_nacl=false \ |
464 |
is_nacl_glibc=false \ |
465 |
linux_use_bundled_binutils=false \ |
466 |
custom_toolchain="//build/toolchain/linux/unbundle:default" \ |
467 |
host_toolchain="//build/toolchain/linux/unbundle:default" \ |
468 |
proprietary_codecs=true \ |
469 |
linux_link_libudev = true \ |
470 |
linux_link_libspeechd = true \ |
471 |
linux_link_libbrlapi = true \ |
472 |
linux_link_xlib = true \ |
473 |
enable_platform_ac3_eac3_audio = true \ |
474 |
enable_mse_mpeg2ts_stream_parser=true \ |
475 |
enable_platform_hevc=true \ |
476 |
use_system_libjpeg=true \ |
477 |
use_system_libopenjpeg2=true \ |
478 |
use_libjpeg_turbo=false \ |
479 |
enable_widevine=true \ |
480 |
pdf_enable_xfa=true \ |
481 |
gtk_version=3 \ |
482 |
fatal_linker_warnings=false \ |
483 |
use_libpci = true \ |
484 |
use_pulseaudio=true \ |
485 |
use_allocator="none" \ |
486 |
is_debug=false \ |
487 |
%{?gn_clang} \ |
488 |
clang_use_chrome_plugins=false \ |
489 |
use_lld=false \ |
490 |
%{?gn_gold} \ |
491 |
%{?gn_freetype} \ |
492 |
use_system_harfbuzz=false \ |
493 |
use_system_libpng=true \ |
494 |
enable_dav1d_decoder=true enable_libaom=false \ |
495 |
use_custom_libcxx=false \ |
496 |
enable_mojom_closure_compile=false \ |
497 |
enable_js_type_check=false \ |
498 |
dcheck_always_on=false \ |
499 |
%{?gn_warnings_as_errors} \ |
500 |
google_api_key="%{google_api_key}" |
501 |
|
502 |
|
503 |
# enable_browser_cdms=true \ |
504 |
|
505 |
build/linux/unbundle/replace_gn_files.py --system-libraries %{unbundle_list} |
506 |
third_party/libaddressinput/chromium/tools/update-strings.py |
507 |
|
508 |
%set_build_flags |
509 |
%if %{use_clang} |
510 |
CC=clang; export CC |
511 |
CXX=clang++; export CXX |
512 |
%else |
513 |
CC=%{__cc}; export CC |
514 |
CXX=%{__cxx}; export CXX |
515 |
%endif |
516 |
AR=%{__ar}; export AR |
517 |
NM=%{_bindir}/nm; export NM |
518 |
LD="%{__cxx}"; export LD |
519 |
%if %{use_gold} |
520 |
LD="$LD -fuse-ld=gold" |
521 |
%endif |
522 |
|
523 |
# filter out -g from CFLAGS and CXXFLAGS to fix builds |
524 |
%if %{_enable_debug_packages} |
525 |
%else |
526 |
CFLAGS=$(echo "$CFLAGS"|sed -e 's/-g //') |
527 |
CXXFLAGS=$(echo "$CXXFLAGS"|sed -e 's/-g //') |
528 |
%endif |
529 |
CXXFLAGS="$CXXFLAGS -faligned-new -Wno-attributes -Wno-ignored-attributes" |
530 |
%if %{use_clang} |
531 |
CFLAGS="$CFLAGS -Wno-error=unused-result" |
532 |
CXXFLAGS="$CXXFLAGS -Wno-error=deprecated-declarations -Wno-error=deprecated-copy -Wno-error=psabi -Wno-error=implicit-const-int-float-conversion -Wno-error=non-c-typedef-for-linkage -Wno-error=unused-const-variable" |
533 |
%else |
534 |
CXXFLAGS="$CXXFLAGS -Wno-error=class-memaccess -Wno-error=unknown-pragmas -Wno-error=array-bounds -Wno-return-type -Wno-error=nonnull -Wno-error=free-nonheap-object -Wno-error=unused -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=invalid-offsetof -Wno-error=stringop-overflow -std=gnu++17" |
535 |
%endif |
536 |
%if %{use_gold} |
537 |
%ifarch %ix86 |
538 |
LDFLAGS="$LDFLAGS -Wl,--no-keep-files-mapped" |
539 |
%endif |
540 |
%else |
541 |
LDFLAGS="$LDFLAGS -fno-use-linker-plugin" |
542 |
%endif |
543 |
|
544 |
# for debugging: |
545 |
%if %{_enable_debug_packages} |
546 |
CFLAGS="$(echo $CFLAGS|sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-D_FORTIFY_SOURCE=2//') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -gdwarf64" |
547 |
CXXFLAGS="$(echo $CXXFLAGS|sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-D_FORTIFY_SOURCE=2//') -Og -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -Wno-error=return-type -gdwarf64" |
548 |
%endif |
549 |
|
550 |
%ifarch %{ix86} |
551 |
CFLAGS="$CFLAGS -msse2" |
552 |
CXXFLAGS="$CXXFLAGS -msse2" |
553 |
%endif |
554 |
|
555 |
python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}' |
556 |
|
557 |
out/Release/gn gen --args='%{gn_config}' out/Release |
558 |
|
559 |
# python... |
560 |
mkdir out/Release/python2_root |
561 |
cp -r %{python3_sitelib}/xcbgen out/Release/python2_root/ |
562 |
cp -r %{python3_sitelib}/setuptools out/Release/python2_root/ |
563 |
pushd out/Release/python2_root/ |
564 |
tar xf %{SOURCE3} |
565 |
popd |
566 |
|
567 |
%if !%{use_gold} |
568 |
# ld.bfd needs lots of file descriptors to link chrome |
569 |
ulimit -n 4096 |
570 |
%endif |
571 |
|
572 |
pushd out/Release |
573 |
JOBS=$(echo %{_smp_mflags}|sed -re 's#^-j##') |
574 |
if [ $JOBS -gt 16 ]; then |
575 |
JOBS=16 |
576 |
fi |
577 |
env PYTHONPATH=${PWD}/python2_root ninja -j${JOBS} chrome chrome_sandbox |
578 |
popd |
579 |
|
580 |
# man page |
581 |
sed -e "s/@@PACKAGE@@/chromium/" -e "s/@@MENUNAME@@/Chromium Web Browser/" chrome/app/resources/manpage.1.in >out/Release/chromium.1 |
582 |
|
583 |
%install |
584 |
ls out/Release |
585 |
mkdir -p %{buildroot}%{_bindir} |
586 |
mkdir -p %{buildroot}%{_crdir}/locales |
587 |
mkdir -p %{buildroot}%{_crdir}/themes |
588 |
mkdir -p %{buildroot}%{_crdir}/MEIPreload |
589 |
mkdir -p %{buildroot}%{_mandir}/man1 |
590 |
install -m 755 %{_sourcedir}/chromium-wrapper %{buildroot}%{_crdir}/ |
591 |
install -m 755 out/Release/chrome %{buildroot}%{_crdir}/ |
592 |
install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox |
593 |
install -m 644 out/Release/chromium.1 %{buildroot}%{_mandir}/man1/%{crname}.1 |
594 |
install -m 644 out/Release/chrome_100_percent.pak %{buildroot}%{_crdir}/ |
595 |
install -m 644 out/Release/chrome_200_percent.pak %{buildroot}%{_crdir}/ |
596 |
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/ |
597 |
install -m 644 out/Release/snapshot_blob.bin %{buildroot}%{_crdir}/ |
598 |
install -m 755 out/Release/mksnapshot %{buildroot}%{_crdir}/ |
599 |
install -m 755 out/Release/chrome_crashpad_handler %{buildroot}%{_crdir}/ |
600 |
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/ |
601 |
install -m 644 out/Release/v8_context_snapshot.bin %{buildroot}%{_crdir}/ |
602 |
install -m 755 out/Release/libEGL.so %{buildroot}%{_crdir}/ |
603 |
install -m 755 out/Release/libGLESv2.so %{buildroot}%{_crdir}/ |
604 |
install -m 644 out/Release/MEIPreload/* %{buildroot}%{_crdir}/MEIPreload/ |
605 |
ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname} |
606 |
|
607 |
%ifarch %{ix86} x86_64 |
608 |
mkdir -p %{buildroot}%{_crdir}/swiftshader |
609 |
install -m 755 out/Release/swiftshader/*.so %{buildroot}%{_crdir}/swiftshader/ |
610 |
%endif |
611 |
|
612 |
find out/Release/resources/ -name "*.d" -exec rm {} \; |
613 |
cp -r out/Release/resources %{buildroot}%{_crdir} |
614 |
|
615 |
# desktop file |
616 |
mkdir -p %{buildroot}%{_datadir}/applications |
617 |
install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/ |
618 |
|
619 |
%if %{system_icu} |
620 |
# symlink to ICU data file |
621 |
ICUDATADIR=$(icuinfo | grep \"icudata.path\" | sed -re 's/^.*>(.*)<.*$/\1/') |
622 |
ICUDATANAME=$(icuinfo | grep \"icudata.name\" | sed -re 's/^.*>(.*)<.*$/\1/') |
623 |
ICUDATAFILE=$(realpath --relative-to=%{_crdir}/ ${ICUDATADIR}/${ICUDATANAME}.dat) |
624 |
ln -s ${ICUDATAFILE} %{buildroot}%{_crdir}/icudtl.dat |
625 |
%else |
626 |
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/ |
627 |
%endif |
628 |
|
629 |
# icon |
630 |
for i in 22_mono 24 32 48 64 128 256; do |
631 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
632 |
if [ -f chrome/app/theme/chromium/product_logo_$i.png ]; then |
633 |
install -m 644 chrome/app/theme/chromium/product_logo_$i.png \ |
634 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
635 |
else |
636 |
install -m 644 chrome/app/theme/chromium/linux/product_logo_$i.xpm \ |
637 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.xpm |
638 |
fi |
639 |
done |
640 |
|
641 |
%files -n chromium-browser |
642 |
|
643 |
%files |
644 |
%{_bindir}/%{crname} |
645 |
%dir %{_crdir} |
646 |
%{_crdir}/chromium-wrapper |
647 |
%{_crdir}/chrome |
648 |
%attr(4755,root,root) %{_crdir}/chrome-sandbox |
649 |
%{_crdir}/icudtl.dat |
650 |
%{_crdir}/locales |
651 |
%{_crdir}/snapshot_blob.bin |
652 |
%{_crdir}/v8_context_snapshot.bin |
653 |
%{_crdir}/resources.pak |
654 |
%{_crdir}/resources |
655 |
%{_crdir}/chrome_100_percent.pak |
656 |
%{_crdir}/chrome_200_percent.pak |
657 |
%{_crdir}/mksnapshot |
658 |
%{_crdir}/chrome_crashpad_handler |
659 |
%{_crdir}/themes |
660 |
%{_crdir}/libEGL.so |
661 |
%{_crdir}/libGLESv2.so |
662 |
%ifarch %{ix86} x86_64 |
663 |
%{_crdir}/swiftshader |
664 |
%endif |
665 |
%{_mandir}/man1/%{crname}* |
666 |
%{_datadir}/applications/*.desktop |
667 |
%{_iconsdir}/hicolor/*/apps/%{crname}.png |
668 |
%{_iconsdir}/hicolor/*/apps/%{crname}.xpm |
669 |
%{_crdir}/MEIPreload |