2018-04-24 14:28:44 +03:00
|
|
|
# This spec file is based on other spec files, ebuilds, PKGBUILDs available from
|
2020-10-22 17:33:11 +03:00
|
|
|
# [1] https://build.opensuse.org/package/show/openSUSE:Factory/chromium
|
2018-04-24 14:28:44 +03:00
|
|
|
# [2] https://copr.fedoraproject.org/coprs/churchyard/chromium-russianfedora-tested/
|
|
|
|
# [3] https://www.archlinux.org/packages/extra/x86_64/chromium/
|
|
|
|
# [4] https://src.fedoraproject.org/rpms/chromium/
|
|
|
|
# [5] https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/
|
2021-03-07 15:48:30 +03:00
|
|
|
# [6] https://packages.altlinux.org/ru/sisyphus/srpms/chromium
|
|
|
|
# [7] https://packages.altlinux.org/ru/sisyphus/specfiles/chromium-gost
|
2021-09-02 09:28:44 +03:00
|
|
|
# [8] https://github.com/saiarcot895/chromium-ubuntu-build
|
2018-04-24 14:28:44 +03:00
|
|
|
|
2018-11-11 01:39:53 +03:00
|
|
|
# Get the version number of latest stable version
|
|
|
|
# $ curl -s 'https://omahaproxy.appspot.com/all?os=linux&channel=stable' | sed 1d | cut -d , -f 3
|
2018-04-24 14:28:44 +03:00
|
|
|
|
2020-12-13 16:34:28 +00:00
|
|
|
%ifarch %{x86_64} %ix86
|
2019-09-21 23:02:43 +03:00
|
|
|
%bcond_without gost
|
2020-03-23 21:24:20 +03:00
|
|
|
%else
|
|
|
|
%bcond_with gost
|
|
|
|
%endif
|
2014-11-24 10:50:36 +03:00
|
|
|
|
2021-03-30 00:43:37 +03:00
|
|
|
# Gold linker
|
|
|
|
# http://a3f.at/lists/linkers
|
|
|
|
%bcond_with gold
|
|
|
|
|
|
|
|
# Linker is out of memory on 32 bit with -g2
|
|
|
|
# XXX debugsource package is empty, probably there are odd compiler flags
|
|
|
|
# TODO: fix building with debuginfo
|
|
|
|
%bcond_with debug
|
|
|
|
|
|
|
|
%if %{without debug}
|
|
|
|
%define debug_package %{nil}
|
|
|
|
%endif
|
|
|
|
|
2015-11-11 18:16:42 +03:00
|
|
|
# eol 'fix' corrupts some .bin
|
|
|
|
%define dont_fix_eol 1
|
2016-02-25 12:05:16 +03:00
|
|
|
%define _disable_lto 1
|
2015-11-11 18:16:42 +03:00
|
|
|
|
2012-07-04 11:57:27 +04:00
|
|
|
%define crname chromium-browser
|
|
|
|
%define _crdir %{_libdir}/%{crname}
|
2021-09-02 09:28:44 +03:00
|
|
|
# Yandex Browser, Opera and other proprietary forks of Chromium look for libffmpeg.so in /usr/lib/chromium-browser,
|
|
|
|
# while we use /usr/lib64/chromium-browser on x86_64
|
|
|
|
%define _crdir_compat %{_prefix}/lib/%{crname}
|
2020-09-01 01:05:31 +03:00
|
|
|
|
2016-11-17 23:12:20 +10:00
|
|
|
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys
|
2018-11-11 01:39:53 +03:00
|
|
|
# Note: these are for Mageia use ONLY.
|
|
|
|
# For your own builds, please get your own set of keys.
|
|
|
|
%define google_api_key AIzaSyDhhIHB_kQZodiWr8yDAm8E3GwEyiXmuDU
|
|
|
|
%define google_default_client_id 1039996407057-q599ngv7i6ni4sbkd2fsns30246r9s9v.apps.googleusercontent.com
|
|
|
|
%define google_default_client_secret mRHXPjlS4cLpp1beCiXoYbLZ
|
2016-11-17 23:12:20 +10:00
|
|
|
|
2019-09-21 23:02:43 +03:00
|
|
|
# GOST patches and sources
|
2021-05-27 20:32:27 +03:00
|
|
|
# Using commit hashes because upstream often puts tags long after making changes
|
|
|
|
# (they wait for builds to finish to make a new "release" with binary packages)
|
2022-02-02 15:27:14 +03:00
|
|
|
%define chromium_gost_commit 1bac910d2f90c5a802052443569c295f95ecb5f4
|
2022-01-05 04:56:37 +03:00
|
|
|
%define msspi_commit d9e90e4ef29b3a1abbcde4625363158566d6c8a4
|
2019-09-21 23:02:43 +03:00
|
|
|
%define _gostsourcedir %{_builddir}/chromium-gost
|
|
|
|
|
2020-10-22 17:33:11 +03:00
|
|
|
%define xcb_version 1.14.1
|
2020-07-17 20:27:23 +03:00
|
|
|
|
2020-08-13 23:46:29 +03:00
|
|
|
%if %{mdvver} <= 201410
|
2021-01-21 01:16:12 +03:00
|
|
|
%bcond_without bundled_llvm
|
2020-07-27 17:02:43 +03:00
|
|
|
%else
|
2021-01-21 01:16:12 +03:00
|
|
|
%bcond_with bundled_llvm
|
2021-05-06 01:10:46 +03:00
|
|
|
%define llvm_prefix /opt/llvm12
|
2020-07-27 17:02:43 +03:00
|
|
|
%endif
|
|
|
|
|
2020-08-23 11:21:22 +03:00
|
|
|
# Verbose logging during build
|
|
|
|
%bcond_with verbose
|
|
|
|
|
2020-08-01 21:38:34 +03:00
|
|
|
%global __requires_exclude (^devel\\(|.*\\.so\\()
|
2021-11-29 15:16:23 +03:00
|
|
|
# alternative syntax for rpm5
|
|
|
|
%define __noautoreq '^libffmpeg'
|
2020-08-01 21:38:34 +03:00
|
|
|
# Do not provide libEGL.so, libGLESv2.so
|
|
|
|
%global __provides_exclude_from ^%{_crdir}/.*\\.so$
|
|
|
|
|
Use python 3.8 on old platforms
```
[1467/49932] ACTION //gpu/config:process_json(//build/toolchain/linux:clang_x64)
FAILED: gen/gpu/config/gpu_driver_bug_list_arrays_and_structs_autogen.h gen/gpu/config/gpu_driver_bug_list_autogen.cc gen/gpu/config/gpu_driver_bug_list_autogen.h gen/gpu/config/gpu_driver_bug_list_exceptions_autogen.h gen/gpu/config/software_rendering_list_arrays_and_structs_autogen.h gen/gpu/config/software_rendering_list_autogen.cc gen/gpu/config/software_rendering_list_autogen.h gen/gpu/config/software_rendering_list_exceptions_autogen.h
/usr/bin/python3 ../../gpu/config/process_json.py --output-dir gen/gpu/config --skip-testing-data --os-filter linux
Traceback (most recent call last):
File "../../gpu/config/process_json.py", line 1066, in <module>
sys.exit(main(sys.argv[1:]))
File "../../gpu/config/process_json.py", line 1041, in main
script_dir, options.output_dir, options.os_filter)
File "../../gpu/config/process_json.py", line 930, in process_software_rendering_list
'Software')
File "../../gpu/config/process_json.py", line 837, in process_json_file
json_data = json.load(json_file)
File "/usr/lib64/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```
2021-09-05 21:09:15 +03:00
|
|
|
%if %{mdvver} >= 202110
|
2021-09-02 09:28:44 +03:00
|
|
|
%define __python %{__python3}
|
Use python 3.8 on old platforms
```
[1467/49932] ACTION //gpu/config:process_json(//build/toolchain/linux:clang_x64)
FAILED: gen/gpu/config/gpu_driver_bug_list_arrays_and_structs_autogen.h gen/gpu/config/gpu_driver_bug_list_autogen.cc gen/gpu/config/gpu_driver_bug_list_autogen.h gen/gpu/config/gpu_driver_bug_list_exceptions_autogen.h gen/gpu/config/software_rendering_list_arrays_and_structs_autogen.h gen/gpu/config/software_rendering_list_autogen.cc gen/gpu/config/software_rendering_list_autogen.h gen/gpu/config/software_rendering_list_exceptions_autogen.h
/usr/bin/python3 ../../gpu/config/process_json.py --output-dir gen/gpu/config --skip-testing-data --os-filter linux
Traceback (most recent call last):
File "../../gpu/config/process_json.py", line 1066, in <module>
sys.exit(main(sys.argv[1:]))
File "../../gpu/config/process_json.py", line 1041, in main
script_dir, options.output_dir, options.os_filter)
File "../../gpu/config/process_json.py", line 930, in process_software_rendering_list
'Software')
File "../../gpu/config/process_json.py", line 837, in process_json_file
json_data = json.load(json_file)
File "/usr/lib64/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```
2021-09-05 21:09:15 +03:00
|
|
|
%else
|
|
|
|
%define __python %{__python38}
|
|
|
|
%endif
|
2021-01-08 15:48:07 +03:00
|
|
|
|
2021-03-30 00:43:37 +03:00
|
|
|
# workaround rpmlint bugs (?)
|
|
|
|
%global _build_pkgcheck_set /bin/sh %{_sourcedir}/rpmlint-wrapper.sh %{_build_pkgcheck_set}
|
|
|
|
|
2021-05-06 00:55:58 +03:00
|
|
|
%define _default_patch_fuzz 12
|
|
|
|
|
2015-06-22 21:51:15 +10:00
|
|
|
Summary: A fast web browser based on the Blink engine
|
|
|
|
Name: chromium-browser-stable
|
2022-02-02 15:27:14 +03:00
|
|
|
Version: 98.0.4758.80
|
2022-02-05 07:11:42 +03:00
|
|
|
Release: 2
|
2015-06-22 21:51:15 +10:00
|
|
|
License: BSD, LGPL
|
|
|
|
Group: Networking/WWW
|
2017-01-31 10:51:58 +03:00
|
|
|
Url: https://www.chromium.org/Home
|
2015-06-22 21:51:15 +10:00
|
|
|
Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz
|
|
|
|
Source1: chromium-wrapper
|
2019-09-21 23:02:43 +03:00
|
|
|
Source2: %{crname}.desktop
|
2016-11-17 23:12:20 +10:00
|
|
|
Source10: %{name}.rpmlintrc
|
2021-03-30 00:43:37 +03:00
|
|
|
Source11: rpmlint-wrapper.sh
|
2020-07-17 20:27:23 +03:00
|
|
|
# Bring xcb-proto with us (might need more than python on EPEL?)
|
|
|
|
Source20: https://www.x.org/releases/individual/proto/xcb-proto-%{xcb_version}.tar.xz
|
2021-06-05 12:39:58 +03:00
|
|
|
# From https://github.com/systemd/systemd/blob/main/src/basic/missing_fcntl.h
|
|
|
|
# to fix building on rosa2016.1 where glibc does not have /usr/include/bits/fcntl-linux.h
|
|
|
|
Source21: missing_fcntl.h
|
2021-09-02 09:28:44 +03:00
|
|
|
Source30: master_preferences.json
|
2015-06-22 21:51:15 +10:00
|
|
|
Source31: default_bookmarks.html
|
|
|
|
Source32: chromium.default
|
2022-02-05 07:11:42 +03:00
|
|
|
Source33: chromium-default-config.json
|
2015-06-22 21:51:15 +10:00
|
|
|
Source100: icons.tar.bz2
|
|
|
|
Source997: depot_tools.tar.xz
|
|
|
|
Source999: new-system-icons.tar.xz
|
2021-11-13 18:33:47 +03:00
|
|
|
# segfaults on x86_32, but building with debuginfo is not possible, x86_32 has near to no users
|
|
|
|
ExclusiveArch: %{x86_64} aarch64
|
2019-09-21 23:02:43 +03:00
|
|
|
|
2021-03-07 21:28:19 +03:00
|
|
|
# GOST
|
2021-05-27 20:32:27 +03:00
|
|
|
Source1101: https://github.com/deemru/chromium-gost/archive/%{chromium_gost_commit}.tar.gz?/chromium-gost-%{chromium_gost_commit}.tar.gz
|
|
|
|
Source1102: https://github.com/deemru/msspi/archive/%{msspi_commit}.tar.gz?/msspi-%{msspi_commit}.tar.gz
|
2019-09-21 23:02:43 +03:00
|
|
|
|
2018-11-11 01:39:53 +03:00
|
|
|
Patch4: chromium-30.0.1599.66-master-prefs-path.patch
|
2019-12-19 17:29:31 +03:00
|
|
|
# (cjw) fix gn bootstrapping with gcc
|
|
|
|
Patch190: chromium-69-gn-bootstrap.patch
|
2018-11-11 01:39:53 +03:00
|
|
|
# Patch to fix build
|
2017-11-02 05:09:14 +03:00
|
|
|
Patch601: chromium-62-include-cstdlib.patch
|
2018-09-22 00:11:52 +03:00
|
|
|
# Add "ROSA" to the user agent string
|
2018-11-11 01:39:53 +03:00
|
|
|
Patch627: chromium-68.0.3440.106-rosa-user-agent.patch
|
2021-02-27 15:20:27 +03:00
|
|
|
# Fix building with current glib2.0
|
|
|
|
# Hunks from https://build.opensuse.org/package/view_file/openSUSE:Factory/chromium/chromium-gcc11.patch
|
|
|
|
Patch643: glib2.0.patch
|
2021-09-02 09:28:44 +03:00
|
|
|
Patch647: ALT-allow-to-override-clang-through-env-variables.patch
|
2021-03-30 00:43:37 +03:00
|
|
|
# XXX This patch is not enough to fully fix debuginfo and debugsource subpackages
|
2021-09-02 09:28:44 +03:00
|
|
|
Patch648: fix-debugsource.patch
|
|
|
|
Patch649: off-java-check.patch
|
2018-11-11 01:39:53 +03:00
|
|
|
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: bison
|
2021-05-06 01:10:46 +03:00
|
|
|
BuildRequires: llvm12
|
2021-02-06 17:17:58 +03:00
|
|
|
# for gn, not chromium itself
|
|
|
|
BuildRequires: stdc++-gcc10-devel
|
2018-09-22 00:11:52 +03:00
|
|
|
# gn needs these
|
2016-11-17 23:12:20 +10:00
|
|
|
BuildRequires: flex
|
2021-01-21 01:16:12 +03:00
|
|
|
%if %{with bundled_llvm}
|
2020-07-27 17:02:43 +03:00
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: git
|
|
|
|
%endif
|
2016-11-17 23:12:20 +10:00
|
|
|
BuildRequires: gperf
|
|
|
|
BuildRequires: gyp
|
|
|
|
BuildRequires: ninja
|
2021-09-07 00:17:20 +03:00
|
|
|
# nodejs 10 in rosa2016.1 is too old
|
|
|
|
%if %{mdvver} >= 201905
|
2018-11-11 01:39:53 +03:00
|
|
|
BuildRequires: nodejs
|
2021-09-07 00:17:20 +03:00
|
|
|
%else
|
|
|
|
BuildRequires: nodejs14
|
|
|
|
%endif
|
2016-11-17 23:12:20 +10:00
|
|
|
BuildRequires: util-linux
|
2022-02-05 07:11:42 +03:00
|
|
|
BuildRequires: jq
|
2016-11-17 23:12:20 +10:00
|
|
|
BuildRequires: yasm
|
|
|
|
BuildRequires: atomic-devel
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: bzip2-devel
|
|
|
|
BuildRequires: cap-devel
|
|
|
|
BuildRequires: cups-devel
|
2021-09-02 09:28:44 +03:00
|
|
|
# %{_bindir}/eu-strip
|
|
|
|
BuildRequires: elfutils
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: elfutils-devel
|
2020-01-30 02:07:07 +00:00
|
|
|
BuildRequires: multiarch-utils
|
2020-08-31 21:22:38 +03:00
|
|
|
BuildRequires: java-devel
|
2021-09-05 21:58:53 +03:00
|
|
|
BuildRequires: jpeg-devel
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pam-devel
|
Use python 3.8 on old platforms
```
[1467/49932] ACTION //gpu/config:process_json(//build/toolchain/linux:clang_x64)
FAILED: gen/gpu/config/gpu_driver_bug_list_arrays_and_structs_autogen.h gen/gpu/config/gpu_driver_bug_list_autogen.cc gen/gpu/config/gpu_driver_bug_list_autogen.h gen/gpu/config/gpu_driver_bug_list_exceptions_autogen.h gen/gpu/config/software_rendering_list_arrays_and_structs_autogen.h gen/gpu/config/software_rendering_list_autogen.cc gen/gpu/config/software_rendering_list_autogen.h gen/gpu/config/software_rendering_list_exceptions_autogen.h
/usr/bin/python3 ../../gpu/config/process_json.py --output-dir gen/gpu/config --skip-testing-data --os-filter linux
Traceback (most recent call last):
File "../../gpu/config/process_json.py", line 1066, in <module>
sys.exit(main(sys.argv[1:]))
File "../../gpu/config/process_json.py", line 1041, in main
script_dir, options.output_dir, options.os_filter)
File "../../gpu/config/process_json.py", line 930, in process_software_rendering_list
'Software')
File "../../gpu/config/process_json.py", line 837, in process_json_file
json_data = json.load(json_file)
File "/usr/lib64/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```
2021-09-05 21:09:15 +03:00
|
|
|
%if %{mdvver} >= 202110
|
2021-09-02 09:28:44 +03:00
|
|
|
BuildRequires: python3
|
Use python 3.8 on old platforms
```
[1467/49932] ACTION //gpu/config:process_json(//build/toolchain/linux:clang_x64)
FAILED: gen/gpu/config/gpu_driver_bug_list_arrays_and_structs_autogen.h gen/gpu/config/gpu_driver_bug_list_autogen.cc gen/gpu/config/gpu_driver_bug_list_autogen.h gen/gpu/config/gpu_driver_bug_list_exceptions_autogen.h gen/gpu/config/software_rendering_list_arrays_and_structs_autogen.h gen/gpu/config/software_rendering_list_autogen.cc gen/gpu/config/software_rendering_list_autogen.h gen/gpu/config/software_rendering_list_exceptions_autogen.h
/usr/bin/python3 ../../gpu/config/process_json.py --output-dir gen/gpu/config --skip-testing-data --os-filter linux
Traceback (most recent call last):
File "../../gpu/config/process_json.py", line 1066, in <module>
sys.exit(main(sys.argv[1:]))
File "../../gpu/config/process_json.py", line 1041, in main
script_dir, options.output_dir, options.os_filter)
File "../../gpu/config/process_json.py", line 930, in process_software_rendering_list
'Software')
File "../../gpu/config/process_json.py", line 837, in process_json_file
json_data = json.load(json_file)
File "/usr/lib64/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```
2021-09-05 21:09:15 +03:00
|
|
|
%else
|
|
|
|
BuildRequires: python38
|
|
|
|
%endif
|
2018-11-11 01:39:53 +03:00
|
|
|
BuildRequires: snappy-devel
|
2016-11-17 23:12:20 +10:00
|
|
|
BuildRequires: speech-dispatcher-devel
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(alsa)
|
|
|
|
BuildRequires: pkgconfig(atk)
|
2021-06-04 01:20:07 +03:00
|
|
|
BuildRequires: pkgconfig(libcurl)
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(dbus-glib-1)
|
2020-03-23 21:24:20 +03:00
|
|
|
%if %rpm4
|
|
|
|
BuildRequires: pkgconfig(dri)
|
|
|
|
BuildRequires: pkgconfig(krb5)
|
|
|
|
BuildRequires: pkgconfig(krb5-gssapi)
|
|
|
|
%endif
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(expat)
|
2018-11-11 01:39:53 +03:00
|
|
|
BuildRequires: pkgconfig(flac)
|
2016-01-02 20:32:51 +03:00
|
|
|
BuildRequires: pkgconfig(fontconfig)
|
2017-08-09 15:04:16 +03:00
|
|
|
BuildRequires: pkgconfig(freetype2)
|
2020-05-13 12:24:25 +00:00
|
|
|
BuildRequires: pkgconfig(gbm)
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(gconf-2.0)
|
|
|
|
BuildRequires: pkgconfig(gl)
|
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
|
|
|
BuildRequires: pkgconfig(glu)
|
|
|
|
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
|
2016-03-08 19:51:23 +03:00
|
|
|
BuildRequires: pkgconfig(gtk+-3.0)
|
2018-11-11 01:39:53 +03:00
|
|
|
BuildRequires: pkgconfig(harfbuzz)
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(libgcrypt)
|
|
|
|
BuildRequires: pkgconfig(libmtp)
|
2016-11-17 23:12:20 +10:00
|
|
|
BuildRequires: pkgconfig(libopenjp2)
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(libpci)
|
|
|
|
BuildRequires: pkgconfig(libpulse)
|
|
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
2016-01-10 21:49:52 +03:00
|
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
2018-11-11 01:39:53 +03:00
|
|
|
BuildRequires: pkgconfig(libxslt)
|
2016-01-21 16:07:13 +03:00
|
|
|
BuildRequires: pkgconfig(libva)
|
2019-02-21 00:25:57 +03:00
|
|
|
BuildRequires: pkgconfig(glesv2)
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(nspr)
|
|
|
|
BuildRequires: pkgconfig(nss)
|
2021-02-27 14:46:42 +03:00
|
|
|
%if %{mdvver} >= 201910
|
|
|
|
# Upstream Chromium is comatible with 0.2, we patch for 0.3
|
|
|
|
BuildRequires: pkgconfig(libpipewire-0.3)
|
|
|
|
BuildRequires: pkgconfig(libspa-0.2)
|
|
|
|
%endif
|
2015-06-22 21:51:15 +10:00
|
|
|
BuildRequires: pkgconfig(speex)
|
|
|
|
BuildRequires: pkgconfig(udev)
|
|
|
|
BuildRequires: pkgconfig(xscrnsaver)
|
|
|
|
BuildRequires: pkgconfig(xt)
|
|
|
|
BuildRequires: pkgconfig(xtst)
|
2018-11-11 01:39:53 +03:00
|
|
|
BuildRequires: pkgconfig(zlib)
|
2020-06-21 18:05:58 +03:00
|
|
|
BuildRequires: pythonegg(setuptools)
|
2015-09-02 15:09:51 +03:00
|
|
|
|
2021-09-02 09:28:44 +03:00
|
|
|
Requires: chromium-codecs = %{EVRD}
|
2021-12-04 15:19:39 +03:00
|
|
|
|
2021-12-01 13:06:29 +03:00
|
|
|
Provides: chromium-browser = %{EVRD}
|
2021-12-04 15:19:39 +03:00
|
|
|
Provides: chromium = %{EVRD}
|
2021-09-02 09:28:44 +03:00
|
|
|
|
|
|
|
%if %{mdvver} <= 201610
|
2016-11-19 02:30:47 +10:00
|
|
|
Conflicts: chromium-widevinecdm-plugin < 54
|
|
|
|
Obsoletes: chromium-widevinecdm-plugin < 54
|
2019-10-04 12:16:33 +00:00
|
|
|
# There was a dummy empty package chromium-browser
|
|
|
|
# which depended from chromium-browser-stable and nothing more.
|
|
|
|
# We decided to remove that package.
|
|
|
|
# chromium-browser SUBpackage had Epoch=1
|
2019-10-09 14:16:06 +00:00
|
|
|
Obsoletes: %{crname} < 1:%{version}-%{release}
|
|
|
|
Provides: %{crname} = 1:%{version}-%{release}
|
2019-10-31 23:21:09 +03:00
|
|
|
Obsoletes: chromium-gost-lib < 78.0.3904.70
|
2021-09-02 09:28:44 +03:00
|
|
|
%endif
|
|
|
|
|
2019-10-31 23:21:09 +03:00
|
|
|
%if %{with gost}
|
|
|
|
Provides: chromium-gost-lib = %{EVRD}
|
|
|
|
%endif
|
2015-06-22 21:51:15 +10:00
|
|
|
|
2012-07-04 11:57:27 +04:00
|
|
|
%description
|
|
|
|
Chromium is a browser that combines a minimal design with sophisticated
|
|
|
|
technology to make the web faster, safer, and easier.
|
|
|
|
|
|
|
|
This is the stable channel Chromium browser. It offers a rock solid
|
|
|
|
browser which is updated with features and fixes once they have been
|
2018-04-24 14:28:44 +03:00
|
|
|
thoroughly tested.
|
2021-04-08 11:08:26 +03:00
|
|
|
%if %{with gost}
|
|
|
|
chromium-gost patches are integrated, this Chromium supports GOST TLS
|
|
|
|
if proprietary CryptoPro is installed.
|
|
|
|
%endif
|
2012-07-04 11:57:27 +04:00
|
|
|
|
2015-06-22 21:51:15 +10:00
|
|
|
%files
|
|
|
|
%config %{_sysconfdir}/%{crname}
|
|
|
|
%config %{_sysconfdir}/default/%{crname}
|
|
|
|
%{_bindir}/%{crname}
|
|
|
|
%{_crdir}/chromium-wrapper
|
2022-02-05 07:11:42 +03:00
|
|
|
%{_crdir}/chromium-default-config.json
|
2015-06-22 21:51:15 +10:00
|
|
|
%{_crdir}/chrome
|
|
|
|
%{_crdir}/chrome-sandbox
|
2021-09-22 17:44:54 +03:00
|
|
|
%{_crdir}/chrome_crashpad_handler
|
2016-03-08 19:43:38 +03:00
|
|
|
%{_crdir}/icudtl.dat
|
2015-06-22 21:51:15 +10:00
|
|
|
%{_crdir}/locales
|
2017-03-11 21:09:25 +03:00
|
|
|
%{_crdir}/*.pak
|
2015-06-22 21:51:15 +10:00
|
|
|
%{_crdir}/resources
|
|
|
|
%{_crdir}/themes
|
2018-01-23 08:13:40 +03:00
|
|
|
%{_crdir}/swiftshader
|
2020-09-23 03:13:08 +03:00
|
|
|
%{_crdir}/libEGL.so*
|
|
|
|
%{_crdir}/libGLESv2.so*
|
2015-06-22 21:51:15 +10:00
|
|
|
%dir %{_crdir}/pepper
|
|
|
|
%{_datadir}/applications/*.desktop
|
|
|
|
%{_iconsdir}/hicolor/*/apps/chromium*
|
|
|
|
|
2021-04-06 15:28:50 +03:00
|
|
|
# This crap does not work with rpm4 because it uses good locking of RPM DB
|
|
|
|
%if %rpm5
|
2017-07-29 03:30:57 +03:00
|
|
|
%post
|
2017-07-28 19:13:43 +03:00
|
|
|
# Remove chromium-browser-install package if we have it installed
|
2019-09-21 23:02:43 +03:00
|
|
|
if [ "$(rpm -q %{crname}-install | wc -w)" = 1 ]
|
2017-07-28 19:13:43 +03:00
|
|
|
then
|
2019-09-21 23:02:43 +03:00
|
|
|
rpm -e %{crname}-install
|
2017-07-28 19:13:43 +03:00
|
|
|
fi
|
2021-04-06 15:28:50 +03:00
|
|
|
%endif
|
2017-07-28 19:13:43 +03:00
|
|
|
|
2015-06-22 21:51:15 +10:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2021-09-02 09:28:44 +03:00
|
|
|
%package -n chromium-codecs
|
|
|
|
Summary: FFmpeg library for supporting media codecs in Chromium-based browsers
|
|
|
|
# alike Ubuntu
|
|
|
|
Provides: chromium-codecs-ffmpeg-extra = %{EVRD}
|
|
|
|
Provides: chromium-codecs-ffmpeg = %{EVRD}
|
|
|
|
|
|
|
|
%description -n chromium-codecs
|
|
|
|
FFmpeg (libffmpeg.so) for Chromium-based browsers.
|
|
|
|
This packaged is build from Chromium's bundled FFmpeg
|
|
|
|
with proprietary codecs turned on.
|
|
|
|
|
|
|
|
%files -n chromium-codecs
|
|
|
|
%{_crdir}/libffmpeg.so
|
|
|
|
%if "%{_lib}" != "lib"
|
|
|
|
%{_crdir_compat}/libffmpeg.so
|
|
|
|
%endif
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2019-09-22 14:11:43 +03:00
|
|
|
%package -n chromedriver
|
2015-06-22 21:51:15 +10:00
|
|
|
Summary: WebDriver for Google Chrome/Chromium
|
|
|
|
Group: Development/Other
|
2019-09-22 14:11:43 +03:00
|
|
|
Requires: %{name} = %{EVRD}
|
2013-01-25 15:10:50 +04:00
|
|
|
|
2019-09-22 14:11:43 +03:00
|
|
|
%description -n chromedriver
|
2013-01-25 15:10:50 +04:00
|
|
|
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.
|
2012-07-24 13:18:14 +04:00
|
|
|
|
2019-09-22 14:11:43 +03:00
|
|
|
%files -n chromedriver
|
2015-06-22 21:51:15 +10:00
|
|
|
%doc LICENSE AUTHORS
|
2019-09-22 14:11:43 +03:00
|
|
|
%{_bindir}/chromedriver
|
2015-06-22 21:51:15 +10:00
|
|
|
%{_crdir}/chromedriver
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
|
2012-07-04 11:57:27 +04:00
|
|
|
%prep
|
2016-11-17 23:12:20 +10:00
|
|
|
%setup -qn chromium-%{version} -a 997 -a 999
|
2015-12-11 11:28:48 +03:00
|
|
|
|
2019-09-21 23:02:43 +03:00
|
|
|
%if %{with gost}
|
2019-12-19 17:29:31 +03:00
|
|
|
rm -rf %{_gostsourcedir}
|
2019-09-21 23:02:43 +03:00
|
|
|
mkdir -p %{_gostsourcedir}
|
|
|
|
tar -C %{_gostsourcedir} --strip 1 -xf %{SOURCE1101}
|
|
|
|
sed -i \
|
|
|
|
-e "s,^#include <../ssl/internal.h>,#include \"${PWD}/third_party/boringssl/src/ssl/internal.h\",g" \
|
|
|
|
%{_gostsourcedir}/src/gostssl.cpp
|
|
|
|
tar -C %{_gostsourcedir}/src/msspi --strip 1 -xf %{SOURCE1102}
|
2021-09-02 09:28:44 +03:00
|
|
|
sed -i'' %{_gostsourcedir}/patch/chromium.patch \
|
|
|
|
-e 's/ (Chromium GOST)//g' \
|
|
|
|
-e 's/Chromium GOST/Chromium/g' \
|
2021-12-14 23:14:37 +03:00
|
|
|
-e 's/Chromium-Gost/Chromium/g' \
|
2021-09-02 09:28:44 +03:00
|
|
|
-e 's/"chromium-gost"/"chromium-browser"/g' \
|
|
|
|
-e 's/"chromium-gost.desktop"/"chromium-browser.desktop"/g' \
|
|
|
|
--
|
2019-09-21 23:02:43 +03:00
|
|
|
patch -p1 < %{_gostsourcedir}/patch/chromium.patch
|
|
|
|
( cd ./third_party/boringssl/src
|
|
|
|
patch -p1 < %{_gostsourcedir}/patch/boringssl.patch )
|
2019-10-31 23:21:09 +03:00
|
|
|
|
|
|
|
cp -f %{_gostsourcedir}/src/gostssl.cpp third_party/boringssl/gostssl.cpp
|
|
|
|
cp -f %{_gostsourcedir}/src/msspi/src/* third_party/boringssl
|
|
|
|
cp -f %{_gostsourcedir}/src/msspi/third_party/cprocsp/include/* third_party/boringssl/src/include
|
2019-09-21 23:02:43 +03:00
|
|
|
%endif
|
|
|
|
|
2021-09-02 09:28:44 +03:00
|
|
|
%autopatch -p1
|
2018-11-11 01:39:53 +03:00
|
|
|
|
2020-07-27 17:02:43 +03:00
|
|
|
# fatal error: 'fuzzer/FuzzedDataProvider.h' file not found
|
|
|
|
# (Available in Clang10)
|
2021-01-21 01:16:12 +03:00
|
|
|
%if %{without bundled_llvm}
|
2018-04-24 14:28:44 +03:00
|
|
|
mkdir -p third_party/llvm-build/Release+Asserts/bin
|
|
|
|
pushd third_party/llvm-build/Release+Asserts/bin
|
2021-01-21 01:16:12 +03:00
|
|
|
ln -sf %{llvm_prefix}/bin/clang clang
|
|
|
|
ln -sf %{llvm_prefix}/bin/clang++ clang++
|
2018-04-24 14:28:44 +03:00
|
|
|
popd
|
2020-07-27 17:02:43 +03:00
|
|
|
%endif
|
2017-03-29 01:04:37 +03:00
|
|
|
|
2012-07-04 11:57:27 +04:00
|
|
|
# Hard code extra version
|
2015-10-22 13:02:58 +03:00
|
|
|
FILE=chrome/common/channel_info_posix.cc
|
2021-09-22 17:44:54 +03:00
|
|
|
sed -i.orig -e 's/getenv("CHROME_VERSION_EXTRA")/"%{vendor} %{rosa_release}, RPM %{name} %{EVRD}%{?with_gost: + GOST TLS via CryptoPro}"/' $FILE
|
2012-07-04 11:57:27 +04:00
|
|
|
cmp $FILE $FILE.orig && exit 1
|
|
|
|
|
2021-01-09 00:11:53 +03:00
|
|
|
# Use native page size on aarch64 ("if (current_cpu == "arm64")"), otherwise:
|
|
|
|
# /lib64/ld-linux-aarch64.so.1 ./bytecode_builtins_list_generator
|
|
|
|
# ./bytecode_builtins_list_generator: error while loading shared libraries:
|
|
|
|
# ./bytecode_builtins_list_generator: ELF load command alignment not page-aligned
|
|
|
|
sed -i \
|
|
|
|
-e 's!-Wl,-z,max-page-size=4096!!g' \
|
|
|
|
build/config/compiler/BUILD.gn
|
|
|
|
|
2020-11-20 09:49:50 +03:00
|
|
|
# base/rand_util_posix.cc:27:10: fatal error: 'sys/random.h' file not found
|
|
|
|
sed -i "s|sys/random.h|/usr/include/linux/random.h|g" base/rand_util_posix.cc
|
|
|
|
|
Use python 3.8 on old platforms
```
[1467/49932] ACTION //gpu/config:process_json(//build/toolchain/linux:clang_x64)
FAILED: gen/gpu/config/gpu_driver_bug_list_arrays_and_structs_autogen.h gen/gpu/config/gpu_driver_bug_list_autogen.cc gen/gpu/config/gpu_driver_bug_list_autogen.h gen/gpu/config/gpu_driver_bug_list_exceptions_autogen.h gen/gpu/config/software_rendering_list_arrays_and_structs_autogen.h gen/gpu/config/software_rendering_list_autogen.cc gen/gpu/config/software_rendering_list_autogen.h gen/gpu/config/software_rendering_list_exceptions_autogen.h
/usr/bin/python3 ../../gpu/config/process_json.py --output-dir gen/gpu/config --skip-testing-data --os-filter linux
Traceback (most recent call last):
File "../../gpu/config/process_json.py", line 1066, in <module>
sys.exit(main(sys.argv[1:]))
File "../../gpu/config/process_json.py", line 1041, in main
script_dir, options.output_dir, options.os_filter)
File "../../gpu/config/process_json.py", line 930, in process_software_rendering_list
'Software')
File "../../gpu/config/process_json.py", line 837, in process_json_file
json_data = json.load(json_file)
File "/usr/lib64/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```
2021-09-05 21:09:15 +03:00
|
|
|
find . -type f -name '*.py' -exec sed -i -e 's,#!/usr/bin/env python$,#!%{__python},g' -e 's,#!/usr/bin/env python3$,#!%{__python},g' {} \;
|
2020-03-23 21:24:20 +03:00
|
|
|
|
|
|
|
mkdir -p local_bin
|
2021-01-08 15:48:07 +03:00
|
|
|
ln -s %{__python} local_bin/python
|
Use python 3.8 on old platforms
```
[1467/49932] ACTION //gpu/config:process_json(//build/toolchain/linux:clang_x64)
FAILED: gen/gpu/config/gpu_driver_bug_list_arrays_and_structs_autogen.h gen/gpu/config/gpu_driver_bug_list_autogen.cc gen/gpu/config/gpu_driver_bug_list_autogen.h gen/gpu/config/gpu_driver_bug_list_exceptions_autogen.h gen/gpu/config/software_rendering_list_arrays_and_structs_autogen.h gen/gpu/config/software_rendering_list_autogen.cc gen/gpu/config/software_rendering_list_autogen.h gen/gpu/config/software_rendering_list_exceptions_autogen.h
/usr/bin/python3 ../../gpu/config/process_json.py --output-dir gen/gpu/config --skip-testing-data --os-filter linux
Traceback (most recent call last):
File "../../gpu/config/process_json.py", line 1066, in <module>
sys.exit(main(sys.argv[1:]))
File "../../gpu/config/process_json.py", line 1041, in main
script_dir, options.output_dir, options.os_filter)
File "../../gpu/config/process_json.py", line 930, in process_software_rendering_list
'Software')
File "../../gpu/config/process_json.py", line 837, in process_json_file
json_data = json.load(json_file)
File "/usr/lib64/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib64/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
```
2021-09-05 21:09:15 +03:00
|
|
|
ln -s %{__python} local_bin/python3
|
2020-03-23 21:24:20 +03:00
|
|
|
export PATH="$PWD/local_bin:$PATH"
|
2020-02-21 13:03:09 +03:00
|
|
|
|
2017-04-22 13:40:30 +03:00
|
|
|
# setup node
|
|
|
|
mkdir -p third_party/node/linux/node-linux-x64/bin
|
2021-09-07 00:17:20 +03:00
|
|
|
%if %{mdvver} >= 201905
|
2017-04-22 13:40:30 +03:00
|
|
|
ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/node
|
2021-09-07 00:17:20 +03:00
|
|
|
%else
|
|
|
|
ln -s /opt/nodejs14/bin/node third_party/node/linux/node-linux-x64/bin/node
|
|
|
|
%endif
|
2018-10-31 10:02:21 +03:00
|
|
|
|
2021-09-02 09:28:44 +03:00
|
|
|
# (From Fedora) Get rid of the pre-built eu-strip binary, it is x86_64 and of mysterious origin
|
|
|
|
rm -rf buildtools/third_party/eu-strip/bin/eu-strip
|
|
|
|
ln -s %{_bindir}/eu-strip buildtools/third_party/eu-strip/bin/eu-strip
|
|
|
|
|
2018-10-17 16:13:17 +03:00
|
|
|
%build
|
2020-07-17 20:27:23 +03:00
|
|
|
# unpack a local copy of the xcb-proto bits
|
|
|
|
tar xf %{SOURCE20}
|
|
|
|
export PYTHONPATH="../../third_party/pyjson5/src:../../xcb-proto-%{xcb_version}"
|
2019-09-21 23:02:43 +03:00
|
|
|
|
2018-08-13 15:03:08 +03:00
|
|
|
# widevinecdmadapter
|
2018-09-26 00:21:20 +03:00
|
|
|
# Build error with widevinecdmadapter in 67.0.3396.62 (fixed)
|
2018-08-13 15:03:08 +03:00
|
|
|
%define widevine 1
|
2018-09-22 16:40:06 +03:00
|
|
|
%if 0%{widevine}
|
2018-08-13 15:03:08 +03:00
|
|
|
%define is_widevine true
|
|
|
|
%else
|
|
|
|
%define is_widevine false
|
|
|
|
%endif
|
|
|
|
|
2021-03-30 00:43:37 +03:00
|
|
|
%if %{with gold}
|
|
|
|
%define linker_params use_gold=true use_lld=false
|
|
|
|
%else
|
2021-03-07 15:48:30 +03:00
|
|
|
%define linker_params use_gold=false use_lld=true
|
2021-03-30 00:43:37 +03:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with debug}
|
|
|
|
%define symbol_level 2
|
2020-09-01 01:05:31 +03:00
|
|
|
%else
|
2021-03-30 00:43:37 +03:00
|
|
|
%define symbol_level 0
|
2020-09-01 01:05:31 +03:00
|
|
|
%endif
|
|
|
|
|
2021-01-21 01:16:12 +03:00
|
|
|
%if %{without bundled_llvm}
|
2020-07-27 17:02:43 +03:00
|
|
|
%define clang_use_chrome_plugins clang_use_chrome_plugins=false
|
|
|
|
%else
|
|
|
|
%define clang_use_chrome_plugins clang_use_chrome_plugins=true
|
|
|
|
%endif
|
|
|
|
|
2020-10-24 04:42:57 +03:00
|
|
|
%if %{mdvver} == 201905
|
|
|
|
%define enable_remoting enable_remoting=false
|
|
|
|
%else
|
|
|
|
%define enable_remoting enable_remoting=true
|
|
|
|
%endif
|
|
|
|
|
2021-02-27 14:46:42 +03:00
|
|
|
%if %{mdvver} >= 201910
|
2021-03-07 15:48:30 +03:00
|
|
|
%define pipewire_enablement rtc_use_pipewire=true rtc_link_pipewire=true rtc_pipewire_version="0.3"
|
2021-11-13 12:12:41 +03:00
|
|
|
%define wayland_enablement %{nil}
|
2021-02-27 14:46:42 +03:00
|
|
|
%else
|
|
|
|
%define pipewire_enablement rtc_use_pipewire=false
|
2021-11-13 12:12:41 +03:00
|
|
|
# Wayland parts regularly require adjusting for old glibc in rosa2016.1,
|
|
|
|
# but wayland is generally not widely used there
|
|
|
|
%define wayland_enablement enable_wayland_server=false ozone_platform_wayland=false
|
2021-02-27 14:46:42 +03:00
|
|
|
%endif
|
|
|
|
|
2021-01-08 15:48:07 +03:00
|
|
|
%ifarch aarch64
|
|
|
|
%define target_cpu target_cpu="arm64"
|
|
|
|
%else
|
|
|
|
%define target_cpu %{nil}
|
|
|
|
%endif
|
|
|
|
|
2021-06-04 01:23:46 +03:00
|
|
|
# Linking on 32 bit does not have enough memory for LTO
|
|
|
|
%ifarch %{ix86}
|
|
|
|
%define use_thin_lto false
|
|
|
|
%else
|
|
|
|
%define use_thin_lto true
|
|
|
|
%endif
|
|
|
|
|
2016-11-17 23:12:20 +10:00
|
|
|
# v NO TABS IN HERE!
|
2018-05-28 14:04:45 +03:00
|
|
|
%define gn_config use_sysroot=false \
|
2021-01-08 15:48:07 +03:00
|
|
|
%{target_cpu} \
|
2021-03-13 15:52:27 +03:00
|
|
|
is_official_build=true \
|
2021-03-30 00:43:37 +03:00
|
|
|
symbol_level=%{symbol_level} \
|
2021-06-04 01:23:46 +03:00
|
|
|
use_thin_lto=%{use_thin_lto} \
|
2021-03-30 00:43:37 +03:00
|
|
|
strip_debug_info=false \
|
2021-09-02 09:28:44 +03:00
|
|
|
is_cfi=false \
|
2016-11-17 23:12:20 +10:00
|
|
|
system_libdir="%{_lib}" \
|
|
|
|
icu_use_data_file=true \
|
2018-11-11 01:39:53 +03:00
|
|
|
enable_nacl=false \
|
|
|
|
is_nacl_glibc=false \
|
2021-03-07 15:48:30 +03:00
|
|
|
%{linker_params} \
|
2021-09-02 09:28:44 +03:00
|
|
|
ffmpeg_branding="ChromeOS" \
|
2016-11-17 23:12:20 +10:00
|
|
|
proprietary_codecs=true \
|
2021-09-02 09:28:44 +03:00
|
|
|
is_component_ffmpeg=true \
|
|
|
|
is_component_build=false \
|
2019-12-19 17:29:31 +03:00
|
|
|
enable_platform_ac3_eac3_audio = true \
|
2016-11-17 23:12:20 +10:00
|
|
|
enable_mse_mpeg2ts_stream_parser=true \
|
2019-12-19 17:29:31 +03:00
|
|
|
enable_platform_hevc=true \
|
2018-11-11 01:39:53 +03:00
|
|
|
use_system_libjpeg=true \
|
|
|
|
use_libjpeg_turbo=false \
|
2018-08-13 15:03:08 +03:00
|
|
|
enable_widevine=%{is_widevine} \
|
2021-09-02 09:28:44 +03:00
|
|
|
enable_vulkan=true \
|
2016-11-17 23:12:20 +10:00
|
|
|
use_pulseaudio=true \
|
2021-02-27 14:42:40 +03:00
|
|
|
link_pulseaudio=true \
|
2021-02-27 14:46:42 +03:00
|
|
|
%{pipewire_enablement} \
|
2021-11-13 12:12:41 +03:00
|
|
|
%{wayland_enablement} \
|
2021-09-02 09:28:44 +03:00
|
|
|
use_gnome_keyring=false \
|
2016-11-17 23:12:20 +10:00
|
|
|
use_allocator="none" \
|
|
|
|
treat_warnings_as_errors=false \
|
2018-11-11 01:39:53 +03:00
|
|
|
fatal_linker_warnings=false \
|
2016-11-19 02:16:30 +10:00
|
|
|
use_aura=true \
|
2018-11-11 01:39:53 +03:00
|
|
|
use_libpci = true \
|
2020-01-30 12:09:27 +00:00
|
|
|
is_debug=false \
|
2019-02-21 00:25:57 +03:00
|
|
|
gtk_version=3 \
|
2021-03-07 15:48:30 +03:00
|
|
|
is_clang=true \
|
2020-07-27 17:02:43 +03:00
|
|
|
%{?clang_use_chrome_plugins} \
|
2021-03-07 15:48:30 +03:00
|
|
|
use_vaapi=true \
|
2019-12-19 17:29:31 +03:00
|
|
|
enable_dav1d_decoder=true enable_libaom_decoder=false \
|
2020-10-24 04:42:57 +03:00
|
|
|
%{?enable_remoting} \
|
2018-05-28 14:04:45 +03:00
|
|
|
v8_use_external_startup_data=false \
|
2016-11-17 23:12:20 +10:00
|
|
|
google_api_key="%{google_api_key}" \
|
|
|
|
google_default_client_id="%{google_default_client_id}" \
|
2018-11-11 01:39:53 +03:00
|
|
|
google_default_client_secret="%{google_default_client_secret}"
|
|
|
|
|
2020-07-27 17:02:43 +03:00
|
|
|
#clang_base_path="//third_party/llvm-build/Release+Asserts" \
|
|
|
|
|
2021-09-02 09:28:44 +03:00
|
|
|
%{__python} build/linux/unbundle/replace_gn_files.py --system-libraries \
|
|
|
|
freetype \
|
|
|
|
fontconfig \
|
|
|
|
libdrm
|
2021-01-08 15:48:07 +03:00
|
|
|
%{__python} third_party/libaddressinput/chromium/tools/update-strings.py
|
|
|
|
|
|
|
|
# (From Fedora)
|
|
|
|
# We don't need to cross compile while building on an aarch64 system.
|
|
|
|
sed -i 's|aarch64-linux-gnu-||g' build/toolchain/linux/BUILD.gn
|
2016-11-17 23:12:20 +10:00
|
|
|
|
2021-03-13 15:52:27 +03:00
|
|
|
# is_official_build triggers PGO with bundled profiles, but those profiles are for a specific
|
|
|
|
# version of clang/LLVM which does not match system one
|
|
|
|
%if %{without bundled_llvm}
|
|
|
|
sed -i -e 's,chrome_pgo_phase = 2,chrome_pgo_phase = 0,' build/config/compiler/pgo/pgo.gni
|
|
|
|
%endif
|
|
|
|
|
2021-01-21 01:16:12 +03:00
|
|
|
%if %{with bundled_llvm}
|
2020-07-27 17:02:43 +03:00
|
|
|
# Build clang from Google
|
|
|
|
# python2 tools/clang/scripts/build.py \
|
|
|
|
# --without-android \
|
|
|
|
# --without-fuchsia \
|
|
|
|
# --use-system-cmake \
|
|
|
|
# --gcc-toolchain=%{_prefix}
|
2021-01-08 15:48:07 +03:00
|
|
|
%{__python} tools/clang/scripts/update.py
|
2020-07-27 17:02:43 +03:00
|
|
|
%endif
|
|
|
|
|
2021-03-07 15:48:30 +03:00
|
|
|
# ALT-allow-to-override-clang-through-env-variables.patch makes gn read these variables
|
2021-01-21 01:16:12 +03:00
|
|
|
%if %{without bundled_llvm}
|
|
|
|
export CC=%{llvm_prefix}/bin/clang
|
|
|
|
export CXX=%{llvm_prefix}/bin/clang++
|
|
|
|
export AR=%{llvm_prefix}/bin/llvm-ar
|
|
|
|
export NM=%{llvm_prefix}/bin/llvm-nm
|
|
|
|
sed -i -e 's,//third_party/llvm-build/Release+Asserts,%{llvm_prefix},g' build/config/clang/clang.gni
|
2020-07-27 17:02:43 +03:00
|
|
|
%else
|
|
|
|
%define clang_path "%{_builddir}/chromium-%{version}/third_party/llvm-build/Release+Asserts/bin/"
|
|
|
|
export CC="%{clang_path}clang"
|
|
|
|
export CXX="%{clang_path}clang++"
|
|
|
|
export AR="%{clang_path}llvm-ar"
|
|
|
|
export NM=nm
|
|
|
|
%endif
|
2021-03-07 15:48:30 +03:00
|
|
|
export READELF=readelf
|
2018-11-11 01:39:53 +03:00
|
|
|
|
2021-01-08 15:48:07 +03:00
|
|
|
export PYTHON=%{__python}
|
2021-02-06 17:17:58 +03:00
|
|
|
# libstdc++ in rosa2016.1 is too old to build gn, there are 2 ways to solve this:
|
|
|
|
# 1) run bootstrap.py with --use-custom-libcxx, it will build and use bundled libc++
|
|
|
|
# 2) use libstdc++-gcc10 (https://forum.rosalinux.ru/viewtopic.php?t=10047&p=104560)
|
|
|
|
# Let's choose option 2.
|
|
|
|
LDFLAGS="-lstdc++-gcc10" \
|
|
|
|
CXXFLAGS="-nostdinc++ \
|
|
|
|
-Wno-unused-command-line-argument \
|
|
|
|
-I%{_includedir}/libstdc++-gcc10 \
|
|
|
|
-I%{_includedir}/libstdc++-gcc10/%{_host} \
|
|
|
|
" \
|
2021-01-08 15:48:07 +03:00
|
|
|
%{__python} tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}'
|
2021-03-13 14:56:24 +03:00
|
|
|
unset LDFLAGS CXXFLAGS
|
2021-03-30 00:43:37 +03:00
|
|
|
|
|
|
|
# Reduce memory usage by linker
|
|
|
|
%ifarch %{ix86}
|
|
|
|
%if %{with gold}
|
|
|
|
# https://lwn.net/Articles/797303/
|
|
|
|
export LDFLAGS="-Wl,--no-map-whole-files -Wl,--no-keep-memory -Wl,--no-keep-files-mapped -Wl,--no-mmap-output-file"
|
|
|
|
sed -i -e 's/--threads/--no-threads/' -e '/--thread-count=4/d' build/config/compiler/BUILD.gn
|
|
|
|
%else
|
|
|
|
# Try to reduce memory usage by ld.lld. Multi threads are enabled by default.
|
|
|
|
# XXX Will it reduce it? It is not really needed, lld does not get out of memory without it, at least without debuginfo.
|
|
|
|
export LDFLAGS="-Wl,--threads=1"
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2021-06-05 12:39:58 +03:00
|
|
|
%if %{mdvver} < 201900
|
|
|
|
grep -IrlE '#include([[:space:]])*<fcntl.h>' | xargs sed -i'' -E -e 's,#include([[:space:]])*<fcntl.h>,#include "%{SOURCE21}",'
|
|
|
|
%endif
|
|
|
|
|
2021-01-08 15:48:07 +03:00
|
|
|
out/Release/gn gen --script-executable=%{__python} --args='%{gn_config}' out/Release
|
2016-11-17 23:12:20 +10:00
|
|
|
|
2018-11-11 01:39:53 +03:00
|
|
|
pushd out/Release
|
|
|
|
# widevinecdmadapter
|
2021-09-02 09:28:44 +03:00
|
|
|
ninja %{_smp_mflags} %{?_with_verbose:--verbose} chrome chrome_sandbox chromedriver libffmpeg.so
|
2018-11-11 01:39:53 +03:00
|
|
|
popd
|
2012-07-04 11:57:27 +04:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
mkdir -p %{buildroot}%{_crdir}/locales
|
|
|
|
mkdir -p %{buildroot}%{_crdir}/themes
|
2016-12-06 19:54:52 +03:00
|
|
|
install -m 755 %{SOURCE1} %{buildroot}%{_crdir}/chromium-wrapper
|
2012-07-04 11:57:27 +04:00
|
|
|
install -m 755 out/Release/chrome %{buildroot}%{_crdir}/
|
|
|
|
install -m 4755 out/Release/chrome_sandbox %{buildroot}%{_crdir}/chrome-sandbox
|
2021-09-22 17:44:54 +03:00
|
|
|
install -m 755 out/Release/chrome_crashpad_handler %{buildroot}%{_crdir}/chrome_crashpad_handler
|
2013-01-25 15:10:50 +04:00
|
|
|
cp -a out/Release/chromedriver %{buildroot}%{_crdir}/chromedriver
|
2014-04-10 12:38:43 +04:00
|
|
|
install -m 644 out/Release/*.pak %{buildroot}%{_crdir}/
|
2016-03-08 19:43:38 +03:00
|
|
|
install -m 644 out/Release/icudtl.dat %{buildroot}%{_crdir}/
|
2015-02-09 22:50:26 +03:00
|
|
|
|
2021-09-02 09:28:44 +03:00
|
|
|
install -m 0755 out/Release/libffmpeg.so %{buildroot}%{_crdir}/
|
|
|
|
%if "%{_lib}" != "lib"
|
|
|
|
mkdir -p %{buildroot}%{_crdir_compat}
|
|
|
|
ln -sr %{buildroot}%{_crdir}/libffmpeg.so %{buildroot}%{_crdir_compat}/libffmpeg.so
|
|
|
|
%endif
|
|
|
|
|
2012-07-04 11:57:27 +04:00
|
|
|
install -m 644 out/Release/locales/*.pak %{buildroot}%{_crdir}/locales/
|
|
|
|
install -m 644 out/Release/resources.pak %{buildroot}%{_crdir}/
|
|
|
|
ln -s %{_crdir}/chromium-wrapper %{buildroot}%{_bindir}/%{crname}
|
2014-05-14 17:35:50 +04:00
|
|
|
sed -i "s!@LIBDIR@!%{_libdir}!g" %{buildroot}%{_crdir}/chromium-wrapper
|
2013-01-25 15:10:50 +04:00
|
|
|
ln -s %{_crdir}/chromedriver %{buildroot}%{_bindir}/chromedriver
|
2012-07-04 11:57:27 +04:00
|
|
|
|
2018-01-23 08:13:40 +03:00
|
|
|
cp -r out/Release/swiftshader %{buildroot}%{_crdir}
|
|
|
|
|
2020-09-23 03:13:08 +03:00
|
|
|
# This is ANGLE, not to be confused with the similarly named files under swiftshader/
|
|
|
|
install -m 644 out/Release/libEGL.so* %{buildroot}%{_crdir}/
|
|
|
|
install -m 644 out/Release/libGLESv2.so* %{buildroot}%{_crdir}/
|
|
|
|
|
2014-05-14 17:35:50 +04:00
|
|
|
# create global config file
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/default
|
|
|
|
install -m644 %{SOURCE32} %{buildroot}%{_sysconfdir}/default/%{crname}
|
|
|
|
|
|
|
|
# create pepper dir. talkplugin works fine only if sylinks in pepper
|
|
|
|
mkdir -p %{buildroot}%{_crdir}/pepper
|
|
|
|
|
2012-07-04 11:57:27 +04:00
|
|
|
find out/Release/resources/ -name "*.d" -exec rm {} \;
|
|
|
|
cp -r out/Release/resources %{buildroot}%{_crdir}
|
|
|
|
|
2022-02-05 07:11:42 +03:00
|
|
|
install -m 0644 %{SOURCE33} %{buildroot}%{_crdir}
|
|
|
|
|
2012-07-04 11:57:27 +04:00
|
|
|
# desktop file
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/applications
|
2017-01-16 16:04:48 +03:00
|
|
|
install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/applications/
|
2012-07-04 11:57:27 +04:00
|
|
|
|
|
|
|
# icon
|
2014-05-29 12:59:28 +04:00
|
|
|
mkdir -p %{buildroot}%{_iconsdir}/hicolor/
|
|
|
|
tar xjf %{SOURCE100} -C %{buildroot}%{_iconsdir}/hicolor/
|
2012-07-04 11:57:27 +04:00
|
|
|
|
2012-07-24 16:01:58 +04:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/%{crname}
|
|
|
|
install -m 0644 %{SOURCE30} %{buildroot}%{_sysconfdir}/%{crname}/
|
|
|
|
install -m 0644 %{SOURCE31} %{buildroot}%{_sysconfdir}/%{crname}/
|
|
|
|
|
2012-10-23 15:04:10 +04:00
|
|
|
find %{buildroot} -name "*.nexe" -exec strip {} \;
|
2022-02-05 07:11:42 +03:00
|
|
|
|
|
|
|
%check
|
|
|
|
# ensure JSON validity
|
|
|
|
[ "$(jq .browser.custom_chrome_frame %{buildroot}%{_crdir}/chromium-default-config.json)" = "false" ]
|