commit d0515a20848240d2a7b81d546d427dd0e9a9b432
Author: Jan RÄ™korajski <[email protected]>
Date:   Sat Apr 20 10:00:13 2019 +0200

    - up to 0.99, still doesn't build with boost 1.70

 boost-1.58.patch | 50 ------------------------------------
 boost-1.66.patch | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cxx.patch        | 67 ------------------------------------------------
 ffmpeg3.patch    | 52 -------------------------------------
 vcmi.spec        | 12 +++------
 5 files changed, 82 insertions(+), 177 deletions(-)
---
diff --git a/vcmi.spec b/vcmi.spec
index 96d39bf..1c668c4 100644
--- a/vcmi.spec
+++ b/vcmi.spec
@@ -1,16 +1,14 @@
 Summary:       Heroes 3: WoG recreated
 Name:          vcmi
-Version:       0.98
-Release:       7
+Version:       0.99
+Release:       1
 License:       GPL v2+
 Group:         X11/Applications/Games
 Source0:       
https://github.com/vcmi/vcmi/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 6a69e52a3380358220eba67332b097c6
+# Source0-md5: 686c2a0283184add785d50b447db806f
 Source1:       http://download.vcmi.eu/core.zip
 # Source1-md5: 5cf75d588cc53b93aceb809a6068ae37
-Patch0:                boost-1.58.patch
-Patch1:                ffmpeg3.patch
-Patch2:                cxx.patch
+Patch0:                boost-1.66.patch
 URL:           http://www.vcmi.eu/
 BuildRequires: Qt5Network-devel
 BuildRequires: qt5-build
@@ -38,8 +36,6 @@ H3 engine rewrie (not another mod) with new possibilities.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 %build
 install -d build
