unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Guillaume Le Vaillant <glv@posteo.net>
To: 38344@debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv@posteo.net>
Subject: [bug#38344] [PATCH v2] gnu: Add q5go.
Date: Sun, 24 Nov 2019 16:17:09 +0100	[thread overview]
Message-ID: <20191124151709.10883-1-glv@posteo.net> (raw)
In-Reply-To: <87zhglzer8.fsf@yamatai>

* gnu/packages/games.scm (q5go): New variable.
---
 gnu/packages/games.scm | 81 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 3d825cbe61..b6004b639c 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7809,3 +7809,84 @@ remake of that series or any other game.")
 the AlphaGo Zero paper.  The current best network weights file for the engine
 can be downloaded from @url{https://zero.sjeng.org/best-network}.")
    (license license:gpl3+)))
+
+(define-public q5go
+  (package
+   (name "q5go")
+   (version "1.0")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/bernds/q5Go.git")
+                  (commit (string-append "q5go-" version))))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "1gdlfqcqkqv7vph3qwq78d0qz6dhmdsranxq9bmixiisbzkqby31"))))
+   (build-system gnu-build-system)
+   (native-inputs
+    `(("pkg-config" ,pkg-config)))
+   (inputs
+    `(("qtbase" ,qtbase)
+      ("qtmultimedia" ,qtmultimedia)
+      ("qtsvg" ,qtsvg)))
+   (arguments
+    '(#:phases
+      (modify-phases %standard-phases
+        (add-after 'unpack 'fix-configure-script
+          (lambda _
+            ;; Bypass the unavailable qtchooser program.
+            (substitute* "configure"
+              (("test -z \"QTCHOOSER\"")
+               "false")
+              (("qtchooser -run-tool=(.*) -qt=qt5" _ command)
+               command))
+            #t))
+        (add-after 'unpack 'fix-paths
+          (lambda _
+            (substitute* '("src/pics/Makefile.in"
+                           "src/translations/Makefile.in")
+              (("\\$\\(datadir\\)/qGo/")
+               "$(datadir)/q5go/"))
+            #t))
+        (add-after 'install 'install-desktop-file
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let* ((out (assoc-ref outputs "out"))
+                   (apps (string-append out "/share/applications"))
+                   (pics (string-append out "/share/q5go/pics")))
+              (delete-file-recursively (string-append out "/share/applnk"))
+              (delete-file-recursively (string-append out "/share/mimelnk"))
+              (install-file "../source/src/pics/Bowl.ico" pics)
+              (mkdir-p apps)
+              (with-output-to-file (string-append apps "/q5go.desktop")
+                (lambda _
+                  (format #t
+                          "[Desktop Entry]~@
+                           Name=q5go~@
+                           Exec=~a/bin/q5go~@
+                           Icon=~a/Bowl.ico~@
+                           Categories=Game;~@
+                           Comment=Game of Go~@
+                           Comment[de]=Spiel des Go~@
+                           Comment[eo]=Goo~@
+                           Comment[es]=Juego de Go~@
+                           Comment[fr]=Jeu de Go~@
+                           Comment[ja]=囲碁~@
+                           Comment[ko]=바둑~@
+                           Comment[zh]=围棋~@
+                           Terminal=false~@
+                           Type=Application~%"
+                          out pics))))
+             #t)))))
+   (synopsis "Qt GUI to play the game of Go")
+   (description
+    "This a tool for Go players which performs the following functions:
+@itemize
+@item SGF editor,
+@item Analysis frontend for Leela Zero (or compatible engines),
+@item GTP interface (to play against an engine),
+@item IGS client (to play on the internet),
+@item Export games to a variety of formats.
+@end itemize")
+   (home-page "https://github.com/bernds/q5Go")
+   (license license:gpl2+)))
-- 
2.24.0

  reply	other threads:[~2019-11-25 12:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23 12:56 [bug#38344] [PATCH] gnu: Add qgo Guillaume Le Vaillant
2019-11-24 11:37 ` Guillaume Le Vaillant
2019-11-24 15:17   ` Guillaume Le Vaillant [this message]
2019-12-02  9:17     ` bug#38344: [PATCH v2] gnu: Add q5go Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191124151709.10883-1-glv@posteo.net \
    --to=glv@posteo.net \
    --cc=38344@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).