summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2010-10-13 22:44:05 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2010-10-13 22:44:05 +0000
commitac9622814ad3cf376f67c8a0462b23709f662ebd (patch)
tree6ff80d1b402502ae0efac0e1d05cadefd4cf86a0 /games-puzzle
parentVersion bump (diff)
downloadgentoo-2-ac9622814ad3cf376f67c8a0462b23709f662ebd.tar.gz
gentoo-2-ac9622814ad3cf376f67c8a0462b23709f662ebd.tar.bz2
gentoo-2-ac9622814ad3cf376f67c8a0462b23709f662ebd.zip
tidy; add use deps; fix some compile warnings
(Portage version: 2.1.8.3/cvs/Linux i686)
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/trimines/ChangeLog6
-rw-r--r--games-puzzle/trimines/files/trimines-1.3.0-gentoo.patch101
-rw-r--r--games-puzzle/trimines/trimines-1.3.0.ebuild11
3 files changed, 111 insertions, 7 deletions
diff --git a/games-puzzle/trimines/ChangeLog b/games-puzzle/trimines/ChangeLog
index a9f07879d3de..ca83b6359476 100644
--- a/games-puzzle/trimines/ChangeLog
+++ b/games-puzzle/trimines/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-puzzle/trimines
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/trimines/ChangeLog,v 1.5 2010/10/05 12:39:32 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/trimines/ChangeLog,v 1.6 2010/10/13 22:44:05 mr_bones_ Exp $
+
+ 13 Oct 2010; Michael Sterrett <mr_bones_@gentoo.org>
+ trimines-1.3.0.ebuild, +files/trimines-1.3.0-gentoo.patch:
+ tidy; add use deps; fix some compile warnings
05 Oct 2010; Tupone Alfredo <tupone@gentoo.org> trimines-1.3.0.ebuild:
Respect LDFLAGS. Bug #337111 by flameeyes@gentoo.org
diff --git a/games-puzzle/trimines/files/trimines-1.3.0-gentoo.patch b/games-puzzle/trimines/files/trimines-1.3.0-gentoo.patch
new file mode 100644
index 000000000000..d7c01e6e0194
--- /dev/null
+++ b/games-puzzle/trimines/files/trimines-1.3.0-gentoo.patch
@@ -0,0 +1,101 @@
+diff -ruN trimines-1.3.0.orig/Makefile trimines-1.3.0/Makefile
+--- trimines-1.3.0.orig/Makefile 1969-12-31 19:00:00.000000000 -0500
++++ trimines-1.3.0/Makefile 2010-10-13 18:01:50.802198348 -0400
+@@ -0,0 +1,2 @@
++trimines:
++ $(CC) $(LDFLAGS) $(CFLAGS) src/main.c -o ./trimines `sdl-config --cflags` `sdl-config --libs`
+diff -ruN trimines-1.3.0.orig/src/boardinit.c trimines-1.3.0/src/boardinit.c
+--- trimines-1.3.0.orig/src/boardinit.c 2006-05-13 15:40:32.000000000 -0400
++++ trimines-1.3.0/src/boardinit.c 2010-10-13 18:00:58.238609895 -0400
+@@ -22,7 +22,7 @@
+
+ void genrandmines(int ex, int ey)
+ {
+-int rx,ry,count,z,i,j;
++int rx,ry,count,i,j;
+
+ // generate random mines + (ex,ey) will never be a mine
+
+diff -ruN trimines-1.3.0.orig/src/gfx.c trimines-1.3.0/src/gfx.c
+--- trimines-1.3.0.orig/src/gfx.c 2006-05-13 15:40:32.000000000 -0400
++++ trimines-1.3.0/src/gfx.c 2010-10-13 18:00:58.238609895 -0400
+@@ -218,7 +218,7 @@
+
+ void drawcounter(int n,int posx, int posy)
+ {
+-SDL_Surface *p1, *p2, *p3, *p4;
++SDL_Surface *p2, *p3, *p4;
+ int n1,n2,n3,num;
+
+
+diff -ruN trimines-1.3.0.orig/src/main.c trimines-1.3.0/src/main.c
+--- trimines-1.3.0.orig/src/main.c 2006-05-13 15:40:32.000000000 -0400
++++ trimines-1.3.0/src/main.c 2010-10-13 18:00:58.239609676 -0400
+@@ -131,14 +131,14 @@
+ int out;
+ int loadimgs = 1;
+
+-#include "boardinit.c"
+ #include "counters.c"
++#include "boardinit.c"
+ #include "gfx.c"
+ #include "gamestatus.c"
+ #include "uncover.c"
+ #include "menu.c"
+
+-main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+ if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
+ fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
+@@ -189,7 +189,7 @@
+ SDL_Event event;
+
+
+-int x,y,x2,y2,mx,my,i,j;
++int x,y,x2,y2,mx,my;
+
+ x2 = -1;
+
+@@ -228,6 +228,7 @@
+ break;
+ case SDLK_F1: if (firstclick == 0 && gamestatus == 0) {solve();}
+ break;
++ default:;
+ }
+
+ break; // end case SDL_KEYDOWN
+@@ -380,11 +381,13 @@
+ break; // end case SDL_MOUSEBUTTONDOWN
+
+ case SDL_QUIT: SDL_ShowCursor(SDL_ENABLE); main(0,0);
++ break;
+
++ default:;
+ } // end switch (event.type)
+
+ } }// end whiles
+
+ atexit(SDL_Quit);
+-
++ exit(0);
+ }
+diff -ruN trimines-1.3.0.orig/src/menu.c trimines-1.3.0/src/menu.c
+--- trimines-1.3.0.orig/src/menu.c 2006-05-13 15:40:32.000000000 -0400
++++ trimines-1.3.0/src/menu.c 2010-10-13 18:00:58.239609676 -0400
+@@ -104,6 +104,7 @@
+ if (mode == 6) {if (mines != 1){mines--;}
+ }}}
+ break;
++ default:;
+ }
+
+
+@@ -126,6 +127,7 @@
+ exit(0);
+ break;
+
++ default:;
+ }
+ }
+
diff --git a/games-puzzle/trimines/trimines-1.3.0.ebuild b/games-puzzle/trimines/trimines-1.3.0.ebuild
index 30a5aecad9f5..d3b5a0355969 100644
--- a/games-puzzle/trimines/trimines-1.3.0.ebuild
+++ b/games-puzzle/trimines/trimines-1.3.0.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/trimines/trimines-1.3.0.ebuild,v 1.4 2010/10/05 12:39:32 tupone Exp $
-EAPI="2"
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/trimines/trimines-1.3.0.ebuild,v 1.5 2010/10/13 22:44:05 mr_bones_ Exp $
-inherit eutils toolchain-funcs games
+EAPI=2
+inherit eutils games
DESCRIPTION="A mine sweeper game that uses triangles instead of squares"
HOMEPAGE="http://www.freewebs.com/trimines/"
@@ -14,14 +14,13 @@ SLOT="0"
KEYWORDS="~ppc x86"
IUSE=""
-RDEPEND="media-libs/libsdl"
-DEPEND="${RDEPEND}"
+DEPEND="media-libs/libsdl[video]"
src_prepare() {
sed -i \
-e "s:data/:${GAMES_DATADIR}/${PN}/:" src/gfx.c \
|| die "sed failed"
- echo "${PN}: ; $(tc-getCC) ${LDFLAGS} ${CFLAGS} src/main.c -o ./${PN} \`sdl-config --cflags\` \`sdl-config --libs\`" > Makefile
+ epatch "${FILESDIR}"/${P}-gentoo.patch
}
src_install() {