From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:60518) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZDSJ-0006T3-OM for guix-patches@gnu.org; Mon, 25 Nov 2019 07:27:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZDSI-0002j8-C1 for guix-patches@gnu.org; Mon, 25 Nov 2019 07:27:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41758) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZDSH-0002iX-UQ for guix-patches@gnu.org; Mon, 25 Nov 2019 07:27:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iZDSH-0002mY-SH for guix-patches@gnu.org; Mon, 25 Nov 2019 07:27:01 -0500 Subject: [bug#38344] [PATCH v2] gnu: Add q5go. Resent-Message-ID: From: Guillaume Le Vaillant Date: Sun, 24 Nov 2019 16:17:09 +0100 Message-Id: <20191124151709.10883-1-glv@posteo.net> In-Reply-To: <87zhglzer8.fsf@yamatai> References: <87zhglzer8.fsf@yamatai> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38344@debbugs.gnu.org Cc: Guillaume Le Vaillant * 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