gnu: Add pokerth.

* gnu/packages/games.scm (pokerth): New variable.
This commit is contained in:
Guillaume Le Vaillant 2020-07-12 15:02:55 +02:00
parent e1485cd9ad
commit c02af11dbf
No known key found for this signature in database
GPG key ID: 6BE8208ADF21FE3F

View file

@ -113,9 +113,11 @@ (define-module (gnu packages games)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gnuzilla)
#:use-module (gnu packages gperf)
#:use-module (gnu packages graphics)
#:use-module (gnu packages gsasl)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
@ -136,6 +138,7 @@ (define-module (gnu packages games)
#:use-module (gnu packages lua)
#:use-module (gnu packages man)
#:use-module (gnu packages maths)
#:use-module (gnu packages messaging)
#:use-module (gnu packages mp3)
#:use-module (gnu packages music)
#:use-module (gnu packages multiprecision)
@ -149,6 +152,7 @@ (define-module (gnu packages games)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages perl-compression)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
@ -176,8 +180,6 @@ (define-module (gnu packages games)
#:use-module (gnu packages xorg)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages messaging)
#:use-module (gnu packages networking)
#:use-module (guix build-system copy)
#:use-module (guix build-system cmake)
#:use-module (guix build-system glib-or-gtk)
@ -11593,3 +11595,76 @@ (define-public neverball
earn extra balls. Also included is Neverputt, which is a 3D miniature golf
game.") ;thanks to Debian for description
(license license:gpl2+))))
(define-public pokerth
(package
(name "pokerth")
(version "1.1.2")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://sourceforge/pokerth/pokerth/"
version "/pokerth-" version ".tar.gz"))
(sha256
(base32 "0yi9bj3k8yc1gkwmaf14zbbvvn13n54n1dli8k6j1pkph3p3vjq2"))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove bundled websocketpp.
(delete-file-recursively "src/third_party/websocketpp")
(substitute* "pokerth_lib.pro"
(("src/third_party/websocketpp")
""))
#t))))
(build-system qt-build-system)
(inputs
`(("boost" ,boost)
("curl" ,curl)
("gsasl" ,gsasl)
("libgcrypt" ,libgcrypt)
("libircclient" ,libircclient)
("protobuf" ,protobuf-2)
("qtbase" ,qtbase)
("sdl" ,(sdl-union (list sdl sdl-mixer)))
("sqlite" ,sqlite)
("tinyxml" ,tinyxml)
("websocketpp" ,websocketpp)
("zlib" ,zlib)))
(arguments
`(#:tests? #f ; No test suite
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (find-files "." "\\.pro$")
(("/opt/gsasl")
(assoc-ref inputs "gsasl"))
(("\\$\\$\\{PREFIX\\}/include/libircclient")
(string-append (assoc-ref inputs "libircclient")
"/include/libircclient"))
(("LIB_DIRS =")
(string-append "LIB_DIRS = "
(assoc-ref inputs "boost") "/lib")))
#t))
(add-after 'unpack 'fix-build
(lambda _
;; Fixes for Boost versions >= 1.66.
(substitute* '("src/net/common/clientthread.cpp"
"src/net/serveraccepthelper.h")
(("boost::asio::socket_base::non_blocking_io command\\(true\\);")
"")
(("newSock->io_control\\(command\\);")
"newSock->non_blocking(true);")
(("acceptedSocket->io_control\\(command\\);")
"acceptedSocket->non_blocking(true);"))
#t))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(invoke "qmake" "pokerth.pro" "CONFIG+=client"
(string-append "PREFIX=" (assoc-ref outputs "out"))))))))
(home-page "https://www.pokerth.net")
(synopsis "Texas holdem poker game")
(description
"With PokerTH you can play the Texas holdem poker game, either against
computer opponents or against real players online.")
(license license:agpl3+)))