diff --git a/boost-1.58.patch b/boost-1.58.patch
deleted file mode 100644
index 854e505..0000000
--- a/boost-1.58.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From aa00fdbd0e99b2beec382c7677a64d962b748dcb Mon Sep 17 00:00:00 2001
-From: Rohit Nirmal <[email protected]>
-Date: Wed, 6 May 2015 19:16:51 -0500
-Subject: [PATCH] Fix building with Boost 1.58.
-
----
- CCallback.cpp             | 2 +-
- lib/CArtHandler.cpp       | 2 +-
- lib/CGameInfoCallback.cpp | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/CCallback.cpp b/CCallback.cpp
-index 8009bc7..da280db 100644
---- a/CCallback.cpp
-+++ b/CCallback.cpp
-@@ -80,7 +80,7 @@ void CCallback::recruitCreatures(const CGDwelling *obj, 
const CArmedInstance * d
- 
- bool CCallback::dismissCreature(const CArmedInstance *obj, SlotID stackPos)
- {
--      if(((player>=0)  &&  obj->tempOwner != player) || (obj->stacksCount()<2 
 && obj->needsLastStack()))
-+      if((player && obj->tempOwner != player) || (obj->stacksCount()<2  && 
obj->needsLastStack()))
-               return false;
- 
-       DisbandCreature pack(stackPos,obj->id);
-diff --git a/lib/CArtHandler.cpp b/lib/CArtHandler.cpp
-index 2d9dd01..0026a66 100644
---- a/lib/CArtHandler.cpp
-+++ b/lib/CArtHandler.cpp
-@@ -671,7 +671,7 @@ boost::optional<std::vector<CArtifact*>&> 
CArtHandler::listFromClass( CArtifact:
-       case CArtifact::ART_RELIC:
-               return relics;
-       default: //special artifacts should not be erased
--              return nullptr;
-+              return boost::optional<std::vector<CArtifact*>&>();
-       }
- }
- 
-diff --git a/lib/CGameInfoCallback.cpp b/lib/CGameInfoCallback.cpp
-index 051bb9c..2a59b96 100644
---- a/lib/CGameInfoCallback.cpp
-+++ b/lib/CGameInfoCallback.cpp
-@@ -403,7 +403,7 @@ std::vector <const CGObjectInstance * > 
CGameInfoCallback::getVisitableObjs(int3
- 
-       for(const CGObjectInstance * obj : t->visitableObjects)
-       {
--              if(player < nullptr || obj->ID != Obj::EVENT) //hide events 
from players
-+              if(player || obj->ID != Obj::EVENT) //hide events from players
-                       ret.push_back(obj);
-       }
- 
diff --git a/boost-1.66.patch b/boost-1.66.patch
new file mode 100644
index 0000000..2bf9190
--- /dev/null
+++ b/boost-1.66.patch
@@ -0,0 +1,78 @@
+From 83c6ffbda0f373848e11b81f128647bfcaed024f Mon Sep 17 00:00:00 2001
+From: Raphnalor <[email protected]>
+Date: Sun, 11 Mar 2018 16:02:20 +0300
+Subject: [PATCH] Reflect changes in boost::asio released in Boost 1.66. (#428)
+
+The service template parameters are disabled by default for now.
+Use BOOST_ASIO_ENABLE_OLD_SERVICES macro to enable the old interface.
+---
+ lib/serializer/Connection.cpp | 3 +++
+ lib/serializer/Connection.h   | 6 ++++++
+ server/CVCMIServer.cpp        | 3 +++
+ server/CVCMIServer.h          | 8 +++++++-
+ 4 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/lib/serializer/Connection.cpp b/lib/serializer/Connection.cpp
+index 0a842d1d3..ae1810e8b 100644
+--- a/lib/serializer/Connection.cpp
++++ b/lib/serializer/Connection.cpp
+@@ -14,6 +14,9 @@
+ #include "../mapping/CMap.h"
+ #include "../CGameState.h"
+ 
++#if BOOST_VERSION >= 106600
++#define BOOST_ASIO_ENABLE_OLD_SERVICES
++#endif
+ #include <boost/asio.hpp>
+ 
+ using namespace boost;
+diff --git a/lib/serializer/Connection.h b/lib/serializer/Connection.h
+index b6ceee7a0..cb134e2b6 100644
+--- a/lib/serializer/Connection.h
++++ b/lib/serializer/Connection.h
+@@ -22,7 +22,13 @@ namespace boost
+               {
+                       class tcp;
+               }
++
++#if BOOST_VERSION >= 106600  // Boost version >= 1.66
++              class io_context;
++              typedef io_context io_service;
++#else
+               class io_service;
++#endif
+ 
+               template <typename Protocol> class stream_socket_service;
+               template <typename Protocol,typename StreamSocketService>
+diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp
+index b077607be..d459a8e95 100644
+--- a/server/CVCMIServer.cpp
++++ b/server/CVCMIServer.cpp
+@@ -9,5 +9,8 @@
+ #include "StdInc.h"
+ 
++#if BOOST_VERSION >= 106600
++#define BOOST_ASIO_ENABLE_OLD_SERVICES
++#endif
+ #include <boost/asio.hpp>
+ 
+ #include "../lib/filesystem/Filesystem.h"
+diff --git a/server/CVCMIServer.h b/server/CVCMIServer.h
+index 6fa7ad5bb..ad9951f64 100644
+--- a/server/CVCMIServer.h
++++ b/server/CVCMIServer.h
+@@ -26,7 +26,13 @@ namespace boost
+               {
+                       class tcp;
+               }
+-              class io_service;
++
++#if BOOST_VERSION >= 106600  // Boost version >= 1.66
++              class io_context;
++              typedef io_context io_service;
++#else
++              class io_service;
++#endif
+ 
+               template <typename Protocol> class stream_socket_service;
+               template <typename Protocol,typename StreamSocketService>
diff --git a/cxx.patch b/cxx.patch
deleted file mode 100644
index aeed7b6..0000000
--- a/cxx.patch
+++ /dev/null
@@ -1,67 +0,0 @@
---- vcmi-0.98/lib/Connection.cpp~      2015-04-01 07:34:22.000000000 +0000
-+++ vcmi-0.98/lib/Connection.cpp       2016-05-28 17:54:42.579831336 +0000
-@@ -440,7 +440,7 @@
-               return typeDescr;  //type found, return ptr to structure
- 
-       //type not found - add it to the list and return given ID
--      auto newType = make_shared<TypeDescriptor>();
-+      auto newType = std::make_shared<TypeDescriptor>();
-       newType->typeID = typeInfos.size() + 1;
-       newType->name = type->name();
-       typeInfos[type] = newType;
---- vcmi-0.98/client/Client.cpp~       2015-04-01 07:34:22.000000000 +0000
-+++ vcmi-0.98/client/Client.cpp        2016-05-28 18:01:35.421105201 +0000
-@@ -451,7 +451,7 @@
-                       }
-                       else 
-                       {
--                              
installNewPlayerInterface(make_shared<CPlayerInterface>(color), color);
-+                              
installNewPlayerInterface(std::make_shared<CPlayerInterface>(color), color);
-                               humanPlayers++;
-                       }
-               }
-@@ -467,7 +467,7 @@
-               if(!gNoGUI)
-               {
-                       boost::unique_lock<boost::recursive_mutex> 
un(*LOCPLINT->pim);
--                      auto p = 
make_shared<CPlayerInterface>(PlayerColor::NEUTRAL);
-+                      auto p = 
std::make_shared<CPlayerInterface>(PlayerColor::NEUTRAL);
-                       p->observerInDuelMode = true;
-                       installNewPlayerInterface(p, boost::none);
-                       GH.curInt = p.get();
-@@ -550,7 +550,7 @@
-                       else
-                       {
-                               assert(isHuman);
--                              nInt = make_shared<CPlayerInterface>(pid);
-+                              nInt = std::make_shared<CPlayerInterface>(pid);
-                       }
- 
-                       nInt->dllName = dllname;
-@@ -620,7 +620,7 @@
-                       else
-                       {
-                               assert(isHuman);
--                              nInt = make_shared<CPlayerInterface>(pid);
-+                              nInt = std::make_shared<CPlayerInterface>(pid);
-                       }
- 
-                       nInt->dllName = dllname;
-@@ -866,7 +866,7 @@
-       playerint[colorUsed] = gameInterface;
- 
-       logGlobal->traceStream() << boost::format("\tInitializing the interface 
for player %s") % colorUsed;
--      auto cb = make_shared<CCallback>(gs, color, this);
-+      auto cb = std::make_shared<CCallback>(gs, color, this);
-       callbacks[colorUsed] = cb;
-       battleCallbacks[colorUsed] = cb;
-       gameInterface->init(cb);
-@@ -887,7 +887,7 @@
-       if(needCallback)
-       {
-               logGlobal->traceStream() << boost::format("\tInitializing the 
battle interface for player %s") % *color;
--              auto cbc = make_shared<CBattleCallback>(gs, color, this);
-+              auto cbc = std::make_shared<CBattleCallback>(gs, color, this);
-               battleCallbacks[colorUsed] = cbc;
-               battleInterface->init(cbc);
-       }
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
deleted file mode 100644
index 919d31e..0000000
--- a/ffmpeg3.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -ur vcmi-0.98.orig/client/CVideoHandler.cpp 
vcmi-0.98/client/CVideoHandler.cpp
---- vcmi-0.98.orig/client/CVideoHandler.cpp    2015-04-01 09:34:22.000000000 
+0200
-+++ vcmi-0.98/client/CVideoHandler.cpp 2016-03-29 01:45:43.689696331 +0200
-@@ -155,7 +155,7 @@
-       }
- 
-       // Allocate video frame
--      frame = avcodec_alloc_frame();
-+      frame = av_frame_alloc();
-       
-       //setup scaling
-       
-@@ -201,21 +201,21 @@
- #endif
-       { // Convert the image into YUV format that SDL uses
-               sws = sws_getContext(codecContext->width, codecContext->height, 
codecContext->pix_fmt, 
--                                                       pos.w, pos.h, 
PIX_FMT_YUV420P, 
-+                                                       pos.w, pos.h, 
AV_PIX_FMT_YUV420P, 
-                                                        SWS_BICUBIC, nullptr, 
nullptr, nullptr);
-       }
-       else
-       {
- 
--              PixelFormat screenFormat = PIX_FMT_NONE;
-+              AVPixelFormat screenFormat = AV_PIX_FMT_NONE;
-               if (screen->format->Bshift > screen->format->Rshift)
-               {
-                       // this a BGR surface
-                       switch (screen->format->BytesPerPixel)
-                       {
--                              case 2: screenFormat = PIX_FMT_BGR565; break;
--                              case 3: screenFormat = PIX_FMT_BGR24; break;
--                              case 4: screenFormat = PIX_FMT_BGR32; break;
-+                              case 2: screenFormat = AV_PIX_FMT_BGR565; break;
-+                              case 3: screenFormat = AV_PIX_FMT_BGR24; break;
-+                              case 4: screenFormat = AV_PIX_FMT_BGR32; break;
-                               default: return false;
-                       }
-               }
-@@ -224,9 +224,9 @@
-                       // this a RGB surface
-                       switch (screen->format->BytesPerPixel)
-                       {
--                              case 2: screenFormat = PIX_FMT_RGB565; break;
--                              case 3: screenFormat = PIX_FMT_RGB24; break;
--                              case 4: screenFormat = PIX_FMT_RGB32; break;
-+                              case 2: screenFormat = AV_PIX_FMT_RGB565; break;
-+                              case 3: screenFormat = AV_PIX_FMT_RGB24; break;
-+                              case 4: screenFormat = AV_PIX_FMT_RGB32; break;
-                               default: return false;
-                       }
-               }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/vcmi.git/commitdiff/7423bc77077754586c754559d5145e3a754ebe05

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to