]> git.pld-linux.org Git - packages/pokerth.git/commitdiff
- add build fixes from fedora auto/th/pokerth-1.1.1-2
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 12 Apr 2017 23:02:12 +0000 (01:02 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Wed, 12 Apr 2017 23:02:12 +0000 (01:02 +0200)
- fix moc parsing
- rel 2

cxx11-build.patch [new file with mode: 0644]
cxx11-fixes.patch [new file with mode: 0644]
moc.patch [new file with mode: 0644]
ownerless.patch [new file with mode: 0644]
pokerth.spec
system-qtsingleapp.patch [new file with mode: 0644]

diff --git a/cxx11-build.patch b/cxx11-build.patch
new file mode 100644 (file)
index 0000000..7d237d6
--- /dev/null
@@ -0,0 +1,22 @@
+From 924fcd64044bd17c683345627def83df044ce867 Mon Sep 17 00:00:00 2001
+From: Felix Hammer <f.hammer@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
new file mode 100644 (file)
index 0000000..886acc6
--- /dev/null
@@ -0,0 +1,95 @@
+From a7cc33e89a97e73d39ecd1697d2ba646d5c639da Mon Sep 17 00:00:00 2001
+From: Felix Hammer <f.hammer@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/moc.patch b/moc.patch
new file mode 100644 (file)
index 0000000..9f65a49
--- /dev/null
+++ b/moc.patch
@@ -0,0 +1,75 @@
+diff -ur PokerTH-1.1.1-src/src/gui/qt/chattools/chattools.h PokerTH-1.1.1-src-moc/src/gui/qt/chattools/chattools.h
+--- PokerTH-1.1.1-src/src/gui/qt/chattools/chattools.h 2014-01-10 22:18:20.782643125 +0100
++++ PokerTH-1.1.1-src-moc/src/gui/qt/chattools/chattools.h     2017-04-13 00:39:07.356116710 +0200
+@@ -37,7 +37,9 @@
+ #include <QtWidgets>
+ #endif
+ #include <QtGui>
++#ifndef Q_MOC_RUN
+ #include <boost/shared_ptr.hpp>
++#endif
+ enum ChatType { INET_LOBBY_CHAT, LAN_LOBBY_CHAT, INGAME_CHAT };
+diff -ur PokerTH-1.1.1-src/src/gui/qt/gametable/gametableimpl.h PokerTH-1.1.1-src-moc/src/gui/qt/gametable/gametableimpl.h
+--- PokerTH-1.1.1-src/src/gui/qt/gametable/gametableimpl.h     2014-01-10 22:18:20.788643125 +0100
++++ PokerTH-1.1.1-src-moc/src/gui/qt/gametable/gametableimpl.h 2017-04-13 00:45:09.443702802 +0200
+@@ -31,6 +31,7 @@
+ #ifndef GAMETABLEIMPL_H
+ #define GAMETABLEIMPL_H
++#ifndef Q_MOC_RUN
+ #ifdef GUI_800x480
+ #include "ui_gametable_800x480.h"
+ #include "ui_tabs_800x480.h"
+@@ -38,6 +39,7 @@
+ #include "ui_gametable.h"
+ #endif
+ #include "game_defs.h"
++#endif
+ #include <string>
+diff -ur PokerTH-1.1.1-src/src/gui/qt/logfiledialog/logfiledialog.h PokerTH-1.1.1-src-moc/src/gui/qt/logfiledialog/logfiledialog.h
+--- PokerTH-1.1.1-src/src/gui/qt/logfiledialog/logfiledialog.h 2014-01-10 22:18:20.853643118 +0100
++++ PokerTH-1.1.1-src-moc/src/gui/qt/logfiledialog/logfiledialog.h     2017-04-13 00:52:54.025749930 +0200
+@@ -35,7 +35,9 @@
+ #include <QDialog>
+ #include <QFile>
+ #include <net/uploadcallback.h>
++#ifndef Q_MOC_RUN
+ #include <boost/shared_ptr.hpp>
++#endif
+ class UploaderThread;
+diff -ur PokerTH-1.1.1-src/src/gui/qt/settingsdialog/settingsdialogimpl.h PokerTH-1.1.1-src-moc/src/gui/qt/settingsdialog/settingsdialogimpl.h
+--- PokerTH-1.1.1-src/src/gui/qt/settingsdialog/settingsdialogimpl.h   2014-01-10 22:18:20.909643111 +0100
++++ PokerTH-1.1.1-src-moc/src/gui/qt/settingsdialog/settingsdialogimpl.h       2017-04-13 00:48:14.432361758 +0200
+@@ -45,7 +45,9 @@
+ #include <QtWidgets>
+ #endif
++#ifndef Q_MOC_RUN
+ #include <boost/shared_ptr.hpp>
++#endif
+ #include <vector>
+ #include <iostream>
+diff -ur PokerTH-1.1.1-src/src/gui/qt/sound/sdlplayer.h PokerTH-1.1.1-src-moc/src/gui/qt/sound/sdlplayer.h
+--- PokerTH-1.1.1-src/src/gui/qt/sound/sdlplayer.h     2014-01-10 22:18:20.910643111 +0100
++++ PokerTH-1.1.1-src-moc/src/gui/qt/sound/sdlplayer.h 2017-04-13 00:52:12.038603251 +0200
+@@ -36,11 +36,13 @@
+ #include "configfile.h"
+ #include <string>
++#ifndef Q_MOC_RUN
+ #ifdef __APPLE__
+ #include <SDL_mixer.h>
+ #else
+ #include <SDL/SDL_mixer.h>
+ #endif
++#endif
+ /**
+       @author FThauer FHammer <webmaster@pokerth.net>
diff --git a/ownerless.patch b/ownerless.patch
new file mode 100644 (file)
index 0000000..5e96ae0
--- /dev/null
@@ -0,0 +1,32 @@
+From 1d34288a91a94f2156af761586d7efef82b3cf54 Mon Sep 17 00:00:00 2001
+From: lotodore <pokerth@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);
index a2494ca912b328a81eb981fa23dc96cec4f21d09..654dba33162b0782a5cab81b09c4283277a634a9 100644 (file)
@@ -2,17 +2,23 @@ Summary:      The Open Source Texas-Holdem Poker Engine
 Summary(pl.UTF-8):     Silnik gry Texas-Holdem poker
 Name:          pokerth
 Version:       1.1.1
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         X11/Applications/Games
 Source0:       http://downloads.sourceforge.net/pokerth/PokerTH-%{version}-src.tar.bz2
 # Source0-md5: a7f76f95782099f966e5f2b6809f502a
 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
 URL:           http://www.pokerth.net/
 BuildRequires: QtCore-devel >= 4.3.1
 BuildRequires: QtGui-devel >= 4.3.1
 BuildRequires: QtNetwork-devel
+BuildRequires: QtSingleApplication-devel
 BuildRequires: QtSql-devel
 BuildRequires: SDL_mixer-devel
 BuildRequires: boost-devel >= 1.37.0-3
@@ -44,6 +50,13 @@ Silnik gry dostępny jest na platformy Linux, Windows oraz MacOS X.
 %setup -q -n PokerTH-%{version}-src
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+
+%{__rm} -r src/third_party/qtsingleapplication
 
 %build
 qmake-qt4 pokerth.pro \
diff --git a/system-qtsingleapp.patch b/system-qtsingleapp.patch
new file mode 100644 (file)
index 0000000..8c70d5f
--- /dev/null
@@ -0,0 +1,41 @@
+diff -Nur PokerTH-1.1.1-src/pokerth_game.pro PokerTH-1.1.1-src-fedora/pokerth_game.pro
+--- PokerTH-1.1.1-src/pokerth_game.pro 2014-01-10 21:18:20.743643000 +0000
++++ PokerTH-1.1.1-src-fedora/pokerth_game.pro  2014-06-14 05:15:10.996114724 +0000
+@@ -10,13 +10,13 @@
+ TEMPLATE = app
+ CODECFORSRC = UTF-8
+ CONFIG += qt \
++      qtsingleapplication \
+       thread \
+       embed_manifest_exe \
+       exceptions \
+       rtti \
+       stl \
+       warn_on
+-include(src/third_party/qtsingleapplication/qtsingleapplication.pri)
+ QT += sql
+ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+ UI_DIR = uics
+diff -Nur PokerTH-1.1.1-src/src/pokerth.cpp PokerTH-1.1.1-src-fedora/src/pokerth.cpp
+--- PokerTH-1.1.1-src/src/pokerth.cpp  2014-01-10 21:18:20.926643000 +0000
++++ PokerTH-1.1.1-src-fedora/src/pokerth.cpp   2014-06-14 06:24:45.446516672 +0000
+@@ -55,7 +55,7 @@
+ #include "startsplash.h"
+ #include "game_defs.h"
+ #include <net/socket_startup.h>
+-#include <third_party/qtsingleapplication/qtsingleapplication.h>
++#include <QtSingleApplication>
+ #ifdef _MSC_VER
+ #ifdef _DEBUG
+@@ -103,8 +103,8 @@
+       QApplication a(argc, argv);
+       a.setApplicationName("PokerTH");
+ #else
+-      SharedTools::QtSingleApplication a( "PokerTH", argc, argv );
+-      if (a.sendMessage("Wake up!")) {
++      QtSingleApplication a( "PokerTH", argc, argv );
++      if (a.sendMessage(QString("Wake up!"))) {
+               return 0;
+       }
+ #endif
This page took 0.173319 seconds and 4 git commands to generate.