From patchwork Sat Nov 23 12:56:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Le Vaillant X-Patchwork-Id: 16199 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 706E1177A1; Sat, 23 Nov 2019 12:58:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 26CF017757 for ; Sat, 23 Nov 2019 12:58:17 +0000 (GMT) Received: from localhost ([::1]:58536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYUzQ-0001nh-IJ for patchwork@mira.cbaines.net; Sat, 23 Nov 2019 07:58:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37597) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYUzH-0001nb-7G for guix-patches@gnu.org; Sat, 23 Nov 2019 07:58:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYUzF-00023e-UY for guix-patches@gnu.org; Sat, 23 Nov 2019 07:58:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47103) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iYUzF-00023Z-Ph for guix-patches@gnu.org; Sat, 23 Nov 2019 07:58:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iYUzF-0006KZ-My for guix-patches@gnu.org; Sat, 23 Nov 2019 07:58:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38344] [PATCH] gnu: Add qgo. Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Nov 2019 12:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38344 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38344@debbugs.gnu.org Cc: Guillaume Le Vaillant X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.157451385924301 (code B ref -1); Sat, 23 Nov 2019 12:58:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Nov 2019 12:57:39 +0000 Received: from localhost ([127.0.0.1]:55924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYUyo-0006Js-V5 for submit@debbugs.gnu.org; Sat, 23 Nov 2019 07:57:39 -0500 Received: from lists.gnu.org ([209.51.188.17]:32925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYUym-0006Jk-LL for submit@debbugs.gnu.org; Sat, 23 Nov 2019 07:57:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37514) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iYUyk-0001jR-Rt for guix-patches@gnu.org; Sat, 23 Nov 2019 07:57:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iYUyj-0001re-2D for guix-patches@gnu.org; Sat, 23 Nov 2019 07:57:34 -0500 Received: from mout02.posteo.de ([185.67.36.66]:53149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iYUyi-0001r3-BB for guix-patches@gnu.org; Sat, 23 Nov 2019 07:57:33 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 30A112400FD for ; Sat, 23 Nov 2019 13:57:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1574513849; bh=zm9fd2vi9Q95ScZ/QuHTeaY51/1b9B0vRNJU73YpSHk=; h=From:To:Cc:Subject:Date:From; b=idaBooUETIecs5u1tgEB2Pq9OeZ0k9pOKhYlXLe1C+3TfENvxIzvm6lgUTcvCQ9P1 NgWv/+VvPfI8a81mSaDPlxMsFzfruDlLe3QHoM2oZf2/WK7aYinsAKDS3cGqF9iI25 ak9eHoOORH6DdSTwEQjfLTEB/IEV9zm35tLYZ/A7GvWDlFggYR1UTTGXDfqNjQvatk FA8u4H9/JrG0NdUOB4odG0ovnMVMy4/yDUWfo7GzB5YXbq34mZZ4biq4+H5tRSecaV C29+a74zSmrRKv8RLSsJZypUyNXMK1sHsjheuDwn8XN+rqY6rnkvtUBnaY5bLxWquM dH+OfojUxXJ2Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 47KtcP69G7z9rxP; Sat, 23 Nov 2019 13:57:25 +0100 (CET) From: Guillaume Le Vaillant Date: Sat, 23 Nov 2019 13:56:54 +0100 Message-Id: <20191123125654.16899-1-glv@posteo.net> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/games.scm (qgo): New variable. --- gnu/packages/games.scm | 71 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 3d825cbe61..e97af7609e 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -7809,3 +7809,74 @@ 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 qgo + (let ((commit "2a4212d473372bb531fdc5c919a20dd96819f9b0") + (revision "0")) + (package + (name "qgo") + (version (git-version "2.1.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pzorin/qgo.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0v03g0wp9vqzdn6ppxrhvabbz32ww83ipkk7178f8fqhm7ndvsbj")))) + (build-system gnu-build-system) + (native-inputs + `(("qttools" ,qttools))) + (inputs + `(("gnugo" ,gnugo) + ("qtbase" ,qtbase) + ("qtmultimedia" ,qtmultimedia))) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build qt-utils) + (guix build utils)) + #:imported-modules (,@%gnu-build-system-modules + (guix build qt-utils)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "src/src.pro" + (("= /usr/") + (string-append "= " (assoc-ref outputs "out") "/")) + (("\\$\\$\\[QT_INSTALL_BINS\\]/lrelease") + (string-append (assoc-ref inputs "qttools") "/bin/lrelease"))) + (substitute* "src/defines.h" + (("/usr/games/") + (string-append (assoc-ref inputs "gnugo") "/bin/")) + (("/usr/share/") + (string-append (assoc-ref outputs "out") "/share/"))) + (substitute* "src/main.cpp" + (("QCoreApplication::applicationDirPath\\(\\)\\+\"") + (string-append "\"" (assoc-ref outputs "out") "/share/qgo"))) + #t)) + (replace 'configure + (lambda _ + (invoke "qmake" "src"))) + (add-after 'install 'install-translations + (lambda* (#:key outputs #:allow-other-keys) + (let ((dest (string-append (assoc-ref outputs "out") + "/share/qgo/translations"))) + (for-each (lambda (file) + (install-file file dest)) + (find-files "../source/src/translations/" + "qgo_.*\\.qm"))) + #t)) + (add-after 'install-translations 'wrap-program + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (wrap-qt-program out "qgo")) + #t))))) + (synopsis "Qt GUI to play the game of Go") + (description + "This is a Go client. It supports playing online at IGS-compatible +servers and locally against GTP-compliant engines like @code{gnugo}. +It also has rudimentary support for editing SGF files.") + (home-page "https://github.com/pzorin/qgo") + (license license:gpl2+))))