diff --git a/libreoffice.spec b/libreoffice.spec index f09483e..f940bbd 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -52,7 +52,7 @@ %endif %bcond_with firebird %if 0%{?gcc_version} < 12 -%define with_gcc 12 +%global with_gcc 12 %endif Name: libreoffice Version: 24.2.1.2 @@ -329,8 +329,13 @@ BuildRequires: libmariadb-devel BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(libopenjp2) %endif +%if 0%{?with_gcc:1} BuildRequires: gcc%{with_gcc} BuildRequires: gcc%{with_gcc}-c++ +%else +BuildRequires: gcc +BuildRequires: gcc-c++ +%endif BuildRequires: java-devel >= 1.8 %if 0%{?suse_version} # needed by python3_sitelib