1 |
# eu-strip crashes on chrome binary from this build |
2 |
%define _enable_debug_packages %{nil} |
3 |
%global debug_package %{nil} |
4 |
%global __debug_install_post %{nil} |
5 |
|
6 |
%global use_clang 1 |
7 |
%global system_icu 1 |
8 |
%global system_openjpeg 1 |
9 |
%global system_libtiff 1 |
10 |
# system libevent causes the renderer to get stuck |
11 |
%global system_libevent 0 |
12 |
|
13 |
%if %{system_libevent} |
14 |
%define gn_libevent libevent |
15 |
%endif |
16 |
%if %{use_clang} |
17 |
%define gn_clang is_clang=true |
18 |
%else |
19 |
%define gn_clang is_clang=false |
20 |
%endif |
21 |
|
22 |
%define crname chromium-browser |
23 |
%define _crdir %{_libdir}/%{crname} |
24 |
%define __requires_exclude_from ^%{_crdir}/libwidevinecdmadapter.so$ |
25 |
|
26 |
# eol 'fix' corrupts some .bin |
27 |
%define dont_fix_eol 1 |
28 |
|
29 |
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
30 |
# Note: these are for Mageia use ONLY. |
31 |
# For your own builds, please get your own set of keys. |
32 |
%define google_api_key AIzaSyDhhIHB_kQZodiWr8yDAm8E3GwEyiXmuDU |
33 |
%define google_default_client_id 1039996407057-q599ngv7i6ni4sbkd2fsns30246r9s9v.apps.googleusercontent.com |
34 |
%define google_default_client_secret mRHXPjlS4cLpp1beCiXoYbLZ |
35 |
|
36 |
Name: chromium-browser-stable |
37 |
Version: 77.0.3865.75 |
38 |
Release: %mkrel 1 |
39 |
Summary: A fast webkit-based web browser |
40 |
Group: Networking/WWW |
41 |
License: BSD, LGPL |
42 |
URL: http://www.chromium.org/Home |
43 |
# http://omahaproxy.appspot.com/ |
44 |
# http://googlechromereleases.blogspot.com/ |
45 |
Source0: http://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz |
46 |
Source1: chromium-wrapper |
47 |
Source2: chromium-browser.desktop |
48 |
Source4: widevine_cdm_version.h.in |
49 |
# from gentoo: compiler setup |
50 |
Patch1: chromium-compiler-r4.patch |
51 |
# fix googleisms in man page |
52 |
Patch2: chromium-mageia.patch |
53 |
# (cjw) 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. |
54 |
Patch6: chromium-55-extra-media.patch |
55 |
# (cjw) [1/2] Recognize mimetypes for WMV (.wmv), FLV (.flv) and MPEG (.mpg) videos |
56 |
Patch7: chromium-40-wmvflvmpg.patch |
57 |
# (cjw) [2/2] Handle more video codecs. |
58 |
Patch8: chromium-40-sorenson-spark.patch |
59 |
# (cjw) disable external components -- this stops chromium from downloading hotword stuff, for example |
60 |
Patch10: chromium-45-no-external-components.patch |
61 |
# (debian) disable third party cookies by default |
62 |
Patch11: chromium-third-party-cookies-off-by-default.patch |
63 |
# (cjw) fix build error due to android-specific code |
64 |
Patch19: chromium-50-codec-warnings.patch |
65 |
# (cjw) remove assertion on "chromium" branding in combination with enabled "proprietary codecs" |
66 |
Patch22: chromium-54-proprietary-codecs-assert.patch |
67 |
# (cjw) disable werror for a compilation warning that causes the build to fail |
68 |
Patch23: chromium-53-bignum-werror-fix.patch |
69 |
# (cjw) add -Wno-error=depecated-declarations because ffmpeg deprecations cause the build to fail |
70 |
Patch24: chromium-53-ffmpeg-no-deprecation-errors.patch |
71 |
# (cjw) link several libraries directly instead of loading them using dlopen() |
72 |
Patch27: chromium-53-link-libgio-libpci-libudev-libbrlapi.patch |
73 |
# (cjw) add missing unbundle gn files (1) |
74 |
Patch28: chromium-53-gn-system-icu-jsoncpp.patch |
75 |
# (cjw) add missing unbundle gn files (2) |
76 |
Patch29: chromium-53-gn-system-opus.patch |
77 |
%if %{system_libtiff} |
78 |
# (cjw) build pdfium with system libtiff |
79 |
Patch30: chromium-52-pdfium-system-libtiff-libpng.patch |
80 |
%endif |
81 |
%if %{system_openjpeg} |
82 |
# (cjw) fix pdfium build with system openjpeg |
83 |
Patch31: chromium-74-pdfium-system-libopenjpeg2.patch |
84 |
%endif |
85 |
# (cjw) fix build with current glib... |
86 |
Patch36: chromium-58-glib.patch |
87 |
# (cjw) use system nodejs to fix build |
88 |
Patch37: chromium-58-system-nodejs.patch |
89 |
# (cjw) redefined macro |
90 |
Patch40: chromium-59-gcc5.patch |
91 |
# (cjw) fix coding errors resulting in gcc 7 warning |
92 |
Patch54: chromium-62-gcc7.patch |
93 |
# (cjw) fix gcc errors and warnings |
94 |
Patch177: chromium-64-gcc7.patch |
95 |
# (cjw) fix even more gcc warnings |
96 |
Patch179: chromium-65-gcc7.patch |
97 |
# (cjw) fix yet mmore gcc warnings |
98 |
Patch182: chromium-66-gcc7.patch |
99 |
# (cjw) try to get widevine binary plugin to work (must be taken from a chrome download bundle), v2 |
100 |
Patch183: chromium-67-widevine.patch |
101 |
# (cjw) fix a few more gcc warnings |
102 |
Patch184: chromium-67-gcc7.patch |
103 |
# (cjw) more gcc warnings |
104 |
Patch186: chromium-68-gcc7.patch |
105 |
# (cjw) moore gcc warnings |
106 |
Patch188: chromium-68-gcc8.patch |
107 |
# (cjw) and more gcc warnings |
108 |
Patch189: chromium-69-gcc7.patch |
109 |
# (cjw) fix gn bootstrapping with gcc |
110 |
Patch190: chromium-69-gn-bootstrap.patch |
111 |
# (cjw) moooore gcc warnings |
112 |
Patch192: chromium-70-gcc8.patch |
113 |
# (cjw) build fixes for 64-bit arm |
114 |
Patch193: chromium-70-aarch64.patch |
115 |
# (joequant) fix crash on cinnamon |
116 |
Patch194: chromium-69-cinnamon.patch |
117 |
# (cjw) gn bootstrap fix |
118 |
Patch195: chromium-72-gn-bootstrap.patch |
119 |
# (cjw) yet more gcc warnings |
120 |
Patch196: chromium-72-gcc8.patch |
121 |
# (cjw) use system closure compiler |
122 |
Patch197: chromium-72-system-closure-compiler.patch |
123 |
# (cjw) fix i586 build |
124 |
Patch198: chromium-72-i586.patch |
125 |
# (cjw) some more gcc warnings |
126 |
Patch199: chromium-73-gcc8.patch |
127 |
# (cjw) gcc warnings |
128 |
Patch200: chromium-74-gcc8.patch |
129 |
# (cjw) gcc warnings |
130 |
Patch201: chromium-75-gcc8.patch |
131 |
# (cjw) fixes for gcc warnings that do not work with clang |
132 |
%if !%{use_clang} |
133 |
Patch203: chromium-75-gcc-only.patch |
134 |
%endif |
135 |
# (cjw) gcc warnings |
136 |
Patch205: chromium-76-gcc8.patch |
137 |
# (cjw) system zlib build fix |
138 |
Patch206: SOURCES/chromium-77-system-zlib.patch |
139 |
# (cjw) gcc warnings |
140 |
Patch207: chromium-77-gcc9.patch |
141 |
# (cjw) fix missing const qualifiers in pulseaudio prototype |
142 |
Patch208: chromium-77-system-pulseaudio.patch |
143 |
# (cjw) fix build with system icu |
144 |
Patch209: chromium-77-system-icu.patch |
145 |
# (cjw) add missing harfbuzz library to fix link errors |
146 |
Patch210: chromium-77-system-harfbuzz.patch |
147 |
# (cjw) fixes for gcc warnings that do not work with clang |
148 |
%if !%{use_clang} |
149 |
Patch211: chromium-77-gcc-only.patch |
150 |
%endif |
151 |
# (cjw) fixes for build with gcc's libstdc++ |
152 |
Patch212: chromium-77-libstdc++.patch |
153 |
# (cjw) via gentoo, fix renderer crash at startup |
154 |
# from upstream: https://bugs.chromium.org/p/chromium/issues/detail?id=980025 |
155 |
Patch213: chromium-77-std-string.patch |
156 |
# (cjw) via gentoo, specific gcc build fix |
157 |
Patch214: chromium-77-gcc-abstract.patch |
158 |
# (cjw) force use of python2, since python3 does not work |
159 |
Patch215: chromium-77-python2.patch |
160 |
|
161 |
|
162 |
Provides: %{crname} |
163 |
Obsoletes: chromium-browser-unstable < 26.0.1410.51 |
164 |
Obsoletes: chromium-browser-beta < 26.0.1410.51 |
165 |
Obsoletes: chromium-browser < 1:9.0.597.94 |
166 |
BuildRequires: bison |
167 |
BuildRequires: flex |
168 |
BuildRequires: gperf |
169 |
BuildRequires: icu |
170 |
BuildRequires: ninja |
171 |
BuildRequires: python2 |
172 |
BuildRequires: yasm |
173 |
BuildRequires: bzip2-devel |
174 |
#BuildRequires: closure-compiler |
175 |
BuildRequires: cups-devel |
176 |
BuildRequires: elfutils-devel |
177 |
BuildRequires: ffmpeg-devel |
178 |
BuildRequires: glib2-devel |
179 |
BuildRequires: gtk3-devel |
180 |
BuildRequires: libatomic-devel |
181 |
%if %{system_libevent} |
182 |
BuildRequires: libevent-devel |
183 |
%endif |
184 |
BuildRequires: libmesagl-devel |
185 |
BuildRequires: libpam-devel |
186 |
BuildRequires: libpulseaudio-devel |
187 |
BuildRequires: mesaglesv2-devel |
188 |
%if %mgaver >= 6 |
189 |
BuildRequires: nodejs |
190 |
%endif |
191 |
BuildRequires: osmesa-devel |
192 |
#BuildRequires: protobuf-devel |
193 |
BuildRequires: snappy-devel |
194 |
BuildRequires: perl(Switch) |
195 |
BuildRequires: pkgconfig(alsa) |
196 |
BuildRequires: pkgconfig(atk) |
197 |
BuildRequires: pkgconfig(dbus-glib-1) |
198 |
BuildRequires: pkgconfig(expat) |
199 |
BuildRequires: pkgconfig(flac) |
200 |
BuildRequires: pkgconfig(fontconfig) |
201 |
BuildRequires: pkgconfig(freetype2) |
202 |
BuildRequires: pkgconfig(glu) |
203 |
BuildRequires: pkgconfig(gnome-keyring-1) |
204 |
BuildRequires: pkgconfig(gnutls) |
205 |
%if %mgaver >= 7 |
206 |
BuildRequires: pkgconfig(harfbuzz) |
207 |
%endif |
208 |
%if %{system_icu} |
209 |
BuildRequires: pkgconfig(icu-i18n) |
210 |
%endif |
211 |
BuildRequires: pkgconfig(jsoncpp) |
212 |
BuildRequires: pkgconfig(libcap) |
213 |
BuildRequires: pkgconfig(libdrm) |
214 |
BuildRequires: pkgconfig(libexif) |
215 |
BuildRequires: pkgconfig(libjpeg) |
216 |
BuildRequires: pkgconfig(libopenjp2) |
217 |
BuildRequires: pkgconfig(libpci) |
218 |
BuildRequires: pkgconfig(libpng) |
219 |
%if %{system_libtiff} |
220 |
BuildRequires: pkgconfig(libtiff-4) |
221 |
%endif |
222 |
BuildRequires: pkgconfig(libusb-1.0) |
223 |
%if %mgaver >= 7 |
224 |
BuildRequires: pkgconfig(libvpx) |
225 |
%endif |
226 |
BuildRequires: pkgconfig(libwebp) |
227 |
BuildRequires: pkgconfig(libxml-2.0) |
228 |
BuildRequires: pkgconfig(libxslt) |
229 |
BuildRequires: pkgconfig(minizip) |
230 |
BuildRequires: pkgconfig(nspr) |
231 |
BuildRequires: pkgconfig(nss) |
232 |
BuildRequires: pkgconfig(opus) |
233 |
BuildRequires: pkgconfig(speech-dispatcher) |
234 |
BuildRequires: pkgconfig(speex) |
235 |
BuildRequires: pkgconfig(udev) |
236 |
BuildRequires: pkgconfig(xscrnsaver) |
237 |
BuildRequires: pkgconfig(xt) |
238 |
BuildRequires: pkgconfig(xtst) |
239 |
BuildRequires: pkgconfig(zlib) |
240 |
%if %{use_clang} |
241 |
BuildRequires: clang |
242 |
%endif |
243 |
|
244 |
# Unused but building gn wants it to be present |
245 |
BuildRequires: pkgconfig(gconf-2.0) |
246 |
BuildRequires: git |
247 |
ExclusiveArch: i586 x86_64 |
248 |
# aarch64 does not build without fewer than default parallel jobs config |
249 |
# armv5tl armv7hl |
250 |
|
251 |
%description |
252 |
Chromium is a browser that combines a minimal design with sophisticated |
253 |
technology to make the web faster, safer, and easier. |
254 |
|
255 |
For certain media playback features - AAC decoding - this package |
256 |
currently assumes decoder support is available, while that is only true if |
257 |
the 'tainted' variety of the libavcodec package is installed. When the 'core' |
258 |
variety of libavcodec is installed, chromium may output noise for AAC audio. |
259 |
|
260 |
%ifarch %{ix86} |
261 |
The i586 build of this package does not work on machines that do not |
262 |
support the SSE2 instruction set extension. |
263 |
%endif |
264 |
|
265 |
%package -n chromium-browser |
266 |
Summary: A fast webkit-based web browser (transition package) |
267 |
Epoch: 1 |
268 |
Group: Networking/WWW |
269 |
Requires: %{name} = %{version}-%{release} |
270 |
|
271 |
%description -n chromium-browser |
272 |
Chromium is a browser that combines a minimal design with sophisticated |
273 |
technology to make the web faster, safer, and easier. |
274 |
|
275 |
This is a transition package that installs the stable channel Chromium |
276 |
browser. |
277 |
|
278 |
%prep |
279 |
%setup -q -n chromium-%{version} |
280 |
%autopatch -p1 |
281 |
|
282 |
# files we do not want from upstream source bundles |
283 |
rm -r --interactive=never third_party/breakpad/breakpad/src/processor/testdata/ |
284 |
rm -r --interactive=never third_party/breakpad/breakpad/src/tools |
285 |
rm -r --interactive=never chrome/common/extensions/docs/ |
286 |
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,firefox320_profile,firefox35_profile,firefox3_nss,firefox3_nss_mac,firefox3_profile,firefox_profile,firefox_searchplugins,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,pdf,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,subresource_filter,sunspider,sync,template_url_scraper,textinput,third_party,top_sites,translate,unit,v8_benchmark_v6,viewsource,web_app_info,webrtc,websocket,webui_test_resources.grd,whitelists,workers} |
287 |
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,pnacl_mime_type} |
288 |
rmdir chrome/test/data/webui/{settings,extensions}/a11y |
289 |
rmdir chrome/test/data/webui/settings/chromeos |
290 |
rmdir chrome/test/data/webui/{engagement,extensions,print_preview,cr_elements,settings,history,net_internals} |
291 |
rm -r --interactive=never components/test/data/update_client/jebgalgnebhfojomionfpkfelancnnkf/component1.dll |
292 |
rm -r --interactive=never content/test/data/ |
293 |
rm -r --interactive=never ppapi/native_client/tests/ |
294 |
rm -r --interactive=never third_party/apache-win32/ |
295 |
rm -r --interactive=never third_party/binutils/ |
296 |
rm -r --interactive=never third_party/expat/files/ |
297 |
rm -r --interactive=never third_party/ffmpeg/*/* |
298 |
rm -r --interactive=never third_party/flac/{include,src} |
299 |
rm -r --interactive=never third_party/icu/{android,android_small,common,patches,source,chromeos,ios} |
300 |
rm -r --interactive=never third_party/jsoncpp/source |
301 |
rm -r --interactive=never third_party/lcov |
302 |
rm -r --interactive=never third_party/libvpx/source/{libvpx,config} |
303 |
rm -r --interactive=never third_party/libjpeg/*.[ch] |
304 |
rm -r --interactive=never third_party/libjpeg_turbo/*.[ch] |
305 |
rm -r --interactive=never third_party/libpng/*.[ch] |
306 |
rm -r --interactive=never third_party/libxslt/{linux,mac,src,win32} |
307 |
rm -r --interactive=never third_party/xdg-utils/tests/ |
308 |
rm -r --interactive=never third_party/yasm/source/ |
309 |
rm -r --interactive=never third_party/zlib/{*.[ch],contrib/minizip} |
310 |
rm -r --interactive=never native_client_sdk/src/tools/lib/tests/data |
311 |
rm -r --interactive=never buildtools/third_party/eu-strip/bin |
312 |
rm -r --interactive=never third_party/pdfium/third_party/eu-strip |
313 |
rm --interactive=never third_party/pdfium/third_party/libopenjpeg20/*.[ch] |
314 |
rm -r --interactive=never third_party/pdfium/third_party/libpng16 |
315 |
%if %{system_libtiff} |
316 |
rm --interactive=never third_party/pdfium/third_party/libtiff/*.[ch] |
317 |
%endif |
318 |
rm -r --interactive=never third_party/pdfium/third_party/yasm/source |
319 |
rm --interactive=never third_party/swiftshader/third_party/PowerVR_SDK/Utilities/Filewrap/Windows_x86_32/Filewrap.exe |
320 |
rm --interactive=never native_client/tools/redirector.exe |
321 |
rm --interactive=never third_party/webrtc/data/voice_engine/stereo_rtp_files/rtpplay.exe |
322 |
rm -r --interactive=never third_party/llvm |
323 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-Gerbera.exe |
324 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/SanOGLES-PVRSDK.exe |
325 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/t/libGLES_CM.dll |
326 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/gles/bob/bob |
327 |
rm --interactive=never third_party/webgl/src/sdk/demos/google/san-angeles/glut/SanOGLES |
328 |
rm --interactive=never third_party/lzma_sdk/Executable/7za.exe |
329 |
rm --interactive=never third_party/lzma_sdk/7zr.exe |
330 |
rm --interactive=never third_party/breakpad/symupload.exe |
331 |
rm -r --interactive=never third_party/catapult/third_party/google-endpoints/setuptools |
332 |
rm -r --interactive=never third_party/catapult/third_party/vinn/third_party/v8 |
333 |
rm --interactive=never third_party/depot_tools/ninja.exe |
334 |
rm --interactive=never third_party/depot_tools/ninja-linux32 |
335 |
rm --interactive=never third_party/depot_tools/ninja-linux64 |
336 |
rm -r --interactive=never native_client/tools/hermetic_cygwin |
337 |
rm -r --interactive=never base/test/data/pe_image/ |
338 |
rm -r --interactive=never base/test/data/file_version_info_unittest |
339 |
rm -r --interactive=never chrome/chrome_cleaner/test/resources/signed_dll |
340 |
rm --interactive=never third_party/crashpad/crashpad/handler/win/z7_test.dll |
341 |
rm -r --interactive=never third_party/crashpad/crashpad/snapshot/elf/elf_image_reader_fuzzer_corpus |
342 |
rm -r --interactive=never third_party/boringssl/src/util/ar/testdata |
343 |
rm -r --interactive=never third_party/pyelftools/test/testfiles_for_unittests |
344 |
rm -r --interactive=never third_party/pyelftools/test/external_tools |
345 |
rm -r --interactive=never third_party/pyelftools/test/testfiles_for_readelf |
346 |
rm -r --interactive=never third_party/pyelftools/examples |
347 |
rm -r --interactive=never third_party/skia/platform_tools/android/bin |
348 |
rm --interactive=never third_party/nasm/travis/test/tmap.o.t |
349 |
rm -r --interactive=never third_party/chromite/lib/datafiles |
350 |
rm -r --interactive=never components/test/data/update_client |
351 |
rm -r --interactive=never build/android/tests/symbolize |
352 |
|
353 |
rm --interactive=never third_party/skia/platform_tools/android/apps/gradle/wrapper/gradle-wrapper.jar |
354 |
rm -r --interactive=never third_party/sfntly/src/java/lib |
355 |
rm --interactive=never third_party/libphonenumber/dist/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar |
356 |
rm --interactive=never third_party/libphonenumber/dist/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar |
357 |
rm -r --interactive=never third_party/libphonenumber/dist/java/demo/war/WEB-INF/lib |
358 |
rm -r --interactive=never third_party/libphonenumber/dist/java/lib |
359 |
rm --interactive=never third_party/webrtc/examples/androidapp/third_party/autobanh/lib/autobanh.jar |
360 |
rm -r --interactive=never third_party/cacheinvalidation/src/example-app-build/libs |
361 |
rm --interactive=never third_party/closure_compiler/compiler/compiler.jar |
362 |
rm -r --interactive=never third_party/sfntly/src/cpp/ext |
363 |
rm --interactive=never third_party/bazel/desugar/Desugar-runtime.jar |
364 |
rm --interactive=never third_party/flatbuffers/src/android/gradle/wrapper/gradle-wrapper.jar |
365 |
rm --interactive=never third_party/flatbuffers/src/samples/android/gradle/wrapper/gradle-wrapper.jar |
366 |
rm --interactive=never third_party/blink/renderer/devtools/scripts/closure/compiler.jar |
367 |
rm --interactive=never third_party/blink/renderer/devtools/scripts/closure/closure_runner/closure_runner.jar |
368 |
rm --interactive=never third_party/blink/renderer/devtools/scripts/jsdoc_validator/jsdoc_validator.jar |
369 |
rm --interactive=never third_party/gradle_wrapper/gradle/wrapper/gradle-wrapper.jar |
370 |
rm --interactive=never third_party/webgl/src/conformance-suites/2.0.0/deqp/compiler.jar |
371 |
|
372 |
%if %{system_libevent} |
373 |
find base/third_party/libevent -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete |
374 |
%endif |
375 |
|
376 |
%if %{system_icu} |
377 |
# Remove bundled ICU; its header files appear to get picked up instead of |
378 |
# the system ones, leading to errors during the final link stage. |
379 |
# https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q |
380 |
find third_party/icu -type f \! -regex '.*\.\(gn\|gni\|isolate\)' -delete |
381 |
%endif |
382 |
|
383 |
# Hard code extra version |
384 |
FILE=chrome/common/channel_info_posix.cc |
385 |
sed -i.orig -re 's/char\s*\*(.*)getenv\("CHROME_VERSION_EXTRA"\)/char const *\1"%{product_vendor} %{product_version}"/' $FILE |
386 |
if diff -u $FILE $FILE.orig >/dev/null; then |
387 |
exit 1 |
388 |
fi |
389 |
|
390 |
# version taken from: strings opt/google/chrome-unstable/chrome | grep -C 1 " (version:" |
391 |
%define widevine_version 1.4.8.1008 |
392 |
for chrome_arch in ia32 x64; do |
393 |
mkdir -p third_party/widevine/cdm/linux/${chrome_arch} |
394 |
sed -e "s/@WIDEVINE_VERSION@/%{widevine_version}/" %{SOURCE4} > third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h |
395 |
done |
396 |
|
397 |
%build |
398 |
%if %mgaver >= 7 |
399 |
%define system_gn_list ffmpeg flac libwebp libxml libxslt snappy yasm libvpx libpng icu zlib jsoncpp opus libdrm %{?gn_libevent} |
400 |
%else |
401 |
%define system_gn_list ffmpeg flac libwebp libxml libxslt snappy yasm libpng icu zlib jsoncpp opus libdrm |
402 |
%endif |
403 |
# handled by upstream regular build scripts? : freetype harfbuzz-ng |
404 |
# mesa |
405 |
|
406 |
# v NO TABS IN HERE! |
407 |
%define gn_config use_sysroot=false \ |
408 |
system_libdir="%{_lib}" \ |
409 |
icu_use_data_file=true \ |
410 |
enable_nacl=false \ |
411 |
is_nacl_glibc=false \ |
412 |
binutils_path="%{_bindir}" \ |
413 |
linux_use_bundled_binutils=false \ |
414 |
custom_toolchain="//build/toolchain/linux/unbundle:default" \ |
415 |
host_toolchain="//build/toolchain/linux/unbundle:default" \ |
416 |
proprietary_codecs=true \ |
417 |
enable_ac3_eac3_audio_demuxing=true \ |
418 |
enable_mse_mpeg2ts_stream_parser=true \ |
419 |
enable_hevc_demuxing=true \ |
420 |
use_system_libjpeg=true \ |
421 |
use_system_libopenjpeg2=true \ |
422 |
use_libjpeg_turbo=false \ |
423 |
enable_widevine=true \ |
424 |
pdf_enable_xfa=true \ |
425 |
gtk_version=3 \ |
426 |
fatal_linker_warnings=false \ |
427 |
use_libpci = true \ |
428 |
use_pulseaudio=true \ |
429 |
use_allocator="none" \ |
430 |
is_debug=false \ |
431 |
%{?gn_clang} \ |
432 |
clang_use_chrome_plugins=false \ |
433 |
use_lld=false \ |
434 |
use_system_freetype=true \ |
435 |
use_system_harfbuzz=true \ |
436 |
use_system_libpng=true \ |
437 |
use_custom_libcxx=false \ |
438 |
closure_compile=false \ |
439 |
google_api_key="%{google_api_key}" \ |
440 |
google_default_client_id="%{google_default_client_id}" \ |
441 |
google_default_client_secret="%{google_default_client_secret}" |
442 |
|
443 |
|
444 |
# enable_browser_cdms=true \ |
445 |
|
446 |
build/linux/unbundle/replace_gn_files.py --system-libraries %{system_gn_list} |
447 |
third_party/libaddressinput/chromium/tools/update-strings.py |
448 |
|
449 |
%setup_compile_flags |
450 |
%if %{use_clang} |
451 |
CC=clang; export CC |
452 |
CXX=clang++; export CXX |
453 |
%else |
454 |
CC=%{__cc}; export CC |
455 |
CXX=%{__cxx}; export CXX |
456 |
%endif |
457 |
AR=%{__ar}; export AR |
458 |
NM=%{__nm}; export NM |
459 |
LD="%{__cxx} -fuse-ld=gold"; export LD |
460 |
|
461 |
# filter out -g from CFLAGS and CXXFLAGS to fix builds |
462 |
CFLAGS=$(echo "$CFLAGS"|sed -e 's/-g //') |
463 |
CXXFLAGS=$(echo "$CXXFLAGS"|sed -e 's/-g //') |
464 |
CXXFLAGS="$CXXFLAGS -faligned-new -Wno-attributes" |
465 |
%if %{use_clang} |
466 |
CFLAGS="$CFLAGS -Wno-error=unused-result" |
467 |
CXXFLAGS="$CXXFLAGS -Wno-error=deprecated-declarations" |
468 |
%else |
469 |
CXXFLAGS="$CXXFLAGS -Wno-error=class-memaccess -Wno-error=unknown-pragmas -Wno-error=array-bounds" |
470 |
%endif |
471 |
%ifarch %ix86 |
472 |
LDFLAGS="$LDFLAGS -Wl,--no-keep-files-mapped" |
473 |
%endif |
474 |
|
475 |
%ifarch %{ix86} |
476 |
CFLAGS="$CFLAGS -msse2" |
477 |
CXXFLAGS="$CXXFLAGS -msse2" |
478 |
%endif |
479 |
|
480 |
python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}' |
481 |
|
482 |
out/Release/gn gen --script-executable=/usr/bin/python2 --args='%{gn_config}' out/Release |
483 |
|
484 |
pushd out/Release |
485 |
ninja %{_smp_mflags} chrome chrome_sandbox |
486 |
popd |
487 |
|
488 |
# man page |
489 |
sed -e "s/@@PACKAGE@@/chromium/" -e "s/@@MENUNAME@@/Chromium Web Browser/" chrome/app/resources/manpage.1.in >out/Release/chromium.1 |
490 |
|
491 |
%install |
492 |
ls out/Release |
493 |
mkdir -p %{buildroot}%{_bindir} |
494 |
mkdir -p %{buildroot}%{_crdir}/locales |
495 |
mkdir -p %{buildroot}%{_crdir}/themes |
496 |
mkdir -p %{buildroot}%{_crdir}/default_apps |
497 |
mkdir -p %{buildroot}%{_mandir}/man1 |
498 |
install -m 755 %{_sourcedir}/chromium-wrapper %{buildroot}%{_crdir}/ |
499 |
install -m 755 out/Release/chrome %{buildroot}%{_crdir}/ |
500 |
install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox |
501 |
install -m 644 out/Release/chromium.1 %{buildroot}%{_mandir}/man1/%{crname}.1 |
502 |
install -m 644 out/Release/chrome_100_percent.pak %{buildroot}%{_crdir}/ |
503 |
install -m 644 out/Release/chrome_200_percent.pak %{buildroot}%{_crdir}/ |
504 |
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/ |
505 |
install -m 644 out/Release/natives_blob.bin %{buildroot}%{_crdir}/ |
506 |
install -m 644 out/Release/snapshot_blob.bin %{buildroot}%{_crdir}/ |
507 |
install -m 755 out/Release/mksnapshot %{buildroot}%{_crdir}/ |
508 |
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/ |
509 |
install -m 644 chrome/browser/resources/default_apps/* %{buildroot}%{_crdir}/default_apps/ |
510 |
install -m 644 out/Release/v8_context_snapshot.bin %{buildroot}%{_crdir}/ |
511 |
ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname} |
512 |
|
513 |
%ifarch %{ix86} x86_64 |
514 |
mkdir -p %{buildroot}%{_crdir}/swiftshader |
515 |
install -m 755 out/Release/swiftshader/*.so %{buildroot}%{_crdir}/swiftshader/ |
516 |
%endif |
517 |
|
518 |
find out/Release/resources/ -name "*.d" -exec rm {} \; |
519 |
cp -r out/Release/resources %{buildroot}%{_crdir} |
520 |
|
521 |
# desktop file |
522 |
mkdir -p %{buildroot}%{_datadir}/applications |
523 |
install -m 644 %{_sourcedir}/%{crname}.desktop %{buildroot}%{_datadir}/applications/ |
524 |
|
525 |
%if %{system_icu} |
526 |
# symlink to ICU data file |
527 |
ICUDATADIR=$(icuinfo | grep \"icudata.path\" | sed -re 's/^.*>(.*)<.*$/\1/') |
528 |
ICUDATANAME=$(icuinfo | grep \"icudata.name\" | sed -re 's/^.*>(.*)<.*$/\1/') |
529 |
ICUDATAFILE=$(realpath --relative-to=%{_crdir}/ ${ICUDATADIR}/${ICUDATANAME}.dat) |
530 |
ln -s ${ICUDATAFILE} %{buildroot}%{_crdir}/icudtl.dat |
531 |
%else |
532 |
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/ |
533 |
%endif |
534 |
|
535 |
# icon |
536 |
for i in 22_mono 24 48 64 128 256; do |
537 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
538 |
install -m 644 chrome/app/theme/chromium/product_logo_$i.png \ |
539 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
540 |
done |
541 |
|
542 |
for i in 16 32; do |
543 |
mkdir -p %{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps |
544 |
install -m 644 chrome/app/theme/default_100_percent/chromium/product_logo_$i.png \ |
545 |
%{buildroot}%{_iconsdir}/hicolor/${i}x${i}/apps/%{crname}.png |
546 |
done |
547 |
|
548 |
%files -n chromium-browser |
549 |
|
550 |
%files |
551 |
%{_bindir}/%{crname} |
552 |
%dir %{_crdir} |
553 |
%{_crdir}/chromium-wrapper |
554 |
%{_crdir}/chrome |
555 |
%attr(4755,root,root) %{_crdir}/chrome-sandbox |
556 |
%{_crdir}/icudtl.dat |
557 |
%{_crdir}/locales |
558 |
%{_crdir}/natives_blob.bin |
559 |
%{_crdir}/snapshot_blob.bin |
560 |
%{_crdir}/resources.pak |
561 |
%{_crdir}/resources |
562 |
%{_crdir}/chrome_100_percent.pak |
563 |
%{_crdir}/chrome_200_percent.pak |
564 |
%{_crdir}/mksnapshot |
565 |
%{_crdir}/themes |
566 |
%{_crdir}/default_apps |
567 |
%ifarch %{ix86} x86_64 |
568 |
%{_crdir}/swiftshader |
569 |
%endif |
570 |
%{_crdir}/v8_context_snapshot.bin |
571 |
%{_mandir}/man1/%{crname}* |
572 |
%{_datadir}/applications/*.desktop |
573 |
%{_iconsdir}/hicolor/*/apps/%{crname}.png |