diff options
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/games.scm | 89 | ||||
| -rw-r--r-- | gnu/packages/patches/pokerth-boost.patch | 38 |
3 files changed, 32 insertions, 96 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 851a0cf78fc..0f920bdc495 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2103,7 +2103,6 @@ dist_patch_DATA = \ | |||
| 2103 | %D%/packages/patches/plasp-include-iostream.patch \ | 2103 | %D%/packages/patches/plasp-include-iostream.patch \ |
| 2104 | %D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch \ | 2104 | %D%/packages/patches/pocketfft-cpp-prefer-preprocessor-if.patch \ |
| 2105 | %D%/packages/patches/podofo-gcc-14.patch \ | 2105 | %D%/packages/patches/podofo-gcc-14.patch \ |
| 2106 | %D%/packages/patches/pokerth-boost.patch \ | ||
| 2107 | %D%/packages/patches/pounce-readable-checks.patch \ | 2106 | %D%/packages/patches/pounce-readable-checks.patch \ |
| 2108 | %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ | 2107 | %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ |
| 2109 | %D%/packages/patches/procps-strtod-test.patch \ | 2108 | %D%/packages/patches/procps-strtod-test.patch \ |
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 10c45d22d85..bf01f35a032 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm | |||
| @@ -12758,72 +12758,47 @@ earn extra balls. Also included is Neverputt, which is a 3D miniature golf | |||
| 12758 | game.") ;thanks to Debian for description | 12758 | game.") ;thanks to Debian for description |
| 12759 | (license license:gpl2+)))) | 12759 | (license license:gpl2+)))) |
| 12760 | 12760 | ||
| 12761 | ;; TODO: We may wish to package the server and client separately. | ||
| 12761 | (define-public pokerth | 12762 | (define-public pokerth |
| 12762 | (package | 12763 | (package |
| 12763 | (name "pokerth") | 12764 | (name "pokerth") |
| 12764 | (version "1.1.2") | 12765 | (version "2.0.8") |
| 12765 | (source | 12766 | (source |
| 12766 | (origin | 12767 | (origin |
| 12767 | (method url-fetch) | 12768 | (method git-fetch) |
| 12768 | (uri (string-append "mirror://sourceforge/pokerth/pokerth/" | 12769 | (uri (git-reference |
| 12769 | version "/pokerth-" version ".tar.gz")) | 12770 | (url "https://github.com/pokerth/pokerth") |
| 12771 | (commit (string-append "v" version)))) | ||
| 12772 | (file-name (git-file-name name version)) | ||
| 12770 | (sha256 | 12773 | (sha256 |
| 12771 | (base32 "0yi9bj3k8yc1gkwmaf14zbbvvn13n54n1dli8k6j1pkph3p3vjq2")) | 12774 | (base32 "1hwnywqq5c05j1qym5q82r9inyps3p1fsjd7c819575vvqcdwqx8")) |
| 12772 | (modules '((guix build utils))) | 12775 | (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) |
| 12773 | (snippet | 12776 | (snippet |
| 12774 | '(begin | 12777 | #~(begin |
| 12775 | ;; Remove bundled websocketpp. | 12778 | ;; XXX: We must use the ancient bundled websocketpp because the new |
| 12776 | (delete-file-recursively "src/third_party/websocketpp") | 12779 | ;; one is not compatible with newer versions of boost asio: |
| 12777 | (substitute* "pokerth_lib.pro" | 12780 | ;; https://github.com/zaphoyd/websocketpp/issues/721 |
| 12778 | (("src/third_party/websocketpp") | 12781 | ;; One alternative is to use boost-1.83 as an input. |
| 12779 | "")))) | 12782 | ;; XXX: Can we copy the third party boost headers in from somewhere? |
| 12780 | (patches (search-patches "pokerth-boost.patch")))) | 12783 | (let ((keep '("boost" "websocketpp"))) |
| 12784 | (with-directory-excursion "src/third_party" | ||
| 12785 | (for-each delete-file-recursively | ||
| 12786 | (lset-difference string=? | ||
| 12787 | (scandir ".") | ||
| 12788 | (cons* "." ".." keep))))))))) | ||
| 12781 | (build-system qt-build-system) | 12789 | (build-system qt-build-system) |
| 12782 | (inputs | 12790 | (inputs |
| 12783 | (list boost-1.83 | 12791 | (list boost |
| 12784 | curl | 12792 | openssl |
| 12785 | gsasl | 12793 | protobuf |
| 12786 | libgcrypt | 12794 | qtbase |
| 12787 | libircclient | 12795 | qtdeclarative |
| 12788 | protobuf-2 ;remove package when no longer needed | 12796 | qtmultimedia |
| 12789 | qtbase-5 | 12797 | qtsvg |
| 12790 | qtwayland-5 | 12798 | qtwayland |
| 12791 | (sdl-union (list sdl sdl-mixer)) | 12799 | sqlite)) |
| 12792 | sqlite | 12800 | (native-inputs (list qttools qtwebsockets)) |
| 12793 | tinyxml | 12801 | (arguments (list #:tests? #f)) ;TODO: 'bot client' must be built & run |
| 12794 | websocketpp | ||
| 12795 | zlib)) | ||
| 12796 | (arguments | ||
| 12797 | (list | ||
| 12798 | #:tests? #f ; No test suite | ||
| 12799 | #:modules '((guix build qt-build-system) | ||
| 12800 | ((guix build gnu-build-system) #:prefix gnu:) | ||
| 12801 | (guix build utils)) | ||
| 12802 | #:phases | ||
| 12803 | #~(modify-phases %standard-phases | ||
| 12804 | (add-after 'unpack 'fix-paths | ||
| 12805 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 12806 | (substitute* (find-files "." "\\.pro$") | ||
| 12807 | (("LIB_DIRS =") | ||
| 12808 | (string-append "LIB_DIRS = " | ||
| 12809 | #$(this-package-input "boost") "/lib"))))) | ||
| 12810 | (add-after 'unpack 'fix-build | ||
| 12811 | (lambda _ | ||
| 12812 | ;; Fixes for Boost versions >= 1.66. | ||
| 12813 | (substitute* '("src/net/common/clientthread.cpp" | ||
| 12814 | "src/net/serveraccepthelper.h") | ||
| 12815 | (("boost::asio::socket_base::non_blocking_io command\\(true\\);") | ||
| 12816 | "") | ||
| 12817 | (("newSock->io_control\\(command\\);") | ||
| 12818 | "newSock->non_blocking(true);") | ||
| 12819 | (("acceptedSocket->io_control\\(command\\);") | ||
| 12820 | "acceptedSocket->non_blocking(true);")))) | ||
| 12821 | (replace 'configure | ||
| 12822 | (lambda _ | ||
| 12823 | (invoke "qmake" "pokerth.pro" "CONFIG+=client" | ||
| 12824 | (string-append "PREFIX=" #$output)))) | ||
| 12825 | (replace 'build (assoc-ref gnu:%standard-phases 'build)) | ||
| 12826 | (replace 'install (assoc-ref gnu:%standard-phases 'install))))) | ||
| 12827 | (home-page "https://www.pokerth.net") | 12802 | (home-page "https://www.pokerth.net") |
| 12828 | (synopsis "Texas holdem poker game") | 12803 | (synopsis "Texas holdem poker game") |
| 12829 | (description | 12804 | (description |
diff --git a/gnu/packages/patches/pokerth-boost.patch b/gnu/packages/patches/pokerth-boost.patch deleted file mode 100644 index 85d32df299c..00000000000 --- a/gnu/packages/patches/pokerth-boost.patch +++ /dev/null | |||
| @@ -1,38 +0,0 @@ | |||
| 1 | Retrieved from https://patch-diff.githubusercontent.com/raw/pokerth/pokerth/pull/396.patch | ||
| 2 | |||
| 3 | From a769887330a317d55e7f64c71a32ad130ffb9307 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: Stefan Strogin <steils@gentoo.org> | ||
| 5 | Date: Mon, 18 May 2020 03:30:53 +0300 | ||
| 6 | Subject: [PATCH] Fix using boost placeholders (#395) | ||
| 7 | |||
| 8 | --- | ||
| 9 | src/net/common/serveracceptwebhelper.cpp | 9 +++++---- | ||
| 10 | 1 file changed, 5 insertions(+), 4 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/src/net/common/serveracceptwebhelper.cpp b/src/net/common/serveracceptwebhelper.cpp | ||
| 13 | index f61d4d779..8701e1e99 100644 | ||
| 14 | --- a/src/net/common/serveracceptwebhelper.cpp | ||
| 15 | +++ b/src/net/common/serveracceptwebhelper.cpp | ||
| 16 | @@ -29,6 +29,7 @@ | ||
| 17 | * as that of the covered work. * | ||
| 18 | *****************************************************************************/ | ||
| 19 | |||
| 20 | +#include <boost/bind/bind.hpp> | ||
| 21 | #include <net/serveracceptwebhelper.h> | ||
| 22 | #include <net/sessiondata.h> | ||
| 23 | #include <net/webreceivebuffer.h> | ||
| 24 | @@ -58,10 +59,10 @@ ServerAcceptWebHelper::Listen(unsigned serverPort, bool /*ipv6*/, const std::str | ||
| 25 | |||
| 26 | m_webSocketServer->init_asio(m_ioService.get()); | ||
| 27 | |||
| 28 | - m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, _1)); | ||
| 29 | - m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, _1)); | ||
| 30 | - m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, _1)); | ||
| 31 | - m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, _1, _2)); | ||
| 32 | + m_webSocketServer->set_validate_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::validate), this, boost::placeholders::_1)); | ||
| 33 | + m_webSocketServer->set_open_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_open), this, boost::placeholders::_1)); | ||
| 34 | + m_webSocketServer->set_close_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_close), this, boost::placeholders::_1)); | ||
| 35 | + m_webSocketServer->set_message_handler(boost::bind(boost::mem_fn(&ServerAcceptWebHelper::on_message), this, boost::placeholders::_1, boost::placeholders::_2)); | ||
| 36 | |||
| 37 | m_webSocketServer->listen(serverPort); | ||
| 38 | m_webSocketServer->start_accept(); | ||
