/[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 1715255 - (show annotations) (download)
Mon Apr 12 14:57:36 2021 UTC (3 years ago) by ns80
File size: 26813 byte(s)
- SILENT: try building with only 4 CPUs

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

  ViewVC Help
Powered by ViewVC 1.1.30