Accepting request 435144 from home:Vogtinator:branches:KDE:Applications

Add cpp11.patch to fix build on Leap 42.x.

OBS-URL: https://build.opensuse.org/request/show/435144
OBS-URL: https://build.opensuse.org/package/show/KDE:Applications/kshisen?expand=0&rev=36
This commit is contained in:
Luca Beltrame 2016-10-14 15:58:59 +00:00 committed by Git OBS Bridge
parent b155079e65
commit 52654c9cc9
3 changed files with 33 additions and 0 deletions

25
cpp14.patch Normal file
View File

@ -0,0 +1,25 @@
Index: kshisen-16.08.2/src/board.cpp
===================================================================
--- kshisen-16.08.2.orig/src/board.cpp
+++ kshisen-16.08.2/src/board.cpp
@@ -1401,9 +1401,9 @@ void Board::madeMove(TilePos const & til
{
std::unique_ptr<Move> move;
if (slide.empty()) {
- move = std::make_unique<Move>(tilePos1, tilePos2, field(tilePos1), field(tilePos2));
+ move = std::unique_ptr<Move>(new Move(tilePos1, tilePos2, field(tilePos1), field(tilePos2)));
} else {
- move = std::make_unique<Move>(tilePos1, tilePos2, field(tilePos1), field(tilePos2), slide);
+ move = std::unique_ptr<Move>(new Move(tilePos1, tilePos2, field(tilePos1), field(tilePos2), slide));
}
m_undo.push_back(std::move(move));
if (!m_redo.empty()) {
@@ -1743,7 +1743,7 @@ bool Board::hint_I(PossibleMoves & possi
int Board::tilesLeft() const
{
- return std::count_if(m_field.begin(), m_field.end(), [](auto field) { return field != EMPTY; });
+ return std::count_if(m_field.begin(), m_field.end(), [](int field) { return field != EMPTY; });
}
int Board::currentTime() const

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Oct 14 15:47:28 UTC 2016 - fabian@ritter-vogt.de
- Add cpp11.patch to use only c++ features supported by GCC 4.8
-------------------------------------------------------------------
Tue Oct 11 21:02:07 UTC 2016 - lbeltrame@kde.org

View File

@ -37,6 +37,8 @@ Url: http://www.kde.org
Version: 16.08.2
Release: 0
Source0: kshisen-%{version}.tar.xz
# PATCH-FIX-OPENSUSE cpp14.patch fabian@ritter-vogt.de Use only c++11 features
Patch1: cpp14.patch
Obsoletes: %{name}5 < %{version}
Provides: %{name}5 = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -50,6 +52,7 @@ two tiles with of the same type until no tile is left.
%prep
%setup -q -n kshisen-%{version}
%patch1 -p1
%build
%cmake_kf5 -d build