games-board/pouetchess: Port to EAPI 6

* Make patches -p1 compliant

Package-Manager: Portage-2.3.5, Repoman-2.3.2
This commit is contained in:
David Seifert
2017-03-25 13:45:09 +01:00
parent b6dce8e552
commit 2130d65f17
6 changed files with 91 additions and 16 deletions

View File

@@ -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"

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,5 +1,5 @@
--- SConstruct
+++ SConstruct
--- a/SConstruct
+++ b/SConstruct
@@ -22,14 +22,24 @@

View File

@@ -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++)

View File

@@ -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"
}