gnuchess (5.07-7) debian-dir only changes

Summary

 debian/README.Debian                            |   24 ++
 debian/changelog                                |  233 ++++++++++++++++++++++++
 debian/compat                                   |    1 
 debian/control                                  |   19 +
 debian/copyright                                |   39 ++++
 debian/docs                                     |    3 
 debian/gnuchess.6                               |   28 ++
 debian/gnuchessx.6                              |   21 ++
 debian/menu                                     |    2 
 debian/patches/00_compile_fixes.diff            |  126 ++++++++++++
 debian/patches/01_ftbfs_getline_conflicts.patch |   43 ++++
 debian/patches/series                           |    2 
 debian/rules                                    |   65 ++++++
 debian/watch                                    |    2 
 14 files changed, 608 insertions(+)

    
download this patch

Patch contents

--- gnuchess-5.07.orig/debian/docs
+++ gnuchess-5.07/debian/docs
@@ -0,0 +1,3 @@
+NEWS
+README
+TODO
--- gnuchess-5.07.orig/debian/changelog
+++ gnuchess-5.07/debian/changelog
@@ -0,0 +1,233 @@
+gnuchess (5.07-7) unstable; urgency=low
+
+  * Fix getline FTBFS. Closes: #552906, #559909.
+
+ -- Bradley Smith <bradsmith@debian.org>  Mon, 07 Dec 2009 19:00:35 +0000
+
+gnuchess (5.07-6) unstable; urgency=low
+
+  * Move readline dependency to libreadline-dev.
+  * Update Standards-Version to 3.8.3.
+
+ -- Bradley Smith <bradsmith@debian.org>  Sun, 27 Sep 2009 14:17:57 +0100
+
+gnuchess (5.07-5) unstable; urgency=low
+
+  * debian/control:
+    - New maintainer. Closes: #503524
+    - Update compat to 7 and upgrade debhelper Build-Depends.
+    - Add Homepage field.
+    - Add Vcs-* fields.
+    - Update Standards-Version to 3.8.0. (No changes).
+  * Convert copyright to machine readable format.
+  * Tidy up debian/rules
+  * Add watch file.
+  * Add quilt patch system:
+    - 00_compile_fixes.diff - move changes out of top srcdir.
+
+ -- Bradley Smith <bradsmith@debian.org>  Sun, 26 Oct 2008 21:21:56 +0000
+
+gnuchess (5.07-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fixed bashism in debian/rules. (closes: #477581)
+
+ -- Peter Eisentraut <petere@debian.org>  Mon, 26 May 2008 03:11:28 +0200
+
+gnuchess (5.07-4) unstable; urgency=low
+
+  * Updated libreadline-dev build dependency to resolve build
+    failure. Thanks to Matthias Klose for the patch, and thanks
+    to Florian Ernst for the gentle nudge. (closes: #326354) 
+  * Updated to standards version 3.6.2.1.
+  * Updated the FSF address in debian/copyright.
+
+ -- Lukas Geyer <lukas@debian.org>  Tue, 29 Nov 2005 15:27:47 -0700
+
+gnuchess (5.07-3) unstable; urgency=low
+
+  * Removed superfluous declaration of input_thread in src/common.h.
+    Thanks to Andreas Jochens for the patch. (closes: #297582)
+
+ -- Lukas Geyer <lukas@debian.org>  Fri,  4 Mar 2005 14:59:12 -0500
+
+gnuchess (5.07-2) unstable; urgency=low
+
+  * Fixed sprintf() undefined behavior in src/pgn.c. Thanks to
+    Ben Winslow for the patch. (closes: #228197)
+
+ -- Lukas Geyer <lukas@debian.org>  Sat, 17 Jan 2004 09:50:29 -0500
+
+gnuchess (5.07-1) unstable; urgency=low
+
+  * New upstream version.
+  * Update to standards version 3.6.1
+  * Improve wording in gnuchessx manpage.
+  * Do not write logfiles by default.
+  * Update debian/copyright, strip of some unnecessary stuff and
+    include all upstream authors.
+
+ -- Lukas Geyer <lukas@debian.org>  Sun,  5 Oct 2003 02:52:48 -0400
+
+gnuchess (5.06-1) unstable; urgency=low
+
+  * New upstream version. (closes: #184935)
+
+ -- Lukas Geyer <lukas@debian.org>  Sat, 15 Mar 2003 16:30:36 -0500
+
+gnuchess (5.04-4) unstable; urgency=low
+
+  * src/book.c: fixed segfault when using gnuchess without book
+    in xboard or eboard. (closes: #170652)
+
+ -- Lukas Geyer <lukas@debian.org>  Mon, 25 Nov 2002 20:58:56 -0500
+
+gnuchess (5.04-3) unstable; urgency=low
+
+  * New maintainer
+  * Updated to standards version 3.5.7.
+  * Updated debian/rules to use debhelper.
+  * Removed build-dependency on autoconf, added build dependency on
+    autotools-dev for config.{sub,guess}.
+  * Added Recommends: gnuchess-book and actually fixed the book
+    code. (closes: #144705)
+  * Incorporated changes from NMU for 5.04-2.1, except the change to
+    debian/rules which has been completely rewritten and the change to
+    debian/README.Debian
+  * Added instructions on opening book creation to debian/README.Debian,
+    and a recommendation to install gnuchess-book. (closes: #144703)
+  * Updated debian/copyright.
+  * Re-added rudimentary manpage for gnuchess(6) and menu entry from the NMU
+    of Andreas Tille for 5.03-0.1.
+  * Provide gnuchessx as a separate script, added a note on startup that
+    it is obsolete.
+  * Added manpage for gnuchessx(6).
+  
+ -- Lukas Geyer <lukas@debian.org>  Thu, 17 Oct 2002 21:31:48 -0400
+
+gnuchess (5.04-2.1) unstable; urgency=high
+
+  * NMU
+  * Fixed buffer overflows in src/pgn.c and src/epd.c. 
+    (closes: #162701, #163757)  
+  * Reverted broken "fix" to gnuchessx. (closes: #145366)
+  * Give build options to configure, not make in debian/rules.
+    (closes: #145505)
+  * Added build dependencies on libreadline4-dev and
+    libncurses5-dev. (closes: #144656)
+  * Corrected instructions in README.Debian about opening book.
+
+ -- Lukas Geyer <lukas@debian.org>  Tue,  8 Oct 2002 13:48:22 -0400
+
+gnuchess (5.04-2) unstable; urgency=low
+
+  * Update changelog with NMU entries.
+
+ -- Martin Mitchell <martin@debian.org>  Fri, 26 Apr 2002 00:51:26 +1000
+
+gnuchess (5.04-1) unstable; urgency=low
+
+  * New upstream release. (closes: #95339, #129653, #128306, #130807, #138829)
+    Also (closes: #122091)
+  * Remove book from package, following upstream.
+  * Rename source package back to gnuchess, following upstream.
+  * Update to standards version 3.5.6.
+  * Implement symlinks to doc directory. (closes: #102449)
+  * Also suggest eboard. (closes: #103044)
+  * Change gnuchessx script to new syntax. (closes: #105792)
+  
+ -- Martin Mitchell <martin@debian.org>  Wed, 24 Apr 2002 23:57:31 +1000
+
+chess (5.03-0.2) unstable; urgency=low
+
+  * fixes permissions of /usr/games/gnuchessx
+    closes: #138829
+
+ -- Andreas Tille <tille@debian.org>  Mon, 18 Mar 2002 08:02:01 +0100
+
+chess (5.03-0.1) unstable; urgency=low
+
+  * NMU
+  * New upstream version which
+    closes: #119475
+    closes: #130807
+  * Standards: 3.5.6
+  * Switched to debhelper to
+    closes: #102449
+    (Sorry, I do not know how to close this long standing RC bug
+     in the currently used packaging system.  So I had to switch.)
+  * Build-Depends: debhelper
+  * PORTERS PLEASE CHECK!
+    If I understand the NEWS file correct we could go with only
+    one compiled book for all architectures.  I did not implement
+    this but I really hope that somebody would check this to save
+    space of our archive.
+    Perhaps the book should be packaged in a separate source/binary
+    package because it is also in a separate upstream source.
+  * Provide gnuchessx as separate script instead of creating it in debian/rules
+  * Wrote manpage. Not really much - just a hint to the doc/README file which
+    claims to be the manual. This is copied to /usr/share/doc/gnuchess/MANUAL.
+  * Wrote manpage for gnuchessx which explains, why not call this script
+    manually
+    closes: #105792
+  * Added menu entry.
+  * Used `make distclean` do clean up before build
+    closes: #128306
+  * Suggests: eboard
+    closes: #103044
+
+ -- Andreas Tille <tille@debian.org>  Sat, 16 Mar 2002 08:56:32 +0100
+  
+chess (5.02-1) unstable; urgency=low
+
+  * New upstream release.
+  * Update to standards version 3.5.2.
+  * Add gnuchessx script. (closes: #66198, #74490, #93094, #66086)
+
+ -- Martin Mitchell <martin@debian.org>  Tue, 10 Apr 2001 02:04:30 +1000
+
+chess (5.00-2) unstable; urgency=low
+
+  * Apply endianness patch to src/util.c. (closes: #67613)
+
+ -- Martin Mitchell <martin@debian.org>  Sat, 12 Aug 2000 20:07:48 +1000
+
+chess (5.00-1) frozen unstable; urgency=low
+
+  * New upstream bugfix release. (closes: #57945)
+  * Update to standards version 3.1.1.
+  * Update copyright information.
+  * Source name changed.
+  * Remove gnuchess-book package.
+
+ -- Martin Mitchell <martin@debian.org>  Wed, 22 Mar 2000 23:10:15 +1100
+
+gnuchess (4.0.pl79-1) unstable; urgency=low
+
+  * New upstream release.
+  * Update copyright file.
+  * Update to standards version 2.4.1.
+
+ -- Martin Mitchell <martin@debian.org>  Mon, 12 Oct 1998 20:01:07 +1000
+
+gnuchess (4.0.pl77-5) frozen unstable; urgency=low
+
+  * Correct changelog names.
+
+ -- Martin Mitchell <martin@debian.org>  Wed, 15 Apr 1998 01:53:06 +1000
+
+gnuchess (4.0.pl77-4) unstable; urgency=low
+
+  * Install copyright for gnuchess-book. (#19319)
+  * Make generate script executable. (#16993)
+
+ -- Martin Mitchell <martin@debian.org>  Thu, 12 Mar 1998 23:44:20 +1100
+
+gnuchess (4.0.pl77-3) unstable; urgency=low
+
+  * New maintainer.
+  * Libc6 compile.
+  * Pristine source used.
+  * Updated from pre 2.0.0.0 package (#9473,#9474)
+
+ -- Martin Mitchell <martin@debian.org>  Thu,  6 Nov 1997 00:45:59 +1100
--- gnuchess-5.07.orig/debian/README.Debian
+++ gnuchess-5.07/debian/README.Debian
@@ -0,0 +1,24 @@
+Notes on the Debian package of gnuchess
+---------------------------------------
+
+gnuchess no longer comes packaged with an opening book, due to build time
+and size considerations. It is strongly recommended that you install the
+gnuchess-book package to have a good working opening book for gnuchess.
+
+If you insist on creating your own opening book, find a PGN file with grand-
+master games, move it into a directory where you have write permissions,
+start gnuchess from that directory, type 'book add <filename>', wait some
+time (depends on the size of the PGN), and if it is finished, type 'quit'.
+You should now have a file 'book.dat' in your current directory, which is
+used as an opening book if you start gnuchess in that directory. If you want
+a system-wide opening book, copy it to
+
+  /usr/share/games/gnuchess/book.dat
+
+and enjoy. (There are some caveats in this whole procedure, because the
+gnuchess PGN parser is not overly smart, so it might choke on complicated
+PGN. Furthermore it checks the names of the players against a hard-coded
+list of names, mostly grandmasters. If it does not match, the opening is not
+added to the opening book.)
+
+Lukas Geyer
--- gnuchess-5.07.orig/debian/menu
+++ gnuchess-5.07/debian/menu
@@ -0,0 +1,2 @@
+?package(gnuchess):needs="text" section="Games/Board" \
+	hints="Chess" title="GnuChess" command="/usr/games/gnuchess"
--- gnuchess-5.07.orig/debian/rules
+++ gnuchess-5.07/debian/rules
@@ -0,0 +1,65 @@
+#! /usr/bin/make -f
+
+include /usr/share/quilt/quilt.make
+
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+CFLAGS = -g -Wall
+LDFLAGS = -Wl,--as-needed
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+  CFLAGS += -O0
+else
+  CFLAGS += -O2
+endif
+
+configure: patch configure-stamp
+configure-stamp:
+	dh_testdir
+	ln -s /usr/share/misc/config.guess /usr/share/misc/config.sub .
+	CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \
+		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+		--prefix=/usr --bindir=\$${prefix}/games
+	touch $@
+
+build: build-stamp
+build-stamp: configure
+	dh_testdir
+	$(MAKE)
+	touch $@
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -f src/GCint.h config.guess config.sub src/lexpgn.c
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/gnuchess/
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installmenu
+	dh_installman debian/gnuchess.6 debian/gnuchessx.6
+	dh_installchangelogs ChangeLog
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
--- gnuchess-5.07.orig/debian/copyright
+++ gnuchess-5.07/debian/copyright
@@ -0,0 +1,39 @@
+Download: ftp://ftp.gnu.org/pub/gnu/chess
+Authors:
+ Chua Kong Sian
+ Stuart Cracraft
+ Lukas Geyer
+ Simon Waters
+ David A. Wheeler
+
+Files: *
+Copyright:
+ (C) 1985-1996 Stuart Cracraft, John Stanback, Daryl Baker, Conor McCarthy,
+ Mike McGann, Chua Kong Sian
+ (C) 1985-1996 Free Software Foundation, Inc.
+ (C) 1999-2002 Free Software Foundation, Inc.
+License: GPL-2+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; version 2 dated June, 1991.
+ .
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ more details.
+
+Files: debian/*
+Copyright: (C) 2008 Bradley Smith <brad@brad-smith.co.uk>
+License: GPL-2+.
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option)
+ any later version.
+ .
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ more details.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
--- gnuchess-5.07.orig/debian/control
+++ gnuchess-5.07/debian/control
@@ -0,0 +1,19 @@
+Source: gnuchess
+Section: games
+Priority: optional
+Maintainer: Bradley Smith <bradsmith@debian.org>
+Build-Depends: debhelper (>= 7), libreadline-dev, libncurses5-dev, flex, autotools-dev, quilt
+Standards-Version: 3.8.3
+Homepage: http://www.gnu.org/software/chess/
+Vcs-Git: http://git.brad-smith.co.uk/git/debian/pkg-gnuchess.git
+Vcs-Browser: http://git.brad-smith.co.uk/?p=debian/pkg-gnuchess.git
+
+Package: gnuchess
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: gnuchess-book
+Suggests: xboard | eboard
+Description: Plays a game of chess, either against the user or against itself
+ Gnuchess is an updated version of the GNU chess playing program.  It has a
+ simple alpha-numeric board display, and is also compatible with frontends
+ like xboard and eboard.
--- gnuchess-5.07.orig/debian/gnuchess.6
+++ gnuchess-5.07/debian/gnuchess.6
@@ -0,0 +1,28 @@
+.TH GNUCHESS 6 "March 2002" "Debian Project" "Debian GNU/Linux"
+.SH NAME
+gnuchess  \- Plays a game of chess, either against the user or against itself.
+.SH SYNOPSIS
+.B gnuchess
+
+.SH DESCRIPTION
+On Debian GNU/Linux systems you can find the documentation under
+.I /usr/share/doc/gnuchess/MANUAL.gz
+which was originally named doc/README in the upstream source.
+Usually you will want to use gnuchess through a chess interface
+such as xboard, eboard or gnome-chess.
+
+.SH SEE ALSO
+xboard(6)
+
+.SH AUTHORS
+.B gnuchess
+was written by
+Chua Kong Sian,
+Stuart Cracraft <cracraft@ai.mit.edu>,
+Lukas Geyer <lukas@debian.org>,
+Simon Waters <simon@wretched.demon.co.uk>
+and perhaps some others which might be named at
+.I http://savannah.gnu.org/projects/chess/.
+.PP
+This manual page was created by Andreas Tille <tille@debian.org>
+for the Debian GNU/Linux system (but may be used by others).
--- gnuchess-5.07.orig/debian/compat
+++ gnuchess-5.07/debian/compat
@@ -0,0 +1 @@
+7
--- gnuchess-5.07.orig/debian/watch
+++ gnuchess-5.07/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://ftp.gnu.org/gnu/chess/gnuchess-([\d.]+)\.tar\.gz
--- gnuchess-5.07.orig/debian/gnuchessx.6
+++ gnuchess-5.07/debian/gnuchessx.6
@@ -0,0 +1,21 @@
+.TH GNUCHESSX 6 "October 2002" "Debian Project" "Debian GNU/Linux"
+.SH NAME
+gnuchessx \- Plays a game of chess, either against the user or against itself.
+.SH SYNOPSIS
+.B gnuchessx
+
+.SH DESCRIPTION
+This command is obsolete and does nothing but calling "gnuchess xboard".
+Documentation about the GNU Chess program is contained in the manual
+page of gnuchess and in 
+.I /usr/share/doc/gnuchess/MANUAL.gz.
+If you
+just want to play gnuchess with a graphical interface, install and
+start xboard.
+
+.SH SEE ALSO
+gnuchess(6), xboard(6)
+
+.SH AUTHORS
+This manual page was created by Lukas Geyer <lukas@debian.org>
+for the Debian GNU/Linux system (but may be used by others).
--- gnuchess-5.07.orig/debian/patches/series
+++ gnuchess-5.07/debian/patches/series
@@ -0,0 +1,2 @@
+01_ftbfs_getline_conflicts.patch
+00_compile_fixes.diff
--- gnuchess-5.07.orig/debian/patches/00_compile_fixes.diff
+++ gnuchess-5.07/debian/patches/00_compile_fixes.diff
@@ -0,0 +1,126 @@
+diff --git a/src/cmd.c b/src/cmd.c
+index bfddbce..39bb169 100644
+--- a/src/cmd.c
++++ b/src/cmd.c
+@@ -332,6 +332,7 @@ void cmd_movenow(void) {}
+  * dir. Again, how does one handle paths portably across Unix/Windows?
+  *   -- Lukas 
+  */
++#ifdef DEBUG
+ void cmd_name(void)
+ {
+   int suffix = 0;
+@@ -358,6 +359,12 @@ void cmd_name(void)
+   fprintf(stderr, "Could not create logfile, all slots occupied.\n");
+   fprintf(stderr, "You may consider deleting or renaming your existing logfiles.\n");
+ }
++#else /* !DEBUG */
++void cmd_name(void)
++{
++   ofp = stdout;
++}
++#endif /* DEBUG */
+ 
+ void cmd_new(void)
+ {
+diff --git a/src/common.h b/src/common.h
+index 18ed6e2..e24cdaf 100644
+--- a/src/common.h
++++ b/src/common.h
+@@ -716,7 +716,6 @@ void DBTest (void);
+ 
+ /* Input thread and thread function */
+ #include <pthread.h>
+-extern pthread_t input_thread;
+ void *input_func(void *);
+ 
+ /*
+diff --git a/src/epd.c b/src/epd.c
+index 755c4d5..da908e9 100644
+--- a/src/epd.c
++++ b/src/epd.c
+@@ -321,7 +321,7 @@ void SaveEPD (char *p)
+    int r, c, sq, k;
+    char c1;
+ 
+-   sscanf (p, "%s ", file);
++   sscanf (p, "%31s ", file);
+    fp = fopen (file, "a");
+    for (r = A8; r >= A1; r -= 8)
+    {
+diff --git a/src/gnuchessx b/src/gnuchessx
+index 17dfadc..67c49c0 100755
+--- a/src/gnuchessx
++++ b/src/gnuchessx
+@@ -8,5 +8,6 @@
+ # bug in some old Unix-like systems; see the GNU autoconf documentation
+ # for the rationale.
+ 
++echo "gnuchessx is obsolete, please read the manpage for details." >&2
+ gnuchess xboard ${1+"$@"}
+ 
+diff --git a/src/lexpgn.l b/src/lexpgn.l
+index fe5ccf0..25a72f4 100644
+--- a/src/lexpgn.l
++++ b/src/lexpgn.l
+@@ -178,7 +178,7 @@ NONSPACE	[^ \t\n\r\f]
+ <tagsymbol>blackELO		{ctag = BLACK_ELO_TAG; BEGIN(tagsep);}
+ <tagsymbol>[a-z0-9_]+		{
+ 	ctag = OTHER_TAG;
+-	if (yyleng >= (sizeof(tagname)-1)) {
++	if ((size_t)yyleng >= (sizeof(tagname)-1)) {
+ 		printf("Error, tagname too long: %s", yytext);
+ 		return 1;
+ 	}
+@@ -313,6 +313,7 @@ NONSPACE	[^ \t\n\r\f]
+ 				append_str(&pgn_othertags, "\"]\n");
+ 			}
+ 			break;
++		case NO_TAG: /* Nothing */ ;
+ 	}
+ 	}
+ 
+diff --git a/src/pgn.c b/src/pgn.c
+index 7bd90e4..cfddbae 100644
+--- a/src/pgn.c
++++ b/src/pgn.c
+@@ -39,6 +39,7 @@
+ #define NULL2EMPTY(x) ( (x) ? (x) : "")
+ 
+ extern FILE *yyin;
++extern int yylex(void);
+ 
+ void PGNSaveToFile (const char *file, const char *resultstr)
+ /****************************************************************************
+@@ -49,7 +50,7 @@ void PGNSaveToFile (const char *file, const char *resultstr)
+  ****************************************************************************/
+ {
+    FILE *fp;
+-   char s[100];
++   char s[100], s2[100];
+    int len;
+    char *p;
+    int i;
+@@ -126,9 +127,11 @@ void PGNSaveToFile (const char *file, const char *resultstr)
+    for (i = 0; i <= GameCnt; i++)
+    {
+       if (! (i % 2)) {
+-        sprintf (s, "%s%d. ", s, i/2 + 1);
++        sprintf (s2, "%d. ", i/2 + 1);
++        strcat (s, s2);
+       }
+-      sprintf (s, "%s%s ", s, Game[i].SANmv);
++      strcat (s, Game[i].SANmv);
++      strcat (s, " ");
+       if (strlen (s) > 80)
+       {
+          p = s + 79;
+@@ -300,7 +303,7 @@ static const char *const trusted_players[] = {
+ int IsTrustedPlayer(const char *name)
+ /* Return 1 if name in trusted_players list, else 0 */
+ {
+-	int i;
++	size_t i;
+ 	for (i = 0; i < (sizeof(trusted_players) / sizeof(*trusted_players));
+ 	    	i++) {
+ 		if (strstr(name, trusted_players[i]) != NULL)
--- gnuchess-5.07.orig/debian/patches/01_ftbfs_getline_conflicts.patch
+++ gnuchess-5.07/debian/patches/01_ftbfs_getline_conflicts.patch
@@ -0,0 +1,43 @@
+Index: gnuchess-5.07/src/input.c
+===================================================================
+--- gnuchess-5.07.orig/src/input.c	2009-09-29 16:01:38.000000000 +0200
++++ gnuchess-5.07/src/input.c	2009-09-29 16:02:57.000000000 +0200
+@@ -127,7 +127,7 @@
+ 	      (RealGameCnt+1)/2 + 1 );
+     }
+     pthread_mutex_lock(&input_mutex);
+-    getline(prompt);
++    get_line(prompt);
+     input_status = INPUT_AVAILABLE;
+     pthread_cond_signal(&input_cond);
+     pthread_mutex_unlock(&input_mutex);
+@@ -173,13 +173,13 @@
+ {
+ #ifdef HAVE_LIBREADLINE
+   if (isatty(STDIN_FILENO)) {
+-    getline = getline_readline;
++    get_line = getline_readline;
+     using_history();
+   } else {
+-    getline = getline_standard;
++    get_line = getline_standard;
+   }
+ #else
+-  getline = getline_standard;
++  get_line = getline_standard;
+ #endif
+   /* Start input thread */
+   pthread_create(&input_thread, NULL, input_func, NULL);
+Index: gnuchess-5.07/src/common.h
+===================================================================
+--- gnuchess-5.07.orig/src/common.h	2009-09-29 16:06:17.000000000 +0200
++++ gnuchess-5.07/src/common.h	2009-09-29 16:06:40.000000000 +0200
+@@ -745,7 +745,7 @@
+  * Input routine, initialized to one of the specific
+  * input routines. The given argument is the prompt.
+  */
+-void (*getline) (char *);
++void (*get_line) (char *);
+ 
+ #define MAXSTR 128
+ extern char inputstr[MAXSTR];