From 25c7c0038392aa5e6a3e0b361c3f13532b6d9cd9 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Mon, 5 Jun 2023 06:48:58 -0700 Subject: [PATCH] Use gcc-toolset-12 on RHEL 9 or older --- qt6-qtmultimedia.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qt6-qtmultimedia.spec b/qt6-qtmultimedia.spec index 8cba08e..4f1b3ac 100644 --- a/qt6-qtmultimedia.spec +++ b/qt6-qtmultimedia.spec @@ -42,6 +42,9 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod BuildRequires: cmake BuildRequires: gcc-c++ +%if 0%{?rhel} && 0%{?rhel} < 10 +BuildRequires: gcc-toolset-12 +%endif BuildRequires: ninja-build BuildRequires: qt6-rpm-macros BuildRequires: qt6-qtbase-devel >= %{version} @@ -112,6 +115,9 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %build +%if 0%{?rhel} && 0%{?rhel} < 10 +. /opt/rh/gcc-toolset-12/enable +%endif %cmake_qt6 -DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF} %cmake_build