unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: gemmaro <gemmaro.dev@gmail.com>
To: 63206@debbugs.gnu.org
Cc: gemmaro <gemmaro.dev@gmail.com>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	宋文武 <iyzsong@envs.net>
Subject: [bug#63206] [PATCH v3] gnu: gnushogi: Fix build.
Date: Sun, 11 Jun 2023 20:13:33 +0900	[thread overview]
Message-ID: <765feb5a519d82294ac2032b18c4ad22d9fd7c29.1686481609.git.gemmaro.dev@gmail.com> (raw)
In-Reply-To: <483665ed2ac988be7e19c67fe28b9f9e5acf2a9e.1682952374.git.gemmaro.dev@gmail.com>

* gnu/packages/games.scm (gnushogi)
[source]: Fix warnings by prefixing "__FUNCTION__" with "__extension__".
[arguments]: Turn off some GCC warnings in C flags.
Set the linker flag to build the program.
Skip the "--enable-fast-install" flag in the configure phase.
Enable the "sizetest" test in the check phase.
[synopsis]: Remove "The" so that the sentence doesn't start with it.
---
Hello,

Thank you for the review.  I tried to use #:make-flags in the revision
2, and additionally dealt with warnings and enable check phase in this
revision.

Best,
gemmaro.

 gnu/packages/games.scm | 51 ++++++++++++++++++++++++++++++++----------
 1 file changed, 39 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 8c00c2e66ed..37c51873ab8 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -78,6 +78,7 @@
 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
 ;;; Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
+;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2043,20 +2044,46 @@ (define-public gnushogi
   (package
     (name "gnushogi")
     (version "1.4.2")
-    (source
-     (origin
-      (method url-fetch)
-      (uri (string-append "mirror://gnu/gnushogi/gnushogi-"
-                          version ".tar.gz"))
-      (sha256
-       (base32
-        "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))))
-    (arguments `(#:tests? #f)) ;; No check target.
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gnushogi/gnushogi-" version
+                                  ".tar.gz"))
+              (sha256
+               (base32
+                "0a9bsl2nbnb138lq0h14jfc5xvz7hpb2bcsj4mjn6g1hcsl4ik0y"))
+              (modules '((guix build utils)))
+              ;; Fix "warning: ISO C90 does not support ‘__func__’ predefined
+              ;; identifier [-Wpedantic]"
+              (snippet '(begin
+                          (substitute* "gnushogi/dspwrappers.c"
+                            (("__FUNCTION__")
+                             "__extension__ __FUNCTION__"))))))
+    (arguments
+     `(#:configure-flags (list (string-append
+                                "CFLAGS="
+                                (string-join '("-Wno-format"
+                                               "-Wno-unused-but-set-variable"
+                                               "-Wno-bool-compare")
+                                             " ")))
+       #:make-flags '("LDFLAGS=-z muldefs")
+       #:phases (modify-phases %standard-phases
+                  ;; Skip --enable-fast-install flag
+                  (replace 'configure
+                    (lambda* (#:key outputs configure-flags #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (setenv "CONFIG_SHELL"
+                                (which "sh"))
+                        (setenv "SHELL"
+                                (which "sh"))
+                        (apply invoke "./configure"
+                               (string-append "--prefix=" out) configure-flags)))))
+       #:test-target "sizetest"))
     (build-system gnu-build-system)
     (home-page "https://www.gnu.org/software/gnushogi/")
-    (synopsis "The game of Shogi (Japanese chess)")
-    (description  "GNU Shogi is a program that plays the game Shogi (Japanese
-Chess).  It is similar to standard chess but this variant is far more complicated.")
+    (synopsis "Game of Shogi (Japanese chess)")
+    (description
+     "GNU Shogi is a program that plays the game Shogi (Japanese Chess).
+It is similar to standard chess but this variant is far more complicated.")
     (license license:gpl3+)))
 
 (define-public ltris

base-commit: 73fa2889895f35bcf0c41f1174413381fdd7ec2c
-- 
2.40.1





  parent reply	other threads:[~2023-06-11 11:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 14:47 [bug#63206] [PATCH] gnu: gnushogi: Fix build gemmaro
2023-05-03  2:46 ` gemmaro
2023-05-04  4:28 ` Liliana Marie Prikler
2023-05-04  9:01 ` [bug#63206] [PATCH v2] " gemmaro
2023-06-11 11:13 ` gemmaro [this message]
2023-06-14 21:20   ` bug#63206: [PATCH] " 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=765feb5a519d82294ac2032b18c4ad22d9fd7c29.1686481609.git.gemmaro.dev@gmail.com \
    --to=gemmaro.dev@gmail.com \
    --cc=63206@debbugs.gnu.org \
    --cc=iyzsong@envs.net \
    --cc=liliana.prikler@gmail.com \
    /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).