From patchwork Tue Apr 4 21:50:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Goaziou X-Patchwork-Id: 48979 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 D25581735B; Tue, 4 Apr 2023 22:51:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7CEF91734C for ; Tue, 4 Apr 2023 22:51:24 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjoYS-00039S-Li; Tue, 04 Apr 2023 17:51:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjoYR-00039E-F4 for guix-patches@gnu.org; Tue, 04 Apr 2023 17:51:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjoYR-0005Nt-6F for guix-patches@gnu.org; Tue, 04 Apr 2023 17:51:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjoYQ-0001Mh-Dy for guix-patches@gnu.org; Tue, 04 Apr 2023 17:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62670] [PATCH] gnu: Add deal. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 04 Apr 2023 21:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62670 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62670@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16806450195027 (code B ref -1); Tue, 04 Apr 2023 21:51:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Apr 2023 21:50:19 +0000 Received: from localhost ([127.0.0.1]:50415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjoXi-0001J1-UP for submit@debbugs.gnu.org; Tue, 04 Apr 2023 17:50:19 -0400 Received: from lists.gnu.org ([209.51.188.17]:54094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjoXh-0001It-3B for submit@debbugs.gnu.org; Tue, 04 Apr 2023 17:50:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjoXg-000343-Q3 for guix-patches@gnu.org; Tue, 04 Apr 2023 17:50:16 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjoXe-0005Fx-R8 for guix-patches@gnu.org; Tue, 04 Apr 2023 17:50:16 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id 89DE61C0003 for ; Tue, 4 Apr 2023 21:50:10 +0000 (UTC) From: Nicolas Goaziou Date: Tue, 4 Apr 2023 23:50:04 +0200 Message-Id: <20230404215004.740745-1-mail@nicolasgoaziou.fr> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4b98:dc4:8::225; envelope-from=mail@nicolasgoaziou.fr; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/games.scm (deal): New variable. --- gnu/packages/games.scm | 80 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) base-commit: 6311493d7a6271bfbc51f4693857f9a12fe9965d diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index debd9b5d30..249ee469f4 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1152,6 +1152,84 @@ (define-public cowsay tired of cows, a variety of other ASCII-art messengers are available.") (license license:gpl3+))) +(define-public deal + (package + (name "deal") + (version "3.1.11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/gtwilliams/deal") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1wcrx3yq5ycnkdnygcq80ljpgc9iwyrr8zayprzvbibvj77hdm0c")))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #t + #:test-target "test" + #:make-flags + #~(let* ((tcl #$(this-package-input "tcl")) + (tcl-version #$(version-major+minor (package-version tcl)))) + (list "CPPFLAGS += -O3" + (string-append "CC=" #$(cc-for-target)) + (string-append "TCL_INCL=" tcl "/include") + (string-append "LDFLAGS=-L" tcl "/lib" + " -ltcl" tcl-version + " -lm") + (string-append "DATA_DIR=" #$output "/share/deal/"))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'locate-pod2man + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "Makefile" + (("/usr/bin/pod2man") + (search-input-file inputs "/bin/pod2man"))))) + (delete 'configure) ;no configure script + ;; Prevent the error: "Makefile:248: Make.dep: No such file + ;; or directory". + (add-before 'build 'create-Make.dep + (lambda _ + (call-with-output-file "Make.dep" (const #t)))) + ;; There is no install target. Do everything manually. + (replace 'install + (lambda _ + (let ((bin (string-append #$output "/bin")) + (man (string-append #$output "/share/man/man6")) + (data (string-append #$output "/share/deal"))) + (install-file "deal" bin) + (install-file "deal.6" man) + (install-file "deal.tcl" data) + (for-each (lambda (d) + (let ((target (string-append data "/" d))) + (mkdir-p target) + (copy-recursively d target))) + '("ex" "format" "input" "lib"))))) + ;; Tests need to happen once the data is properly installed + ;; because the "deal.tcl" script file location is hard-coded + ;; in the "deal" binary. + (delete 'check) + (add-after 'install 'check + (assoc-ref %standard-phases 'check))))) + (native-inputs + (list perl)) + (inputs + (list tcl)) + (home-page "https://bridge.thomasoandrews.com/deal/") + (synopsis "Bridge hand generator") + (description + "This program generates bridge hands. It can be told to generate only +hands satisfying conditions like being balanced, having a range of +High Cards Points (HCP), controls, or other user-definable properties. +Hands can be output in various formats, like PBN for feeding to other +bridge programs, Deal itself, or split up into a file per player for +practise.") + (license (list license:gpl2+ + license:gpl1+ ;ansidecl.h + license:bsd-3)))) ;random.c + (define-public falltergeist (package (name "falltergeist") @@ -1167,7 +1245,7 @@ (define-public falltergeist "05cg58i2g32wbmrvmdsicic8xs83gld3qr1p7r4lnlckcl1l7dy4")))) (build-system cmake-build-system) (arguments - `(#:tests? #f)) ; no tests provided + `(#:tests? #f)) ; no tests provided (native-inputs (list pkg-config)) (inputs `(("sdl" ,(sdl-union (list sdl2 sdl2-image