[Chinese-commits] [gmchess] 02/07: Import gmchess_0.29.6-2.1.debian.tar.xz
Boyuan Yang
073plan at gmail.com
Mon Aug 21 07:08:32 UTC 2017
This is an automated email from the git hooks/post-receive script.
hosiet-guest pushed a commit to branch master
in repository gmchess.
commit bd70e27b287f239f77e282faa1c9c8b6b2859fb0
Author: Adrian Bunk <bunk at debian.org>
Date: Sat Mar 4 23:39:45 2017 +0800
Import gmchess_0.29.6-2.1.debian.tar.xz
[dgit import tarball gmchess 0.29.6-2.1 gmchess_0.29.6-2.1.debian.tar.xz]
---
changelog | 147 ++++++++++
clean | 1 +
compat | 1 +
control | 79 +++++
convert-pgn.install | 2 +
copyright | 64 ++++
docs | 2 +
eleeye.install | 2 +
gmchess.install | 6 +
libeval0-dev.install | 2 +
libeval0.install | 1 +
menu | 7 +
patches/0001-fix-the-warning-from-cppcheck.patch | 353 +++++++++++++++++++++++
patches/0002-fix-potfiles-skip.patch | 9 +
patches/0003-fix-kfreebsd.patch | 38 +++
patches/series | 2 +
rules | 37 +++
source/format | 1 +
watch | 2 +
19 files changed, 756 insertions(+)
diff --git a/changelog b/changelog
new file mode 100644
index 0000000..91750b1
--- /dev/null
+++ b/changelog
@@ -0,0 +1,147 @@
+gmchess (0.29.6-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * autoreconf to fix FTBFS on arm64. (Closes: #727872)
+
+ -- Adrian Bunk <bunk at debian.org> Sat, 04 Mar 2017 17:39:45 +0200
+
+gmchess (0.29.6-2) unstable; urgency=low
+
+ * Fix build on kfreebsd-*
+
+ -- Aron Xu <aron at debian.org> Sun, 01 Jan 2012 23:49:28 +0800
+
+gmchess (0.29.6-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Aron Xu <aron at debian.org> Sun, 25 Dec 2011 21:10:37 +0800
+
+gmchess (0.29.4-1) unstable; urgency=low
+
+ * New upstream release.
+ * Move to Debian Chinese Team.
+
+ -- Aron Xu <aron at debian.org> Fri, 21 Oct 2011 23:32:08 +0800
+
+gmchess (0.29.3-5) unstable; urgency=low
+
+ * Fix FTBFS by modifying debian/rules (Closes: #638351).
+
+ -- Aron Xu <aron at debian.org> Fri, 19 Aug 2011 10:52:04 +0800
+
+gmchess (0.29.3-4) unstable; urgency=low
+
+ * Use my @debian.org address.
+ * Use dh compat 8.
+ * Enable -O3 by default, now build on ia64.
+ while LTO only success when gold is present, not enabling.
+ * Use new dh rules.tiny style.
+ * Add a patch to workaround FTBFS
+
+ -- Aron Xu <aron at debian.org> Fri, 19 Aug 2011 01:21:44 +0800
+
+gmchess (0.29.3-3) unstable; urgency=low
+
+ * debian/control:
+ - Remove useless ${shlibs:Depends}.
+ + Bump std-ver: 3.9.2.
+ * debian/libeval0-dev.install:
+ - Wipe out dependency_libs from .la files, per Policy 10.2
+ (Closes: #621278).
+ * debian/clean:
+ - Remove useless gmchess.desktop during clean.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Sat, 09 Apr 2011 14:42:01 +0800
+
+gmchess (0.29.3-2) unstable; urgency=low
+
+ * debian/control:
+ + Correct Conflicts and Provides for libeval0-dev.
+ * debian/clean:
+ + Add ./output to remove it.
+ * debian/patches:
+ - Remove debian-changes caused by the build-time ./output file.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Fri, 18 Feb 2011 22:00:00 +0800
+
+gmchess (0.29.3-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/patch/0001-fix-the-warning-from-cppcheck.patch:
+ - Upstream patch to fix warnings from cppcheck.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Fri, 03 Dec 2010 19:24:21 +0800
+
+gmchess (0.29.2-1) unstable; urgency=low
+
+ * New upstream release:
+ Search libeval0.so.0 instead of libeval0.so.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Mon, 04 Oct 2010 19:04:43 +0800
+
+gmchess (0.29.1-1) unstable; urgency=low
+
+ * New upstream release:
+ Add network game support.
+ * debian/control:
+ Bump std-ver to 3.9.1;
+ Remove duplicate section info from binaries: gmchess, eleeye.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Sun, 19 Sep 2010 18:34:12 +0800
+
+gmchess (0.20.6-1) unstable; urgency=low
+
+ * New upstream release.
+ * debian/control:
+ Change section of eleeye from comm to games,
+ Raise Standards-Version from 3.8.3 to 3.8.4.
+ * debian/source/format: using `3.0 (quilt)' format.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Tue, 06 Apr 2010 18:43:48 +0800
+
+gmchess (0.20.4-2) unstable; urgency=low
+
+ * Correct location of eleeye_engine and convert_png.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Mon, 14 Dec 2009 15:14:56 +0800
+
+gmchess (0.20.4-1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Tue, 08 Dec 2009 13:38:13 +0800
+
+gmchess (0.20.3-2) unstable; urgency=low
+
+ * Add src/engine/mips.h to debian/copyrigh
+ * Add "Replaces" section for convert-pgn, eleeye, libeval0
+ (closes: bug#550696).
+
+ -- Aron Xu <happyaron.xu at gmail.com> Mon, 12 Oct 2009 19:07:30 +0800
+
+gmchess (0.20.3-1) unstable; urgency=low
+
+ * New upstream release.
+ * Split gmchess into separate packages.
+ * Solve cross platform issue (closes: bug#544757).
+
+ -- Aron Xu <happyaron.xu at gmail.com> Fri, 9 Oct 2009 22:05:33 +0800
+
+gmchess (0.20.2-3) unstable; urgency=low
+
+ * Added menu items. (closes: bug#544510)
+
+ -- Aron Xu <happyaron.xu at gmail.com> Tue, 1 Sep 2009 21:50:25 +0800
+
+gmchess (0.20.2-2) unstable; urgency=low
+
+ * Fixed locale path.
+
+ -- Aron Xu <happyaron.xu at gmail.com> Sat, 22 Aug 2009 22:27:25 +0800
+
+gmchess (0.20.2-1) unstable; urgency=low
+
+ * Initial release (closes: bug#527040)
+
+ -- Aron Xu <happyaron.xu at gmail.com> Sat, 22 Aug 2009 21:40:25 +0800
diff --git a/clean b/clean
new file mode 100644
index 0000000..c72594f
--- /dev/null
+++ b/clean
@@ -0,0 +1 @@
+data/gmchess.desktop
diff --git a/compat b/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/compat
@@ -0,0 +1 @@
+8
diff --git a/control b/control
new file mode 100644
index 0000000..66d4ba9
--- /dev/null
+++ b/control
@@ -0,0 +1,79 @@
+Source: gmchess
+Section: games
+Priority: optional
+Maintainer: Debian Chinese Team <chinese-developers at lists.alioth.debian.org>
+Uploaders: Aron Xu <aron at debian.org>
+Build-Depends: debhelper (>= 9.20160403~), autotools-dev, intltool (>= 0.35.0), gettext, perl (>= 5.8.1), libxml2, libglademm-2.4-dev (>= 2.6.0), libtool, imagemagick
+Standards-Version: 3.9.2
+Homepage: http://code.google.com/p/gmchess/
+
+Package: gmchess
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, eleeye, convert-pgn
+Description: Chinese chess game (Xiangqi)
+ gmchess enables you to play Chinese chess (Xiangqi) against
+ a human opponent or the computer, read many chess manuals
+ and improve your skills.
+ .
+ Chinese chess (Xiangqi) is one of the most popular chess
+ games to have originated in China.
+
+Package: eleeye
+Architecture: any
+Replaces: gmchess (<< 0.20.3-2)
+Depends: ${shlibs:Depends}, ${misc:Depends}, libeval0
+Description: Chinese chess (Xiangqi) engine
+ elephant eye (eleeye) is a Chinese chess (Xiangqi) engine
+ providing a set of functions for developing Xiangqi games using
+ the Universal Chess Interface, which is an open communication
+ protocol that enables a chess program engine to communicate with
+ its user interface.
+ .
+ Chinese chess (Xiangqi) is one of the most popular chess
+ games to have originated in China.
+
+Package: convert-pgn
+Section: utils
+Architecture: any
+Replaces: gmchess (<< 0.20.3-2)
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: chess book format converter
+ Convert format of given chess book from one format to PGN,
+ the Portable Game Notation format.
+ .
+ PGN is an XML-like computer-processible format for recording
+ chess games (both the moves and related data).
+ .
+ Supported source chess book formats: ccm, che, chn, mxq, xqf
+
+
+Package: libeval0
+Section: libs
+Architecture: any
+Replaces: gmchess (<< 0.20.3-1)
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: support library for eleeye
+ elephant eye (eleeye) is a Chinese chess (Xiangqi) engine
+ providing a set of functions for developing Xiangqi games.
+ .
+ This package provide library that eleeye engine used to
+ keep algorithm's balance.
+ .
+ Chinese chess (Xiangqi) is one of the most popular chess
+ games to have originated in China.
+
+Package: libeval0-dev
+Section: libdevel
+Architecture: any
+Provides: libeval-dev
+Conflicts: libeval-dev
+Depends: ${misc:Depends}, libeval0 (= ${binary:Version})
+Description: support library for eleeye - development file
+ elephant eye (eleeye) is a Chinese chess (Xiangqi) engine
+ providing a set of functions for developing Xiangqi games.
+ .
+ This package provide development file for library that
+ eleeye engine used to keep algorithm's balance.
+ .
+ Chinese chess (Xiangqi) is one of the most popular chess
+ games to have originated in China.
diff --git a/convert-pgn.install b/convert-pgn.install
new file mode 100644
index 0000000..5758019
--- /dev/null
+++ b/convert-pgn.install
@@ -0,0 +1,2 @@
+usr/share/man/man6/convert_pgn*
+usr/games/convert_pgn usr/bin/
diff --git a/copyright b/copyright
new file mode 100644
index 0000000..c4f38e3
--- /dev/null
+++ b/copyright
@@ -0,0 +1,64 @@
+This package was debianized by Aron Xu <happyaron.xu at gmail.com> on
+Fri, 9 Oct 2009 22:11:04 +0800.
+
+It was downloaded from <http://gmchess.googlecode.com/files/gmchess-0.20.3.tar.bz2>
+
+Upstream Authors:
+
+ lerosua <lerosua at gmail.com>
+ xihes <xihes at gmail.com>
+
+Copyright:
+
+ Copyright (C) 2009 lerosua & xihes
+
+License:
+
+ This package 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 package 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 version 2 for more details.
+
+ You should have received a copy of the GNU General Public License
+ version 2 along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General Public License
+version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+
+The Debian packaging is copyright 2009, Aron Xu <happyaron.xu at gmail.com> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+-------------------------------------------------------------------------------
+
+Files: data/gmchess.png
+Copyright: 2009 TG <linuxertony at gmail.com>
+License: GPL-2+
+
+-------------------------------------------------------------------------------
+
+Files: data/p1.png,data/p2.png
+Copyright: 2009 李祥 <pengkelee at gmail.com>
+License: GPL-2+
+
+-------------------------------------------------------------------------------
+
+Files: data/book.dat, data/wood/*, data/sound/*, src/engine/*
+Copyright: 2008, 黄晨 <webmaster at elephantbase.net>
+License: LGPL
+ On Debian systems the full text of the GNU Lesser General Public
+ License can be found in the `/usr/share/common-licenses/LGPL'
+ file.
+-------------------------------------------------------------------------------
+
+Files: src/engine/mips.h
+Copyright: 2009 HjjHjj <hjjhjj at gmail.com>
+License: GPL-3+
+ On Debian systems the full text of the GNU General Public
+ License can be found in the `/usr/share/common-licenses/GPL-3'
+ file.
diff --git a/docs b/docs
new file mode 100644
index 0000000..50bd824
--- /dev/null
+++ b/docs
@@ -0,0 +1,2 @@
+NEWS
+README
diff --git a/eleeye.install b/eleeye.install
new file mode 100644
index 0000000..021646b
--- /dev/null
+++ b/eleeye.install
@@ -0,0 +1,2 @@
+usr/share/man/man6/eleeye_engine*
+usr/games/eleeye_engine
diff --git a/gmchess.install b/gmchess.install
new file mode 100644
index 0000000..2b43ee0
--- /dev/null
+++ b/gmchess.install
@@ -0,0 +1,6 @@
+usr/share/gmchess/*
+usr/share/locale/*
+usr/share/applications/*
+usr/share/man/man6/gmchess*
+usr/share/pixmaps/*
+usr/games/gmchess
diff --git a/libeval0-dev.install b/libeval0-dev.install
new file mode 100644
index 0000000..87ca0ec
--- /dev/null
+++ b/libeval0-dev.install
@@ -0,0 +1,2 @@
+usr/lib/libeval.so
+usr/lib/*.a
diff --git a/libeval0.install b/libeval0.install
new file mode 100644
index 0000000..01839d8
--- /dev/null
+++ b/libeval0.install
@@ -0,0 +1 @@
+usr/lib/libeval.so.0*
diff --git a/menu b/menu
new file mode 100644
index 0000000..45d679c
--- /dev/null
+++ b/menu
@@ -0,0 +1,7 @@
+?package(gmchess):needs="X11" \
+ section="Games/Simulation"\
+ title="gmchess" \
+ longtitle="Xiangqi game" \
+ icon32x32="/usr/share/pixmaps/gmchess-32.xpm" \
+ icon16x16="/usr/share/pixmaps/gmchess-16.xpm" \
+ command="/usr/games/gmchess"
diff --git a/patches/0001-fix-the-warning-from-cppcheck.patch b/patches/0001-fix-the-warning-from-cppcheck.patch
new file mode 100644
index 0000000..1acfa9c
--- /dev/null
+++ b/patches/0001-fix-the-warning-from-cppcheck.patch
@@ -0,0 +1,353 @@
+From 275949a8260aa2cadfcdb2920ca3a9671703ca51 Mon Sep 17 00:00:00 2001
+From: lerosua <lerosua at gmail.com>
+Date: Sat, 20 Nov 2010 19:06:09 +0800
+Subject: [PATCH] fix the warning from cppcheck
+
+---
+ src/Board.cc | 12 ++++++------
+ src/Engine.cc | 20 ++++++++++++++------
+ src/MainWindow.cc | 33 ++++++++++++++++-----------------
+ src/MainWindow.h | 5 ++---
+ src/engine/convert_pgn.cpp | 4 +++-
+ src/engine/x86asm.h | 10 +++++++---
+ src/main.cc | 7 +++----
+ src/robot.h | 8 ++++----
+ 8 files changed, 55 insertions(+), 44 deletions(-)
+--- a/src/Board.cc
++++ b/src/Board.cc
+@@ -732,8 +732,8 @@
+ int dst = m_engine.get_dst_xy(dst_x,dst_y,is_rev_board);
+ int src = m_engine.get_chessman_xy(selected_chessman);
+ int mv = m_engine.get_move(src,dst);
+- int eat = m_engine.get_move_eat(mv);
+- DLOG("Board:: src = %x dst = %x mv = %d eat = %d\n",src,dst,mv,eat);
++ //int eat = m_engine.get_move_eat(mv);
++ //DLOG("Board:: src = %x dst = %x mv = %d eat = %d\n",src,dst,mv,eat);
+ return try_move(mv);
+ }
+ int Board::try_move(int mv)
+@@ -1349,11 +1349,11 @@
+ int Board::init_send_socket()
+ {
+ int sockfd;
+- char buf[1024];
++ //char buf[1024];
+ struct sockaddr_in srvaddr;
+
+ EC_THROW(-1 == (sockfd=socket(AF_INET,SOCK_STREAM,0)));
+- bzero(&srvaddr,sizeof(srvaddr));
++ memset(&srvaddr,0,sizeof(srvaddr));
+ srvaddr.sin_family=AF_INET;
+ srvaddr.sin_port=htons(GMPORT+1);
+ srvaddr.sin_addr.s_addr=htonl(INADDR_ANY);
+@@ -1367,11 +1367,11 @@
+ {
+
+ int sockfd;
+- char buf[1024];
++ //char buf[1024];
+ struct sockaddr_in srvaddr;
+
+ EC_THROW(-1 == (sockfd=socket(AF_INET,SOCK_STREAM,0)));
+- bzero(&srvaddr,sizeof(srvaddr));
++ memset(&srvaddr,0,sizeof(srvaddr));
+ srvaddr.sin_family=AF_INET;
+ srvaddr.sin_port=htons(GMPORT+1);
+ srvaddr.sin_addr.s_addr=htonl(INADDR_ANY);
+--- a/src/Engine.cc
++++ b/src/Engine.cc
+@@ -22,6 +22,9 @@
+ Engine::Engine():black_player(0)
+ ,m_checked(0)
+ {
++ memset(chessboard, 0 , sizeof(chessboard));
++ memset(revchessboard, 0, sizeof(revchessboard));
++ memset(chessmans, 0, sizeof(chessmans));
+ clean_board();
+ }
+
+@@ -759,7 +762,7 @@
+ int min_t = src<dst?src:dst;
+ int num_t = abs(RANK_Y(src)-RANK_Y(dst))-1;
+ min_t +=16;
+- int paotai=0;
++ //int paotai=0;
+ if(!eated){
+ for(int i =0;i<num_t;i++){
+ if(chessboard[min_t]==0)
+@@ -770,6 +773,7 @@
+ return true;
+ }
+ else{
++ int paotai=0;
+ for(int i =0;i<num_t;i++){
+ if(chessboard[min_t]==0)
+ ;
+@@ -786,7 +790,6 @@
+ int min_t = src<dst?src:dst;
+ int num_t = abs(src-dst) -1 ;
+ min_t++;
+- int paotai=0;
+ if(!eated){
+ for(int i =0;i<num_t; i++){
+ if(chessboard[min_t]==0)
+@@ -797,6 +800,7 @@
+ return true;
+ }
+ else {
++ int paotai=0;
+ for(int i =0;i<num_t; i++){
+ if(chessboard[min_t]==0)
+ ;
+@@ -1650,7 +1654,11 @@
+ DLOG("hazi[0...3] = %c%c%c%c\n",c_hanzi.word[0],c_hanzi.word[1],c_hanzi.word[2],c_hanzi.word[3]);
+ /** cman_type 是棋子类型*/
+ int cman_type = fen_to_piece(c_hanzi.word[0]);
+- int src_x,src_y,dst_x,dst_y;
++ //int src_x,src_y,dst_x,dst_y;
++ int src_x = 0;
++ int src_y = 0;
++ int dst_x = 0;
++ int dst_y = 0;
+ int num =0;
+
+ DLOG("who is going black=%d\n",black_player);
+@@ -1935,7 +1943,7 @@
+ }
+ else if(4==cman_type||5==cman_type){
+ /** 车炮的目标坐标生成*/
+- int type_num;
++ int type_num=0;
+ if(cman_type==4)
+ type_num = 23;
+ else if(5==cman_type)
+@@ -2164,7 +2172,7 @@
+ }
+
+ if(c_hanzi.word[2] == '+'){
+- char c= c_hanzi.word[3];
++ //char c= c_hanzi.word[3];
+ dst_x = src_x;
+ if(!black_player)
+ dst_y = src_y + 1;
+@@ -2172,7 +2180,7 @@
+ dst_y = src_y - 1;
+ }
+ else if(c_hanzi.word[2] == '-'){
+- char c= c_hanzi.word[3];
++ //char c= c_hanzi.word[3];
+ dst_x = src_x;
+ if(!black_player)
+ dst_y = src_y - 1;
+--- a/src/MainWindow.cc
++++ b/src/MainWindow.cc
+@@ -884,7 +884,7 @@
+
+ }
+
+-void MainWindow::on_network_game(const std::string me_name,const std::string& enemy_name,bool role_red_)
++void MainWindow::on_network_game(const std::string& me_name,const std::string& enemy_name,bool role_red_)
+ {
+ p1_name->set_text(enemy_name);
+ p2_name->set_text(me_name);
+@@ -934,7 +934,7 @@
+ Gtk::MessageDialog dialog_info(*this, _("Information"), false);
+ Glib::ustring msg =_("You are play with network game,Please over it first!");
+ dialog_info.set_secondary_text(msg);
+- int result = dialog_info.run();
++ dialog_info.run();
+ return ;
+
+ }
+@@ -984,15 +984,15 @@
+ int result =dialog.run();
+ switch (result) {
+ case (Gtk::RESPONSE_OK): {
+- board->send_to_socket("resign");
+- Gtk::MessageDialog dialog_info(*this, _("Information"), false);
+- Glib::ustring msg =_("You lose the game!");
+- dialog_info.set_secondary_text(msg);
+- int result = dialog_info.run();
+- board->free_game();
+- set_status();
++ board->send_to_socket("resign");
++ Gtk::MessageDialog dialog_info(*this, _("Information"), false);
++ Glib::ustring msg =_("You lose the game!");
++ dialog_info.set_secondary_text(msg);
++ dialog_info.run();
++ board->free_game();
++ set_status();
+ break;
+- }
++ }
+
+ case (Gtk::RESPONSE_CANCEL): {
+ //board->free_game(false);
+@@ -1020,7 +1020,7 @@
+ Gtk::MessageDialog dialog(*this, _("Warning"), false);
+ Glib::ustring msg =_("Only ask rue game when you are going,so wait a minute!");
+ dialog.set_secondary_text(msg);
+- int result = dialog.run();
++ dialog.run();
+ }
+ }
+
+@@ -1040,7 +1040,7 @@
+ Gtk::MessageDialog dialog(*this, _("Warning"), false);
+ Glib::ustring msg =_("Only rue game when you are going,so wait a minute!");
+ dialog.set_secondary_text(msg);
+- int result = dialog.run();
++ dialog.run();
+ }
+
+ }
+@@ -1052,7 +1052,7 @@
+ Gtk::MessageDialog dialog(*this, _("Warning"), false);
+ Glib::ustring msg =_("Only rue game when you are going,so wait a minute!");
+ dialog.set_secondary_text(msg);
+- int result = dialog.run();
++ dialog.run();
+ }
+
+
+@@ -1091,7 +1091,7 @@
+ }
+ Gtk::MessageDialog dialog_info(*this, _("Game End"), false);
+ dialog_info.set_secondary_text(msg);
+- int result = dialog_info.run();
++ dialog_info.run();
+
+ if(board->is_network_game())
+ auto_save_chess_file();
+@@ -1120,8 +1120,7 @@
+ }
+ void MainWindow::start_with(const std::string& param)
+ {
+- size_t pos;
+- if((pos = param.find("network-game-red,"))!= std::string::npos){
++ if((param.find("network-game-red,"))!= std::string::npos){
+ //start network game with red player
+ std::string enemy_name,my_name;
+ size_t pos_s,pos_e,pos_m;
+@@ -1133,7 +1132,7 @@
+ my_name = param.substr(pos_e+9,pos_m-pos_e-9);
+
+ on_network_game(enemy_name,my_name,true);
+- }else if((pos = param.find("network-game-black,")) != std::string::npos){
++ }else if((param.find("network-game-black,")) != std::string::npos){
+ //start network game with black player
+ std::string enemy_name,my_name;
+ size_t pos_s,pos_e,pos_m;
+--- a/src/MainWindow.h
++++ b/src/MainWindow.h
+@@ -26,8 +26,6 @@
+ #include <gtkmm/liststore.h>
+ #include "Board.h"
+ #define main_ui DATA_DIR"/gmchess.glade"
+-//typedef Glib::RefPtr < Gnome::Glade::Xml > GlademmXML;
+-typedef Glib::RefPtr < Gtk::Builder> GBuilderXML;
+
+ class Board;
+ class BookView;
+@@ -54,7 +52,7 @@
+ * @param enemy_ 对方名字
+ * @param role_red_ 已方角色
+ */
+- void on_network_game(const std::string me_,const std::string& enemy_,bool role_red_=true);
++ void on_network_game(const std::string& me_,const std::string& enemy_,bool role_red_=true);
+ /** gmchess最开始运行带的参数解释函数*/
+ void start_with(const std::string& param);
+ /** 认输*/
+@@ -134,6 +132,7 @@
+ Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
+
+ private:
++ typedef Glib::RefPtr < Gtk::Builder> GBuilderXML;
+ Board* board;
+ GBuilderXML ui_xml;
+ Glib::RefPtr<Gtk::UIManager> ui_manager;
+--- a/src/engine/convert_pgn.cpp
++++ b/src/engine/convert_pgn.cpp
+@@ -633,8 +633,10 @@
+ if (infp == NULL) {
+ return _ERROR_OPEN;
+ }
+- if((outfp=fopen(szPgnFile,"wb"))==NULL)
++ if((outfp=fopen(szPgnFile,"wb"))==NULL) {
++ fclose(infp);
+ return _ERROR_OPEN;
++ }
+ while(!feof(infp)){
+ c=fgetc(infp);
+ fputc(c,outfp);
+--- a/src/engine/x86asm.h
++++ b/src/engine/x86asm.h
+@@ -133,7 +133,8 @@
+ #else
+
+ static __inline__ int Exchange(volatile int *Target, int Value) {
+- int eax, ebx;
++ int eax=0;
++ int ebx=0;
+ asm __volatile__ (
+ "xchgl %0, (%1)" "\n\t"
+ : "=a" (eax), "=b" (ebx)
+@@ -143,7 +144,9 @@
+ }
+
+ static __inline__ int CompareExchange(volatile int *Destination, int Exchange, int Comperand) {
+- int eax, ebx, edx;
++ int eax=0;
++ int ebx=0;
++ int edx=0;
+ asm __volatile__ (
+ "cmpxchgl %2, (%1)" "\n\t"
+ : "=a" (eax), "=b" (ebx), "=d" (edx)
+@@ -153,7 +156,8 @@
+ }
+
+ static __inline__ int ExchangeAdd(volatile int *Addend, int Increment) {
+- int eax, ebx;
++ int eax=0;
++ int ebx=0;
+ asm __volatile__ (
+ "xaddl %0, (%1)" "\n\t"
+ : "=a" (eax), "=b" (ebx)
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -30,13 +30,12 @@
+ //检测单一实例
+ int singleon(const std::string& url)
+ {
+- int sockfd,nbytes;
+- char buf[1024];
+- struct hostent *he;
++ int sockfd;
++ //struct hostent *he;
+ struct sockaddr_in srvaddr;
+
+ EC_THROW(-1 == (sockfd=socket(AF_INET,SOCK_STREAM,0)));
+- bzero(&srvaddr,sizeof(srvaddr));
++ memset(&srvaddr, 0, sizeof(srvaddr));
+ srvaddr.sin_family=AF_INET;
+ srvaddr.sin_port=htons(GMPORT);
+ srvaddr.sin_addr.s_addr=htonl(INADDR_ANY);
+--- a/src/robot.h
++++ b/src/robot.h
+@@ -39,12 +39,12 @@
+ ssize_t get_robot_log(char* buf, size_t count)
+ { return read(child_tem, buf, count); }
+
+- typedef sigc::signal<void> type_signal_stop;
+- type_signal_stop signal_stop()
++ typedef const sigc::signal<void> type_signal_stop;
++ type_signal_stop signal_stop() const
+ { return signal_stop_; }
+
+- typedef sigc::signal<void> type_signal_start;
+- type_signal_start signal_start()
++ typedef const sigc::signal<void> type_signal_start;
++ type_signal_start signal_start() const
+ { return signal_start_; }
+ protected:
+ int my_system(char* const argv[]);
diff --git a/patches/0002-fix-potfiles-skip.patch b/patches/0002-fix-potfiles-skip.patch
new file mode 100644
index 0000000..9d4d438
--- /dev/null
+++ b/patches/0002-fix-potfiles-skip.patch
@@ -0,0 +1,9 @@
+Index: gmchess-0.29.3/po/POTFILES.skip
+===================================================================
+--- gmchess-0.29.3.orig/po/POTFILES.skip 2009-09-07 12:08:47.000000000 +0000
++++ gmchess-0.29.3/po/POTFILES.skip 2011-08-18 17:55:11.398264018 +0000
+@@ -1,2 +1,4 @@
+ data/gmchess.desktop.in
+ src/BookView.cc
++data/confwin.glade
++.pc/0001-fix-the-warning-from-cppcheck.patch/src/MainWindow.cc
diff --git a/patches/0003-fix-kfreebsd.patch b/patches/0003-fix-kfreebsd.patch
new file mode 100644
index 0000000..6f2a1f5
--- /dev/null
+++ b/patches/0003-fix-kfreebsd.patch
@@ -0,0 +1,38 @@
+--- a/src/Sound.cc
++++ b/src/Sound.cc
+@@ -77,10 +77,12 @@
+ void CSound::play_file(const char* filename)
+ {
+ gchar* argv[3];
+-#ifdef __linux__
+- argv[0] = "aplay";
+-#elif __APPLE__
++//#ifdef __linux__
++// argv[0] = "aplay";
++#ifdef __APPLE__
+ argv[0] = "afplay";
++#else
++ argv[0] = "aplay";
+ #endif
+ argv[1] = (gchar*)filename;
+ argv[2] = NULL;
+--- a/src/engine/eleeye.cpp
++++ b/src/engine/eleeye.cpp
+@@ -32,13 +32,13 @@
+ #ifdef _WIN32
+ #include <windows.h>
+ const char *const cszLibEvalFile = "EVALUATE.DLL";
+-#elif __linux__
+- #include <dlfcn.h>
+- #define WINAPI
+- const char *const cszLibEvalFile = "../lib/libeval.so.0";
+ #elif __APPLE__
+ #include <dlfcn.h>
+ const char *const cszLibEvalFile = "/usr/local/lib/libeval.0.dylib";
++#else //for __linux__ and freebsd
++ #include <dlfcn.h>
++ #define WINAPI
++ const char *const cszLibEvalFile = "../lib/libeval.so.0";
+ #endif
+
+ const int INTERRUPT_COUNT = 4096; // 搜索若干结点后调用中断
diff --git a/patches/series b/patches/series
new file mode 100644
index 0000000..420556f
--- /dev/null
+++ b/patches/series
@@ -0,0 +1,2 @@
+0002-fix-potfiles-skip.patch
+0003-fix-kfreebsd.patch
diff --git a/rules b/rules
new file mode 100755
index 0000000..34b20c5
--- /dev/null
+++ b/rules
@@ -0,0 +1,37 @@
+#!/usr/bin/make -f
+
+CFLAGS = -g -O3
+CXXFLAGS = -g -O3
+LDFLAGS += -Wl,-z,defs -Wl,--as-needed -Wl,--no-undefined
+TMPDIR=debian/tmp
+
+%:
+ dh $@ --with autoreconf
+
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ --prefix=/usr \
+ --bindir=/usr/games \
+ --datarootdir=/usr/share \
+ CFLAGS="$(CFLAGS)" \
+ CXXFLAGS="$(CXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS)"
+override_dh_auto_install:
+ dh_auto_install
+ sed -i 's!^Categories=.*!Categories=GTK;Game;!' \
+ $(TMPDIR)/usr/share/applications/gmchess.desktop
+ sed -i 's!^Encoding=.*!!' \
+ $(TMPDIR)/usr/share/applications/gmchess.desktop
+ find debian/ -name '*.la' -delete
+ mkdir -p $(TMPDIR)/usr/share/pixmaps
+ for size in 16 24 32 48; do \
+ convert $(CURDIR)/data/gmchess.png -resize $${size} \
+ $(TMPDIR)/usr/share/pixmaps/gmchess-$${size}.xpm || exit 1; \
+ mkdir -p $(TMPDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps || exit 1; \
+ convert $(CURDIR)/data/gmchess.png -resize $${size} \
+ $(TMPDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/gmchess.png || exit 1; \
+ done
+ mv $(TMPDIR)/usr/share/pixmaps/gmchess-48.xpm $(TMPDIR)/usr/share/pixmaps/gmchess.xpm
+ rm -f $(TMPDIR)/usr/share/pixmaps/gmchess.png
+ rm -f $(TMPDIR)/usr/share/man/man6/*.6.6.gz
+ dh_install
diff --git a/source/format b/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/watch b/watch
new file mode 100644
index 0000000..f86abc2
--- /dev/null
+++ b/watch
@@ -0,0 +1,2 @@
+version=3
+http://code.google.com/p/gmchess/downloads/list .*/gmchess-*\.*(.*)\.tar\.bz2
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/gmchess.git
More information about the Chinese-commits
mailing list