commit b98c8122d349722ff82f3ee93e6478c3f05f758e
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Thu May 2 13:31:41 2019 +0200
Boost 1.69 fixes, exclude ppc64le
Co-authored-by: Jonathan Wakely <jwakely(a)redhat.com>
vcmi-boost-1.69.patch | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
vcmi.spec | 9 ++++++++
2 files changed, 68 insertions(+)
---
diff --git a/vcmi-boost-1.69.patch b/vcmi-boost-1.69.patch
new file mode 100644
index 0000000..b689599
--- /dev/null
+++ b/vcmi-boost-1.69.patch
@@ -0,0 +1,59 @@
+diff --git a/AI/VCAI/AIUtility.cpp b/AI/VCAI/AIUtility.cpp
+index 3ca20b0..d884fa6 100644
+--- a/AI/VCAI/AIUtility.cpp
++++ b/AI/VCAI/AIUtility.cpp
+@@ -179,7 +179,7 @@ std::string strFromInt3(int3 pos)
+ return oss.str();
+ }
+
+-bool CDistanceSorter::operator ()(const CGObjectInstance *lhs, const CGObjectInstance
*rhs)
++bool CDistanceSorter::operator ()(const CGObjectInstance *lhs, const CGObjectInstance
*rhs) const
+ {
+ const CGPathNode *ln =
ai->myCb->getPathsInfo(hero)->getPathInfo(lhs->visitablePos()),
+ *rn =
ai->myCb->getPathsInfo(hero)->getPathInfo(rhs->visitablePos());
+diff --git a/AI/VCAI/AIUtility.h b/AI/VCAI/AIUtility.h
+index bbe96f8..8fcc0a2 100644
+--- a/AI/VCAI/AIUtility.h
++++ b/AI/VCAI/AIUtility.h
+@@ -167,5 +167,5 @@ class CDistanceSorter
+ public:
+ CDistanceSorter(const CGHeroInstance * hero): hero(hero) {}
+
+- bool operator ()(const CGObjectInstance *lhs, const CGObjectInstance *rhs);
++ bool operator ()(const CGObjectInstance *lhs, const CGObjectInstance *rhs) const;
+ };
+diff --git a/client/windows/CAdvmapInterface.cpp b/client/windows/CAdvmapInterface.cpp
+index d14e3a8..d096854 100644
+--- a/client/windows/CAdvmapInterface.cpp
++++ b/client/windows/CAdvmapInterface.cpp
+@@ -781,7 +781,7 @@ void CAdvMapInt::updateMoveHero(const CGHeroInstance *h, tribool
hasPath)
+ if(boost::logic::indeterminate(hasPath))
+ hasPath = LOCPLINT->paths[h].nodes.size() ? true : false;
+
+- moveHero->block(!hasPath || (h->movement == 0));
++ moveHero->block(bool(!hasPath) || (h->movement == 0));
+ }
+
+ void CAdvMapInt::updateSpellbook(const CGHeroInstance *h)
+diff --git a/lib/CBattleCallback.cpp b/lib/CBattleCallback.cpp
+index 334bca2..3dcb8a7 100644
+--- a/lib/CBattleCallback.cpp
++++ b/lib/CBattleCallback.cpp
+@@ -499,7 +499,7 @@ bool CBattleInfoEssentials::battleMatchOwner(const CStack * attacker,
const CSta
+ else if(defender->owner != battleGetOwner(defender))
+ return true;//mind controlled unit is attackable for both sides
+ else
+- return (battleGetOwner(attacker) == battleGetOwner(defender)) == positivness;
++ return (battleGetOwner(attacker) == battleGetOwner(defender)) == (bool) positivness;
+ }
+
+ si8 CBattleInfoCallback::battleHasWallPenalty( const CStack * stack, BattleHex destHex )
const
+@@ -1359,7 +1359,7 @@ std::pair<const CStack *, BattleHex>
CBattleInfoCallback::getNearestStack(const
+
+ std::vector<const CStack *> possibleStacks = battleGetStacksIf([=](const CStack *
s)
+ {
+- return s->isValidTarget(false) && s != closest &&
(boost::logic::indeterminate(attackerOwned) || s->attackerOwned == attackerOwned);
++ return s->isValidTarget(false) && s != closest &&
bool(boost::logic::indeterminate(attackerOwned) || s->attackerOwned == attackerOwned);
+ });
+
+ for(const CStack * st : possibleStacks)
diff --git a/vcmi.spec b/vcmi.spec
index 26e8e06..623a541 100644
--- a/vcmi.spec
+++ b/vcmi.spec
@@ -18,6 +18,13 @@ Patch1: %{name}-boost-1.66.patch
Source2: %{name}.zip
Patch2: %{name}-mods.patch
+# Boost 1.69 failures
+# tribool casts +
https://github.com/vcmi/vcmi/commit/edcaaf036acb76882df2274f4df2aeef3c84525e
+Patch3: %{name}-boost-1.69.patch
+
+# The Koji builder gets killed here, but I don't expect people to use this there
+ExcludeArch: ppc64le
+
BuildRequires: %{_bindir}/desktop-file-validate
BuildRequires: %{_bindir}/dos2unix
BuildRequires: cmake
@@ -71,6 +78,8 @@ Data files for the VCMI project, a %{summary}.
mv vcmi/Mods/* Mods && rm -rf vcmi
%patch2 -p1
+%patch3 -p1
+
dos2unix README.md README.linux license.txt AUTHORS ChangeLog