commit f6243dd4cb6b9fce1d7256085148cce954731617
Author: Miro Hrončok <miro(a)hroncok.cz>
Date: Tue Sep 29 21:46:59 2020 +0200
Update to a git snapshot, pick the same one as Debian
.gitignore | 6 +-
ac81d0f.patch | 62 +++++++++++
sources | 5 +-
vcmi-boost-1.66.patch | 280 --------------------------------------------------
vcmi-boost-1.69.patch | 59 -----------
vcmi-mods.patch | 13 ---
vcmi.spec | 79 +++++++-------
7 files changed, 114 insertions(+), 390 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5350a59..6ed0011 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,6 @@
-/vcmi-0.99.tar.gz
+/vcmi-*.tar.gz
+/fuzzylite-*.tar.gz
/vcmi.zip
+results_vcmi/
+/vcmi-*/
+*.src.rpm
diff --git a/ac81d0f.patch b/ac81d0f.patch
new file mode 100644
index 0000000..6e024d6
--- /dev/null
+++ b/ac81d0f.patch
@@ -0,0 +1,62 @@
+From ac81d0f7b42fb535748ec311ba877a6e6216567b Mon Sep 17 00:00:00 2001
+From: krkos <krkos(a)users.noreply.github.com>
+Date: Tue, 21 Jan 2020 09:55:28 +0100
+Subject: [PATCH] Fix build with Boost versioni >= 1.70 (#615)
+
+---
+ lib/serializer/Connection.h | 7 +++++++
+ server/CVCMIServer.cpp | 8 ++++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/lib/serializer/Connection.h b/lib/serializer/Connection.h
+index e6bfcfd86..6ba68d269 100644
+--- a/lib/serializer/Connection.h
++++ b/lib/serializer/Connection.h
+@@ -14,6 +14,11 @@
+
+ struct CPack;
+
++#if BOOST_VERSION >= 107000 // Boost version >= 1.70
++#include <boost/asio.hpp>
++typedef boost::asio::basic_stream_socket < boost::asio::ip::tcp > TSocket;
++typedef boost::asio::basic_socket_acceptor < boost::asio::ip::tcp > TAcceptor;
++#else
+ namespace boost
+ {
+ namespace asio
+@@ -43,6 +48,8 @@ namespace boost
+
+ typedef boost::asio::basic_stream_socket < boost::asio::ip::tcp ,
boost::asio::stream_socket_service<boost::asio::ip::tcp> > TSocket;
+ typedef boost::asio::basic_socket_acceptor<boost::asio::ip::tcp,
boost::asio::socket_acceptor_service<boost::asio::ip::tcp> > TAcceptor;
++#endif
++
+
+ /// Main class for network communication
+ /// Allows establishing connection and bidirectional read-write
+diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp
+index 730ddba96..dfcfefe4e 100644
+--- a/server/CVCMIServer.cpp
++++ b/server/CVCMIServer.cpp
+@@ -214,8 +214,8 @@ void CVCMIServer::threadAnnounceLobby()
+
+ if(acceptor)
+ {
+- acceptor->get_io_service().reset();
+- acceptor->get_io_service().poll();
++ io->reset();
++ io->poll();
+ }
+ }
+
+@@ -272,7 +272,11 @@ void CVCMIServer::startAsyncAccept()
+ assert(!upcomingConnection);
+ assert(acceptor);
+
++#if BOOST_VERSION >= 107000 // Boost version >= 1.70
++ upcomingConnection = std::make_shared<TSocket>(acceptor->get_executor());
++#else
+ upcomingConnection = std::make_shared<TSocket>(acceptor->get_io_service());
++#endif
+ acceptor->async_accept(*upcomingConnection,
std::bind(&CVCMIServer::connectionAccepted, this, _1));
+ }
+
diff --git a/sources b/sources
index f176b98..736f1ec 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,3 @@
-686c2a0283184add785d50b447db806f vcmi-0.99.tar.gz
-2464d5e6200e95c8699c0c0ce38f1d47 vcmi.zip
+SHA512 (vcmi-f06c8a8.tar.gz) =
9c646c30e4b670fc362b505bd06b90153383a9f160a43710e03776c55ad6c77de4b50d31dd80934f2176299899028e76ab50cce362c0a051bf370cec66cba287
+SHA512 (fuzzylite-9751a75.tar.gz) =
0925487f00a0997b8ea9819a8d2f5161f797b3f3b2e69cc0859fd85d85859a013e5b6775e4a5bbf5ad5422f62139a592f03b885d567e3dcab69f7a6dab4fe9d7
+SHA512 (vcmi.zip) =
f64966dfc1446fafa11870875a63a8bf48c2d8d80852ecf8337914a36fbc6061e21ffdbe9f0db872b442690c74e7c68f84ecc33d9de83246bed57b69f8cc0d71
diff --git a/vcmi.spec b/vcmi.spec
index 5f9da15..aa7fb3f 100644
--- a/vcmi.spec
+++ b/vcmi.spec
@@ -1,26 +1,31 @@
Name: vcmi
Summary: Heroes of Might and Magic 3 game engine
-Version: 0.99
-Release: 10%{?dist}
-License: GPLv2+
URL:
https://vcmi.eu/
-Source:
https://github.com/%{name}/%{name}/archive/%{version}/%{name}-%{version}....
+%global commit f06c8a872592bddfbe3fd5116979af0679f27bd3
+%global scommit %(c=%{commit}; echo ${c:0:7})
-# Absolutely disgusting and untested patch for compatibility with Boost 1.66
-# Courtesy of Robert-André Mauchin during the review
-# Sent upstream via
https://github.com/vcmi/vcmi/pull/285#issuecomment-370504722
-Patch1: %{name}-boost-1.66.patch
+%global fuzzylite_commit 9751a751a17c0682ed5d02e583c6a0cda8bc88e5
+%global fuzzylite_scommit %(c=%{fuzzylite_commit}; echo ${c:0:7})
+%global fuzzylite_version 6.0
+
+
+Version: 0.99^20190113git%{scommit}
+Release: 1%{?dist}
+
+# vcmi is GPLv2+, fyzzylight is GPLv3
+License: GPLv2+ and GPLv3
+
+Source0:
https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{scommit}.t...
+Source1:
https://github.com/fuzzylite/fuzzylite/archive/%{fuzzylite_commit}/fuzzyl...
# Enable extra resolutions
#
https://forum.vcmi.eu/t/where-is-the-mod-for-resolutions-other-than-800x6...
#
https://www.dropbox.com/sh/fwor43x5xrgzx6q/AABpTFqGK7Q9almbyr3hp9jma/mods... (not
directly downloadable)
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
+# Boost 1.71+
+Patch1:
https://github.com/vcmi/vcmi/commit/ac81d0f.patch
# The Koji builder gets killed here, but I don't expect people to use this there
ExcludeArch: ppc64le
@@ -41,6 +46,7 @@ BuildRequires: boost-system >= 1.51
BuildRequires: boost-thread >= 1.51
BuildRequires: boost-program-options >= 1.51
BuildRequires: boost-locale >= 1.51
+BuildRequires: minizip-devel
BuildRequires: zlib-devel
BuildRequires: ffmpeg-devel
BuildRequires: ffmpeg-libs
@@ -48,7 +54,7 @@ BuildRequires: qt5-qtbase-devel
Requires: hicolor-icon-theme
Requires: %{name}-data = %{version}-%{release}
-
+Provides: bundled(fuzzylight) = %{fuzzylite_version}
%description
The purpose of VCMI project is to rewrite entire Heroes 3.5: WoG engine from
@@ -70,32 +76,38 @@ Data files for the VCMI project, a %{summary}.
%prep
-%setup -q -a2
-
-%patch1 -p1
+%setup -q -a1 -a2 -n %{name}-%{commit}
+# fuzzyight from Source1:
+rmdir AI/FuzzyLite
+mv fuzzylite-%{fuzzylite_commit} AI/FuzzyLite
# mods from Source2:
mv vcmi/Mods/* Mods && rm -rf vcmi
-%patch2 -p1
-%patch3 -p1
+dos2unix README.md license.txt AUTHORS ChangeLog
-dos2unix README.md README.linux license.txt AUTHORS ChangeLog
+%patch1 -p1
%build
-%cmake -DENABLE_TEST=0 -UCMAKE_INSTALL_LIBDIR
+# low effort fix of some cmake brokenness
+export CXXFLAGS="%{build_cxxflags} -I/usr/include/ffmpeg"
+
+%cmake \
+ -DENABLE_TEST=0 \
+ -UCMAKE_INSTALL_LIBDIR \
+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
+ -DCMAKE_INSTALL_RPATH=%{_libdir}/%{name}
-%ifarch %{ix86} x86_64
-%make_build
-%else
+%ifnarch %{ix86} x86_64
# not enough memory in Koji for parallel build
-make
+%global _smp_mflags -j1
%endif
+%cmake_build
%install
-%make_install
+%cmake_install
%check
@@ -106,8 +118,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%files
-%doc README.md README.linux AUTHORS ChangeLog
-%license license.txt
+%doc README.md AUTHORS ChangeLog
+%license license.txt AI/FuzzyLite/LICENSE.FuzzyLite
%{_bindir}/vcmiclient
%{_bindir}/vcmiserver
%{_bindir}/vcmibuilder
@@ -118,10 +130,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/vcmiclient.png
-# don't need devel and static packages until requested
-%exclude %{_includedir}/fl
-%exclude %{_libdir}/*.a
-
%files data
%{_datadir}/%{name}/
@@ -129,11 +137,12 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/*.desktop
%changelog
-* Tue Aug 18 2020 RPM Fusion Release Engineering <leigh123linux(a)gmail.com> -
0.99-10
-- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
-
-* Thu Jun 04 2020 Leigh Scott <leigh123linux(a)gmail.com> - 0.99-9
+* Tue Sep 29 2020 Miro Hrončok <mhroncok(a)redhat.com> - 0.99^20190113gitf06c8a8-1
+- Update to a git snapshot to support new Boost
+- Use RPATH to make it launch :/
+- Declare the bundled FuzzyLite
- Rebuilt for Boost 1.73
+- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Feb 22 2020 RPM Fusion Release Engineering <leigh123linux(a)googlemail.com> -
0.99-8
- Rebuild for ffmpeg-4.3 git