/[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 1715152 - (show annotations) (download)
Mon Apr 12 09:14:47 2021 UTC (3 years ago) by ns80
File size: 26787 byte(s)
- SILENT: revert to gcc

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

  ViewVC Help
Powered by ViewVC 1.1.30