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!
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 +++++++++++++++++++++++++ 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 +
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 #1: Type: text/plain, Size: 1720 bytes --] 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: >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 #2: Type: text/html, Size: 2404 bytes --]
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’.
Hi Tomás, A friendly reminder. :-) https://issues.guix.gnu.org/43781 Ludo’. Ludovic Courtès <ludo@gnu.org> skribis: > 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’.
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 +++++++++++++++++++++++++++++ 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"))
[-- Attachment #1: Type: text/plain, Size: 403 bytes --] 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]