From 5e0bf701408dcdab539a623f87ef3d978db2676b04f969c94e777c5504752ee5 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Sat, 28 Jul 2018 15:56:35 +0000 Subject: [PATCH] Accepting request 625941 from home:wolfi323:branches:KDE:Applications - Build with gcc7 on Leap 42.3 (it fails to compile with gcc 4.8) OBS-URL: https://build.opensuse.org/request/show/625941 OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kbackup?expand=0&rev=13 --- kbackup.changes | 1 + kbackup.spec | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/kbackup.changes b/kbackup.changes index 44dc839..d7eac42 100644 --- a/kbackup.changes +++ b/kbackup.changes @@ -12,6 +12,7 @@ Thu Jul 26 13:00:34 UTC 2018 - lbeltrame@kde.org * Fix includes * Use nullptr * fix releaseinfo +- Build with gcc7 on Leap 42.3 ------------------------------------------------------------------- Fri Jul 13 04:49:51 UTC 2018 - lbeltrame@kde.org diff --git a/kbackup.spec b/kbackup.spec index 1d48d26..2f65f85 100644 --- a/kbackup.spec +++ b/kbackup.spec @@ -39,6 +39,15 @@ BuildRequires: cmake(KF5WidgetsAddons) BuildRequires: cmake(KF5XmlGui) BuildRequires: cmake(Qt5Gui) BuildRequires: cmake(Qt5Widgets) +# Needed for 42.3 +%if 0%{?suse_version} < 1330 +# It does not build with the default compiler (GCC 4.8) on Leap 42.x +%if 0%{?sle_version} < 120300 +BuildRequires: gcc6-c++ +%else +BuildRequires: gcc7-c++ +%endif +%endif %description kbackup is a backup program based on KDE Frameworks 5. It allows backing @@ -52,6 +61,16 @@ Although GUI based, it also offers an automated, GUI-less mode. %setup -q %build + %if 0%{?suse_version} < 1330 + # It does not build with the default compiler (GCC 4.8) on Leap 42.x + %if 0%{?sle_version} < 120300 + export CC=gcc-6 + export CXX=g++-6 + %else + export CC=gcc-7 + export CXX=g++-7 + %endif + %endif %cmake_kf5 -d build %make_jobs