disable bootstrap on fedora and epel >=8, use system gn

epel8
Than Ngo 2 years ago
parent 5c70c7eeb5
commit 2e0aa4d4c9

@ -1,3 +1,5 @@
%define _lto_cflags %{nil}
# set default fuzz=2 for patch # set default fuzz=2 for patch
%global _default_patch_fuzz 2 %global _default_patch_fuzz 2
@ -27,6 +29,13 @@
# official builds have less debugging and go faster... but we have to shut some things off. # official builds have less debugging and go faster... but we have to shut some things off.
%global official_build 1 %global official_build 1
# enable|disble bootstrap for gn
%if 0%{?rhel} >= 8 || 0%{?fedora}
%global bootstrap 0
%else
%global bootstrap 1
%endif
# Fancy build status, so we at least know, where we are.. # Fancy build status, so we at least know, where we are..
# %1 where # %1 where
# %2 what # %2 what
@ -497,9 +506,6 @@ BuildRequires: minizip-compat-devel
# RHEL 8 needs to use the compat-minizip (provided by minizip1.2) # RHEL 8 needs to use the compat-minizip (provided by minizip1.2)
%if 0%{?rhel} >= 8 %if 0%{?rhel} >= 8
BuildRequires: minizip-compat-devel BuildRequires: minizip-compat-devel
%else
# RHEL 7 used to have minizip, but as of 7.9, it does not.
# BuildRequires: minizip-devel
%endif %endif
%endif %endif
@ -508,6 +514,11 @@ BuildRequires: minizip-compat-devel
BuildRequires: nodejs BuildRequires: nodejs
%endif %endif
# use system gn on fedora and rhel >=8, el7 needs bundle gn
%if ! %{bootstrap}
BuildRequires: gn
%endif
BuildRequires: nss-devel >= 3.26 BuildRequires: nss-devel >= 3.26
BuildRequires: pciutils-devel BuildRequires: pciutils-devel
BuildRequires: pulseaudio-libs-devel BuildRequires: pulseaudio-libs-devel
@ -519,8 +530,12 @@ BuildRequires: pkgconfig(libpipewire-0.3)
# for /usr/bin/appstream-util # for /usr/bin/appstream-util
BuildRequires: libappstream-glib BuildRequires: libappstream-glib
%if %{bootstrap}
# gn needs these # gn needs these
BuildRequires: libstdc++-static BuildRequires: libstdc++-static
%endif
# Fedora tries to use system libs whenever it can. # Fedora tries to use system libs whenever it can.
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: dbus-glib-devel BuildRequires: dbus-glib-devel
@ -1159,6 +1174,7 @@ FLAGS+=' -Wno-unused-but-set-variable -Wno-unused-result -Wno-unused-function -W
FLAGS+=' -Wno-unused-const-variable -Wno-unneeded-internal-declaration' FLAGS+=' -Wno-unused-const-variable -Wno-unneeded-internal-declaration'
%if %{system_build_flags} %if %{system_build_flags}
CFLAGS=${CFLAGS/-g }
CFLAGS=${CFLAGS/-fexceptions} CFLAGS=${CFLAGS/-fexceptions}
CFLAGS=${CFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS} CFLAGS=${CFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS}
CFLAGS=${CFLAGS/-fcf-protection} CFLAGS=${CFLAGS/-fcf-protection}
@ -1369,7 +1385,12 @@ if python3 -c 'import google ; print google.__path__' 2> /dev/null ; then \
exit 1 ; \ exit 1 ; \
fi fi
%if %{bootstrap}
tools/gn/bootstrap/bootstrap.py --gn-gen-args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" tools/gn/bootstrap/bootstrap.py --gn-gen-args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES"
%else
cp -a %{_bindir}/gn %{builddir}/
%endif
%{builddir}/gn --script-executable=%{chromium_pybin} gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{builddir} %{builddir}/gn --script-executable=%{chromium_pybin} gen --args="$CHROMIUM_CORE_GN_DEFINES $CHROMIUM_BROWSER_GN_DEFINES" %{builddir}
%if %{build_headless} %if %{build_headless}

Loading…
Cancel
Save