mirror of
https://abf.rosa.ru/djam/chromium-browser-stable-test.git
synced 2025-02-24 01:52:45 +00:00
Clean up and more preparation for aarch64
(still not buildable on aarch64) + some clean up of odd conditions + python-beautifulsoup4 dropped python2 in rosa2019.1, but build scripts of Chromium work only with python 2, bundled python 2 modules must be used
This commit is contained in:
parent
213760b35a
commit
66d61226f7
1 changed files with 24 additions and 28 deletions
|
@ -60,10 +60,13 @@
|
||||||
# Do not provide libEGL.so, libGLESv2.so
|
# Do not provide libEGL.so, libGLESv2.so
|
||||||
%global __provides_exclude_from ^%{_crdir}/.*\\.so$
|
%global __provides_exclude_from ^%{_crdir}/.*\\.so$
|
||||||
|
|
||||||
|
# Chromium build scripts are not compatible with Python 3 yet
|
||||||
|
%define __python %{__python2}
|
||||||
|
|
||||||
Summary: A fast web browser based on the Blink engine
|
Summary: A fast web browser based on the Blink engine
|
||||||
Name: chromium-browser-stable
|
Name: chromium-browser-stable
|
||||||
Version: 87.0.4280.141
|
Version: 87.0.4280.141
|
||||||
Release: 1
|
Release: 2
|
||||||
License: BSD, LGPL
|
License: BSD, LGPL
|
||||||
Group: Networking/WWW
|
Group: Networking/WWW
|
||||||
Url: https://www.chromium.org/Home
|
Url: https://www.chromium.org/Home
|
||||||
|
@ -178,6 +181,7 @@ BuildRequires: jpeg-devel
|
||||||
BuildRequires: jsoncpp-devel
|
BuildRequires: jsoncpp-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
|
BuildRequires: python2
|
||||||
BuildRequires: snappy-devel
|
BuildRequires: snappy-devel
|
||||||
BuildRequires: speech-dispatcher-devel
|
BuildRequires: speech-dispatcher-devel
|
||||||
BuildRequires: pkgconfig(alsa)
|
BuildRequires: pkgconfig(alsa)
|
||||||
|
@ -234,14 +238,6 @@ BuildRequires: pkgconfig(xscrnsaver)
|
||||||
BuildRequires: pkgconfig(xt)
|
BuildRequires: pkgconfig(xt)
|
||||||
BuildRequires: pkgconfig(xtst)
|
BuildRequires: pkgconfig(xtst)
|
||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
%if %{mdvver} >= 201910
|
|
||||||
# no support python2
|
|
||||||
#BuildRequires: python2dist(beautifulsoup4)
|
|
||||||
BuildRequires: python2dist(html5lib)
|
|
||||||
%else
|
|
||||||
BuildRequires: pythonegg(beautifulsoup4)
|
|
||||||
BuildRequires: pythonegg(html5lib)
|
|
||||||
%endif
|
|
||||||
BuildRequires: pythonegg(setuptools)
|
BuildRequires: pythonegg(setuptools)
|
||||||
%if %{with gost}
|
%if %{with gost}
|
||||||
BuildRequires: chrpath
|
BuildRequires: chrpath
|
||||||
|
@ -415,17 +411,11 @@ sed -i \
|
||||||
# base/rand_util_posix.cc:27:10: fatal error: 'sys/random.h' file not found
|
# 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
|
sed -i "s|sys/random.h|/usr/include/linux/random.h|g" base/rand_util_posix.cc
|
||||||
|
|
||||||
%if %{mdvver} >= 201910
|
find . -type f -name '*.py' -exec sed -i 's,#!/usr/bin/env python$,#!%{__python},g' {} \;
|
||||||
# gn is rather convoluted and not python3 friendly -- let's make
|
|
||||||
# sure it sees python2 when it calls python
|
|
||||||
ln -s %{_bindir}/python2 python
|
|
||||||
|
|
||||||
find . -type f -name '*.py' -exec sed -i 's,#!/usr/bin/env python,#!/usr/bin/env python2,g' {} \;
|
|
||||||
|
|
||||||
mkdir -p local_bin
|
mkdir -p local_bin
|
||||||
ln -s %{__python2} local_bin/python
|
ln -s %{__python} local_bin/python
|
||||||
export PATH="$PWD/local_bin:$PATH"
|
export PATH="$PWD/local_bin:$PATH"
|
||||||
%endif
|
|
||||||
|
|
||||||
# setup node
|
# setup node
|
||||||
mkdir -p third_party/node/linux/node-linux-x64/bin
|
mkdir -p third_party/node/linux/node-linux-x64/bin
|
||||||
|
@ -498,8 +488,15 @@ export PYTHONPATH="../../third_party/pyjson5/src:../../xcb-proto-%{xcb_version}"
|
||||||
%define enable_remoting enable_remoting=true
|
%define enable_remoting enable_remoting=true
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%ifarch aarch64
|
||||||
|
%define target_cpu target_cpu="arm64"
|
||||||
|
%else
|
||||||
|
%define target_cpu %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
# v NO TABS IN HERE!
|
# v NO TABS IN HERE!
|
||||||
%define gn_config use_sysroot=false \
|
%define gn_config use_sysroot=false \
|
||||||
|
%{target_cpu} \
|
||||||
system_libdir="%{_lib}" \
|
system_libdir="%{_lib}" \
|
||||||
icu_use_data_file=true \
|
icu_use_data_file=true \
|
||||||
enable_nacl=false \
|
enable_nacl=false \
|
||||||
|
@ -538,8 +535,12 @@ export PYTHONPATH="../../third_party/pyjson5/src:../../xcb-proto-%{xcb_version}"
|
||||||
|
|
||||||
#clang_base_path="//third_party/llvm-build/Release+Asserts" \
|
#clang_base_path="//third_party/llvm-build/Release+Asserts" \
|
||||||
|
|
||||||
python2 build/linux/unbundle/replace_gn_files.py --system-libraries %{system_gn_list}
|
%{__python} build/linux/unbundle/replace_gn_files.py --system-libraries %{system_gn_list}
|
||||||
python2 third_party/libaddressinput/chromium/tools/update-strings.py
|
%{__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
|
||||||
|
|
||||||
%if %{with native_clang}
|
%if %{with native_clang}
|
||||||
# Build clang from Google
|
# Build clang from Google
|
||||||
|
@ -548,7 +549,7 @@ python2 third_party/libaddressinput/chromium/tools/update-strings.py
|
||||||
# --without-fuchsia \
|
# --without-fuchsia \
|
||||||
# --use-system-cmake \
|
# --use-system-cmake \
|
||||||
# --gcc-toolchain=%{_prefix}
|
# --gcc-toolchain=%{_prefix}
|
||||||
python2 tools/clang/scripts/update.py
|
%{__python} tools/clang/scripts/update.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with clang}
|
%if %{with clang}
|
||||||
|
@ -584,14 +585,9 @@ CFLAGS="$CFLAGS -Wno-error=pointer-to-int-cast -Wno-error=int-to-pointer-cast -f
|
||||||
CXXFLAGS="$CXXFLAGS -Wno-error=attributes -Wno-error=comment -Wno-error=unused-variable -Wno-error=strict-overflow -Wno-error=deprecated-declarations -fno-strict-aliasing"
|
CXXFLAGS="$CXXFLAGS -Wno-error=attributes -Wno-error=comment -Wno-error=unused-variable -Wno-error=strict-overflow -Wno-error=deprecated-declarations -fno-strict-aliasing"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{mdvver} >= 201910
|
export PYTHON=%{__python}
|
||||||
export PYTHON=%{__python2}
|
%{__python} tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}'
|
||||||
python2 tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}'
|
out/Release/gn gen --script-executable=%{__python} --args='%{gn_config}' out/Release
|
||||||
out/Release/gn gen --script-executable=/usr/bin/python2 --args='%{gn_config}' out/Release
|
|
||||||
%else
|
|
||||||
python tools/gn/bootstrap/bootstrap.py --gn-gen-args='%{gn_config}'
|
|
||||||
out/Release/gn gen --args='%{gn_config}' out/Release
|
|
||||||
%endif
|
|
||||||
|
|
||||||
pushd out/Release
|
pushd out/Release
|
||||||
# widevinecdmadapter
|
# widevinecdmadapter
|
||||||
|
|
Loading…
Add table
Reference in a new issue