* [gentoo-commits] repo/gentoo:master commit in: games-board/pouetchess/files/, games-board/pouetchess/
@ 2017-03-25 12:48 David Seifert
0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2017-03-25 12:48 UTC (permalink / raw
To: gentoo-commits
commit: 2130d65f17d712f5b0e3adfa3f2e380a9a10bb9b
Author: David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 25 12:45:09 2017 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Mar 25 12:48:05 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2130d65f
games-board/pouetchess: Port to EAPI 6
* Make patches -p1 compliant
Package-Manager: Portage-2.3.5, Repoman-2.3.2
.../pouetchess-0.2.0-fix-sdl-version-list.patch | 11 ++++
.../pouetchess/files/pouetchess-0.2.0-gcc43.patch | 4 +-
.../files/pouetchess-0.2.0-nvidia_glext.patch | 4 +-
.../pouetchess-0.2.0-sconstruct-sandbox.patch | 4 +-
.../files/pouetchess-0.2.0-segfaults.patch | 20 +++----
games-board/pouetchess/pouetchess-0.2.0-r2.ebuild | 64 ++++++++++++++++++++++
6 files changed, 91 insertions(+), 16 deletions(-)
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-fix-sdl-version-list.patch b/games-board/pouetchess/files/pouetchess-0.2.0-fix-sdl-version-list.patch
new file mode 100644
index 00000000000..06b9aff2c2d
--- /dev/null
+++ b/games-board/pouetchess/files/pouetchess-0.2.0-fix-sdl-version-list.patch
@@ -0,0 +1,11 @@
+--- a/pouetChess.py
++++ b/pouetChess.py
+@@ -228,7 +228,7 @@
+ sdlver = sdlobj.read()
+ sdlerr = sdlobj.close()
+ print sdlver,
+- if sdlver.split('.') >= ['1','2','8']:
++ if sdlver.split('.') >= [1,2,8]:
+ env.ParseConfig(sdlcfg+" --cflags --libs")
+ else:
+ print "You need LibSDL version 1.2.8 or greater for this program"
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-gcc43.patch b/games-board/pouetchess/files/pouetchess-0.2.0-gcc43.patch
index 0a60c2117da..ef2ba157582 100644
--- a/games-board/pouetchess/files/pouetchess-0.2.0-gcc43.patch
+++ b/games-board/pouetchess/files/pouetchess-0.2.0-gcc43.patch
@@ -1,5 +1,5 @@
---- src/sxmlgui/XMLUtils.h.orig 2008-06-14 14:50:16.000000000 +0000
-+++ src/sxmlgui/XMLUtils.h 2008-06-14 14:50:33.000000000 +0000
+--- a/src/sxmlgui/XMLUtils.h.orig 2008-06-14 14:50:16.000000000 +0000
++++ b/src/sxmlgui/XMLUtils.h 2008-06-14 14:50:33.000000000 +0000
@@ -38,6 +38,8 @@
#include <stdio.h>
#include <assert.h>
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-nvidia_glext.patch b/games-board/pouetchess/files/pouetchess-0.2.0-nvidia_glext.patch
index 952f6dc85ad..b7077feb6a3 100644
--- a/games-board/pouetchess/files/pouetchess-0.2.0-nvidia_glext.patch
+++ b/games-board/pouetchess/files/pouetchess-0.2.0-nvidia_glext.patch
@@ -1,5 +1,5 @@
---- src/sxmlgui/GenUtils.h 2006-05-27 03:22:57.000000000 +0200
-+++ src/sxmlgui/GenUtils.h.new 2006-06-12 20:35:32.000000000 +0200
+--- a/src/sxmlgui/GenUtils.h 2006-05-27 03:22:57.000000000 +0200
++++ b/src/sxmlgui/GenUtils.h.new 2006-06-12 20:35:32.000000000 +0200
@@ -5,6 +5,9 @@
#include <iostream>
#include <fstream>
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-sconstruct-sandbox.patch b/games-board/pouetchess/files/pouetchess-0.2.0-sconstruct-sandbox.patch
index cea3a5a451a..5d4cf9c00b4 100644
--- a/games-board/pouetchess/files/pouetchess-0.2.0-sconstruct-sandbox.patch
+++ b/games-board/pouetchess/files/pouetchess-0.2.0-sconstruct-sandbox.patch
@@ -1,5 +1,5 @@
---- SConstruct
-+++ SConstruct
+--- a/SConstruct
++++ b/SConstruct
@@ -22,14 +22,24 @@
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-segfaults.patch b/games-board/pouetchess/files/pouetchess-0.2.0-segfaults.patch
index 58780e1b275..346ee1248ab 100644
--- a/games-board/pouetchess/files/pouetchess-0.2.0-segfaults.patch
+++ b/games-board/pouetchess/files/pouetchess-0.2.0-segfaults.patch
@@ -1,5 +1,5 @@
---- src/faile/search.c
-+++ src/faile/search.c
+--- a/src/faile/search.c
++++ b/src/faile/search.c
@@ -805,6 +805,7 @@
for (j = 0; j < indent; j++) {
fputc (' ', output);
@@ -8,8 +8,8 @@
print_move (&moves[0], i, output);
fprintf (output, "\n");
---- src/faile/utils.c
-+++ src/faile/utils.c
+--- a/src/faile/utils.c
++++ b/src/faile/utils.c
@@ -125,7 +125,7 @@
rank (target) < 1 || rank (target) > 8 ||
file (target) < 1 || file (target) > 8)
@@ -19,8 +19,8 @@
return;
}
---- src/main.cpp
-+++ src/main.cpp
+--- a/src/main.cpp
++++ b/src/main.cpp
@@ -184,6 +184,9 @@
// first scene is SCENE_INIT.
pGlobalInfos->SetCurrentScene(GAME_SCENE_INIT);
@@ -31,8 +31,8 @@
// main game loop
while( pGlobalInfos->IsGameRunning() )
{
---- src/scene_main_game.cpp
-+++ src/scene_main_game.cpp
+--- a/src/scene_main_game.cpp
++++ b/src/scene_main_game.cpp
@@ -245,7 +245,7 @@
if (pGlobalInfos->OnLeftMouseButtonDown())
@@ -42,8 +42,8 @@
{
// if a piece was already selected, this means the player want to move this piece
if (SquareXSelected>-1 && SquareZSelected>-1)
---- src/graphic_chessboard.cpp.old 2011-03-23 08:08:40.000000000 +0100
-+++ src/graphic_chessboard.cpp 2011-03-23 08:33:04.000000000 +0100
+--- a/src/graphic_chessboard.cpp
++++ b/src/graphic_chessboard.cpp
@@ -122,8 +122,8 @@
for(int i=0;i<6;i++)
diff --git a/games-board/pouetchess/pouetchess-0.2.0-r2.ebuild b/games-board/pouetchess/pouetchess-0.2.0-r2.ebuild
new file mode 100644
index 00000000000..6786484105d
--- /dev/null
+++ b/games-board/pouetchess/pouetchess-0.2.0-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils scons-utils toolchain-funcs
+
+MY_PN=${PN/c/C}
+
+DESCRIPTION="3D and open source chess game"
+HOMEPAGE="http://pouetchess.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_src_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug"
+
+DEPEND="
+ media-libs/libsdl:0[opengl,video]
+ media-libs/sdl-image[jpeg,png]
+ virtual/glu
+ virtual/opengl"
+RDEPEND=${DEPEND}
+
+S=${WORKDIR}/${PN}_src_${PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-sconstruct-sandbox.patch
+ "${FILESDIR}"/${P}-nvidia_glext.patch
+ "${FILESDIR}"/${P}-segfaults.patch
+ "${FILESDIR}"/${P}-gcc43.patch
+ "${FILESDIR}"/${P}-gcc6-cmath.patch
+ # Fix for LibSDL >= 1.2.10 detection
+ "${FILESDIR}"/${P}-fix-sdl-version-list.patch
+)
+
+src_configure() {
+ tc-export CC CXX
+
+ # turn off the hackish optimization setting code (bug #230127)
+ scons configure \
+ strip=false \
+ optimize=false \
+ prefix="${EPREFIX}"/usr \
+ datadir="${EPREFIX}"/usr/share/${PN} \
+ $(use debug && echo debug=1) || die
+}
+
+src_compile() {
+ escons
+}
+
+src_install() {
+ dobin bin/${MY_PN}
+
+ insinto /usr/share/${PN}
+ doins -r data/.
+
+ einstalldocs
+
+ doicon data/icons/${MY_PN}.png
+ make_desktop_entry ${MY_PN} ${MY_PN} ${MY_PN} "KDE;Qt;Game;BoardGame"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: games-board/pouetchess/files/, games-board/pouetchess/
@ 2017-03-25 12:48 David Seifert
0 siblings, 0 replies; 2+ messages in thread
From: David Seifert @ 2017-03-25 12:48 UTC (permalink / raw
To: gentoo-commits
commit: b6dce8e5520aeb34b66435133d9e5488bae1492f
Author: Peter-Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Tue Mar 21 22:08:42 2017 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Mar 25 12:47:59 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6dce8e5
games-board/pouetchess: Fix building with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=613428
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4278
.../pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch | 16 ++++++++++++++++
games-board/pouetchess/pouetchess-0.2.0-r1.ebuild | 5 +++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch b/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch
new file mode 100644
index 00000000000..4853eee81e1
--- /dev/null
+++ b/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch
@@ -0,0 +1,16 @@
+--- pouetchess_src_0.2.0/src/sxmlgui/MathUtils.h.old 2006-05-26 21:22:57.000000000 -0400
++++ pouetchess_src_0.2.0/src/sxmlgui/MathUtils.h 2017-03-21 18:01:15.569181229 -0400
+@@ -27,10 +27,13 @@
+ return (x < min) ? min : (x > max) ? max : x;
+ }
+
++// Not used anywhere and conflicts with C++11 std::round(float)
++#if __cplusplus < 201103L
+ inline int round(float f)
+ {
+ return int(f + 0.5f);
+ }
++#endif
+
+ inline float getNextRandom(){
+ return (float)rand()/(RAND_MAX + 1);
diff --git a/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild b/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild
index fd5a950149b..5858f138eaf 100644
--- a/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild
+++ b/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -27,7 +27,8 @@ src_prepare() {
"${FILESDIR}/${P}-sconstruct-sandbox.patch" \
"${FILESDIR}/${P}-nvidia_glext.patch" \
"${FILESDIR}/${P}-segfaults.patch" \
- "${FILESDIR}/${P}-gcc43.patch"
+ "${FILESDIR}/${P}-gcc43.patch" \
+ "${FILESDIR}/${P}-gcc6-cmath.patch"
# Fix for LibSDL >= 1.2.10 detection
sed -i \
-e "s:sdlver.split('.') >= \['1','2','8'\]:sdlver.split('.') >= [1,2,8]:" \
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-25 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-25 12:48 [gentoo-commits] repo/gentoo:master commit in: games-board/pouetchess/files/, games-board/pouetchess/ David Seifert
-- strict thread matches above, loose matches on Subject: below --
2017-03-25 12:48 David Seifert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox