/[packages]/updates/8/chromium-browser-stable/current/SPECS/chromium-browser-stable.spec
ViewVC logotype

Contents of /updates/8/chromium-browser-stable/current/SPECS/chromium-browser-stable.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1932201 - (show annotations) (download)
Tue Jan 10 21:49:46 2023 UTC (15 months, 1 week ago) by squidf
File size: 35811 byte(s)
- Update to 109.0.5414.74 (mga#31389)
- Update esbuild to 0.16.4
- Update patches

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_gold 0
7
8 #squidf:WARNING: building with gcc is broken from chromium version 98. Too heavy workload to update patches and find new ones.
9 # Actually, only clang is supported by Chromium dev.
10 %global use_clang 1
11
12 #squidf: MGA version dependent flags
13 #squidf: MGA8 icu verson is deprecated
14 %global system_icu 0
15 #squidf: harfbuzz >= 3 required
16 %global system_harfbuzz 0
17 %global system_ffmpeg 1
18 #squidf: use vaapi from the system
19 %global use_vaapi 1
20 %global system_openjpeg 1
21 %global system_libtiff 1
22 %global system_libvpx 0
23 #squidf: deprecated dav1d version since chromium 98_ It still works for Cauldron/MGA9
24 %global system_dav1d 0
25 %global system_re2 1
26 %global system_fontconfig 1
27 %global system_freetype 1
28 # system libevent causes the renderer to get stuck
29 %global system_libevent 0
30
31 #squidf:build error with chromium 97 even for MGA9
32 %global warnings_as_errors 0
33
34 %if %{use_gold}
35 %define gn_gold use_gold=true
36 %else
37 %define gn_gold use_gold=false
38 %endif
39 %if %{system_icu}
40 %define bdl_icu icu
41 #squidf: icu_use_data_file needs to be adjusted accordingly
42 %define gn_icu icu_use_data_file=false
43 %else
44 %define gn_icu icu_use_data_file=true
45 %endif
46 %if %{system_libvpx}
47 %define gn_libvpx libvpx
48 %endif
49 %if %{system_dav1d}
50 %define gn_dav1d dav1d
51 %endif
52 %if %{system_re2}
53 %define gn_re2 re2
54 %endif
55 %if %{system_fontconfig}
56 %define gn_fontconfig fontconfig
57 %endif
58 %if %{system_freetype}
59 %define gn_freetype use_system_freetype=true
60 %define bdl_freetype freetype
61 %endif
62 %if %{system_libevent}
63 %define gn_libevent libevent
64 %endif
65 %if %{system_ffmpeg}
66 %define bdl_ffmpeg ffmpeg
67 %endif
68 %if %{use_vaapi}
69 %define gn_vaapi use_vaapi=true
70 %else
71 %define gn_vaapi use_vaapi=false
72 %endif
73 %if %{use_clang}
74 %define gn_clang is_clang=true
75 %define gn_lld use_lld=true
76 %else
77 %define gn_clang is_clang=false
78 %define gn_lld use_lld=false
79 %endif
80 %if %{warnings_as_errors}
81 #squidf: added as above for consistency
82 %define gn_warnings_as_errors treat_warnings_as_errors=true
83 %else
84 %define gn_warnings_as_errors treat_warnings_as_errors=false
85 %endif
86 #squidf:test added here to be independant of Mageia version
87 %if %{system_harfbuzz}
88 %define gn_harfbuzz use_system_harfbuzz=true
89 %define bdl_harfbuzz harfbuzz-ng
90 %else
91 %define gn_harfbuzz use_system_harfbuzz=false
92 %endif
93
94 %define crname chromium-browser
95 %define _crdir %{_libdir}/%{crname}
96 %define __requires_exclude_from ^%{_crdir}/libwidevinecdmadapter.so$
97
98 # eol 'fix' corrupts some .bin
99 %define dont_fix_eol 1
100
101 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
102 # Note: these are for Mageia use ONLY.
103 # For your own builds, please get your own set of keys.
104 %define google_api_key AIzaSyDhhIHB_kQZodiWr8yDAm8E3GwEyiXmuDU
105
106 #squidf: to better track esbuild version
107 # check chromium version in third_party/devtools-frontend/src/DEPS
108 # https://github.com/evanw/esbuild
109 %define esb_ver 0.16.4
110
111 Name: chromium-browser-stable
112 Version: 109.0.5414.74
113 Release: %mkrel 1
114 Summary: A fast webkit-based web browser
115 Group: Networking/WWW
116 License: BSD and LGPLv2+
117 URL: https://www.chromium.org/Home
118 # https://omahaproxy.appspot.com/
119 # https://googlechromereleases.blogspot.com/
120 Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz
121 Source1: chromium-wrapper
122 Source2: chromium-browser.desktop
123 #squidf: to get esbuild from https://github.com/evanw/esbuild with vendor
124 Source3: gen_esbuild_vendor.sh
125 Source4: esbuild-%{esb_ver}.tar.xz
126 #squidf: Applications preferences at startup
127 Source13: master_preferences
128
129 # fix googleisms in man page
130 Patch2: chromium-mageia.patch
131 # (ns80) use a patch rather than a source file for widevine
132 Patch3: chromium-71.0.3578.98-widevine-r3.patch
133 # (ns80) remove unrar
134 #squidf: update for 108_
135 Patch4: chromium-108-norar.patch
136 # (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.
137 # (cjw) [2/4] Recognize mimetypes for WMV (.wmv), FLV (.flv) and MPEG (.mpg) videos
138 # (cjw) [3/4] Handle more video codecs.
139 #squidf: update for 103_ - Merge wmvflvmpg.patch sorenson-spark.patch sorenson-spark.patch into extra-media.patch
140 # Better visibility of the maze
141 # Fix obvious misses but cannot warrant all expected codec support works
142 Patch6: chromium-107-extra-media.patch
143 # (cjw) disable external components -- this stops chromium from downloading hotword stuff, for example
144 #squidf: update for 103_ and simplified
145 Patch10: chromium-103-no-external-components.patch
146 # (cjw) remove assertion on "chromium" branding in combination with enabled "proprietary codecs"
147 Patch22: chromium-106-proprietary-codecs-assert.patch
148 # (cjw) link several libraries directly instead of loading them using dlopen()
149 Patch27: chromium-53-link-libgio-libpci-libudev-libbrlapi.patch
150 # (cjw) add missing unbundle gn files (2)
151 Patch29: chromium-53-gn-system-opus.patch
152 # (cjw) build pdfium with system libtiff
153 Patch30: chromium-99-pdfium-system-libtiff-libpng.patch
154 # (cjw) fix pdfium build with system openjpeg
155 Patch31: chromium-100-pdfium-system-libopenjpeg2.patch
156 # (cjw) fix build with current glib...
157 Patch36: chromium-58-glib.patch
158 # (cjw) use system nodejs to fix build
159 Patch37: chromium-98-system-nodejs.patch
160 # (cjw) use system closure compiler
161 Patch38: chromium-97-system-closure-compiler.patch
162 # (cjw) fix build with system icu
163 Patch39: chromium-103-system-icu.patch
164 # (cjw) gcc errors: include files
165 #squidf: Required with clang as well
166 Patch81: chromium-105-gcc-includes.patch
167 # (cjw) gcc warnings: missing casts
168 #squidf: Required for MGA9 even using clang. MGA8 manages without.
169 Patch84: chromium-108-gcc-type-errors.patch
170 # (cjw) fix gn bootstrapping with gcc. Kept with clang to stay safe.
171 #squidf: grouped 69 and 72 versions
172 Patch190: chromium-98-gn-bootstrap.patch
173 # (cjw) fix i586 build
174 Patch198: chromium-72-i586.patch
175 #squidf: grouped system zlib patches 85, 87 and 96, including angle-vulkan fix
176 Patch240: chromium-106-system-zlib.patch
177 # (cjw) fix broken system libvpx build
178 Patch244: chromium-88-system-libvpx.patch
179 # (cjw) fix build with system ffmpeg
180 #squidf: 100_: for ffmpeg5, adjust system-ffmpeg patch to test ffmpeg version, based on openSUSE
181 Patch255: chromium-100-system-ffmpeg-4.4.patch
182
183 #squidf: for clang <12
184 Patch258: chromium-107-clang-nomerge.patch
185 #squidf: MGA8 specific to use clang11 instead of clang13 (unknown option -ffile-compilation-dir)
186 #squidf: merged with former compiler-r4.patch from gentoo
187 #squidf: update for 105_ use https://github.com/stha09/chromium-patches version for easier maintenance
188 Patch259: chromium-109-compiler.patch
189 #squidf:geentoo patch to pass sandbox/linux/services/credentials.cc:103:16: error: variable-sized object may not be initialized
190 # https://bugs.gentoo.org/823857
191 Patch261: chromium-100-clang-variable-size-object.patch
192 #squidf: fix clang++: error: unknown argument: '-gsimple-template-names'
193 Patch262: chromium-109-fix-unknown-simple-template-names.patch
194
195 #squidf:additional patch for vaapi (mainly from rpmfusion/freeworld)
196 #squidf: update for 100_: deprecated patch for media/gpu/chromeos/video_decoder_pipeline.cc
197 Patch280: chromium-100-vaapi-libdrm.patch
198 Patch281: chromium-98-fix-vaapi-on-intel.patch
199
200 #squidf: additional patch
201 #squidf: From Arch linux: build error: media/filters/ffmpeg_demuxer.cc:1599:9: error: use of undeclared identifier 'av_stream_get_first_dts'
202 Patch300: chromium-97-ffmpeg-av_stream_get_first_dts.patch
203 #squidf: build error: math_extras.h:130:18: error: constexpr function never produces a constant expression
204 Patch301: chromium-98-constexpr-compiler.patch
205 #squidf: 2 patches from openSUSE tumbleweed
206 Patch304: chromium-98-sql-standard-layout-type.patch
207 Patch305: chromium-94-sql-no-assert.patch
208 #squidf: from openSUSE tumbleweed to unbundle fully libdrm
209 Patch306: chromium-109-system-libdrm.patch
210 #squidf: update for 99_
211 Patch307: chromium-99-wayland-egl.patch
212 #squidf: 102_: additional build fix for i586
213 Patch310: chromium-105-fix-i586-build.patch
214 #squidf: 102_: fix no member named 'ch_layout' in 'AVCodecContext' and 'AVframe'
215 # revert commit https://crrev.com/6e554a30893150793c2638e3689cf208ffc8e375
216 # to be applied after patch6 which does include ffmpge_common.cc changes
217 Patch312: chromium-103-revert-ffmpeg-ch_layout.patch
218 #squidf: 102: fix fatal error: instantiating fold expression with 303 arguments exceeded expression nesting limit of 256
219 # from https://github.com/stha09/chromium-patches
220 Patch313: chromium-102-regex_pattern-array.patch
221 #squidf: 106_ fix task_features.cc: implicit instantiation of undefined template 'std::atomic<base::TimeDelta>'
222 #squidf: 106_ fix audio_file_reader.cc: no member named 'duration' in 'AVFrame'
223 Patch315: chromium-106-include-AVFrame.patch
224 #squidf: 105_ fix quic_time.h:260:34: error: constexpr function never produces a constant expression
225 Patch316: chromium-106-constexpr-quic.patch
226 #squidf: 106_ fix argument_spec.cc: no member named 'isnan' in namespace 'std'
227 Patch318: chromium-106-include-std-namespace.patch
228 #squid: 106_ fix color.cc: non-constexpr function 'round' cannot be used in a constant expression
229 #squidf: allow system clang version
230 Patch320: chromium-107-remove-clang-version-test.patch
231 #squidf: fix build error for 107_
232 Patch321: chromium-107-std-tensorflow-abs.patch
233 #squidf: fix build error for 109_
234 Patch322: chromium-109-constexpr-affine_transform.patch
235
236 Provides: %{crname}
237 Obsoletes: chromium-browser-unstable < 26.0.1410.51
238 Obsoletes: chromium-browser-beta < 26.0.1410.51
239 Obsoletes: chromium-browser < 1:9.0.597.94
240 BuildRequires: bison
241 BuildRequires: flex
242 #squidf: add golang to build esbuild from source
243 BuildRequires: golang
244 BuildRequires: gperf
245 %if %{system_icu}
246 BuildRequires: icu
247 %endif
248 BuildRequires: ninja
249 #squidf: move to Python3:
250 BuildRequires: python3
251 BuildRequires: python3-devel
252 BuildRequires: python3-beautifulsoup4
253 BuildRequires: python3-html5lib
254 BuildRequires: python3-markupsafe
255 BuildRequires: python3-ply
256 BuildRequires: python3-simplejson
257 #BuildRequires: yasm
258 BuildRequires: bzip2-devel
259 #BuildRequires: closure-compiler
260 BuildRequires: cups-devel
261 BuildRequires: elfutils-devel
262 BuildRequires: ffmpeg-devel
263 BuildRequires: glib2-devel
264 BuildRequires: gtk3-devel
265 BuildRequires: libatomic-devel
266 %if %{system_libevent}
267 BuildRequires: libevent-devel
268 %endif
269 BuildRequires: libmesagl-devel
270 BuildRequires: libpam-devel
271 BuildRequires: libpulseaudio-devel
272 BuildRequires: mesaglesv2-devel
273
274 BuildRequires: nodejs
275
276 BuildRequires: osmesa-devel
277 #BuildRequires: protobuf-devel
278 BuildRequires: snappy-devel
279 BuildRequires: perl(Switch)
280 BuildRequires: pkgconfig(alsa)
281 BuildRequires: pkgconfig(atk)
282 %if %{system_dav1d}
283 BuildRequires: pkgconfig(dav1d)
284 %endif
285 BuildRequires: pkgconfig(dbus-glib-1)
286 BuildRequires: pkgconfig(expat)
287 BuildRequires: pkgconfig(flac)
288 %if %{system_fontconfig}
289 BuildRequires: pkgconfig(fontconfig)
290 %endif
291 BuildRequires: pkgconfig(freetype2)
292 BuildRequires: pkgconfig(gbm)
293 BuildRequires: pkgconfig(glu)
294 BuildRequires: pkgconfig(gnome-keyring-1)
295 BuildRequires: pkgconfig(gnutls)
296 #squidf:test not based on Mageia version anymore
297 %if %{system_harfbuzz}
298 BuildRequires: pkgconfig(harfbuzz)
299 %endif
300 %if %{system_icu}
301 BuildRequires: pkgconfig(icu-i18n)
302 %endif
303 BuildRequires: pkgconfig(jsoncpp)
304 BuildRequires: pkgconfig(libcap)
305 BuildRequires: pkgconfig(libdrm)
306 BuildRequires: pkgconfig(libexif)
307 BuildRequires: pkgconfig(libjpeg)
308 BuildRequires: pkgconfig(libopenjp2)
309 BuildRequires: pkgconfig(libpci)
310 BuildRequires: pkgconfig(libpng)
311 %if %{system_libtiff}
312 BuildRequires: pkgconfig(libtiff-4)
313 %endif
314 BuildRequires: pkgconfig(libusb-1.0)
315 #squidf:added for vaapi support
316 BuildRequires: pkgconfig(egl)
317 BuildRequires: pkgconfig(libva)
318 BuildRequires: pkgconfig(libva-drm)
319 BuildRequires: pkgconfig(libva-glx)
320 BuildRequires: pkgconfig(libva-wayland)
321 BuildRequires: pkgconfig(libva-x11)
322 %if %{system_libvpx}
323 BuildRequires: pkgconfig(libvpx)
324 %endif
325 BuildRequires: pkgconfig(libwebp)
326 BuildRequires: pkgconfig(libxml-2.0)
327 BuildRequires: pkgconfig(libxslt)
328 BuildRequires: pkgconfig(minizip)
329 BuildRequires: pkgconfig(nspr)
330 BuildRequires: pkgconfig(nss)
331 BuildRequires: pkgconfig(opus)
332 %if %{system_re2}
333 BuildRequires: pkgconfig(re2)
334 %endif
335 BuildRequires: pkgconfig(speech-dispatcher)
336 BuildRequires: pkgconfig(speex)
337 BuildRequires: pkgconfig(udev)
338 BuildRequires: pkgconfig(xscrnsaver)
339 BuildRequires: pkgconfig(xt)
340 BuildRequires: pkgconfig(xtst)
341 BuildRequires: pkgconfig(zlib)
342 %if %{use_clang}
343 BuildRequires: clang
344 BuildRequires: lld
345 %endif
346 BuildRequires: clang-tools-extra
347 #squidf:for 98_ and system wayland
348 BuildRequires: pkgconfig(wayland-egl)
349 BuildRequires: pkgconfig(wayland-client)
350 BuildRequires: pkgconfig(wayland-cursor)
351 BuildRequires: pkgconfig(wayland-scanner)
352 BuildRequires: pkgconfig(wayland-server)
353
354 # Unused but building gn wants it to be present
355 BuildRequires: pkgconfig(gconf-2.0)
356 BuildRequires: git
357 #squidf: new BR from 107_
358 BuildRequires: pkgconfig(Qt5Core)
359 BuildRequires: pkgconfig(Qt5Widgets)
360 #squidf: 107_
361 %ifarch %{ix86}
362 BuildRequires: compiler-rt
363 BuildRequires: pkgconfig(libunwind)
364 %endif
365
366 ExclusiveArch: i586 x86_64
367 # aarch64 does not build without fewer than default parallel jobs config
368 # armv5tl armv7hl
369
370 %description
371 Chromium is a browser that combines a minimal design with sophisticated
372 technology to make the web faster, safer, and easier.
373
374 For certain media playback features - AAC decoding - this package
375 currently assumes decoder support is available, while that is only true if
376 the 'tainted' variety of the libavcodec package is installed. When the 'core'
377 variety of libavcodec is installed, chromium may output noise for AAC audio.
378
379 %ifarch %{ix86}
380 The i586 build of this package does not work on machines that do not
381 support the SSE2 instruction set extension.
382 %endif
383
384 %package -n chromium-browser
385 Summary: A fast webkit-based web browser (transition package)
386 Epoch: 1
387 Group: Networking/WWW
388 Requires: %{name} = %{version}-%{release}
389
390 %description -n chromium-browser
391 Chromium is a browser that combines a minimal design with sophisticated
392 technology to make the web faster, safer, and easier.
393
394 This is a transition package that installs the stable channel Chromium
395 browser.
396
397 %prep
398 %setup -q -n chromium-%{version}
399
400 #squidf: avoid autopatch to get all patches in src.rpm, independently of the flag settings
401 %patch2 -p1 -b .fix-googleism
402 %patch3 -p1 -b .add-widevine
403 %patch4 -p1 -b .remove-norar
404 %patch6 -p1 -b .add-extra-media
405 %patch10 -p1 -b .disable-no-external-components-downloads
406 %patch22 -p1 -b .remove-chromium-branding
407 %patch27 -p1 -b .link-libraaries-libgio-libpci-libudev-libbrlapi
408 %patch29 -p1 -b .missing-system-opus-gn-flag
409 %if %{system_libtiff}
410 %patch30 -p1 -b .use-pdfium-with-system-libtiff-libpng
411 %endif
412 %if %{system_openjpeg}
413 %patch31 -p1 -b .use-pdfium-with-system-libopenjpeg2
414 %endif
415 %patch36 -p1 -b .fix-build-with-current-glib
416 %patch37 -p1 -b .fix-build-with-system-nodejs
417 %patch38 -p1 -b .use-system-closure-compiler
418 %patch39 -p1 -b .fix-build-with-system-icu
419 %patch81 -p1 -b .fix-build-gcc-includes
420 %patch84 -p1 -b .fix-build-gcc-type-errors
421 %patch190 -p1 -b .fix-build-gn-bootstrap
422 %patch198 -p1 -b .fix-build-i586
423 %patch240 -p1 -b .use-system-zlib
424 %patch244 -p1 -b .use-system-libvpx
425
426 %patch255 -p1 -b .use-older-system-ffmpeg
427
428 #squidf: patches required to use clang 11
429 %patch258 -p1 -b .fix-build-clang11-nomerge
430 %patch259 -p1 -b .fix-build-clang11-options
431 %patch261 -p1 -b .fix-build-variable-size-object
432 %patch262 -p1 -b .fix-build-simple-template-names
433
434 %patch280 -p1 -b .use-system-vaapi-libdrm
435 %patch281 -p1 -b .fix-vaapi-on-intel
436
437 #squidf: linked to ffmpeg5 coming with Cauldron
438 %patch300 -p1 -b .fix-build-av_stream_get_first_dts
439 %patch301 -p1 -b .fix-build-constexpr
440
441 %patch304 -p1 -b .sql-standard-layout-type
442 %patch305 -p1 -b .sql-no-assert.patch
443 %patch306 -p1 -b .system-libdrm
444 %patch307 -p1 -b .wayland-egl
445
446 %patch310 -p1 -b .fix-i586-build
447 %patch312 -p1 -b .fix-build-ffmpeg-ch_layout-revert-commit
448 %patch313 -p1 -b .fix-build-array-limit
449 %patch315 -p1 -b .fix-build-duration-member
450 %patch318 -p1 -b .fix-build-isnan-member
451 %patch320 -p1 -b .allow-system-clang-version
452 %patch321 -p1 -b .fix-build-tensorflow-abs
453 %patch322 -p1 -b .fix-build-constexpr-affine_transform
454
455 #squidf: use esbuild version from esbuild source
456 sed -i 's/0.14.13/%{esb_ver}/g' ./third_party/devtools-frontend/src/DEPS
457 sed -i 's/0.14.13/%{esb_ver}/g' ./DEPS
458 sed -i 's/0.14.13/%{esb_ver}/g' ./third_party/devtools-frontend/src/node_modules/esbuild/lib/main.js
459 sed -i 's/0.14.13/%{esb_ver}/g' ./third_party/devtools-frontend/src/node_modules/esbuild/install.js
460 sed -i 's/0.14.13/%{esb_ver}/g' ./third_party/devtools-frontend/src/node_modules/esbuild/package.json
461 sed -i 's/0.14.13/%{esb_ver}/g' ./third_party/devtools-frontend/src/package-lock.json
462 sed -i 's/0.14.13/%{esb_ver}/g' ./third_party/devtools-frontend/src/scripts/deps/manage_node_deps.py
463
464 # files we do not want from upstream source bundles
465 rm -r --interactive=never third_party/breakpad/breakpad/src/processor/testdata/
466 rm -r --interactive=never third_party/breakpad/breakpad/src/tools
467 #squidf: chrome/test/data/extensions is mandatory to build 108_
468 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,dromaeo,durable,edge_database_reader,edge_profile,encoding_tests,fast_shutdown,fast_tab_close,favicon,feeds,file_select_helper,find_in_page,focus,frame_dom_access,frame_tree,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}
469 rm -r --interactive=never chrome/test/data/nacl/{pnacl_error_handling,cross_origin,irt_exception,pnacl_request_header,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}
470 rmdir chrome/test/data/webui/{settings,extensions}/a11y
471 rmdir chrome/test/data/webui/settings/chromeos/app_management
472 rmdir chrome/test/data/webui/history/history_clusters
473 rmdir chrome/test/data/webui/engagement
474 rm -r --interactive=never components/test/data/update_client/jebgalgnebhfojomionfpkfelancnnkf/component1.dll
475 rm -r --interactive=never content/test/data/
476 rm -r --interactive=never ppapi/native_client/tests/
477 rm -r --interactive=never third_party/apache-win32/
478 rm -r --interactive=never third_party/expat/{fuzz,include,src}
479 %if %{system_freetype}
480 rm -r --interactive=never third_party/freetype/{include,src}
481 %endif
482 %if %{system_ffmpeg}
483 rm -r --interactive=never third_party/ffmpeg/*/*
484 %endif
485 rm -r --interactive=never third_party/flac/{include,src}
486 %if %{system_icu}
487 rm -r --interactive=never third_party/icu/{android,common,patches,source,chromeos,ios}
488 %endif
489 rm -r --interactive=never third_party/jsoncpp/source
490 rm -r --interactive=never third_party/lcov
491 %if %{system_libevent}
492 rm -r --interactive=never base/third_party/libevent/*/*
493 rm -r --interactive=never base/third_party/libevent/*.[ch]
494 %endif
495 %if %{system_libvpx}
496 rm -r --interactive=never third_party/libvpx/source/{libvpx,config}
497 %endif
498 rm -r --interactive=never third_party/libaom/source
499 %if %{system_dav1d}
500 rm -r --interactive=never third_party/dav1d/{libdav1d,version}
501 %endif
502 rm -r --interactive=never third_party/libjpeg_turbo/*.[ch]
503 rm -r --interactive=never third_party/libpng/*.[ch]
504 rm -r --interactive=never third_party/libxslt/{linux,mac,src,win32}
505 rm -r --interactive=never third_party/xdg-utils/tests/
506 rm -r --interactive=never third_party/zlib/{*.[ch],contrib/minizip}
507 rm -r --interactive=never native_client_sdk/src/tools/lib/tests/data
508 rm -r --interactive=never buildtools/third_party/eu-strip/bin
509 rm --interactive=never third_party/pdfium/third_party/libopenjpeg/*.[ch]
510 rm -r --interactive=never third_party/pdfium/third_party/libpng16
511 %if %{system_libtiff}
512 rm --interactive=never third_party/pdfium/third_party/libtiff/*.[ch]
513 %endif
514 %if %{system_re2}
515 rm -r --interactive=never third_party/re2/src
516 %endif
517 %if %{system_fontconfig}
518 rm -r --interactive=never third_party/fontconfig/{src,include,chromium}
519 %endif
520 rm --interactive=never native_client/tools/redirector.exe
521 rm --interactive=never third_party/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe
522 rm -r --interactive=never third_party/llvm
523 rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/bob/bob
524 rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/glut/SanOGLES
525 rm -r --interactive=never third_party/lzma_sdk/bin/*
526 rm --interactive=never third_party/breakpad/symupload.exe
527 rm -r --interactive=never third_party/catapult/third_party/google-endpoints/setuptools
528 rm -r --interactive=never third_party/catapult/third_party/vinn/third_party/v8
529 rm --interactive=never third_party/depot_tools/ninja.exe
530 rm --interactive=never third_party/depot_tools/ninja-linux64
531 rm -r --interactive=never native_client/tools/hermetic_cygwin
532 rm -r --interactive=never base/test/data/pe_image/
533 rm -r --interactive=never base/test/data/file_version_info_unittest
534 rm -r --interactive=never chrome/chrome_cleaner/test/resources/signed_dll
535 rm --interactive=never third_party/crashpad/crashpad/handler/win/z7_test.dll
536 rm -r --interactive=never third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer_corpus
537 rm -r --interactive=never third_party/boringssl/src/util/ar/testdata
538 rm -r --interactive=never third_party/pyelftools/test/testfiles_for_unittests
539 rm -r --interactive=never third_party/pyelftools/test/external_tools
540 rm -r --interactive=never third_party/pyelftools/test/testfiles_for_readelf
541 rm -r --interactive=never third_party/pyelftools/examples
542 rm -r --interactive=never third_party/skia/platform_tools/android/bin
543 rm --interactive=never third_party/nasm/travis/test/tmap.o.t
544 rm -r --interactive=never components/test/data/update_client
545 rm -r --interactive=never build/android/tests/symbolize
546 rm --interactive=never third_party/skia/platform_tools/android/apps/gradle/wrapper/gradle-wrapper.jar
547 rm --interactive=never third_party/libphonenumber/dist/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar
548 rm --interactive=never third_party/libphonenumber/dist/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar
549 rm -r --interactive=never third_party/libphonenumber/dist/java/lib
550 rm --interactive=never third_party/webrtc/examples/androidapp/third_party/autobanh/lib/autobanh.jar
551 rm --interactive=never third_party/closure_compiler/compiler/compiler.jar
552 rm --interactive=never third_party/flatbuffers/src/android/gradle/wrapper/gradle-wrapper.jar
553 rm --interactive=never third_party/flatbuffers/src/kotlin/gradle/wrapper/gradle-wrapper.jar
554 rm --interactive=never third_party/gradle_wrapper/gradle/wrapper/gradle-wrapper.jar
555 rm --interactive=never third_party/webgl/src/conformance-suites/2.0.0/deqp/compiler.jar
556 rm --interactive=never third_party/grpc/src/examples/android/helloworld/gradle/wrapper/gradle-wrapper.jar
557 rm --interactive=never third_party/grpc/src/src/android/test/interop/gradle/wrapper/gradle-wrapper.jar
558 rm --interactive=never third_party/tflite/src/tensorflow/lite/java/ovic/demo/gradle/wrapper/gradle-wrapper.jar
559 rm --interactive=never third_party/tflite/src/tensorflow/lite/java/demo/gradle/wrapper/gradle-wrapper.jar
560 rm --interactive=never third_party/checkstyle/checkstyle-all.jar
561 rm --interactive=never build/android/stacktrace/java_deobfuscate_java.jar
562
563 %if %{system_libevent}
564 find base/third_party/libevent -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete
565 %endif
566
567 %if %{system_icu}
568 # Remove bundled ICU; its header files appear to get picked up instead of
569 # the system ones, leading to errors during the final link stage.
570 # https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q
571 find third_party/icu -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete
572 %endif
573
574 # Hard code extra version
575 FILE=chrome/common/channel_info_posix.cc
576 sed -i.orig -r -e 's/env = getenv\("CHROME_VERSION_EXTRA"\).*;/env = "%{product_vendor} %{product_version}";/' -e 's/return env \? (.*) : .*;/return \1;/' $FILE
577 if diff -u $FILE $FILE.orig >/dev/null; then
578 exit 1
579 fi
580
581 %build
582 #squidf: esbuild built from source
583 rm third_party/devtools-frontend/src/third_party/esbuild/esbuild
584 %{__tar} -xf %{SOURCE4}
585 pushd esbuild
586 GO_FLAGS="-mod=vendor" make
587 cp -a esbuild ../third_party/devtools-frontend/src/third_party/esbuild/esbuild
588 popd
589
590 #squidf: harfbuzz and freetype added back based on other distro spec, but might not be mandatory
591 %define unbundle_list %{?bdl_ffmpeg} flac %{?gn_fontconfig} libwebp libxml libxslt snappy %{?gn_libvpx} libpng %{?bdl_icu} zlib jsoncpp opus %{?gn_re2} libdrm %{?gn_dav1d} %{?gn_libevent} %{?bdl_freetype} %{?bdl_harfbuzz-ng}
592 # handled by upstream regular build scripts: freetype harfbuzz-ng
593 # mesa
594
595 # v NO TABS IN HERE!
596 %define gn_mga use_sysroot=false \
597 system_libdir="%{_lib}" \
598 %{?gn_icu} \
599 enable_nacl=false \
600 is_nacl_glibc=false \
601 custom_toolchain="//build/toolchain/linux/unbundle:default" \
602 host_toolchain="//build/toolchain/linux/unbundle:default" \
603 proprietary_codecs=true \
604 linux_link_libudev = true \
605 linux_link_libspeechd = true \
606 linux_link_xlib = true \
607 enable_platform_ac3_eac3_audio = true \
608 enable_platform_dts_audio = true \
609 enable_mse_mpeg2ts_stream_parser=true \
610 enable_platform_hevc=true \
611 use_system_libjpeg=true \
612 use_system_libopenjpeg2=true \
613 use_libjpeg_turbo=false \
614 enable_widevine=true \
615 pdf_enable_xfa=true \
616 gtk_version=3 \
617 fatal_linker_warnings=false \
618 use_libpci = true \
619 use_pulseaudio=true \
620 use_allocator="none" \
621 is_debug=false \
622 %{?gn_clang} \
623 clang_use_chrome_plugins=false \
624 %{?gn_lld} \
625 %{?gn_gold} \
626 %{?gn_freetype} \
627 %{?gn_harfbuzz} \
628 use_system_libpng=true \
629 enable_dav1d_decoder=true enable_libaom=false \
630 use_custom_libcxx=false \
631 enable_mojom_closure_compile=false \
632 enable_js_type_check=false \
633 dcheck_always_on=false \
634 %{?gn_warnings_as_errors} \
635 google_api_key="%{google_api_key}"
636
637 #squidf:additional arguments:
638 # to use vaapi from Chromium 96
639 # for 98_, compiler errors with bundled Wayland
640 # is_component_build to improve load-time (used by many other distro)
641 %define gn_more %{gn_mga} \
642 %{?gn_vaapi} \
643 use_system_libwayland=true \
644 use_system_libwayland_server=true \
645 use_system_wayland_scanner=true \
646 is_component_build=false
647
648 build/linux/unbundle/replace_gn_files.py --system-libraries %{unbundle_list}
649 third_party/libaddressinput/chromium/tools/update-strings.py
650
651 %set_build_flags
652 %if %{use_clang}
653 CC=clang; export CC
654 CXX=clang++; export CXX
655 %else
656 CC=%{__cc}; export CC
657 CXX=%{__cxx}; export CXX
658 LD="%{__cxx}"; export LD
659 %endif
660
661 AR=%{__ar}; export AR
662 NM=%{_bindir}/nm; export NM
663
664 %if %{use_clang}
665 LDFLAGS="-fuse-ld=lld $LDFLAGS"
666 %else
667 %if %{use_gold}
668 LDFLAGS="-fuse-ld=gold $LDFLAGS"
669 %endif
670 %endif
671
672 # filter out -g from CFLAGS and CXXFLAGS to fix builds
673 %if %{_enable_debug_packages}
674 %else
675 CFLAGS=$(echo "$CFLAGS"|sed -e 's/-g //')
676 CXXFLAGS=$(echo "$CXXFLAGS"|sed -e 's/-g //')
677 %endif
678
679 CXXFLAGS="$CXXFLAGS -faligned-new -Wno-attributes -Wno-ignored-attributes"
680
681 #squidf: all the below flags are from openSUSE
682 export CXXFLAGS="${CXXFLAGS} -Wno-unused-command-line-argument -Wno-unknown-warning-option"
683 # extra flags to reduce warnings that aren't very useful
684 export CXXFLAGS="${CXXFLAGS} -Wno-pedantic -Wno-unused-result -Wno-unused-function -Wno-unused-variable -Wno-deprecated-declarations"
685 # ignore warnings for minor mistakes that are too common
686 export CXXFLAGS="${CXXFLAGS} -Wno-return-type -Wno-parentheses -Wno-misleading-indentation"
687 # ignore warnings due to gcc bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84055)
688 export CXXFLAGS="${CXXFLAGS} -Wno-ignored-attributes"
689 # ingore new gcc 8 warnings that aren't yet handled upstream
690 export CXXFLAGS="${CXXFLAGS} -Wno-address -Wno-dangling-else"
691 # for wayland
692 export CXXFLAGS="${CXXFLAGS} -I/usr/include/wayland -I/usr/include/libxkbcommon -I/usr/include/opus"
693 #### end openSUSE flag
694
695 #squidf:FIXME ?:-std=gnu++17 has been added for Chromium 96 but leads to build failure
696 #squidf: for MGA8 and clang11, add -Wno-error=c++11-narrowing
697 %if %{use_clang}
698 CFLAGS="$CFLAGS -Wno-error=unused-result -Wno-error=c++11-narrowing"
699 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 -Wno-error=c++11-narrowing"
700 %else
701 #squidf:WARNING: so far, building with gcc on Mageia does not work for chromium version higher than 98
702 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=stringop-overflow -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"
703 %endif
704
705 #squidf: fix random stack mashing detection with clang 11
706 CFLAGS=${CFLAGS/-fstack-protector}
707 CFLAGS="$CFLAGS -fno-stack-protector -fstack-clash-protection"
708 CXXFLAGS=${CXXFLAGS/-fstack-protector}
709 CXXFLAGS="$CXXFLAGS -fno-stack-protector -fstack-clash-protection"
710
711
712 %if %{use_gold}
713 %ifarch %ix86
714 LDFLAGS="$LDFLAGS -Wl,--no-keep-files-mapped"
715 %endif
716 %else
717 LDFLAGS="$LDFLAGS -fno-use-linker-plugin"
718 %endif
719
720 #squidf: 107_ fix i586 link error ld.lld: undefined symbol: __mulodi4 referenced by const_eval.cc
721 # and ld.lld: undefined symbol: _Unwind_Resume referenced by torque.cc
722 %ifarch %ix86
723 LDFLAGS="$LDFLAGS -Wl,-z,notext -Wl,-lunwind -lgcc_s --rtlib=compiler-rt"
724 %endif
725
726
727 # for debugging:
728 %if %{_enable_debug_packages}
729 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"
730 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"
731 %endif
732
733 %ifarch %{ix86}
734 CFLAGS="$CFLAGS -msse2"
735 CXXFLAGS="$CXXFLAGS -msse2"
736 %endif
737
738
739 python tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_more}'
740
741 out/Release/gn gen --args='%{gn_more}' out/Release
742
743
744 %if !%{use_gold}
745 # ld.bfd needs lots of file descriptors to link chrome
746 ulimit -n 4096
747 %endif
748
749
750 JOBS=$(echo %{_smp_mflags}|sed -re 's#^-j##')
751 %{__ninja} -j${JOBS} -C out/Release chrome chrome_sandbox
752
753
754 # man page
755 sed -e "s/@@PACKAGE@@/chromium/" -e "s/@@MENUNAME@@/Chromium Web Browser/" chrome/app/resources/manpage.1.in >out/Release/chromium.1
756
757 %install
758 mkdir -p %{buildroot}%{_bindir}
759 mkdir -p %{buildroot}%{_crdir}/locales
760 mkdir -p %{buildroot}%{_crdir}/themes
761 mkdir -p %{buildroot}%{_crdir}/MEIPreload
762 mkdir -p %{buildroot}%{_mandir}/man1
763
764 #squidf: add master_preferences to prevent default browser check banner, at first
765 %{__install} -m 644 %{SOURCE13} %{buildroot}%{_crdir}/master_preferences
766 #squidf: install chromium-wrapper from source1
767 install -m 755 %{SOURCE1} %{buildroot}%{_crdir}/
768 install -m 755 out/Release/chrome %{buildroot}%{_crdir}/
769 install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox
770 install -m 644 out/Release/chromium.1 %{buildroot}%{_mandir}/man1/%{crname}.1
771 install -m 644 out/Release/chrome_100_percent.pak %{buildroot}%{_crdir}/
772 install -m 644 out/Release/chrome_200_percent.pak %{buildroot}%{_crdir}/
773 install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/
774 install -m 644 out/Release/snapshot_blob.bin %{buildroot}%{_crdir}/
775 install -m 755 out/Release/mksnapshot %{buildroot}%{_crdir}/
776 install -m 755 out/Release/chrome_crashpad_handler %{buildroot}%{_crdir}/
777 install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/
778 install -m 644 out/Release/v8_context_snapshot.bin %{buildroot}%{_crdir}/
779 install -m 755 out/Release/libEGL.so %{buildroot}%{_crdir}/
780 install -m 755 out/Release/libGLESv2.so %{buildroot}%{_crdir}/
781 install -m 755 out/Release/libVk*.so %{buildroot}%{_crdir}/
782 install -m 755 out/Release/libvk_swiftshader.so %{buildroot}%{_crdir}/
783 install -m 644 out/Release/MEIPreload/* %{buildroot}%{_crdir}/MEIPreload/
784 ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname}
785
786 find out/Release/resources/ -name "*.d" -exec rm {} \;
787 cp -r out/Release/resources %{buildroot}%{_crdir}
788
789 # desktop file
790 mkdir -p %{buildroot}%{_datadir}/applications
791 install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/
792
793 %if %{system_icu}
794 # symlink to ICU data file
795 ICUDATADIR=$(icuinfo | grep \"icudata.path\" | sed -re 's/^.*>(.*)<.*$/\1/')
796 ICUDATANAME=$(icuinfo | grep \"icudata.name\" | sed -re 's/^.*>(.*)<.*$/\1/')
797 ICUDATAFILE=$(realpath --relative-to=%{_crdir}/ ${ICUDATADIR}/${ICUDATANAME}.dat)
798 ln -s ${ICUDATAFILE} %{buildroot}%{_crdir}/icudtl.dat
799 %else
800 %{__install} -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/
801 %endif
802
803 # icon
804 for i in 22_mono 24 32 48 64 128 256; do
805 %{__mkdir_p} %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps
806 if [ -f chrome/app/theme/chromium/product_logo_$i.png ]; then
807 %{__install} -m 644 chrome/app/theme/chromium/product_logo_$i.png \
808 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png
809 else
810 %{__install} -m 644 chrome/app/theme/chromium/linux/product_logo_$i.xpm \
811 %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.xpm
812 fi
813 done
814
815 %files -n chromium-browser
816
817 %files
818 %{_bindir}/%{crname}
819 %dir %{_crdir}
820 %{_crdir}/chromium-wrapper
821 %{_crdir}/chrome
822 %attr(4755,root,root) %{_crdir}/chrome-sandbox
823 %{_crdir}/icudtl.dat
824 %{_crdir}/locales
825 %{_crdir}/master_preferences
826 %{_crdir}/snapshot_blob.bin
827 %{_crdir}/v8_context_snapshot.bin
828 %{_crdir}/resources.pak
829 %{_crdir}/resources
830 %{_crdir}/chrome_100_percent.pak
831 %{_crdir}/chrome_200_percent.pak
832 %{_crdir}/mksnapshot
833 %{_crdir}/chrome_crashpad_handler
834 %{_crdir}/themes
835 %{_crdir}/libEGL.so
836 %{_crdir}/libGLESv2.so
837 %{_crdir}/libVk*.so
838 %{_crdir}/libvk_swiftshader.so
839 %{_mandir}/man1/%{crname}*
840 %{_datadir}/applications/*.desktop
841 %{_iconsdir}/hicolor/*/apps/%{crname}.png
842 %{_iconsdir}/hicolor/*/apps/%{crname}.xpm
843 %{_crdir}/MEIPreload
844
845

  ViewVC Help
Powered by ViewVC 1.1.30