summaryrefslogtreecommitdiffstats
path: root/games/pokerth
diff options
context:
space:
mode:
author Matteo Bernardini2021-04-18 12:28:21 +0200
committer Matteo Bernardini2021-04-18 12:28:21 +0200
commit6a30bf7dd1b8c15df8c0d44e2a9ed762305db71b (patch)
tree04dae6b4df4a55131d1ea5fe55f6128a43940d9b /games/pokerth
parent6ccafa1aca661d89c26578d38ab8cd55a3e54d24 (diff)
downloadslackbuilds-6a30bf7dd1b8c15df8c0d44e2a9ed762305db71b.tar.gz
games/pokerth: Updated for version 20200721_a333185.
Patched for the newer boost, changed maintainer Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'games/pokerth')
-rw-r--r--games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch75
-rw-r--r--games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch52
-rw-r--r--games/pokerth/patches/pokerth-1.1.2-boost-1.73-placeholders.patch18
-rw-r--r--games/pokerth/pokerth.SlackBuild38
-rw-r--r--games/pokerth/pokerth.info6
5 files changed, 169 insertions, 20 deletions
diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch
new file mode 100644
index 0000000000..cfdcf9b7da
--- /dev/null
+++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch
@@ -0,0 +1,75 @@
+From c769c9238ad62178f506038178714a1c35aa2769 Mon Sep 17 00:00:00 2001
+From: Stefan Floeren <42731906+stefan-floeren@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@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/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch
new file mode 100644
index 0000000000..64faab9d37
--- /dev/null
+++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch
@@ -0,0 +1,52 @@
+From f810ca2e800e9b55be41c5911cf1d1185fcd516b Mon Sep 17 00:00:00 2001
+From: Stefan Floeren <42731906+stefan-floeren@users.noreply.github.com>
+Date: Wed, 17 Apr 2019 10:06:18 +0000
+Subject: [PATCH] Fix missed entries; fix testing
+
+(Note: the CmakeLists.txt patch is cut off because we don't have it)
+
+---
+ CMakeLists.txt | 2 +-
+ websocketpp/transport/asio/connection.hpp | 3 +--
+ websocketpp/transport/asio/endpoint.hpp | 7 ++-----
+ 3 files changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp
+index 1ccda8f3..57dda74a 100644
+--- a/websocketpp/transport/asio/connection.hpp
++++ b/websocketpp/transport/asio/connection.hpp
+@@ -462,8 +462,7 @@ class connection : public config::socket_type::socket_con_type {
+ m_io_service = io_service;
+
+ if (config::enable_multithreading) {
+- m_strand = lib::make_shared<lib::asio::io_service::strand>(
+- lib::ref(*io_service));
++ m_strand.reset(new lib::asio::io_service::strand(*io_service));
+ }
+
+ lib::error_code ec = socket_con_type::init_asio(io_service, m_strand,
+diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp
+index 4b719a97..94509adb 100644
+--- a/websocketpp/transport/asio/endpoint.hpp
++++ b/websocketpp/transport/asio/endpoint.hpp
+@@ -687,9 +687,7 @@ class endpoint : public config::socket_type {
+ * @since 0.3.0
+ */
+ void start_perpetual() {
+- m_work = lib::make_shared<lib::asio::io_service::work>(
+- lib::ref(*m_io_service)
+- );
++ m_work.reset(new lib::asio::io_service::work(*m_io_service));
+ }
+
+ /// Clears the endpoint's perpetual flag, allowing it to exit when empty
+@@ -853,8 +851,7 @@ class endpoint : public config::socket_type {
+
+ // Create a resolver
+ if (!m_resolver) {
+- m_resolver = lib::make_shared<lib::asio::ip::tcp::resolver>(
+- lib::ref(*m_io_service));
++ m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service));
+ }
+
+ tcon->set_uri(u);
diff --git a/games/pokerth/patches/pokerth-1.1.2-boost-1.73-placeholders.patch b/games/pokerth/patches/pokerth-1.1.2-boost-1.73-placeholders.patch
new file mode 100644
index 0000000000..8044977c10
--- /dev/null
+++ b/games/pokerth/patches/pokerth-1.1.2-boost-1.73-placeholders.patch
@@ -0,0 +1,18 @@
+diff -Naur pokerth-1.1.2-rc.orig/src/net/common/serveracceptwebhelper.cpp pokerth-1.1.2-rc/src/net/common/serveracceptwebhelper.cpp
+--- pokerth-1.1.2-rc.orig/src/net/common/serveracceptwebhelper.cpp 2017-08-16 14:24:03.000000000 +0200
++++ pokerth-1.1.2-rc/src/net/common/serveracceptwebhelper.cpp 2020-06-23 14:13:56.395204000 +0200
+@@ -58,10 +58,10 @@
+
+ m_webSocketServer->init_asio(m_ioService.get());
+
+- m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, _1));
+- m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, _1));
+- m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, _1));
+- m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, _1, _2));
++ m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, boost::placeholders::_1));
++ m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, boost::placeholders::_1));
++ m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, boost::placeholders::_1));
++ m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, boost::placeholders::_1, boost::placeholders::_2));
+
+ m_webSocketServer->listen(serverPort);
+ m_webSocketServer->start_accept();
diff --git a/games/pokerth/pokerth.SlackBuild b/games/pokerth/pokerth.SlackBuild
index 5412cb9fbe..72b320f642 100644
--- a/games/pokerth/pokerth.SlackBuild
+++ b/games/pokerth/pokerth.SlackBuild
@@ -1,7 +1,8 @@
#!/bin/sh
-# Slackware build script for "pokerth".
+# Slackware build script for pokerth.
+# Copyright 2020 Matteo Bernardini <ponce@slackbuilds.org>
# Copyright 2009-2015 Marcel Saegebarth <marc@mos6581.de>
# Copyright 2012 Laurent Nardou <l.nardou@wanadoo.fr>
# All rights reserved.
@@ -26,14 +27,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=pokerth
-SRCNAM=PokerTH
-VERSION=${VERSION:-1.1.1}
+VERSION=${VERSION:-20200721_a333185}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -44,8 +44,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -61,11 +61,11 @@ fi
set -e
rm -rf $PKG
-rm -rf $TMP/$SRCNAM-$VERSION-src
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$SRCNAM-$VERSION-src.tar.bz2
-cd $SRCNAM-$VERSION-src
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -73,18 +73,22 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# The headers to which this file points have moved in the newer libircclient...
-# Thanks ponce.
-sed -i "s|libircclient/||" src/net/common/ircthread.cpp
+( cd src/third_party/websocketpp
+ patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.70-websocket-fix1.patch
+ patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.70-websocket-fix2.patch )
+patch -p1 < $CWD/patches/pokerth-1.1.2-boost-1.73-placeholders.patch
-qmake pokerth.pro
+qmake-qt5 QMAKE_CFLAGS_ISYSTEM= -spec linux-g++ pokerth.pro
+make
+mkdir -p $PKG/usr/bin
+install -s -D -m 0755 bin/pokerth_server $PKG/usr/bin
+install -s -D -m 0755 chatcleaner $PKG/usr/bin
+make clean
-make #CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS"
+qmake-qt5 CONFIG+="client" QMAKE_CFLAGS_ISYSTEM= -spec linux-g++ pokerth.pro
+make
make install DESTDIR=$PKG INSTALL_ROOT=$PKG
-mkdir -p $PKG/usr/bin
-install -s -D -m 0755 $TMP/$SRCNAM-$VERSION-src/bin/pokerth_server $PKG/usr/bin
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING INSTALL TODO ChangeLog \
$PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/games/pokerth/pokerth.info b/games/pokerth/pokerth.info
index 226febf074..e02f2401d2 100644
--- a/games/pokerth/pokerth.info
+++ b/games/pokerth/pokerth.info
@@ -1,8 +1,8 @@
PRGNAM="pokerth"
-VERSION="1.1.1"
+VERSION="20200721_a333185"
HOMEPAGE="https://www.pokerth.net"
-DOWNLOAD="https://downloads.sourceforge.net/pokerth/PokerTH-1.1.1-src.tar.bz2"
-MD5SUM="a7f76f95782099f966e5f2b6809f502a"
+DOWNLOAD="http://ponce.cc/slackware/sources/repo/pokerth-20200721_a333185.tar.xz"
+MD5SUM="b96da9a09589dd45e7cf576c7190bdb1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libgsasl libircclient tinyxml protobuf3"