From 05cd22b6c16860442b2428dd1c29771da89f66dc Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Jul 30 2015 17:21:16 +0000 Subject: Handle EL6 builds --- diff --git a/octave-image.spec b/octave-image.spec index be16085..a4f27b6 100644 --- a/octave-image.spec +++ b/octave-image.spec @@ -14,6 +14,10 @@ Patch0: workaround_gcc_65843.cset BuildRequires: octave-devel >= 6:4.0.0 # For bootstrap BuildRequires: automake +%if 0%{?rhel} == 6 +# For EL6 +BuildRequires: devtoolset-3-gcc-c++ +%endif Requires: octave(api) = %{octave_api} Requires(post): octave @@ -28,12 +32,22 @@ operations, linear filtering, and much more. %prep %setup -q -n %{octpkg}-%{version} +%if 0%{?fedora} %patch0 -p1 +%endif %build +%if 0%{?fedora} # Needed for patch0 ./bootstrap +%endif +%if 0%{?rhel} == 6 +cat << EOF | scl enable devtoolset-3 - +%endif %octave_pkg_build +%if 0%{?rhel} == 6 +EOF +%endif %install %octave_pkg_install