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

Reply via email to