[packages/pokerth] - updated to 1.1.2 - updated x32 patch - removed obsolete boost-1.60,ownerless,cxx11-build,cxx11-fix
qboosh
qboosh at pld-linux.org
Mon May 6 22:05:47 CEST 2019
commit b5517f5722064a66149a0f1312b8c99c65ef352c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon May 6 22:06:17 2019 +0200
- updated to 1.1.2
- updated x32 patch
- removed obsolete boost-1.60,ownerless,cxx11-build,cxx11-fixes patches
- added boost,websocketpp-boost patches (boost 1.70 compatibility for pokerth itself and bundled websocketpp code)
- now pokerth requires separate server and client build
boost-1.60.patch | 150 ----------------------------------------
cxx11-build.patch | 22 ------
cxx11-fixes.patch | 95 -------------------------
ownerless.patch | 32 ---------
pokerth-boost.patch | 24 +++++++
pokerth-websocketpp-boost.patch | 75 ++++++++++++++++++++
pokerth.spec | 80 ++++++++++++---------
x32.patch | 38 +++++-----
8 files changed, 169 insertions(+), 347 deletions(-)
---
diff --git a/pokerth.spec b/pokerth.spec
index 7fa847f..49be73f 100644
--- a/pokerth.spec
+++ b/pokerth.spec
@@ -1,36 +1,38 @@
Summary: The Open Source Texas-Holdem Poker Engine
Summary(pl.UTF-8): Silnik gry Texas-Holdem poker
Name: pokerth
-Version: 1.1.1
-Release: 6
-License: GPL v2+
+Version: 1.1.2
+Release: 1
+License: AGPL v3+
Group: X11/Applications/Games
-Source0: http://downloads.sourceforge.net/pokerth/PokerTH-%{version}-src.tar.bz2
-# Source0-md5: a7f76f95782099f966e5f2b6809f502a
+Source0: http://downloads.sourceforge.net/pokerth/pokerth-%{version}.tar.gz
+# Source0-md5: 8fd7d7fc7ece17315e58aa3240dd4586
Patch0: x32.patch
-Patch1: boost-1.60.patch
-Patch2: ownerless.patch
-Patch3: cxx11-build.patch
-Patch4: cxx11-fixes.patch
-Patch5: system-qtsingleapp.patch
-Patch6: moc.patch
-Patch7: %{name}-protobuf.patch
+Patch1: system-qtsingleapp.patch
+Patch2: moc.patch
+Patch3: %{name}-protobuf.patch
+Patch4: %{name}-boost.patch
+# from https://github.com/zaphoyd/websocketpp/pull/814/commits/c769c9238ad62178f506038178714a1c35aa2769.patch
+Patch5: %{name}-websocketpp-boost.patch
URL: http://www.pokerth.net/
-BuildRequires: QtCore-devel >= 4.3.1
-BuildRequires: QtGui-devel >= 4.3.1
-BuildRequires: QtNetwork-devel
+BuildRequires: QtCore-devel >= 4.4.3
+BuildRequires: QtGui-devel >= 4.4.3
+BuildRequires: QtNetwork-devel >= 4.4.3
BuildRequires: QtSingleApplication-devel
-BuildRequires: QtSql-devel
+BuildRequires: QtSql-devel >= 4.4.3
+BuildRequires: SDL-devel
BuildRequires: SDL_mixer-devel
-BuildRequires: boost-devel >= 1.37.0-3
+BuildRequires: boost-devel >= 1.49
BuildRequires: curl-devel >= 7.16
BuildRequires: gnutls-devel
-BuildRequires: gsasl-devel
-BuildRequires: libircclient-devel
-BuildRequires: protobuf-devel
+BuildRequires: gsasl-devel >= 1.4
+BuildRequires: libircclient-devel >= 1.3
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: protobuf-devel >= 2.3.0
BuildRequires: qt4-build >= 4.3.1
BuildRequires: qt4-qmake >= 4.3.1
BuildRequires: sed >= 4.0
+BuildRequires: sqlite3-devel >= 3
BuildRequires: tinyxml-devel
BuildRequires: zlib-devel >= 1.2.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -48,32 +50,44 @@ komputerowym przeciwnikom lub sieciową grę z innymi zawodnikami.
Silnik gry dostępny jest na platformy Linux, Windows oraz MacOS X.
%prep
-%setup -q -n PokerTH-%{version}-src
+%setup -q -n pokerth-%{version}-rc
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
+cd src/third_party/websocketpp
%patch5 -p1
-%patch6 -p1
-%patch7 -p1
+cd ../../..
%{__rm} -r src/third_party/qtsingleapplication
%build
-qmake-qt4 pokerth.pro \
+install -d build-client build-server
+cd build-server
+qmake-qt4 ../pokerth.pro \
QMAKE_CXX="%{__cxx}" \
- QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}"
+ QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
+ QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
+%{__make}
+
+cd ../build-client
+qmake-qt4 ../pokerth.pro \
+ CONFIG+=client \
+ QMAKE_CXX="%{__cxx}" \
+ QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
-%{__make} install \
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1}
+
+%{__make} -C build-client install \
INSTALL_ROOT=$RPM_BUILD_ROOT
-install pokerth bin/pokerth_server $RPM_BUILD_ROOT%{_bindir}
+install build-client/pokerth build-server/bin/pokerth_server $RPM_BUILD_ROOT%{_bindir}
+cp -p docs/pokerth.1 $RPM_BUILD_ROOT%{_mandir}/man1
%clean
rm -rf $RPM_BUILD_ROOT
@@ -81,7 +95,9 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc COPYING ChangeLog TODO
-%attr(755,root,root) %{_bindir}/pokerth*
-%{_desktopdir}/%{name}.desktop
-%{_pixmapsdir}/%{name}.png
-%{_datadir}/%{name}
+%attr(755,root,root) %{_bindir}/pokerth
+%attr(755,root,root) %{_bindir}/pokerth_server
+%{_desktopdir}/pokerth.desktop
+%{_pixmapsdir}/pokerth.png
+%{_datadir}/pokerth
+%{_mandir}/man1/pokerth.1*
diff --git a/boost-1.60.patch b/boost-1.60.patch
deleted file mode 100644
index daaeca0..0000000
--- a/boost-1.60.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 69f820bb3d7c4dc8c838f115cb4c7ee5fd188721 Mon Sep 17 00:00:00 2001
-From: Jonathan Wakely <github at kayari.org>
-Date: Thu, 26 Nov 2015 16:27:52 +0000
-Subject: [PATCH] Qualify std::ifstream and std::ofstream
-
-Starting with Boost 1.60.0 <boost/filesystem.hpp> includes
-<boost/filesystem/fstream.hpp>, which declares ifstream and ofstream
-types that make the unqualified names ifstream and ofstream ambiguous.
-The names must be qualified to refer to the std versions.
----
- src/core/common/avatarmanager.cpp | 4 ++--
- src/core/common/loghelper_server.cpp | 6 +++---
- src/net/common/clientstate.cpp | 4 ++--
- src/net/common/clientthread.cpp | 4 ++--
- src/net/common/downloaderthread.cpp | 2 +-
- src/pokerth_server.cpp | 2 +-
- src/zlib_compress.cpp | 4 ++--
- 7 files changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/src/core/common/avatarmanager.cpp b/src/core/common/avatarmanager.cpp
-index a8a52e4..0246b72 100644
---- a/src/core/common/avatarmanager.cpp
-+++ b/src/core/common/avatarmanager.cpp
-@@ -61,7 +61,7 @@ using namespace std;
- using namespace boost::filesystem;
-
- struct AvatarFileState {
-- ifstream inputStream;
-+ std::ifstream inputStream;
- };
-
- AvatarManager::AvatarManager(bool useExternalServer, const std::string &externalServerAddress,
-@@ -371,7 +371,7 @@ AvatarManager::StoreAvatarInCache(const MD5Buf &md5buf, AvatarFileType avatarFil
- path tmpPath(cacheDir);
- tmpPath /= (md5buf.ToString() + ext);
- string fileName(tmpPath.file_string());
-- ofstream o(fileName.c_str(), ios_base::out | ios_base::binary | ios_base::trunc);
-+ std::ofstream o(fileName.c_str(), ios_base::out | ios_base::binary | ios_base::trunc);
- if (!o.fail()) {
- o.write((const char *)data, size);
- o.close();
-diff --git a/src/core/common/loghelper_server.cpp b/src/core/common/loghelper_server.cpp
-index f79e4ca..a0d0350 100644
---- a/src/core/common/loghelper_server.cpp
-+++ b/src/core/common/loghelper_server.cpp
-@@ -67,7 +67,7 @@ void
- internal_log_err(const string &msg)
- {
- if (!g_logFile.empty()) {
-- ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
-+ std::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
- if (!o.fail()) {
- o << second_clock::local_time() << " ERR: " << msg;
- o.flush();
-@@ -80,7 +80,7 @@ internal_log_msg(const std::string &msg)
- {
- if (g_logLevel) {
- if (!g_logFile.empty()) {
-- ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
-+ std::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
- if (!o.fail())
- o << second_clock::local_time() << " MSG: " << msg;
- }
-@@ -92,7 +92,7 @@ internal_log_level(const std::string &msg, int logLevel)
- {
- if (g_logLevel >= logLevel) {
- if (!g_logFile.empty()) {
-- ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
-+ std::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
- if (!o.fail())
- o << second_clock::local_time() << " OUT: " << msg;
- }
-diff --git a/src/net/common/clientstate.cpp b/src/net/common/clientstate.cpp
-index 143773b..080da2d 100644
---- a/src/net/common/clientstate.cpp
-+++ b/src/net/common/clientstate.cpp
-@@ -308,8 +308,8 @@ ClientStateReadingServerList::Enter(boost::shared_ptr<ClientThread> client)
-
- // Unzip the file using zlib.
- try {
-- ifstream inFile(zippedServerListPath.directory_string().c_str(), ios_base::in | ios_base::binary);
-- ofstream outFile(xmlServerListPath.directory_string().c_str(), ios_base::out | ios_base::trunc);
-+ std::ifstream inFile(zippedServerListPath.directory_string().c_str(), ios_base::in | ios_base::binary);
-+ std::ofstream outFile(xmlServerListPath.directory_string().c_str(), ios_base::out | ios_base::trunc);
- boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
- in.push(boost::iostreams::zlib_decompressor());
- in.push(inFile);
-diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp
-index d60a535..1f3a619 100644
---- a/src/net/common/clientthread.cpp
-+++ b/src/net/common/clientthread.cpp
-@@ -1695,7 +1695,7 @@ void
- ClientThread::ReadSessionGuidFromFile()
- {
- string guidFileName(GetContext().GetCacheDir() + TEMP_GUID_FILENAME);
-- ifstream guidStream(guidFileName.c_str(), ios::in | ios::binary);
-+ std::ifstream guidStream(guidFileName.c_str(), ios::in | ios::binary);
- if (guidStream.good()) {
- std::vector<char> tmpGuid(CLIENT_GUID_SIZE);
- guidStream.read(&tmpGuid[0], CLIENT_GUID_SIZE);
-@@ -1707,7 +1707,7 @@ void
- ClientThread::WriteSessionGuidToFile() const
- {
- string guidFileName(GetContext().GetCacheDir() + TEMP_GUID_FILENAME);
-- ofstream guidStream(guidFileName.c_str(), ios::out | ios::trunc | ios::binary);
-+ std::ofstream guidStream(guidFileName.c_str(), ios::out | ios::trunc | ios::binary);
- if (guidStream.good()) {
- guidStream.write(GetContext().GetSessionGuid().c_str(), GetContext().GetSessionGuid().size());
- }
-diff --git a/src/net/common/downloaderthread.cpp b/src/net/common/downloaderthread.cpp
-index e58e3f8..56a9526 100644
---- a/src/net/common/downloaderthread.cpp
-+++ b/src/net/common/downloaderthread.cpp
-@@ -96,7 +96,7 @@ DownloaderThread::Main()
- // Previous download was finished.
- if (m_curDownloadData) {
- path filepath(m_curDownloadData->filename);
-- ifstream instream(filepath.file_string().c_str(), ios_base::in | ios_base::binary);
-+ std::ifstream instream(filepath.file_string().c_str(), ios_base::in | ios_base::binary);
- // Find out file size.
- // Not fully portable, but works on win/linux/mac.
- instream.seekg(0, ios_base::beg);
-diff --git a/src/pokerth_server.cpp b/src/pokerth_server.cpp
-index 3b93d46..450a47e 100644
---- a/src/pokerth_server.cpp
-+++ b/src/pokerth_server.cpp
-@@ -161,7 +161,7 @@ main(int argc, char *argv[])
- pidFile = tmpPidPath.directory_string();
- }
- {
-- ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
-+ std::ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
- if (!pidStream.fail())
- pidStream << getpid();
- else
-diff --git a/src/zlib_compress.cpp b/src/zlib_compress.cpp
-index e3fd72d..4b04817 100644
---- a/src/zlib_compress.cpp
-+++ b/src/zlib_compress.cpp
-@@ -59,8 +59,8 @@ main(int argc, char *argv[])
- return 2;
- }
- try {
-- ifstream inFile(inputFilePath.directory_string().c_str(), ios_base::in);
-- ofstream outFile(outputFilePath.directory_string().c_str(), ios_base::out | ios_base::binary);
-+ std::ifstream inFile(inputFilePath.directory_string().c_str(), ios_base::in);
-+ std::ofstream outFile(outputFilePath.directory_string().c_str(), ios_base::out | ios_base::binary);
- boost::iostreams::filtering_streambuf<boost::iostreams::output> out;
- out.push(boost::iostreams::zlib_compressor());
- out.push(outFile);
diff --git a/cxx11-build.patch b/cxx11-build.patch
deleted file mode 100644
index 7d237d6..0000000
--- a/cxx11-build.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 924fcd64044bd17c683345627def83df044ce867 Mon Sep 17 00:00:00 2001
-From: Felix Hammer <f.hammer at web.de>
-Date: Wed, 19 Aug 2015 15:02:10 +0200
-Subject: [PATCH] Linux Desktop build fix
-
----
- pokerth_lib.pro | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/pokerth_lib.pro b/pokerth_lib.pro
-index 6ab18b9..e9f1e3a 100644
---- a/pokerth_lib.pro
-+++ b/pokerth_lib.pro
-@@ -256,6 +256,8 @@ win32{
- ##### My release static build options
- #QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
- INCLUDEPATH += $${PREFIX}/include /opt/gsasl/include
-+ DEFINES += _WEBSOCKETPP_CPP11_STL_
-+ QMAKE_CXXFLAGS += -std=gnu++11
- }
-
- mac{
diff --git a/cxx11-fixes.patch b/cxx11-fixes.patch
deleted file mode 100644
index 886acc6..0000000
--- a/cxx11-fixes.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From a7cc33e89a97e73d39ecd1697d2ba646d5c639da Mon Sep 17 00:00:00 2001
-From: Felix Hammer <f.hammer at web.de>
-Date: Wed, 19 Aug 2015 14:52:11 +0200
-Subject: [PATCH] android compile fix, needs to be approved by lotodore
-
----
- pokerth_qml-client.pro | 1 -
- src/net/common/sessiondata.cpp | 5 +++--
- src/net/common/websendbuffer.cpp | 12 +++++++-----
- src/net/serveracceptwebhelper.h | 5 +++--
- 4 files changed, 13 insertions(+), 10 deletions(-)
-
-#diff --git a/pokerth_qml-client.pro b/pokerth_qml-client.pro
-#index 6e5223f..eec1feb 100644
-#--- a/pokerth_qml-client.pro
-#+++ b/pokerth_qml-client.pro
-#@@ -6,7 +6,6 @@ isEmpty( PREFIX ){
-# DEFINES += PREFIX=\"$${PREFIX}\"
-#
-# TEMPLATE = app
-#-TARGET = pokerth
-# CODECFORSRC = UTF-8
-# QT += core qml quick widgets svg sql
-# CONFIG += qt thread embed_manifest_exe exceptions rtti stl warn_on
-diff --git a/src/net/common/sessiondata.cpp b/src/net/common/sessiondata.cpp
-index 06f7146..69bcdb7 100644
---- a/src/net/common/sessiondata.cpp
-+++ b/src/net/common/sessiondata.cpp
-@@ -318,8 +318,9 @@ void
- SessionData::CloseWebSocketHandle()
- {
- if (m_webData) {
-- boost::system::error_code ec;
-- m_webData->webSocketServer->close(m_webData->webHandle, websocketpp::close::status::normal, "PokerTH server closed the connection.", ec);
-+// boost::system::error_code ec;
-+ std::error_code std_ec;
-+ m_webData->webSocketServer->close(m_webData->webHandle, websocketpp::close::status::normal, "PokerTH server closed the connection.", std_ec);
- }
- }
-
-diff --git a/src/net/common/websendbuffer.cpp b/src/net/common/websendbuffer.cpp
-index 2ba665a..3130373 100644
---- a/src/net/common/websendbuffer.cpp
-+++ b/src/net/common/websendbuffer.cpp
-@@ -57,9 +57,10 @@ void
- WebSendBuffer::AsyncSendNextPacket(boost::shared_ptr<SessionData> session)
- {
- if (closeAfterSend) {
-- boost::system::error_code ec;
-+// boost::system::error_code ec;
-+ std::error_code std_ec;
- boost::shared_ptr<WebSocketData> webData = session->GetWebData();
-- webData->webSocketServer->close(webData->webHandle, websocketpp::close::status::normal, "PokerTH server closed the connection.", ec);
-+ webData->webSocketServer->close(webData->webHandle, websocketpp::close::status::normal, "PokerTH server closed the connection.", std_ec);
- }
- }
-
-@@ -70,10 +71,11 @@ WebSendBuffer::InternalStorePacket(boost::shared_ptr<SessionData> session, boost
- google::protobuf::uint8 *buf = new google::protobuf::uint8[packetSize];
- packet->GetMsg()->SerializeWithCachedSizesToArray(buf);
-
-- boost::system::error_code ec;
-+// boost::system::error_code ec;
-+ std::error_code std_ec;
- boost::shared_ptr<WebSocketData> webData = session->GetWebData();
-- webData->webSocketServer->send(webData->webHandle, string((const char *)buf, packetSize), websocketpp::frame::opcode::BINARY, ec);
-- if (ec) {
-+ webData->webSocketServer->send(webData->webHandle, string((const char *)buf, packetSize), websocketpp::frame::opcode::BINARY, std_ec);
-+ if (std_ec) {
- SetCloseAfterSend();
- }
-
-diff --git a/src/net/serveracceptwebhelper.h b/src/net/serveracceptwebhelper.h
-index a1d371e..f7e8123 100644
---- a/src/net/serveracceptwebhelper.h
-+++ b/src/net/serveracceptwebhelper.h
-@@ -37,7 +37,8 @@
- #include <net/serveracceptinterface.h>
- #include <net/serverlobbythread.h>
-
--#include <boost/smart_ptr/owner_less.hpp>
-+//#include <boost/smart_ptr/owner_less.hpp>
-+#include <memory>
-
- class ServerAcceptWebHelper : public ServerAcceptInterface
- {
-@@ -52,7 +53,7 @@ class ServerAcceptWebHelper : public ServerAcceptInterface
-
- protected:
-
-- typedef std::map<websocketpp::connection_hdl, boost::weak_ptr<SessionData>, boost::owner_less<websocketpp::connection_hdl> > SessionMap;
-+ typedef std::map<websocketpp::connection_hdl, boost::weak_ptr<SessionData>, std::owner_less<websocketpp::connection_hdl> > SessionMap;
-
- bool validate(websocketpp::connection_hdl hdl);
- void on_open(websocketpp::connection_hdl hdl);
diff --git a/ownerless.patch b/ownerless.patch
deleted file mode 100644
index 5e96ae0..0000000
--- a/ownerless.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1d34288a91a94f2156af761586d7efef82b3cf54 Mon Sep 17 00:00:00 2001
-From: lotodore <pokerth at lotharmay.de>
-Date: Tue, 18 Aug 2015 20:49:06 +0200
-Subject: [PATCH] Use owner_less for ordering of connection_hdl (see
- https://github.com/zaphoyd/websocketpp/issues/457)
-
----
- src/net/serveracceptwebhelper.h | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/net/serveracceptwebhelper.h b/src/net/serveracceptwebhelper.h
-index ea5b926..a1d371e 100644
---- a/src/net/serveracceptwebhelper.h
-+++ b/src/net/serveracceptwebhelper.h
-@@ -37,6 +37,8 @@
- #include <net/serveracceptinterface.h>
- #include <net/serverlobbythread.h>
-
-+#include <boost/smart_ptr/owner_less.hpp>
-+
- class ServerAcceptWebHelper : public ServerAcceptInterface
- {
- public:
-@@ -50,7 +52,7 @@ class ServerAcceptWebHelper : public ServerAcceptInterface
-
- protected:
-
-- typedef std::map<websocketpp::connection_hdl, boost::weak_ptr<SessionData> > SessionMap;
-+ typedef std::map<websocketpp::connection_hdl, boost::weak_ptr<SessionData>, boost::owner_less<websocketpp::connection_hdl> > SessionMap;
-
- bool validate(websocketpp::connection_hdl hdl);
- void on_open(websocketpp::connection_hdl hdl);
diff --git a/pokerth-boost.patch b/pokerth-boost.patch
new file mode 100644
index 0000000..7e02dd5
--- /dev/null
+++ b/pokerth-boost.patch
@@ -0,0 +1,24 @@
+--- pokerth-1.1.2-rc/src/net/common/clientthread.cpp.orig 2017-08-16 14:24:03.000000000 +0200
++++ pokerth-1.1.2-rc/src/net/common/clientthread.cpp 2019-05-06 20:01:16.461183436 +0200
+@@ -993,8 +993,7 @@
+ newSock.reset(new boost::asio::ip::tcp::socket(*m_ioService, tcp::v6()));
+ else
+ newSock.reset(new boost::asio::ip::tcp::socket(*m_ioService, tcp::v4()));
+- boost::asio::socket_base::non_blocking_io command(true);
+- newSock->io_control(command);
++ newSock->non_blocking(true);
+ newSock->set_option(tcp::no_delay(true));
+ newSock->set_option(boost::asio::socket_base::keep_alive(true));
+
+--- pokerth-1.1.2-rc/src/net/serveraccepthelper.h.orig 2017-08-16 14:24:03.000000000 +0200
++++ pokerth-1.1.2-rc/src/net/serveraccepthelper.h 2019-05-06 20:28:04.582779720 +0200
+@@ -122,8 +122,7 @@
+ const boost::system::error_code &error)
+ {
+ if (!error) {
+- boost::asio::socket_base::non_blocking_io command(true);
+- acceptedSocket->io_control(command);
++ acceptedSocket->non_blocking(true);
+ acceptedSocket->set_option(typename P::no_delay(true));
+ acceptedSocket->set_option(boost::asio::socket_base::keep_alive(true));
+ boost::shared_ptr<SessionData> sessionData(new SessionData(acceptedSocket, m_lobbyThread->GetNextSessionId(), m_lobbyThread->GetSessionDataCallback(), *m_ioService));
diff --git a/pokerth-websocketpp-boost.patch b/pokerth-websocketpp-boost.patch
new file mode 100644
index 0000000..cfdcf9b
--- /dev/null
+++ b/pokerth-websocketpp-boost.patch
@@ -0,0 +1,75 @@
+From c769c9238ad62178f506038178714a1c35aa2769 Mon Sep 17 00:00:00 2001
+From: Stefan Floeren <42731906+stefan-floeren at users.noreply.github.com>
+Date: Tue, 16 Apr 2019 08:38:01 +0200
+Subject: [PATCH] Replace make_shared with new in some cases
+
+Replace make_shared for asio types that take a lib::ref as a parameter.
+This should fix the ASIO change (boostorg/asio at 59066d8) for 1.70,
+while keeping it backwards compatible to older boost versions.
+---
+ websocketpp/transport/asio/connection.hpp | 7 ++++---
+ websocketpp/transport/asio/endpoint.hpp | 3 +--
+ websocketpp/transport/asio/security/none.hpp | 3 +--
+ websocketpp/transport/asio/security/tls.hpp | 3 +--
+ 4 files changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp
+index 60f88a79..1ccda8f3 100644
+--- a/websocketpp/transport/asio/connection.hpp
++++ b/websocketpp/transport/asio/connection.hpp
+@@ -311,9 +311,10 @@ class connection : public config::socket_type::socket_con_type {
+ * needed.
+ */
+ timer_ptr set_timer(long duration, timer_handler callback) {
+- timer_ptr new_timer = lib::make_shared<lib::asio::steady_timer>(
+- lib::ref(*m_io_service),
+- lib::asio::milliseconds(duration)
++ timer_ptr new_timer(
++ new lib::asio::steady_timer(
++ *m_io_service,
++ lib::asio::milliseconds(duration))
+ );
+
+ if (config::enable_multithreading) {
+diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp
+index ddab2c74..4b719a97 100644
+--- a/websocketpp/transport/asio/endpoint.hpp
++++ b/websocketpp/transport/asio/endpoint.hpp
+@@ -195,8 +195,7 @@ class endpoint : public config::socket_type {
+
+ m_io_service = ptr;
+ m_external_io_service = true;
+- m_acceptor = lib::make_shared<lib::asio::ip::tcp::acceptor>(
+- lib::ref(*m_io_service));
++ m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service));
+
+ m_state = READY;
+ ec = lib::error_code();
+diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp
+index 5c8293db..6c7d3524 100644
+--- a/websocketpp/transport/asio/security/none.hpp
++++ b/websocketpp/transport/asio/security/none.hpp
+@@ -168,8 +168,7 @@ class connection : public lib::enable_shared_from_this<connection> {
+ return socket::make_error_code(socket::error::invalid_state);
+ }
+
+- m_socket = lib::make_shared<lib::asio::ip::tcp::socket>(
+- lib::ref(*service));
++ m_socket.reset(new lib::asio::ip::tcp::socket(*service));
+
+ if (m_socket_init_handler) {
+ m_socket_init_handler(m_hdl, *m_socket);
+diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp
+index c76fd9aa..04ac3790 100644
+--- a/websocketpp/transport/asio/security/tls.hpp
++++ b/websocketpp/transport/asio/security/tls.hpp
+@@ -193,8 +193,7 @@ class connection : public lib::enable_shared_from_this<connection> {
+ if (!m_context) {
+ return socket::make_error_code(socket::error::invalid_tls_context);
+ }
+- m_socket = lib::make_shared<socket_type>(
+- _WEBSOCKETPP_REF(*service),lib::ref(*m_context));
++ m_socket.reset(new socket_type(*service, *m_context));
+
+ if (m_socket_init_handler) {
+ m_socket_init_handler(m_hdl, get_socket());
diff --git a/x32.patch b/x32.patch
index 378a50d..31eac1d 100644
--- a/x32.patch
+++ b/x32.patch
@@ -1,13 +1,19 @@
---- PokerTH-1.1-src/pokerth_game.pro~ 2013-12-22 17:58:01.000000000 +0100
-+++ PokerTH-1.1-src/pokerth_game.pro 2015-06-27 10:48:03.818795259 +0200
-@@ -408,6 +408,7 @@
- LIBPATH += $${PREFIX}/lib /opt/gsasl/lib
- LIB_DIRS = $${PREFIX}/lib \
- $${PREFIX}/lib64 \
-+ $${PREFIX}/libx32 \
- $$system(qmake -query QT_INSTALL_LIBS)
+--- pokerth-1.1.2-rc/pokerth_game.pro.orig 2017-08-16 14:24:03.000000000 +0200
++++ pokerth-1.1.2-rc/pokerth_game.pro 2019-05-06 18:44:47.675780451 +0200
+@@ -408,11 +408,8 @@
+ INCLUDEPATH += $${PREFIX}/include
+ QMAKE_LIBDIR += lib
+ !android{
+- LIBPATH += $${PREFIX}/lib /opt/gsasl/lib
+- LIB_DIRS = $${PREFIX}/lib \
+- $${PREFIX}/lib64 \
+- $${PREFIX}/lib/x86_64-linux-gnu \
+- $$system(qmake -query QT_INSTALL_LIBS)
++ LIBPATH += $$system(qmake-qt4 -query QT_INSTALL_LIBS)
++ LIB_DIRS = $$system(qmake-qt4 -query QT_INSTALL_LIBS)
}
android{
+ LIBPATH += $${PREFIX}/lib/armv7
--- PokerTH-1.1-src/connectivity.pro~ 2013-12-22 17:58:01.000000000 +0100
+++ PokerTH-1.1-src/connectivity.pro 2015-06-27 10:48:51.073035818 +0200
@@ -41,7 +41,7 @@
@@ -15,7 +21,7 @@
QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib
INCLUDEPATH += $${PREFIX}/include
- LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
-+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $${PREFIX}/libx32 $$system(qmake -query QT_INSTALL_LIBS)
++ LIB_DIRS = $$system(qmake-qt4 -query QT_INSTALL_LIBS)
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
BOOST_SYS = boost_system boost_system-mt
@@ -26,18 +32,18 @@
QMAKE_LIBDIR += lib $${PREFIX}/lib /opt/gsasl/lib
INCLUDEPATH += $${PREFIX}/include
- LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
-+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $${PREFIX}/libx32 $$system(qmake -query QT_INSTALL_LIBS)
++ LIB_DIRS = $$system(qmake-qt4 -query QT_INSTALL_LIBS)
BOOST_THREAD = boost_thread boost_thread-mt
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
BOOST_SYS = boost_system boost_system-mt
---- PokerTH-1.1-src/pokerth_server.pro~ 2013-12-22 17:58:01.000000000 +0100
-+++ PokerTH-1.1-src/pokerth_server.pro 2015-06-27 10:49:32.887174260 +0200
-@@ -175,7 +175,7 @@
-
- LIBPATH += lib $${PREFIX}/lib /opt/gsasl/lib
+--- pokerth-1.1.2-rc/pokerth_server.pro.orig 2019-05-06 18:45:52.762554321 +0200
++++ pokerth-1.1.2-rc/pokerth_server.pro 2019-05-06 18:47:54.545658538 +0200
+@@ -180,7 +180,7 @@
INCLUDEPATH += $${PREFIX}/include
+ # see issue https://github.com/pokerth/pokerth/issues/282
+ INCLUDEPATH += $${PREFIX}/include/libircclient
- LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $$system(qmake -query QT_INSTALL_LIBS)
-+ LIB_DIRS = $${PREFIX}/lib $${PREFIX}/lib64 $${PREFIX}/libx32 $$system(qmake -query QT_INSTALL_LIBS)
++ LIB_DIRS = $$system(qmake-qt4 -query QT_INSTALL_LIBS)
BOOST_FS = boost_filesystem boost_filesystem-mt
BOOST_THREAD = boost_thread boost_thread-mt
BOOST_PROGRAM_OPTIONS = boost_program_options boost_program_options-mt
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pokerth.git/commitdiff/b5517f5722064a66149a0f1312b8c99c65ef352c
More information about the pld-cvs-commit
mailing list