SHA256
1
0
forked from pool/krita

Accepting request 861467 from home:wolfi323:branches:KDE:Extra

- Add Upgrade-C++-standard-to-14-if-Boost-ge-1.75.patch to fix
  build with boost 1.75 (kde#430331)

OBS-URL: https://build.opensuse.org/request/show/861467
OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/krita?expand=0&rev=133
This commit is contained in:
Luca Beltrame 2021-01-07 21:22:43 +00:00 committed by Git OBS Bridge
parent bef17f1cde
commit 03ea973b9d
3 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 75a9c5ba57c96e2a1c881aefd6eb0f4760b506a3 Mon Sep 17 00:00:00 2001
From: "L. E. Segovia" <amy@amyspark.me>
Date: Tue, 15 Dec 2020 21:27:50 +0000
Subject: [PATCH] Upgrade C++ standard to 14 if Boost >= 1.75
This only affects compilation if a recent enough Boost is detected.
BUG: 430331
CCMAIL: kimageshop@kde.org
(cherry picked from commit 03ff1bae4348a71987c69bb3746cfa6c15d53862)
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b54887ff97..12b1b5950b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -574,6 +574,10 @@ endif()
add_definitions(-DBOOST_ALL_NO_LIB)
find_package(Boost 1.55 REQUIRED COMPONENTS system)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
+if(${Boost_VERSION} VERSION_GREATER_EQUAL "1.75")
+ message(WARNING "Boost 1.75 or higher detected, upgrading to C++14.")
+ set(CMAKE_CXX_STANDARD 14)
+endif()
##
## Test for GNU Scientific Library
##
--
GitLab

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 7 19:19:56 UTC 2021 - Wolfgang Bauer <wbauer@tmo.at>
- Add Upgrade-C++-standard-to-14-if-Boost-ge-1.75.patch to fix
build with boost 1.75 (kde#430331)
-------------------------------------------------------------------
Fri Oct 30 11:56:59 UTC 2020 - Wolfgang Bauer <wbauer@tmo.at>

View File

@ -31,6 +31,8 @@ License: GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND
Group: Productivity/Graphics/Bitmap Editors
URL: https://www.krita.org/
Source0: https://download.kde.org/stable/krita/%{version}/krita-%{version}.tar.xz
# PATCH-FIX-UPSTREAM
Patch0: Upgrade-C++-standard-to-14-if-Boost-ge-1.75.patch
%ifnarch %{arm} aarch64
# causes build failure on ARM currently
BuildRequires: OpenColorIO-devel
@ -111,7 +113,7 @@ Development headers and libraries for Krita.
%lang_package
%prep
%setup -q
%autosetup -p1
%build
%ifarch %{arm} aarch64