Commit f7ab9c71 authored by Michał Kępień's avatar Michał Kępień
Browse files

Use devtoolset-7 for building on RHEL/CentOS 6

protobuf 3.6+ requires a C++11 compiler.  GCC 4.4.7 available from stock
RHEL/CentOS 6 packages is not one.
parent 222ac9f3
......@@ -19,6 +19,9 @@ Source0: %{url}/releases/download/v%{version}/%{pkg_name}-%{version}.tar.
BuildRequires: autoconf automake libtool
BuildRequires: gcc-c++
BuildRequires: pkgconfig(protobuf)
%if 0%{?rhel} && 0%{?rhel} < 7
BuildRequires: devtoolset-7
%endif
%{?scl:BuildRequires: %{scl}-build}
%{?scl:BuildRequires: %scl_runtime}
......@@ -52,11 +55,23 @@ This package contains protobuf-c headers and libraries.
%build
# autoreconf -ifv
%if 0%{?rhel} && 0%{?rhel} < 7
scl enable devtoolset-7 -- <<\EOF
%endif
%configure --disable-static
%{?scl:scl enable %scl -- }%make_build
%if 0%{?rhel} && 0%{?rhel} < 7
EOF
%endif
%check
%if 0%{?rhel} && 0%{?rhel} < 7
scl enable devtoolset-7 -- <<\EOF
%endif
make check
%if 0%{?rhel} && 0%{?rhel} < 7
EOF
%endif
%install
%make_install
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment