Merge branch 'feature/gcc11' into 'master'

Use GCC 11 on CentOS 7

See merge request packaging/rpm-icinga2!39
This commit is contained in:
Alexander A. Klimov 2022-06-13 16:46:56 +00:00
commit 720baff9fe
1 changed files with 5 additions and 29 deletions

View File

@ -19,7 +19,7 @@
%define apacheuser apache
%define apachegroup apache
%if 0%{?el6}%{?amzn}
%if 0%{?amzn}
%define use_systemd 0
%define use_selinux 0
%if %(uname -m) != "x86_64"
@ -118,15 +118,10 @@ BuildRequires: libyajl-devel
%endif
BuildRequires: libedit-devel
BuildRequires: ncurses-devel
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
BuildRequires: gcc48-c++
BuildRequires: libopenssl1-devel
BuildRequires: libstdc++48-devel
%else
%if "%{_vendor}" == "redhat" && (0%{?el6} || 0%{?rhel} == 6 || "%{?dist}" == ".el6")
# Requires devtoolset-7 scl
%define scl_name devtoolset-7
%define scl_enable scl enable %{scl_name} --
%if "%{_vendor}" == "redhat" && (0%{?el7} || 0%{?rhel} == 7 || "%{?dist}" == ".el7")
# Requires devtoolset-11 scl
%define scl_name devtoolset-11
%define scl_enable scl enable %{scl_name} --
BuildRequires: %{scl_name}-binutils
BuildRequires: %{scl_name}-gcc-c++
BuildRequires: %{scl_name}-libstdc++-devel
@ -135,7 +130,6 @@ BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
%endif
BuildRequires: openssl-devel
%endif
BuildRequires: bison
BuildRequires: cmake
BuildRequires: flex >= 2.5.35
@ -170,13 +164,6 @@ BuildRequires: libboost_test-devel%{?boost_devel_suffix} >= %{boost_min_version
# default boost devel package
%define boost_devel_pkg boost-devel
%if (0%{?el6} || 0%{?rhel} == 6)
# Provided by packages.icinga.com
%define boost_library icinga-boost169
%define boost_version 1.69
%define boost_devel_pkg icinga-boost169-devel
%define boost_rpath %{_libdir}/%{boost_library}
%endif # el6
%if (0%{?el7} || 0%{?rhel} == 7)
# Provided by EPEL
%define boost_library boost169
@ -413,11 +400,6 @@ CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PGSQL=ON"
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_WITH_PGSQL=OFF"
%endif
%if (0%{?el6} || 0%{?rhel} == 6)
# Explicitly link against rt, because ld doesn't detect it automatically
CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_EXE_LINKER_FLAGS=-lrt"
%endif # el6
%if "%{?boost_rpath}" != ""
CMAKE_OPTS="$CMAKE_OPTS -DCMAKE_INSTALL_RPATH=%{boost_rpath}"
%endif # boost_rpath
@ -437,12 +419,6 @@ CMAKE_OPTS="$CMAKE_OPTS
CMAKE_OPTS="$CMAKE_OPTS -DUSE_SYSTEMD=ON"
%endif
%if "%{_vendor}" == "suse" && 0%{?suse_version} < 1210
# from package gcc48-c++
export CC=gcc-4.8
export CXX=g++-4.8
%endif
%if "%{?_buildhost}" != ""
CMAKE_OPTS="$CMAKE_OPTS -DICINGA2_BUILD_HOST_NAME:STRING=%_buildhost"
%endif