unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#43781] [PATCH 0/2] gnu: Add cgoban
@ 2020-10-03 17:50 Tomás Ortín Fernández via Guix-patches via
  2020-10-03 19:05 ` [bug#43781] [PATCH 2/2] " Tomás Ortín Fernández via Guix-patches via
  0 siblings, 1 reply; 6+ messages in thread
From: Tomás Ortín Fernández via Guix-patches via @ 2020-10-03 17:50 UTC (permalink / raw)
  To: 43781

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!




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#43781] [PATCH 2/2] gnu: Add cgoban
  2020-10-03 17:50 [bug#43781] [PATCH 0/2] gnu: Add cgoban Tomás Ortín Fernández via Guix-patches via
@ 2020-10-03 19:05 ` Tomás Ortín Fernández via Guix-patches via
  2020-10-22 14:55   ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Tomás Ortín Fernández via Guix-patches via @ 2020-10-03 19:05 UTC (permalink / raw)
  To: 43781

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
+ 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#43781] [PATCH 2/2] gnu: Add cgoban
  2020-10-03 19:05 ` [bug#43781] [PATCH 2/2] " Tomás Ortín Fernández via Guix-patches via
@ 2020-10-22 14:55   ` Ludovic Courtès
  2020-10-22 15:07     ` Tomás Ortín via Guix-patches
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2020-10-22 14:55 UTC (permalink / raw)
  To: Tomás Ortín Fernández; +Cc: 43781

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’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#43781] [PATCH 2/2] gnu: Add cgoban
  2020-10-22 14:55   ` Ludovic Courtès
@ 2020-10-22 15:07     ` Tomás Ortín via Guix-patches
  2020-10-26 10:44       ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Tomás Ortín via Guix-patches @ 2020-10-22 15:07 UTC (permalink / raw)
  To: Ludovic Courtès

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#43781] [PATCH 2/2] gnu: Add cgoban
  2020-10-22 15:07     ` Tomás Ortín via Guix-patches
@ 2020-10-26 10:44       ` Ludovic Courtès
  2020-11-18 22:06         ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2020-10-26 10:44 UTC (permalink / raw)
  To: Tomás Ortín; +Cc: 43781

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’.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#43781] [PATCH 2/2] gnu: Add cgoban
  2020-10-26 10:44       ` Ludovic Courtès
@ 2020-11-18 22:06         ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2020-11-18 22:06 UTC (permalink / raw)
  To: Tomás Ortín; +Cc: 43781

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’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-11-18 22:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-03 17:50 [bug#43781] [PATCH 0/2] gnu: Add cgoban Tomás Ortín Fernández via Guix-patches via
2020-10-03 19:05 ` [bug#43781] [PATCH 2/2] " Tomás Ortín Fernández via Guix-patches via
2020-10-22 14:55   ` Ludovic Courtès
2020-10-22 15:07     ` Tomás Ortín via Guix-patches
2020-10-26 10:44       ` Ludovic Courtès
2020-11-18 22:06         ` Ludovic Courtès

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git