guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add pokerth.


From: guix-commits
Subject: branch master updated: gnu: Add pokerth.
Date: Sun, 12 Jul 2020 09:06:34 -0400

This is an automated email from the git hooks/post-receive script.

glv pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new c02af11  gnu: Add pokerth.
c02af11 is described below

commit c02af11dbf21b4a41257ab010a15d97c0b434b0a
Author: Guillaume Le Vaillant <glv@posteo.net>
AuthorDate: Sun Jul 12 15:02:55 2020 +0200

    gnu: Add pokerth.
    
    * gnu/packages/games.scm (pokerth): New variable.
---
 gnu/packages/games.scm | 79 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 77 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 655b890..5a38e20 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -113,9 +113,11 @@
   #: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 @@
   #: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 @@
   #: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 @@
   #: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 @@ and shovers to get to the goal.  Race against the 
clock to collect coins to
 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+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]