From d3ec0a8a482878220391c7818dcfac43777ffa24 Mon Sep 17 00:00:00 2001 From: Zamir SUN Date: May 04 2020 02:55:21 +0000 Subject: Improve compatibility with epel7 Signed-off-by: Zamir SUN --- diff --git a/pcmanfm-qt.spec b/pcmanfm-qt.spec index c4ccee1..8e54a34 100644 --- a/pcmanfm-qt.spec +++ b/pcmanfm-qt.spec @@ -24,16 +24,24 @@ BuildRequires: kf5-kwindowsystem-devel BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: libexif-devel +%if 0%{?el7} +BuildRequires: devtoolset-7-gcc-c++ +%endif + +%if 0%{?fedora} Requires: desktop-backgrounds-compat +%endif Obsoletes: pcmanfm-qt5 < 0.9.0 Provides: pcmanfm-qt5 = %{version}-%{release} Obsoletes: pcmanfm-qt4 <= 0.9.0 Obsoletes: pcmanfm-qt-common <= 0.9.0 +%if 0%{?fedora} # gvfs is optional depencency at runtime, so we add a weak dependency here Recommends: gvfs # configuration patched to use qterminal instead as the default terminal emulator but allow to use others Recommends: qterminal +%endif %description %{summary} @@ -55,6 +63,9 @@ This package provides translations for the pcmanfm-qt package. %patch1 -p1 %build +%if 0%{?el7} +scl enable devtoolset-7 - <<\EOF +%endif mkdir -p %{_target_platform} pushd %{_target_platform} %{cmake_lxqt} -DBUILD_DOCUMENTATION=ON -DPULL_TRANSLATIONS=NO .. @@ -62,6 +73,10 @@ popd make %{?_smp_mflags} -C %{_target_platform} +%if 0%{?el7} +EOF +%endif + %install make install/fast DESTDIR=%{buildroot} -C %{_target_platform}