diff --git a/cpp14.patch b/cpp14.patch new file mode 100644 index 0000000..bc4aecc --- /dev/null +++ b/cpp14.patch @@ -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; + if (slide.empty()) { +- move = std::make_unique(tilePos1, tilePos2, field(tilePos1), field(tilePos2)); ++ move = std::unique_ptr(new Move(tilePos1, tilePos2, field(tilePos1), field(tilePos2))); + } else { +- move = std::make_unique(tilePos1, tilePos2, field(tilePos1), field(tilePos2), slide); ++ move = std::unique_ptr(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 diff --git a/kshisen.changes b/kshisen.changes index 2846f83..781a2ae 100644 --- a/kshisen.changes +++ b/kshisen.changes @@ -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 diff --git a/kshisen.spec b/kshisen.spec index 6345f3a..faa3af6 100644 --- a/kshisen.spec +++ b/kshisen.spec @@ -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