[PATCH 0/2] gnu: Add cgoban

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Ludovic Courtès
  • Tomás Ortín Fernández
Owner
unassigned
Submitted by
Tomás Ortín Fernández
Severity
normal
T
T
Tomás Ortín Fernández wrote on 3 Oct 2020 19:50
(address . guix-patches@gnu.org)
d735688d-2268-5da4-afb2-368aa10b257f@mailbox.org
Hello Guix! This is a set of two patches to add CGoban, a Go (as in the boardgame) client. This is just my second contribution and I'm not a programmer, so please provide any feedback and I will improve it. Thanks!
T
T
Tomás Ortín Fernández wrote on 3 Oct 2020 21:05
[PATCH 2/2] gnu: Add cgoban
(address . 43781@debbugs.gnu.org)
9f324abb-f935-b748-526b-467113e87670@mailbox.org
Sorry, I see I should have sent it all in one email.

* gnu/packages/games.scm (cgoban): New variable.
---
2 files changed, 71 insertions(+), 1 deletion(-)
gnu/packages/games.scm | 32 +++++++++++++++++++-
gnu/packages/patches/cgoban-1.9.14-cflags.patch | 40 +++++++++++++++++++++++++

Toggle diff (94 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 28c1492b26..c2fefd6812 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -54,7 +54,8 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Trevor Hass <thass@okstate.edu>
;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
-;;;
+;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
+;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
@@ -11790,3 +11791,32 @@ inside the Zenith Colony.")
X11 that won't set your CPU on fire, drain your laptop battery, or lower video
game FPS.")
(license license:unlicense))))
+
+(define-public cgoban
+ (package
+ (name "cgoban")
+ (version "1.9.14")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://sourceforge.net/projects/cgoban1/files/"
+ "cgoban1/1.9.14/cgoban-1.9.14.tar.gz"))
+ (sha256
+ (base32 "0qlvkiaglqq0izfph3l04mp4rqqqm9ks6rcsrmzrggw9x706z2iv"))
+ (patches (search-patches "cgoban-1.9.14-cflags.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #t))
+ (inputs
+ `(("xorgproto", xorgproto)
+ ("libx11", libx11)
+ ("libxt", libxt)))
+ (home-page "http://cgoban1.sourceforge.net/")
+ (synopsis "Go client for X11")
+ (description "CGoban provides a large set of Go-related services for X11:
+-Local games with precise implementation of the Chinese and Japanese rulesets
+-Edition and visualization of SGF files
+-Connection to the NNGS or IGS Go servers
+-Bridge to Go modem protocol, including playing against Go modem capable AIs,
+such as GnuGo")
+ (license license:gpl2+)))

diff --git a/gnu/packages/patches/cgoban-1.9.14-cflags.patch b/gnu/packages/patches/cgoban-1.9.14-cflags.patch
new file mode 100644
index 0000000000..dc5e9ef15d
--- /dev/null
+++ b/gnu/packages/patches/cgoban-1.9.14-cflags.patch
@@ -0,0 +1,40 @@
+--- a/configure.in
++++ b/configure.in
+@@ -1,8 +1,9 @@
+ #for autoconf 2.1x start configure script with next three lines
+
+ AC_PREREQ(2.13)
+-AC_INIT(src/cgoban.c)
+-AM_INIT_AUTOMAKE(cgoban, 1.9.14)
++AC_INIT([cgoban], [1.9.14])
++AC_CONFIG_SRCDIR([src/cgoban.c])
++AM_INIT_AUTOMAKE([no-define])
+
+ #for autoconf 2.5x start configure script with next four lines
+ # AC_PREREQ(2.50)
+@@ -145,7 +146,7 @@
+ ######################################################################
+
+ export VERSION
+-AC_DEFINE_UNQUOTED(VERSION,$VERSION)
++AC_DEFINE_UNQUOTED(VERSION,["$VERSION"])
+ AC_PREFIX_DEFAULT(/usr/games)
+
+ dayNum=`echo $date | awk '{ print $1 }'`
+@@ -160,6 +161,7 @@
+ AC_DEFINE_UNQUOTED(DATE,$DATE)
+ AC_DEFINE_UNQUOTED(DATE_FRENCH,$DATE_FRENCH)
+
++AM_PROG_AR
+ AC_PROG_MAKE_SET
+ AC_PROG_INSTALL
+ AC_PROG_CC
+@@ -168,7 +170,6 @@
+ AC_MINIX
+ AC_PROG_CPP
+ AC_EXEEXT
+-WMS_GET_CFLAGS
+
+ AM_CONFIG_HEADER(configure.h)
+ AC_SUBST(LIBS)dnl
+
L
L
Ludovic Courtès wrote on 22 Oct 2020 16:55
(name . Tomás Ortín Fernández)(address . tomasortin@mailbox.org)(address . 43781@debbugs.gnu.org)
871rhqtimt.fsf@gnu.org
Hi,

Tomás Ortín Fernández <tomasortin@mailbox.org> skribis:

Toggle quote (4 lines)
> Sorry, I see I should have sent it all in one email.
>
> * gnu/packages/games.scm (cgoban): New variable.

Sorry for the delay! Some comments:

Toggle quote (3 lines)
> + (arguments
> + `(#:tests? #t))

Please add a short comment explaining why tests are disabled.

Toggle quote (6 lines)
> --- /dev/null
> +++ b/gnu/packages/patches/cgoban-1.9.14-cflags.patch
> @@ -0,0 +1,40 @@
> +--- a/configure.in
> ++++ b/configure.in

Patches should start with a couple lines stating the origin, their
upstream status, and what they do.

Patches also need to be listed in ‘gnu/local.mk’ and mentioned in the
commit log.

However, I suspect this patch has no effect: since ‘autoconf’ is not an
input of the package, its ‘configure’ script cannot be rebuilt to take
those changes into account.

Perhaps you can just remove it?

Could you send a second version?

Thanks!

Ludo’.
T
T
Tomás Ortín wrote on 22 Oct 2020 17:07
(name . Ludovic Courtès)(address . ludo@gnu.org)
264BCB13-4FA2-4713-810E-2704D3E45A15@mailbox.org
Hello,

Thank you for your feedback. I will add a comment about the tests.

About the patch: it's taken from the Gentoo package. I first tried packaging cgoban without any package and it consistently failed at configure phase, no matter the flags I passed. I decided to check the Gentoo package to see how they built it, as I have used cgoban in that distribution before and works well, and saw they just added this patch. Tried adding it, and it works. But I won't pretend to understand why.

If adding the patch is not a good solution, could someone help me figure out how to properly pack cgoban? Sorry about the inconvenience.

Tomás Ortín

On October 22, 2020 2:55:38 PM UTC, "Ludovic Courtès" <ludo@gnu.org> wrote:
Toggle quote (38 lines)
>Hi,
>
>Tomás Ortín Fernández <tomasortin@mailbox.org> skribis:
>
>> Sorry, I see I should have sent it all in one email.
>>
>> * gnu/packages/games.scm (cgoban): New variable.
>
>Sorry for the delay! Some comments:
>
>> + (arguments
>> + `(#:tests? #t))
>
>Please add a short comment explaining why tests are disabled.
>
>> --- /dev/null
>> +++ b/gnu/packages/patches/cgoban-1.9.14-cflags.patch
>> @@ -0,0 +1,40 @@
>> +--- a/configure.in
>> ++++ b/configure.in
>
>Patches should start with a couple lines stating the origin, their
>upstream status, and what they do.
>
>Patches also need to be listed in ‘gnu/local.mk’ and mentioned in the
>commit log.
>
>However, I suspect this patch has no effect: since ‘autoconf’ is not an
>input of the package, its ‘configure’ script cannot be rebuilt to take
>those changes into account.
>
>Perhaps you can just remove it?
>
>Could you send a second version?
>
>Thanks!
>
>Ludo’.
Attachment: file
L
L
Ludovic Courtès wrote on 26 Oct 2020 11:44
(name . Tomás Ortín)(address . tomasortin@mailbox.org)(address . 43781@debbugs.gnu.org)
87v9exb72e.fsf@gnu.org
Hi Tomás,

(Please keep the bug Cc’d.)

Tomás Ortín <tomasortin@mailbox.org> skribis:

Toggle quote (2 lines)
> About the patch: it's taken from the Gentoo package. I first tried packaging cgoban without any package and it consistently failed at configure phase, no matter the flags I passed. I decided to check the Gentoo package to see how they built it, as I have used cgoban in that distribution before and works well, and saw they just added this patch. Tried adding it, and it works. But I won't pretend to understand why.

I tested it: it builds just fine without the ‘configure.in’ patch. :-)

Could you send an updated patch?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 18 Nov 2020 23:06
(name . Tomás Ortín)(address . tomasortin@mailbox.org)(address . 43781@debbugs.gnu.org)
87eekqjp5x.fsf@gnu.org
Hi Tomás,

A friendly reminder. :-)


Ludo’.

Ludovic Courtès <ludo@gnu.org> skribis:

Toggle quote (14 lines)
> Hi Tomás,
>
> (Please keep the bug Cc’d.)
>
> Tomás Ortín <tomasortin@mailbox.org> skribis:
>
>> About the patch: it's taken from the Gentoo package. I first tried packaging cgoban without any package and it consistently failed at configure phase, no matter the flags I passed. I decided to check the Gentoo package to see how they built it, as I have used cgoban in that distribution before and works well, and saw they just added this patch. Tried adding it, and it works. But I won't pretend to understand why.
>
> I tested it: it builds just fine without the ‘configure.in’ patch. :-)
>
> Could you send an updated patch?
>
> Thanks,
> Ludo’.
T
T
Tomás Ortín Fernández wrote on 26 Nov 2020 09:56
(no subject)
(address . 43781@debbugs.gnu.org)
1bca958a-8333-3097-daf9-b587991a3217@mailbox.org
Here is the updated patch, sorry for the (long) delay. I've removed the patch and enabled the
tests, as I didn't know / understand I had disabled them.

Tomás


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

Toggle diff (47 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index d01d4de33a..2587c444ff 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -55,6 +55,7 @@
;;; Copyright © 2020 Trevor Hass <thass@okstate.edu>
;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2020 Lu hux <luhux@outlook.com>
+;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -11919,6 +11920,34 @@ computer opponents or against real players online.")
inside the Zenith Colony.")
(license license:gpl3+)))
+(define-public cgoban
+ (package
+ (name "cgoban")
+ (version "1.9.14")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://sourceforge.net/projects/cgoban1/files/"
+ "cgoban1/1.9.14/cgoban-1.9.14.tar.gz"))
+ (sha256
+ (base32 "0qlvkiaglqq0izfph3l04mp4rqqqm9ks6rcsrmzrggw9x706z2iv"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #t
+ #:phases %standard-phases))
+ (inputs
+ `(("xorgproto" ,xorgproto)
+ ("libx11" ,libx11)
+ ("libxt" ,libxt)))
+ (home-page "http://cgoban1.sourceforge.net/")
+ (synopsis "Go client for X11")
+ (description "Provides a large set of Go-related services for X11:
+-Local games with precise implementation of the Chinese and Japanese rulesets
+-Edition and visualization of SGF files-Connection to the NNGS or IGS Go servers
+-Bridge to Go modem protocol, allowing to play against Go modem-capable AIs
+such as GnuGo")
+ (license license:gpl2+)))
+
(define-public paperview
(let ((commit "9f8538eb6734c76877b878b8f1e52587f2ae19e6")
(revision "1"))
E
E
Efraim Flashner wrote on 29 Nov 2020 20:19
(name . Tomás Ortín Fernández)(address . tomasortin@mailbox.org)(address . 43781-done@debbugs.gnu.org)
X8P0LEyQBmJ4mNcv@E5400
I tweaked the source URI to use the sourceforge mirror scheme, organized
the inputs alphabetically and touched up the description to use @item
instead of dashes.

Patch pushed! Thanks.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl/D9CwACgkQQarn3Mo9
g1HSxg//U638QlejvGkZdiIL8qDoyA7Dy/EZLR8uC7/iRUvKdOJFomRksRmlc4d6
RU/A8ViSQDA+Kz9mK0FCL+JwnEIkNacwUfmb6ayNYOCV0AQpc/aG49NWx5dHdre3
+0i7zwQGMusEuanHlfPfdHIfjdA+5NyHZF2Hty9k429HUHD8inaXQajCtnGiaOcF
ViBtmstq/s9lTFAeraLi6qqwAru2PCjOdXQYzHxETezdjOxJYTfr58LjxELY0b2T
TlYxi+Auw/YYS3tmmKUc2ROKc3GqASxRW2uyo6BcVL+XethdGBeC0LVnvy3ACMfQ
+fKupj7StZAuiU4OLCetKAF906ntiyO8u2S6qTbT822vOwgKwjDLy+yP0ecMydd6
auMW7zbhwSv/t7IA2mUxnkMydUHpAYlO4lwWPDJYiVHfxm+N3ghjqN1fKSEkhkU/
UHzYSrlnQ0uef1UhrW8z4U7gT5N4lZA4lq5v1DdF55I+x576+E0UHjqAMCc9EfdT
sgU0PmE1zgjdkuoA7GGKEspmxfKA1nDaj/wdxId7ey1NBK4Uz04F5neZhRDTTG/Z
9PXBmB2aCLpNrASs1WEo/fOGnzpxXbLTYs098JOPNwGPej2iRpJiTxh/LPlFNT/P
cqvTguxEsp46bofLi6iLPmNwXdqwg6sEY/MMiCpk91jJb8QNcgA=
=4Kbc
-----END PGP SIGNATURE-----


Closed
?