* [gentoo-commits] repo/gentoo:master commit in: games-board/gmchess/files/, games-board/gmchess/
@ 2016-09-07 22:16 Austin English
0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2016-09-07 22:16 UTC (permalink / raw
To: gentoo-commits
commit: 98f4a9647c46af365e12962a5c235b632f9e928e
Author: Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 7 21:52:56 2016 +0000
Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Wed Sep 7 22:16:14 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98f4a964
games-board/gmchess: remove deprecated games eclass
Also update to EAPI 6
Gentoo-Bug: https://bugs.gentoo.org/574082
Package-Manager: portage-2.3.0
.../gmchess/files/gmchess-0.29.6-gentoo-r1.patch | 25 ++++++++++
games-board/gmchess/gmchess-0.29.6-r2.ebuild | 58 ++++++++++++++++++++++
2 files changed, 83 insertions(+)
diff --git a/games-board/gmchess/files/gmchess-0.29.6-gentoo-r1.patch b/games-board/gmchess/files/gmchess-0.29.6-gentoo-r1.patch
new file mode 100644
index 00000000..6ef9904
--- /dev/null
+++ b/games-board/gmchess/files/gmchess-0.29.6-gentoo-r1.patch
@@ -0,0 +1,25 @@
+diff -ru gmchess-0.29.6.orig/configure.in gmchess-0.29.6/configure.in
+--- gmchess-0.29.6.orig/configure.in 2011-11-28 07:22:56.000000000 -0500
++++ gmchess-0.29.6/configure.in 2013-05-13 21:30:38.103817044 -0400
+@@ -4,7 +4,7 @@
+ AC_PREREQ([2.63])
+ AC_INIT(gmchess, 0.29.6, lerosua@gmail.com)
+ AC_CONFIG_SRCDIR([src/Pgnfile.cc])
+-AM_CONFIG_HEADER([config.h])
++AC_CONFIG_HEADERS([config.h])
+ AM_INIT_AUTOMAKE(gmchess,0.29.6)
+
+
+diff -ru gmchess-0.29.6.orig/data/gmchess.desktop.in gmchess-0.29.6/data/gmchess.desktop.in
+--- gmchess-0.29.6.orig/data/gmchess.desktop.in 2009-09-07 08:08:47.000000000 -0400
++++ gmchess-0.29.6/data/gmchess.desktop.in 2013-05-13 21:30:19.444462390 -0400
+@@ -1,4 +1,3 @@
+-
+ [Desktop Entry]
+ Name=Chinese chess
+ Name[zh_CN]=天书棋谈
+@@ -10,4 +9,3 @@
+ Type=Application
+ Categories=GNOME;GTK;Game;BoardGame;
+ StartupNotify=true
+-Encoding=UTF-8
diff --git a/games-board/gmchess/gmchess-0.29.6-r2.ebuild b/games-board/gmchess/gmchess-0.29.6-r2.ebuild
new file mode 100644
index 00000000..f464f20
--- /dev/null
+++ b/games-board/gmchess/gmchess-0.29.6-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit autotools flag-o-matic libtool gnome2-utils
+
+DESCRIPTION="Chinese chess with gtkmm and c++"
+HOMEPAGE="https://code.google.com/p/gmchess/"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.bz2"
+RESTRICT="test"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-cpp/gtkmm:2.4"
+RDEPEND=${DEPEND}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo-r1.patch
+)
+
+src_prepare() {
+ default
+ mv configure.{in,ac}
+ eautoreconf
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+ econf \
+ --disable-static \
+ --localedir='/usr/share/locale'
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ itlocaledir='/usr/share/locale' \
+ pixmapsdir='/usr/share/pixmaps' \
+ desktopdir='/usr/share/applications' \
+ install
+ dodoc AUTHORS NEWS README
+ prune_libtool_files
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-board/gmchess/files/, games-board/gmchess/
@ 2021-02-13 13:24 James Le Cuirot
0 siblings, 0 replies; 2+ messages in thread
From: James Le Cuirot @ 2021-02-13 13:24 UTC (permalink / raw
To: gentoo-commits
commit: e7f141b7174e0fb1730d994e12f804da50c68103
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru>
AuthorDate: Tue Feb 9 19:40:51 2021 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Feb 13 13:23:47 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7f141b7
games-board/gmchess: fix build error and segfaults
The applied patch fixes build error issue and
some additional issues that cause segmentation fault on run
(for more detailes see the second issue description
in the list below).
Thanks to Samuel Bauer for proposed patch.
Closes: https://bugs.gentoo.org/651408
Closes: https://bugs.gentoo.org/700696
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/19390
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
.../files/gmchess-0.29.6_fix_build_segfault.patch | 102 +++++++++++++++++++++
games-board/gmchess/gmchess-0.29.6-r3.ebuild | 59 ++++++++++++
2 files changed, 161 insertions(+)
diff --git a/games-board/gmchess/files/gmchess-0.29.6_fix_build_segfault.patch b/games-board/gmchess/files/gmchess-0.29.6_fix_build_segfault.patch
new file mode 100644
index 00000000000..04b06551ace
--- /dev/null
+++ b/games-board/gmchess/files/gmchess-0.29.6_fix_build_segfault.patch
@@ -0,0 +1,102 @@
+diff --git a/src/Board.cc b/src/Board.cc
+index 4395a5c..11c4f31 100644
+--- gmchess-0.29.6-r3/src/Board.cc
++++ gmchess-0.29.6-r3/src/Board.cc
+@@ -297,12 +297,13 @@ void Board::on_map()
+
+ bool Board::on_configure_event(GdkEventConfigure* ev)
+ {
+- //if(ui_pixmap)
+- // return true;
+ ui_pixmap = Gdk::Pixmap::create(this->get_window(),get_width(),get_height());
+
+- redraw();
+-
++ if(ui_pixmap) {
++ redraw();
++ return true;
++ }
++ return false;
+ }
+ bool Board::on_expose_event(GdkEventExpose* ev)
+ {
+@@ -1146,7 +1147,7 @@ bool Board::robot_log(const Glib::IOCondition& condition)
+
+ if (buf_len > 0) {
+ *p = 0;
+- printf(buf);
++ printf("%s",buf);
+ std::string str_buf(buf);
+ parent.show_textview_engine_log(str_buf);
+
+diff --git a/src/ConfWindow.cc b/src/ConfWindow.cc
+index 1ff03c8..4aa61f2 100644
+--- gmchess-0.29.6-r3/src/ConfWindow.cc
++++ gmchess-0.29.6-r3/src/ConfWindow.cc
+@@ -117,7 +117,7 @@ void ConfWindow::on_button_color_set()
+ bool ConfWindow::on_delete_event(GdkEventAny*)
+ {
+ on_button_cancel();
+-
++ return(true);
+ }
+ void ConfWindow::write_to_GMConf()
+ {
+diff --git a/src/Engine.cc b/src/Engine.cc
+index d316c0e..050b01c 100644
+--- gmchess-0.29.6-r3/src/Engine.cc
++++ gmchess-0.29.6-r3/src/Engine.cc
+@@ -509,7 +509,7 @@ bool Engine::mate()
+ case RED_KNIGHT:
+ case BLACK_KNIGHT:
+ for(int k=0;k<8;k++){
+- dst=src+ KingMoveTab[k];
++ dst=src+ KnightMoveTab[k];
+ if(in_board(dst)){
+ int mv = get_move(src,dst);
+ if(make_move(mv)){
+@@ -2098,7 +2098,7 @@ uint32_t Engine::hanzi_to_iccs(uint32_t f_hanzi)
+ n++;
+ }
+ }
+- DLOG(" n=%d\n");
++ DLOG(" n=%d\n", n);
+ /** 为纵线上的棋子排序*/
+ for(int k=start;k<n-1;k++)
+ for(int j=n-2;j>=k;j--){
+diff --git a/src/MainWindow.cc b/src/MainWindow.cc
+index 528680e..cbd5ff1 100644
+--- gmchess-0.29.6-r3/src/MainWindow.cc
++++ gmchess-0.29.6-r3/src/MainWindow.cc
+@@ -1176,6 +1176,7 @@ bool MainWindow::on_end_game(OVERSTATUS _over)
+ auto_save_chess_file();
+ board->free_game(false);
+ set_status();
++ return(true);
+ }
+
+ void MainWindow::set_red_war_time(const Glib::ustring& f_time,const Glib::ustring& c_time)
+diff --git a/src/Sound.cc b/src/Sound.cc
+index 517d126..5efd736 100644
+--- gmchess-0.29.6-r3/src/Sound.cc
++++ gmchess-0.29.6-r3/src/Sound.cc
+@@ -78,7 +78,7 @@ void CSound::play_file(const char* filename)
+ {
+ gchar* argv[3];
+ #ifdef __linux__
+- argv[0] = "aplay";
++ argv[0] = (gchar *)"aplay";
+ #elif __APPLE__
+ argv[0] = "afplay";
+ #endif
+--- gmchess-0.29.6/src/engine/cchess.cpp
++++ gmchess-0.29.6/src/engine/cchess.cpp
+@@ -690,7 +690,7 @@
+ }
+ lpSrc ++;
+ };
+- while(lpSrc != '\0' && lpDst < lpDstLimit) {
++ while(lpSrc != NULL && lpDst < lpDstLimit) {
+ *lpDst = *lpSrc;
+ lpSrc ++;
+ lpDst ++;
diff --git a/games-board/gmchess/gmchess-0.29.6-r3.ebuild b/games-board/gmchess/gmchess-0.29.6-r3.ebuild
new file mode 100644
index 00000000000..67efbf955c4
--- /dev/null
+++ b/games-board/gmchess/gmchess-0.29.6-r3.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools flag-o-matic libtool gnome2-utils
+
+DESCRIPTION="Chinese chess with gtkmm and c++"
+HOMEPAGE="https://github.com/lerosua/gmchess"
+SRC_URI="https://${PN}.googlecode.com/files/${P}.tar.bz2"
+RESTRICT="test"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-cpp/gtkmm:2.4"
+RDEPEND=${DEPEND}
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo-r1.patch
+ "${FILESDIR}"/${P}_fix_build_segfault.patch
+)
+
+src_prepare() {
+ default
+ mv configure.{in,ac}
+ eautoreconf
+}
+
+src_configure() {
+ append-cxxflags -std=c++11
+ econf \
+ --disable-static \
+ --localedir='/usr/share/locale'
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ itlocaledir='/usr/share/locale' \
+ pixmapsdir='/usr/share/pixmaps' \
+ desktopdir='/usr/share/applications' \
+ install
+ dodoc AUTHORS NEWS README
+ find "${ED}" -name "*.la" -delete || die
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-13 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-07 22:16 [gentoo-commits] repo/gentoo:master commit in: games-board/gmchess/files/, games-board/gmchess/ Austin English
-- strict thread matches above, loose matches on Subject: below --
2021-02-13 13:24 James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox