forked from RussianFedora/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chromium.spec
2361 lines (2045 loc) · 88.3 KB
/
chromium.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# NEVER EVER EVER turn this on in official builds
%global freeworld 1
# Some people wish not to use the Fedora Google API keys. Mmkay.
# Expect stuff to break in weird ways if you disable.
%global useapikeys 1
# Leave this alone, please.
%global target out/Release
%global headlesstarget out/Headless
# Debuginfo packages aren't very useful here. If you need to debug
# you should do a proper debug build (not implemented in this spec yet)
%global debug_package %{nil}
# %%{nil} for Stable; -beta for Beta; -dev for Devel
# dash in -beta and -dev is intentional !
%global chromium_channel %{nil}
%global chromium_menu_name Chromium
%global chromium_browser_channel chromium-browser%{chromium_channel}
%global chromium_path %{_libdir}/chromium-browser%{chromium_channel}
%global crd_path %{_libdir}/chrome-remote-desktop
# We don't want any libs in these directories to generate Provides
# Requires is trickier.
%global __provides_exclude_from %{chromium_path}/.*\\.so|%{chromium_path}/lib/.*\\.so
%global privlibs libaccessibility|libaura_extra|libaura|libbase_i18n|libbase|libblink_common|libblink_core|libblink_modules|libblink_platform|libblink_web|libbluetooth|libboringssl|libbrowser_ui_views|libcaptive_portal|libcapture|libcc_blink|libcc_ipc|libcc_proto|libcc|libcc_surfaces|libchromium_sqlite3|libcloud_policy_proto_generated_compile|libcloud_policy_proto|libcommon|libcompositor|libcontent|libcrcrypto|libdbus|libdevice_battery|libdevice_core|libdevice_event_log|libdevice_gamepad|libdevice_geolocation|libdevices|libdevice_vibration|libdisplay_compositor|libdisplay|libdisplay_types|libdisplay_util|libdomain_reliability|libEGL|libevents_base|libevents_devices_x11|libevents_ipc|libevents_ozone_layout|libevents|libevents_x|libffmpeg|libfont_service_library|libgcm|libgeometry|libgesture_detection|libgfx_ipc_color|libgfx_ipc_geometry|libgfx_ipc_skia|libgfx_ipc|libgfx|libgfx_x11|libgin|libgles2_c_lib|libgles2_implementation|libgles2_utils|libGLESv2|libgl_init|libgl_wrapper|libgpu|libgtk2ui|libicui18n|libicuuc|libipc|libkeyboard|libkeyboard_with_content|libkeycodes_x11|libkeyed_service_content|libkeyed_service_core|libmedia_blink|libmedia_gpu|libmedia|libmemory_coordinator_browser|libmemory_coordinator_child|libmemory_coordinator_common|libmessage_center|libmidi|libmojo_blink_lib|libmojo_common_lib|libmojo_ime_lib|libmojo_public_system|libmojo_system_impl|libnative_theme|libnet|libnet_with_v8|libonc|libplatform|libpolicy_component|libpolicy_proto|libpower_save_blocker|libppapi_host|libppapi_proxy|libppapi_shared|libprefs|libprinting|libprotobuf_lite|libproxy_config|librange|libsandbox_services|libseccomp_bpf|libsessions|libshared_memory_support|libshell_dialogs|libskia|libsnapshot|libsql|libstartup_tracing|libstorage_browser|libstorage_common|libstub_window|libsuid_sandbox_client|libsurface|libtracing|libtranslator|libui_base_ime|libui_base|libui_base_x|libui_data_pack|libui_library|libui_touch_selection|libui_views_mus_lib|liburl_ipc|liburl_matcher|liburl|libuser_prefs|libv8|libviews|libwebdata_common|libweb_dialogs|libwebview|libwidevinecdm|libwm|libwtf|libx11_events_platform|libx11_window|libbindings|libgeolocation|libmojo_public_system_cpp|libtime_zone_monitor|libdevice_base|libcc_animation|libcpp|libdevice_base|libdiscardable_memory_client|libdiscardable_memory_common|libdiscardable_memory_service|libgeneric_sensor|libgl_in_process_context|libjs|libpower_monitor|libv8_libbase|libsensors|libdevice_vr|libcc_paint|libgtk3ui|libcapture_base|libcapture_lib|libfingerprint|libanimation|libcc_base|libcc_debug|libcodec|libcolor_space|libembedder|libgeometry_skia|libgin_features|libmedia_mojo_services|libplatform_wtf|libprotobuf_globals|libcdm_manager|libframe_sinks|libresource_coordinator_cpp|libblink_android_mojo_bindings_shared|libblink_mojo_bindings_shared|libblink_mojo_bindings_shared|libblink_offscreen_canvas_mojo_bindings_shared|libcontent_common_mojo_bindings_shared|libdevice_vr_mojo_bindings|libdevice_vr_mojo_bindings_blink|libdevice_vr_mojo_bindings_shared|libgeneric_sensor_public_interfaces_shared|libheadless|libipc_mojom|libipc_mojom_shared|libpublic|libresource_coordinator_public_interfaces_internal_shared|libservice_manager_cpp|libservice_manager_cpp_types|libservice_manager_mojom|libservice_manager_mojom_constants|libservice_manager_mojom_constants_shared|libservice_manager_mojom_shared|libgfx_switches|libmetrics_cpp|libui_devtools|libviz_common|libwm_public|libblink_controller|libcontent_public_common_mojo_bindings_shared|libgfx_switches|libhost|libinterfaces_shared|libmetrics_cpp|libservice|libviz_common|libwm_public|libviz_resource_format|libembedder_switches|libfreetype_harfbuzz|libmessage_support|libsandbox|libclient|libleveldatabase|libblink_core_mojo_bindings_shared|libgpu_util|libmedia_devices_mojo_bindings_shared|libmojo_platform_bindings_shared|libmojo_bindings_shared|libcbor|libcrash_key|libdevice_features|libgfx_ipc_buffer_types|libgles2|libgpu_ipc_service|libmojo_base_lib|libmojo_base_mojom_shared|libmojo_base_shared_typemap_traits|libnetwork_session_configurator|libresource_coordinator_cpp_base|libresource_coordinator_public_interfaces|libresource_coordinator_public_interfaces_blink|libresource_coordinator_public_interfaces_shared
%global __requires_exclude ^(%{privlibs})\\.so
# If we build with shared on, then chrome-remote-desktop depends on chromium libs.
# If we build with shared off, then users cannot swap out libffmpeg (and i686 gets a lot harder to build)
%global shared 1
# We should not need to turn this on. The app in the webstore _should_ work.
%global build_remoting_app 0
# Build Chrome Remote Desktop
%global build_remote_desktop 1
# AddressSanitizer mode
# https://www.chromium.org/developers/testing/addresssanitizer
%if 0%{?fedora} >= 29
%global asan 1
%else
%global asan 0
%endif
# nacl/pnacl are soon to be dead. We're just killing them off early.
%global killnacl 1
%if 0%{?killnacl}
%global nacl 0
%global nonacl 1
%else
# TODO: Try arm (nacl disabled)
%if 0%{?fedora}
%ifarch i686
%global nacl 0
%global nonacl 1
%else
%global nacl 1
%global nonacl 0
%endif
%endif
%endif
%if 0
# Chromium's fork of ICU is now something we can't unbundle.
# This is left here to ease the change if that ever switches.
BuildRequires: libicu-devel >= 5.4
%global bundleicu 0
%else
%global bundleicu 1
%endif
%global bundlere2 1
# The libxml_utils code depends on the specific bundled libxml checkout
# which is not compatible with the current code in the Fedora package as of
# 2017-06-08.
%global bundlelibxml 1
# Chromium used to break on wayland, hidpi, and colors with gtk3 enabled.
# Hopefully it does not anymore.
%global gtk3 1
# Enable vaapi
%global vaapi 1
%if 0%{?rhel} == 7
%global bundleopus 1
%global bundlelibusbx 1
%global bundleharfbuzz 1
%global bundlelibwebp 1
%global bundlelibpng 1
%global bundlelibjpeg 1
%global bundlefreetype 1
%global bundlelibdrm 1
%else
%global bundleharfbuzz 0
%global bundleopus 1
%global bundlelibusbx 0
%global bundlelibwebp 0
%global bundlelibpng 0
%global bundlelibjpeg 0
%global bundlefreetype 0
%global bundlelibdrm 0
%endif
# Needs at least harfbuzz 1.7.3 now.
# 2018-03-07
%if 0%{?fedora} < 28
%global bundleharfbuzz 1
%else
%global bundleharfbuzz 0
%endif
### Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
### Note: These are for Fedora use ONLY.
### For your own distribution, please get your own set of keys.
### http://lists.debian.org/debian-legal/2013/11/msg00006.html
%if %{useapikeys}
%global api_key AIzaSyDUIXvzVrt5OkVsgXhQ6NFfvWlA44by-aw
%global default_client_id 449907151817.apps.googleusercontent.com
%global default_client_secret miEreAep8nuvTdvLums6qyLK
%global chromoting_client_id 449907151817-8vnlfih032ni8c4jjps9int9t86k546t.apps.googleusercontent.com
%else
%global api_key %nil
%global default_client_id %nil
%global default_client_secret %nil
%global chromoting_client_id %nil
%endif
Name: chromium%{chromium_channel}
Version: 65.0.3325.181
%if 0%{?rhel} == 7
Release: 1%{?dist}
%else
Release: 1%{?dist}.R
%endif
Epoch: 1
Summary: A WebKit (Blink) powered web browser
Url: http://www.chromium.org/Home
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
### Chromium Fedora Patches ###
Patch0: chromium-64.0.3282.119-gcc5.patch
Patch1: chromium-45.0.2454.101-linux-path-max.patch
Patch2: chromium-55.0.2883.75-addrfix.patch
Patch4: chromium-46.0.2490.71-notest.patch
# In file included from ../linux/directory.c:21:
# In file included from ../../../../native_client/src/nonsfi/linux/abi_conversion.h:20:
# ../../../../native_client/src/nonsfi/linux/linux_syscall_structs.h:44:13: error: GNU-style inline assembly is disabled
# __asm__ __volatile__("mov %%gs, %0" : "=r"(gs));
# ^
# 1 error generated.
Patch6: chromium-47.0.2526.80-pnacl-fgnu-inline-asm.patch
# Ignore broken nacl open fd counter
Patch7: chromium-47.0.2526.80-nacl-ignore-broken-fd-counter.patch
# Use libusb_interrupt_event_handler from current libusbx (1.0.21-0.1.git448584a)
Patch9: chromium-48.0.2564.116-libusb_interrupt_event_handler.patch
# Ignore deprecations in cups 2.2
# https://bugs.chromium.org/p/chromium/issues/detail?id=622493
Patch12: chromium-55.0.2883.75-cups22.patch
# Use PIE in the Linux sandbox (from openSUSE via Russian Fedora)
Patch15: chromium-55.0.2883.75-sandbox-pie.patch
# Use /etc/chromium for master_prefs
Patch18: chromium-52.0.2743.82-master-prefs-path.patch
# Disable MADV_FREE (if set by glibc)
# https://bugzilla.redhat.com/show_bug.cgi?id=1361157
Patch19: chromium-52.0.2743.116-unset-madv_free.patch
# Use gn system files
Patch20: chromium-60.0.3112.78-gn-system.patch
# Fix last commit position issue
# https://groups.google.com/a/chromium.org/forum/#!topic/gn-dev/7nlJv486bD4
Patch21: chromium-60.0.3112.78-last-commit-position.patch
# Fix issue where timespec is not defined when sys/stat.h is included.
Patch22: chromium-53.0.2785.92-boringssl-time-fix.patch
# I wouldn't have to do this if there was a standard way to append extra compiler flags
Patch24: chromium-63.0.3289.84-nullfix.patch
# Add explicit includedir for jpeglib.h
Patch25: chromium-54.0.2840.59-jpeg-include-dir.patch
# On i686, pass --no-keep-memory --reduce-memory-overheads to ld.
Patch26: chromium-59.0.3071.86-i686-ld-memory-tricks.patch
# obj/content/renderer/renderer/child_frame_compositing_helper.o: In function `content::ChildFrameCompositingHelper::OnSetSurface(cc::SurfaceId const&, gfx::Size const&, float, cc::SurfaceSequence const&)':
# /builddir/build/BUILD/chromium-54.0.2840.90/out/Release/../../content/renderer/child_frame_compositing_helper.cc:214: undefined reference to `cc_blink::WebLayerImpl::setOpaque(bool)'
Patch27: chromium-63.0.3289.84-setopaque.patch
# Use -fpermissive to build WebKit
Patch31: chromium-56.0.2924.87-fpermissive.patch
# Fix issue with compilation on gcc7
# Thanks to Ben Noordhuis
Patch33: chromium-65.0.3325.146-gcc7.patch
# Revert https://chromium.googlesource.com/chromium/src/+/b794998819088f76b4cf44c8db6940240c563cf4%5E%21/#F0
# https://bugs.chromium.org/p/chromium/issues/detail?id=712737
# https://bugzilla.redhat.com/show_bug.cgi?id=1446851
Patch36: chromium-58.0.3029.96-revert-b794998819088f76b4cf44c8db6940240c563cf4.patch
# Correctly compile the stdatomic.h in ffmpeg with gcc 4.8
Patch37: chromium-64.0.3282.119-ffmpeg-stdatomic.patch
# Nacl can't die soon enough
Patch39: chromium-59.0.3071.86-system-clang.patch
# Do not prefix libpng functions
Patch42: chromium-60.0.3112.78-no-libpng-prefix.patch
# Do not mangle libjpeg
Patch43: chromium-60.0.3112.78-jpeg-nomangle.patch
# Do not mangle zlib
Patch45: chromium-60.0.3112.78-no-zlib-mangle.patch
# Apply these changes to work around EPEL7 compiler issues
Patch46: chromium-62.0.3202.62-kmaxskip-constexpr.patch
Patch47: chromium-60.0.3112.90-vulkan-force-c99.patch
# Fix libavutil include pathing to find arch specific timer.h
# For some reason, this only fails on aarch64. No idea why.
Patch50: chromium-60.0.3112.113-libavutil-timer-include-path-fix.patch
# from gentoo
Patch53: chromium-61.0.3163.79-gcc-no-opt-safe-math.patch
# Only needed when glibc 2.26.90 or later is used
Patch57: chromium-63.0.3289.84-aarch64-glibc-2.26.90.patch
# From gentoo
Patch62: chromium-65.0.3325.146-gcc5-r3.patch
# Do not try to use libc++ in the remoting stack
Patch63: chromium-63.0.3289.84-nolibc++.patch
# To use round with gcc, you need to #include <cmath>
Patch65: chromium-65.0.3325.146-gcc-round-fix.patch
# Include proper headers to invoke memcpy()
Patch67: chromium-65.0.3325.146-memcpy-fix.patch
# Work around gcc8 bug in gn
Patch68: chromium-64.0.3282.167-gcc8-fabi11.patch
# From Gentoo
Patch69: chromium-math.h-r0.patch
Patch70: chromium-stdint.patch
# Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654
# crbug.com/784732#27
# https://chromium-review.googlesource.com/c/chromium/src/+/927942
Patch71: chromium-65.0.3325.146-workaround-gcc7-is_trivially_copy_constructable-failure.patch
# And https://bugs.chromium.org/p/chromium/issues/detail?id=816952
Patch72: chromium-65.0.3325.146-wtf-vector-fix.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-build-fix-base-Optional-T-requires-the-full-decl.patch
Patch73: chromium-65.0.3325.146-GCC-build-fix-base-Optional-T-requires-the-full-decl.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-wtf-oilpan-Remove-GC-checks-from-WTF-Optional-T.patch
Patch74: chromium-65.0.3325.146-wtf-oilpan-Remove-GC-checks-from-WTF-Optional-T.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-Fix-non-copyable-class-s-optional-move.patch
Patch75: chromium-65.0.3325.146-Fix-non-copyable-class-s-optional-move.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-Use-affirmative-expression-in-base-Optional.patch
Patch76: chromium-65.0.3325.146-Use-affirmative-expression-in-base-Optional.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-Implement-conditional-copy-move-ctors-assign-operato.patch
Patch77: chromium-65.0.3325.146-Implement-conditional-copy-move-ctors-assign-operato.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-Implement-converting-constructors-from-Optional-U.patch
Patch78: chromium-65.0.3325.146-Implement-converting-constructors-from-Optional-U.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-Implement-value-forward-constructor.patch
Patch79: chromium-65.0.3325.146-Implement-value-forward-constructor.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-Update-non-copy-non-move-assign-operators.patch
Patch80: chromium-65.0.3325.146-Update-non-copy-non-move-assign-operators.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-PlaybackImageProvider-Settings-do-not-provide-co.patch
Patch81: chromium-65.0.3325.146-GCC-PlaybackImageProvider-Settings-do-not-provide-co.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-explicitely-std-move-to-base-Optional-instead-of.patch
Patch82: chromium-65.0.3325.146-GCC-explicitely-std-move-to-base-Optional-instead-of.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-IDB-methods-String-renamed-to-GetString.patch
Patch83: chromium-65.0.3325.146-GCC-IDB-methods-String-renamed-to-GetString.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-fully-declare-ConfigurationPolicyProvider.patch
Patch84: chromium-65.0.3325.146-GCC-fully-declare-ConfigurationPolicyProvider.patch
# ../../mojo/public/cpp/bindings/associated_interface_ptr_info.h:48:43: error: cannot convert 'const mojo::ScopedInterfaceEndpointHandle' to 'bool' in return
Patch85: chromium-65.0.3325.162-boolfix.patch
# From Debian
Patch86: chromium-65.0.3325.162-skia-aarch64-buildfix.patch
# Use lstdc++ on EPEL7 only
Patch87: chromium-65.0.3325.162-epel7-stdc++.patch
# Clang Gentoo patch: ftp://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-clang-r2.patch
Patch500: chromium-clang-r2.patch
# ftp://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-clang-r3.patch
Patch501: chromium-clang-r3.patch
# ftp://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-ffmpeg-clang.patch
Patch502: chromium-ffmpeg-clang.patch
# fix build under ia32
# https://bazaar.launchpad.net/~chromium-team/chromium-browser/bionic-stable/download/head:/fixffmpegia32build.p-20171124052506-76a1tzvpv53mvxrd-1/fix-ffmpeg-ia32-build.patch
Patch503: fix-ffmpeg-ia32-build.patch
# Vaapi Patches
# Ubuntu patch for chromium 64
# https://raw.githubusercontent.com/saiarcot895/chromium-ubuntu-build/branch-3282/debian/patches/enable_vaapi_on_linux_2.diff
Patch600: enable_vaapi_on_linux_2.diff
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
# http://build.chromium.org/buildbot/official/
# For Chromium Fedora use chromium-latest.py --stable --ffmpegclean --ffmpegarm
# If you want to include the ffmpeg arm sources append the --ffmpegarm switch
# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%%{version}.tar.xz
%if %{freeworld}
Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz
%else
Source0: chromium-%{version}-clean.tar.xz
%endif
Source3: chromium-browser.sh
Source4: %{chromium_browser_channel}.desktop
# Also, only used if you want to reproduce the clean tarball.
Source5: clean_ffmpeg.sh
Source6: chromium-latest.py
Source7: get_free_ffmpeg_source_files.py
# Get the names of all tests (gtests) for Linux
# Usage: get_linux_tests_name.py chromium-%%{version} --spec
Source8: get_linux_tests_names.py
# GNOME stuff
Source9: chromium-browser.xml
Source11: chrome-remote-desktop@.service
Source13: master_preferences
# We can assume gcc and binutils.
BuildRequires: gcc-c++
%if 0%{?asan}
BuildRequires: clang
BuildRequires: llvm
%endif
BuildRequires: alsa-lib-devel
BuildRequires: atk-devel
BuildRequires: bison
BuildRequires: cups-devel
BuildRequires: dbus-devel
BuildRequires: desktop-file-utils
BuildRequires: expat-devel
BuildRequires: flex
BuildRequires: fontconfig-devel
BuildRequires: GConf2-devel
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
BuildRequires: glibc-devel
BuildRequires: gperf
BuildRequires: libatomic
BuildRequires: libcap-devel
%if 0%{?bundlelibdrm}
#nothing
%else
BuildRequires: libdrm-devel
%endif
BuildRequires: libgcrypt-devel
BuildRequires: libudev-devel
BuildRequires: libusb-devel
BuildRequires: libXdamage-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libXtst-devel
BuildRequires: minizip-devel
BuildRequires: nodejs
BuildRequires: nss-devel >= 3.26
BuildRequires: pciutils-devel
BuildRequires: pulseaudio-libs-devel
%if 0%{vaapi}
BuildRequires: libva-devel
%endif
# for /usr/bin/appstream-util
BuildRequires: libappstream-glib
# Fedora turns on NaCl
# NaCl needs these
BuildRequires: libstdc++-devel, openssl-devel
%if 0%{?nacl}
BuildRequires: nacl-gcc, nacl-binutils, nacl-newlib
BuildRequires: nacl-arm-gcc, nacl-arm-binutils, nacl-arm-newlib
# pNaCl needs this monster
# It's possible that someday this dep will stabilize, but
# right now, it needs to be updated everytime chromium bumps
# a major version.
BuildRequires: chromium-native_client >= 52.0.2743.82
%ifarch x86_64
# Really, this is what we want:
# BuildRequires: glibc-devel(x86-32) libgcc(x86-32)
# But, koji only offers glibc32. Maybe that's enough.
# This BR will pull in either glibc.i686 or glibc32.
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so
%endif
%endif
# Fedora tries to use system libs whenever it can.
BuildRequires: bzip2-devel
BuildRequires: dbus-glib-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: flac-devel
%if 0%{?bundlefreetype}
# nothing
%else
BuildRequires: freetype-devel
%endif
BuildRequires: hwdata
BuildRequires: kernel-headers
BuildRequires: libevent-devel
BuildRequires: libffi-devel
BuildRequires: vulkan-devel
%if 0%{?bundleicu}
# If this is true, we're using the bundled icu.
# We'd like to use the system icu every time, but we cannot always do that.
%else
# Not newer than 54 (at least not right now)
BuildRequires: libicu-devel = 54.1
%endif
%if 0%{?bundlelibjpeg}
# If this is true, we're using the bundled libjpeg
# which we need to do because the RHEL 7 libjpeg doesn't work for chromium anymore
%else
BuildRequires: libjpeg-devel
%endif
%if 0%{?bundlelibpng}
# If this is true, we're using the bundled libpng
# which we need to do because the RHEL 7 libpng doesn't work right anymore
%else
BuildRequires: libpng-devel
%endif
%if 0
# see https://code.google.com/p/chromium/issues/detail?id=501318
BuildRequires: libsrtp-devel >= 1.4.4
%endif
BuildRequires: libudev-devel
%if %{bundlelibusbx}
# Do nothing
%else
Requires: libusbx >= 1.0.21-0.1.git448584a
BuildRequires: libusbx-devel >= 1.0.21-0.1.git448584a
%endif
# We don't use libvpx anymore because Chromium loves to
# use bleeding edge revisions here that break other things
# ... so we just use the bundled libvpx.
%if %{bundlelibwebp}
# Do nothing
%else
BuildRequires: libwebp-devel
%endif
BuildRequires: libxslt-devel
# Same here, it seems.
# BuildRequires: libyuv-devel
BuildRequires: mesa-libGL-devel
%if %{bundleopus}
# Do nothing
%else
BuildRequires: opus-devel
%endif
BuildRequires: perl(Switch)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pulseaudio-libs-devel
BuildRequires: python2
BuildRequires: python-beautifulsoup4
BuildRequires: python-BeautifulSoup
BuildRequires: python-html5lib
BuildRequires: python-markupsafe
BuildRequires: python-ply
BuildRequires: python-simplejson
%if 0%{?bundlere2}
# Using bundled bits, do nothing.
%else
Requires: re2 >= 20160401
BuildRequires: re2-devel >= 20160401
%endif
BuildRequires: speech-dispatcher-devel
BuildRequires: yasm
BuildRequires: zlib-devel
BuildRequires: pkgconfig(gnome-keyring-1)
# remote desktop needs this
BuildRequires: pam-devel
BuildRequires: systemd
# using the built from source version on aarch64
BuildRequires: ninja-build
%if 0%{?rhel} == 7
BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel
%endif
# There is a hardcoded check for nss 3.26 in the chromium code (crypto/nss_util.cc)
Requires: nss%{_isa} >= 3.26
Requires: nss-mdns%{_isa}
# GTK modules it expects to find for some reason.
Requires: libcanberra-gtk3%{_isa}
%if 0%{?fedora}
# This enables support for u2f tokens
Requires: u2f-hidraw-policy
%endif
%if 0%{vaapi}
Requires: libva
%endif
# Once upon a time, we tried to split these out... but that's not worth the effort anymore.
Provides: chromium-ffmpegsumo = %{epoch}:%{version}-%{release}
Obsoletes: chromium-ffmpegsumo <= 35.0.1916.114
# This is a lie. v8 has its own version... but I'm being lazy and not using it here.
# Barring Google getting much faster on the v8 side (or much slower on the Chromium side)
# the true v8 version will be much smaller than the Chromium version that it came from.
Provides: chromium-v8 = %{epoch}:%{version}-%{release}
Obsoletes: chromium-v8 <= 3.25.28.18
# This is a lie. webrtc never had any real version. 0.2 is greater than 0.1
Provides: webrtc = 0.2
Obsoletes: webrtc <= 0.1
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{epoch}:%{version}-%{release}
# This is broken out so it can be replaced.
Requires: chromium-libs-media%{_isa} = %{epoch}:%{version}-%{release}
# Nothing to do here. chromium-libs is real.
%else
Provides: chromium-libs = %{epoch}:%{version}-%{release}
Obsoletes: chromium-libs <= %{epoch}:%{version}-%{release}
%endif
ExclusiveArch: x86_64 i686
# Bundled bits (I'm sure I've missed some)
Provides: bundled(angle) = 2422
Provides: bundled(bintrees) = 1.0.1
# This is a fork of openssl.
Provides: bundled(boringssl)
Provides: bundled(brotli) = 222564a95d9ab58865a096b8d9f7324ea5f2e03e
Provides: bundled(bspatch)
Provides: bundled(cacheinvalidation) = 20150720
Provides: bundled(colorama) = 799604a104
Provides: bundled(crashpad)
Provides: bundled(dmg_fp)
Provides: bundled(expat) = 2.2.0
Provides: bundled(fdmlibm) = 5.3
# Don't get too excited. MPEG and other legally problematic stuff is stripped out.
Provides: bundled(ffmpeg) = 3.2git
Provides: bundled(fips181) = 2.2.3
Provides: bundled(fontconfig) = 2.11.0
Provides: bundled(gperftools) = svn144
%if 0%{?bundleharfbuzz}
Provides: bundled(harfbuzz) = 1.4.2
%endif
Provides: bundled(hunspell) = 1.6.0
Provides: bundled(iccjpeg)
%if 0%{?bundleicu}
Provides: bundled(icu) = 58.1
%endif
Provides: bundled(kitchensink) = 1
Provides: bundled(leveldb) = 1.20
Provides: bundled(libaddressinput) = 0
%if 0%{?bundlelibdrm}
Provides: bundled(libdrm) = 2.4.85
%endif
Provides: bundled(libevent) = 1.4.15
Provides: bundled(libjingle) = 9564
%if 0%{?bundlelibjpeg}
Provides: bundled(libjpeg-turbo) = 1.4.90
%endif
Provides: bundled(libphonenumber) = a4da30df63a097d67e3c429ead6790ad91d36cf4
%if 0%{?bundlelibpng}
Provides: bundled(libpng) = 1.6.22
%endif
Provides: bundled(libsrtp) = 1.5.2
%if %{bundlelibusbx}
Provides: bundled(libusbx) = 1.0.17
%endif
Provides: bundled(libvpx) = 1.6.0
%if %{bundlelibwebp}
Provides: bundled(libwebp) = 0.6.0
%endif
%if %{bundlelibxml}
# Well, it's actually newer than 2.9.4 and has code in it that has been reverted upstream... but eh.
Provides: bundled(libxml) = 2.9.4
%endif
Provides: bundled(libXNVCtrl) = 302.17
Provides: bundled(libyuv) = 1651
Provides: bundled(lzma) = 15.14
Provides: bundled(libudis86) = 1.7.1
Provides: bundled(mesa) = 9.0.3
Provides: bundled(NSBezierPath) = 1.0
Provides: bundled(mozc)
Provides: bundled(mt19937ar) = 2002.1.26
%if %{bundleopus}
Provides: bundled(opus) = 1.1.3
%endif
Provides: bundled(ots) = 8d70cffebbfa58f67a5c3ed0e9bc84dccdbc5bc0
Provides: bundled(protobuf) = 3.0.0.beta.3
Provides: bundled(qcms) = 4
%if 0%{?bundlere2}
Provides: bundled(re2)
%endif
Provides: bundled(sfntly) = 04740d2600193b14aa3ef24cd9fbb3d5996b9f77
Provides: bundled(skia)
Provides: bundled(SMHasher) = 0
Provides: bundled(snappy) = 1.1.4-head
Provides: bundled(speech-dispatcher) = 0.7.1
Provides: bundled(sqlite) = 3.17patched
Provides: bundled(superfasthash) = 0
Provides: bundled(talloc) = 2.0.1
Provides: bundled(usrsctp) = 0
Provides: bundled(v8) = 5.9.211.31
Provides: bundled(webrtc) = 90usrsctp
Provides: bundled(woff2) = 445f541996fe8376f3976d35692fd2b9a6eedf2d
Provides: bundled(xdg-mime)
Provides: bundled(xdg-user-dirs)
Provides: bundled(x86inc) = 0
# Provides: bundled(zlib) = 1.2.11
# For selinux scriptlet
Requires(post): /usr/sbin/semanage
Requires(post): /usr/sbin/restorecon
%description
Chromium is an open-source web browser, powered by WebKit (Blink).
%package common
Summary: Files needed for both the headless_shell and full Chromium
# Chromium needs an explicit Requires: minizip
# We put it here to cover headless too.
Requires: minizip%{_isa}
%description common
%{summary}.
%if 0%{?shared}
%package libs
Summary: Shared libraries used by chromium (and chrome-remote-desktop)
Requires: chromium-common%{_isa} = %{epoch}:%{version}-%{release}
Requires: chromium-libs-media%{_isa} = %{epoch}:%{version}
Obsoletes: chromium-widevinecdm-plugin < 23.0.0.207
%description libs
Shared libraries used by chromium (and chrome-remote-desktop).
%if %{freeworld}
%package libs-media-freeworld
Summary: Chromium media libraries built with all possible codecs
Provides: chromium-libs-media = %{epoch}:%{version}-%{release}
Provides: chromium-libs-media%{_isa} = %{epoch}:%{version}-%{release}
Obsoletes: chromium-libs-media < %{epoch}:%{version}-%{release}
%description libs-media-freeworld
Chromium media libraries built with all possible codecs. Chromium is an
open-source web browser, powered by WebKit (Blink). This package replaces
the default chromium-libs-media package, which is limited in what it
can include.
%else
%package libs-media
Summary: Shared libraries used by the chromium media subsystem
Requires: chromium-libs%{_isa} = %{epoch}:%{version}
%description libs-media
Shared libraries used by the chromium media subsystem.
%endif
%endif
%if %{build_remote_desktop}
%package -n chrome-remote-desktop
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: xorg-x11-server-Xvfb
%if 0%{?rhel} == 7
Requires: python-psutil
%else
Requires: python2-psutil
%endif
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{epoch}:%{version}-%{release}
%endif
Summary: Remote desktop support for google-chrome & chromium
%description -n chrome-remote-desktop
Remote desktop support for google-chrome & chromium.
%endif
%package -n chromedriver
Summary: WebDriver for Google Chrome/Chromium
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{epoch}:%{version}-%{release}
%endif
# From Russian Fedora (minus the epoch)
Provides: chromedriver-stable = %{epoch}:%{version}-%{release}
Conflicts: chromedriver-testing
Conflicts: chromedriver-unstable
%description -n chromedriver
WebDriver is an open source tool for automated testing of webapps across many
browsers. It provides capabilities for navigating to web pages, user input,
JavaScript execution, and more. ChromeDriver is a standalone server which
implements WebDriver's wire protocol for Chromium. It is being developed by
members of the Chromium and WebDriver teams.
%package headless
Summary: A minimal headless shell built from Chromium
Requires: chromium-common%{_isa} = %{epoch}:%{version}-%{release}
%description headless
A minimal headless client built from Chromium. headless_shell is built
without support for alsa, cups, dbus, gconf, gio, kerberos, pulseaudio, or
udev.
%prep
%setup -q -n chromium-%{version}
# Fix Russian Translation
sed -i 's@адежный@адёжный@g' components/strings/components_strings_ru.xtb
### Chromium Fedora Patches ###
%patch0 -p1 -b .gcc5
%patch1 -p1 -b .pathmax
%patch2 -p1 -b .addrfix
%patch4 -p1 -b .notest
# %%patch6 -p1 -b .gnu-inline
%patch7 -p1 -b .ignore-fd-count
%patch9 -p1 -b .modern-libusbx
%patch12 -p1 -b .cups22
%patch15 -p1 -b .sandboxpie
%patch18 -p1 -b .etc
# %%patch19 -p1 -b .madv_free
%patch20 -p1 -b .gnsystem
%patch21 -p1 -b .lastcommit
%patch22 -p1 -b .timefix
%patch24 -p1 -b .nullfix
%patch25 -p1 -b .jpegfix
%patch26 -p1 -b .ldmemory
%patch27 -p1 -b .setopaque
%patch31 -p1 -b .permissive
%patch33 -p1 -b .gcc7
%patch36 -p1 -b .revert
%patch37 -p1 -b .ffmpeg-stdatomic
%patch39 -p1 -b .system-clang
%patch42 -p1 -b .noprefix
%patch43 -p1 -b .nomangle
%patch45 -p1 -b .nozmangle
%if 0%{?rhel} == 7
%patch46 -p1 -b .kmaxskip
%patch47 -p1 -b .c99
%endif
%patch50 -p1 -b .pathfix
%patch53 -p1 -b .nogccoptmath
# %%if 0%%{?fedora} >= 28
# %%patch57 -p1 -b .aarch64glibc
# %%endif
%patch62 -p1 -b .gcc5-r3
%patch63 -p1 -b .nolibc++
%patch65 -p1 -b .gcc-round-fix
%patch67 -p1 -b .memcpyfix
%if ! 0%{?asan}
%patch68 -p1 -b .fabi11
%endif
%patch69 -p1 -b .gentoo-math
%patch70 -p1 -b .gentoo-stdint
%patch71 -p1 -b .gcc7-itcc
%patch72 -p1 -b .wtf-fix
%patch73 -p1 -b .fulldecl
%patch74 -p1 -b .oilpan
%patch75 -p1 -b .noncopyable
%patch76 -p1 -b .affirmative
%patch77 -p1 -b .conditional
%patch78 -p1 -b .converting
%patch79 -p1 -b .vforward
%patch80 -p1 -b .ncnm
%patch81 -p1 -b .pipcc
%patch82 -p1 -b .explicit-std-move
%patch83 -p1 -b .GetString
%patch84 -p1 -b .fully-declare
%patch85 -p1 -b .boolfix
%patch86 -p1 -b .aarch64fix
%if 0%{?rhel} == 7
%patch87 -p1 -b .epel7
%endif
%if 0%{?asan}
%patch500 -p1 -b .clang
%patch501 -p1 -b .clang-r3
%patch502 -p1 -b .clang-ffmpeg
%endif
%ifarch i686
%if 0%{?fedora} >= 29
%patch503 -p1 -b .ia32-ffmpeg
%endif
%endif
%if 0%{vaapi}
%patch600 -p1 -b .vaapi
%endif
%if 0%{?asan}
export CC="clang"
export CXX="clang++"
%else
export CC="gcc"
export CXX="g++"
%endif
export AR="ar"
export RANLIB="ranlib"
rm -rf buildtools/third_party/libc++/BUILD.gn
%if 0%{?nacl}
# prep the nacl tree
mkdir -p out/Release/gen/sdk/linux_x86/nacl_x86_newlib
cp -a --no-preserve=context /usr/%{_arch}-nacl/* out/Release/gen/sdk/linux_x86/nacl_x86_newlib
mkdir -p out/Release/gen/sdk/linux_x86/nacl_arm_newlib
cp -a --no-preserve=context /usr/arm-nacl/* out/Release/gen/sdk/linux_x86/nacl_arm_newlib
# Not sure if we need this or not, but better safe than sorry.
pushd out/Release/gen/sdk/linux_x86
ln -s nacl_x86_newlib nacl_x86_newlib_raw
ln -s nacl_arm_newlib nacl_arm_newlib_raw
popd
mkdir -p out/Release/gen/sdk/linux_x86/nacl_x86_newlib/bin
pushd out/Release/gen/sdk/linux_x86/nacl_x86_newlib/bin
ln -s /usr/bin/x86_64-nacl-gcc gcc
ln -s /usr/bin/x86_64-nacl-gcc x86_64-nacl-gcc
ln -s /usr/bin/x86_64-nacl-g++ g++
ln -s /usr/bin/x86_64-nacl-g++ x86_64-nacl-g++
# ln -s /usr/bin/x86_64-nacl-ar ar
ln -s /usr/bin/x86_64-nacl-ar x86_64-nacl-ar
# ln -s /usr/bin/x86_64-nacl-as as
ln -s /usr/bin/x86_64-nacl-as x86_64-nacl-as
# ln -s /usr/bin/x86_64-nacl-ranlib ranlib
ln -s /usr/bin/x86_64-nacl-ranlib x86_64-nacl-ranlib
# Cleanups
rm addr2line
ln -s /usr/bin/x86_64-nacl-addr2line addr2line
rm c++filt
ln -s /usr/bin/x86_64-nacl-c++filt c++filt
rm gprof
ln -s /usr/bin/x86_64-nacl-gprof gprof
rm readelf
ln -s /usr/bin/x86_64-nacl-readelf readelf
rm size
ln -s /usr/bin/x86_64-nacl-size size
rm strings
ln -s /usr/bin/x86_64-nacl-strings strings
popd
mkdir -p out/Release/gen/sdk/linux_x86/nacl_arm_newlib/bin
pushd out/Release/gen/sdk/linux_x86/nacl_arm_newlib/bin
ln -s /usr/bin/arm-nacl-gcc gcc
ln -s /usr/bin/arm-nacl-gcc arm-nacl-gcc
ln -s /usr/bin/arm-nacl-g++ g++
ln -s /usr/bin/arm-nacl-g++ arm-nacl-g++
ln -s /usr/bin/arm-nacl-ar arm-nacl-ar
ln -s /usr/bin/arm-nacl-as arm-nacl-as
ln -s /usr/bin/arm-nacl-ranlib arm-nacl-ranlib
popd
touch out/Release/gen/sdk/linux_x86/nacl_x86_newlib/stamp.untar out/Release/gen/sdk/linux_x86/nacl_x86_newlib/stamp.prep
touch out/Release/gen/sdk/linux_x86/nacl_x86_newlib/nacl_x86_newlib.json
touch out/Release/gen/sdk/linux_x86/nacl_arm_newlib/stamp.untar out/Release/gen/sdk/linux_x86/nacl_arm_newlib/stamp.prep
touch out/Release/gen/sdk/linux_x86/nacl_arm_newlib/nacl_arm_newlib.json
pushd out/Release/gen/sdk/linux_x86/
mkdir -p pnacl_newlib pnacl_translator
# Might be able to do symlinks here, but eh.
cp -a --no-preserve=context /usr/pnacl_newlib/* pnacl_newlib/
cp -a --no-preserve=context /usr/pnacl_translator/* pnacl_translator/
for i in lib/libc.a lib/libc++.a lib/libg.a lib/libm.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/x86_64_bc-nacl/$i
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/i686_bc-nacl/$i
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/le32-nacl/$i
done
for i in lib/libpthread.a lib/libnacl.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/le32-nacl/$i
done
for i in lib/clang/3.7.0/lib/x86_64_bc-nacl/libpnaclmm.a lib/clang/3.7.0/lib/i686_bc-nacl/libpnaclmm.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/$i
done
for i in lib/clang/3.7.0/lib/le32-nacl/libpnaclmm.a lib/clang/3.7.0/lib/le32-nacl/libgcc.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/$i
done
popd
mkdir -p native_client/toolchain/.tars/linux_x86
touch native_client/toolchain/.tars/linux_x86/pnacl_translator.json
pushd native_client/toolchain
ln -s ../../out/Release/gen/sdk/linux_x86 linux_x86
popd
mkdir -p third_party/llvm-build/Release+Asserts/bin
pushd third_party/llvm-build/Release+Asserts/bin
ln -sf /usr/bin/clang clang
ln -sf /usr/bin/clang++ clang++
popd
%endif
# Core defines are flags that are true for both the browser and headless.
CHROMIUM_CORE_GN_DEFINES=""
CHROMIUM_CORE_GN_DEFINES+=' is_debug=false'
%ifarch x86_64
CHROMIUM_CORE_GN_DEFINES+=' system_libdir="lib64"'
%endif
CHROMIUM_CORE_GN_DEFINES+=' google_api_key="%{api_key}" google_default_client_id="%{default_client_id}" google_default_client_secret="%{default_client_secret}"'
%if 0%{?asan}
CHROMIUM_CORE_GN_DEFINES+=' is_clang=true clang_base_path="/usr" clang_use_chrome_plugins=false fatal_linker_warnings=false use_lld=false'
%else
CHROMIUM_CORE_GN_DEFINES+=' is_clang=false'
%endif
CHROMIUM_CORE_GN_DEFINES+=' use_sysroot=false use_gold=false fieldtrial_testing_like_official_build=true use_custom_libcxx=false'
%if %{freeworld}
CHROMIUM_CORE_GN_DEFINES+=' ffmpeg_branding="ChromeOS" proprietary_codecs=true'
%else
CHROMIUM_CORE_GN_DEFINES+=' ffmpeg_branding="Chromium" proprietary_codecs=false'
%endif
CHROMIUM_CORE_GN_DEFINES+=' treat_warnings_as_errors=false linux_use_bundled_binutils=false use_custom_libcxx=false'
%if 0%{vaapi}
CHROMIUM_CORE_GN_DEFINES+=' use_vaapi=true'
%endif
export CHROMIUM_CORE_GN_DEFINES
CHROMIUM_BROWSER_GN_DEFINES=""
CHROMIUM_BROWSER_GN_DEFINES+=' use_gio=true use_pulseaudio=true icu_use_data_file=true'
%if 0%{?nonacl}
CHROMIUM_BROWSER_GN_DEFINES+=' enable_nacl=false'
%endif
%if 0%{?shared}
CHROMIUM_BROWSER_GN_DEFINES+=' is_component_ffmpeg=true is_component_build=true'
%else
CHROMIUM_BROWSER_GN_DEFINES+=' is_component_ffmpeg=false is_component_build=false'
%endif
CHROMIUM_BROWSER_GN_DEFINES+=' remove_webcore_debug_symbols=true enable_hangout_services_extension=true'
CHROMIUM_BROWSER_GN_DEFINES+=' use_aura=true'
CHROMIUM_BROWSER_GN_DEFINES+=' enable_webrtc=true enable_widevine=true'
%if 0%{gtk3}
CHROMIUM_BROWSER_GN_DEFINES+=' use_gtk3=true'
%else
CHROMIUM_BROWSER_GN_DEFINES+=' use_gtk3=false'
%endif
export CHROMIUM_BROWSER_GN_DEFINES
CHROMIUM_HEADLESS_GN_DEFINES=""
CHROMIUM_HEADLESS_GN_DEFINES+=' use_ozone=true ozone_auto_platforms=false ozone_platform="headless" ozone_platform_headless=true'
CHROMIUM_HEADLESS_GN_DEFINES+=' headless_use_embedded_resources=true icu_use_data_file=false v8_use_external_startup_data=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' enable_nacl=false enable_print_preview=false enable_remoting=false use_alsa=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' use_cups=false use_dbus=false use_gio=false use_kerberos=false use_libpci=false'
CHROMIUM_HEADLESS_GN_DEFINES+=' use_pulseaudio=false use_udev=false'
export CHROMIUM_HEADLESS_GN_DEFINES
# Remove most of the bundled libraries. Libraries specified below (taken from
# Gentoo's Chromium ebuild) are the libraries that needs to be preserved.
build/linux/unbundle/remove_bundled_libraries.py \
'buildtools/third_party/libc++' \
'buildtools/third_party/libc++abi' \
'base/third_party/dmg_fp' \
'base/third_party/dynamic_annotations' \
'base/third_party/icu' \
'base/third_party/libevent' \
'base/third_party/nspr' \
'base/third_party/superfasthash' \
'base/third_party/symbolize' \
'base/third_party/valgrind' \
'base/third_party/xdg_mime' \
'base/third_party/xdg_user_dirs' \
'chrome/third_party/mozilla_security_manager' \
'courgette/third_party' \
'net/third_party/mozilla_security_manager' \
'net/third_party/nss' \
'third_party/WebKit' \
'third_party/adobe' \
'third_party/analytics' \
'third_party/angle' \
'third_party/angle/src/common/third_party/base' \
'third_party/angle/src/common/third_party/smhasher' \
'third_party/angle/src/third_party/compiler' \
'third_party/angle/src/third_party/libXNVCtrl' \
'third_party/angle/src/third_party/trace_event' \
'third_party/blanketjs' \
'third_party/blink' \
'third_party/boringssl' \
'third_party/boringssl/src/third_party/fiat' \
'third_party/breakpad' \
'third_party/breakpad/breakpad/src/third_party/curl' \
'third_party/brotli' \
'third_party/cacheinvalidation' \
'third_party/catapult' \
'third_party/catapult/common/py_vulcanize/third_party/rcssmin' \
'third_party/catapult/common/py_vulcanize/third_party/rjsmin' \
'third_party/catapult/third_party/polymer' \
'third_party/catapult/tracing/third_party/d3' \
'third_party/catapult/tracing/third_party/gl-matrix' \
'third_party/catapult/tracing/third_party/jszip' \
'third_party/catapult/tracing/third_party/mannwhitneyu' \
'third_party/catapult/tracing/third_party/oboe' \
'third_party/catapult/tracing/third_party/pako' \
'third_party/ced' \
'third_party/cld_3' \
'third_party/crc32c' \
'third_party/cros_system_api' \
'third_party/devscripts' \
'third_party/dom_distiller_js' \
'third_party/expat' \
'third_party/ffmpeg' \
'third_party/fips181' \
'third_party/flac' \
'third_party/flatbuffers' \
'third_party/flot' \
'third_party/fontconfig' \
'third_party/freetype' \
'third_party/glslang-angle' \
'third_party/google_input_tools' \
'third_party/google_input_tools/third_party/closure_library' \
'third_party/google_input_tools/third_party/closure_library/third_party/closure' \
'third_party/googletest' \
'third_party/harfbuzz-ng' \
'third_party/hunspell' \
'third_party/iccjpeg' \
'third_party/icu' \
'third_party/inspector_protocol' \
'third_party/jinja2' \