summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Heaven <nyhm@gentoo.org>2010-04-03 18:03:45 +0000
committerTristan Heaven <nyhm@gentoo.org>2010-04-03 18:03:45 +0000
commit1a829f53ca0b904ef85ee8345c37d662df8c0d96 (patch)
tree6f558dc3a928a2cb9224c53d23801d690b1d9885 /games-puzzle/mirrormagic
parentmedia-libs/mesa: bump libdrm dependency (diff)
downloadgentoo-2-1a829f53ca0b904ef85ee8345c37d662df8c0d96.tar.gz
gentoo-2-1a829f53ca0b904ef85ee8345c37d662df8c0d96.tar.bz2
gentoo-2-1a829f53ca0b904ef85ee8345c37d662df8c0d96.zip
Patch from Debian to fix crash on amd64, bug #196500; install menu entry
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'games-puzzle/mirrormagic')
-rw-r--r--games-puzzle/mirrormagic/ChangeLog11
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch43
-rw-r--r--games-puzzle/mirrormagic/files/mirrormagic.xpm292
-rw-r--r--games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild55
4 files changed, 399 insertions, 2 deletions
diff --git a/games-puzzle/mirrormagic/ChangeLog b/games-puzzle/mirrormagic/ChangeLog
index ded0498f86e7..9420b5fcfd6a 100644
--- a/games-puzzle/mirrormagic/ChangeLog
+++ b/games-puzzle/mirrormagic/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-puzzle/mirrormagic
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/mirrormagic/ChangeLog,v 1.12 2008/12/05 17:32:44 nyhm Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/mirrormagic/ChangeLog,v 1.13 2010/04/03 18:03:45 nyhm Exp $
+
+*mirrormagic-2.0.2-r1 (03 Apr 2010)
+
+ 03 Apr 2010; Tristan Heaven <nyhm@gentoo.org>
+ +mirrormagic-2.0.2-r1.ebuild, +files/mirrormagic-2.0.2-64bit.patch,
+ +files/mirrormagic.xpm:
+ Patch from Debian to fix crash on amd64, bug #196500; install menu entry
05 Dec 2008; Tristan Heaven <nyhm@gentoo.org> mirrormagic-2.0.2.ebuild:
Respect CC and LDFLAGS, bug #244100
diff --git a/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch
new file mode 100644
index 000000000000..e9b313423699
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic-2.0.2-64bit.patch
@@ -0,0 +1,43 @@
+From Debian:
+
+In src/libgame/gadgets.c, check for 64bit when handling
+GDI_TYPE,GDI_STATE in HandleGadgetTags() and use int instead of
+unsigned long. Should probably really be uint32_t but I'll leave
+that decision to upstream. Thanks Pelle Nilsson (and son).
+64bit check borrowed from bug #496863. Closes: #498912.
+
+--- src/libgame/gadgets.c
++++ src/libgame/gadgets.c
+@@ -18,6 +18,12 @@
+ #include "text.h"
+ #include "misc.h"
+
++/* check for 64bit */
++#ifdef _LP64
++#ifndef L64
++#define L64 1
++#endif
++#endif
+
+ /* values for DrawGadget() */
+ #define DG_UNPRESSED 0
+@@ -301,11 +307,19 @@
+ break;
+
+ case GDI_TYPE:
++#ifdef L64
++ gi->type = va_arg(ap, int);
++#else
+ gi->type = va_arg(ap, unsigned long);
++#endif
+ break;
+
+ case GDI_STATE:
++#ifdef L64
++ gi->state = va_arg(ap, int);
++#else
+ gi->state = va_arg(ap, unsigned long);
++#endif
+ break;
+
+ case GDI_CHECKED:
diff --git a/games-puzzle/mirrormagic/files/mirrormagic.xpm b/games-puzzle/mirrormagic/files/mirrormagic.xpm
new file mode 100644
index 000000000000..4e98696d3ef1
--- /dev/null
+++ b/games-puzzle/mirrormagic/files/mirrormagic.xpm
@@ -0,0 +1,292 @@
+/* XPM */
+static char * mirrormagic_xpm[] = {
+"32 32 257 2",
+" c None",
+". c #000000",
+"+ c #999999",
+"@ c #77AAFF",
+"# c #4C2208",
+"$ c #6E4C08",
+"% c #7F7F7F",
+"& c #AACCFF",
+"* c #777777",
+"= c #BB6622",
+"- c #0000CC",
+"; c #994411",
+"> c #00FF00",
+", c #EECC11",
+"' c #5D5D5D",
+") c #447F44",
+"! c #555555",
+"~ c #0000AA",
+"{ c #3B3B3B",
+"] c #009900",
+"^ c #990000",
+"/ c #007F00",
+"( c #005500",
+"_ c #CCCCCC",
+": c #CC0000",
+"< c #7F0000",
+"[ c #19447F",
+"} c #AAAAAA",
+"| c #FF0000",
+"1 c #331900",
+"2 c #888888",
+"3 c #000055",
+"4 c #663300",
+"5 c #6E6E6E",
+"6 c #666666",
+"7 c #DD9911",
+"8 c #5D3311",
+"9 c #00337F",
+"0 c #FFFFFF",
+"a c #00CC00",
+"b c #4C4C4C",
+"c c #FFFF00",
+"d c #444444",
+"e c #00AA00",
+"f c #7F7F00",
+"g c #DDDDDD",
+"h c #0066FF",
+"i c #006600",
+"j c #004C00",
+"k c #776608",
+"l c #3388FF",
+"m c #BBBBBB",
+"n c #0000FF",
+"o c #000000",
+"p c #000000",
+"q c #000000",
+"r c #000000",
+"s c #000000",
+"t c #000000",
+"u c #000000",
+"v c #000000",
+"w c #000000",
+"x c #000000",
+"y c #000000",
+"z c #000000",
+"A c #000000",
+"B c #000000",
+"C c #000000",
+"D c #000000",
+"E c #000000",
+"F c #000000",
+"G c #000000",
+"H c #000000",
+"I c #000000",
+"J c #000000",
+"K c #000000",
+"L c #000000",
+"M c #000000",
+"N c #000000",
+"O c #000000",
+"P c #000000",
+"Q c #000000",
+"R c #000000",
+"S c #000000",
+"T c #000000",
+"U c #000000",
+"V c #000000",
+"W c #000000",
+"X c #000000",
+"Y c #000000",
+"Z c #000000",
+"` c #000000",
+" . c #000000",
+".. c #000000",
+"+. c #000000",
+"@. c #000000",
+"#. c #000000",
+"$. c #000000",
+"%. c #000000",
+"&. c #000000",
+"*. c #000000",
+"=. c #000000",
+"-. c #000000",
+";. c #000000",
+">. c #000000",
+",. c #000000",
+"'. c #000000",
+"). c #000000",
+"!. c #000000",
+"~. c #000000",
+"{. c #000000",
+"]. c #000000",
+"^. c #000000",
+"/. c #000000",
+"(. c #000000",
+"_. c #000000",
+":. c #000000",
+"<. c #000000",
+"[. c #000000",
+"}. c #000000",
+"|. c #000000",
+"1. c #000000",
+"2. c #000000",
+"3. c #000000",
+"4. c #000000",
+"5. c #000000",
+"6. c #000000",
+"7. c #000000",
+"8. c #000000",
+"9. c #000000",
+"0. c #000000",
+"a. c #000000",
+"b. c #000000",
+"c. c #000000",
+"d. c #000000",
+"e. c #000000",
+"f. c #000000",
+"g. c #000000",
+"h. c #000000",
+"i. c #000000",
+"j. c #000000",
+"k. c #000000",
+"l. c #000000",
+"m. c #000000",
+"n. c #000000",
+"o. c #000000",
+"p. c #000000",
+"q. c #000000",
+"r. c #000000",
+"s. c #000000",
+"t. c #000000",
+"u. c #000000",
+"v. c #000000",
+"w. c #000000",
+"x. c #000000",
+"y. c #000000",
+"z. c #000000",
+"A. c #000000",
+"B. c #000000",
+"C. c #000000",
+"D. c #000000",
+"E. c #000000",
+"F. c #000000",
+"G. c #000000",
+"H. c #000000",
+"I. c #000000",
+"J. c #000000",
+"K. c #000000",
+"L. c #000000",
+"M. c #000000",
+"N. c #000000",
+"O. c #000000",
+"P. c #000000",
+"Q. c #000000",
+"R. c #000000",
+"S. c #000000",
+"T. c #000000",
+"U. c #000000",
+"V. c #000000",
+"W. c #000000",
+"X. c #000000",
+"Y. c #000000",
+"Z. c #000000",
+"`. c #000000",
+" + c #000000",
+".+ c #000000",
+"++ c #000000",
+"@+ c #000000",
+"#+ c #000000",
+"$+ c #000000",
+"%+ c #000000",
+"&+ c #000000",
+"*+ c #000000",
+"=+ c #000000",
+"-+ c #000000",
+";+ c #000000",
+">+ c #000000",
+",+ c #000000",
+"'+ c #000000",
+")+ c #000000",
+"!+ c #000000",
+"~+ c #000000",
+"{+ c #000000",
+"]+ c #000000",
+"^+ c #000000",
+"/+ c #000000",
+"(+ c #000000",
+"_+ c #000000",
+":+ c #000000",
+"<+ c #000000",
+"[+ c #000000",
+"}+ c #000000",
+"|+ c #000000",
+"1+ c #000000",
+"2+ c #000000",
+"3+ c #000000",
+"4+ c #000000",
+"5+ c #000000",
+"6+ c #000000",
+"7+ c #000000",
+"8+ c #000000",
+"9+ c #000000",
+"0+ c #000000",
+"a+ c #000000",
+"b+ c #000000",
+"c+ c #000000",
+"d+ c #000000",
+"e+ c #000000",
+"f+ c #000000",
+"g+ c #000000",
+"h+ c #000000",
+"i+ c #000000",
+"j+ c #000000",
+"k+ c #000000",
+"l+ c #000000",
+"m+ c #000000",
+"n+ c #000000",
+"o+ c #000000",
+"p+ c #000000",
+"q+ c #000000",
+"r+ c #000000",
+"s+ c #000000",
+"t+ c #000000",
+"u+ c #000000",
+"v+ c #000000",
+"w+ c #000000",
+"x+ c #000000",
+"y+ c #000000",
+"z+ c #000000",
+"A+ c #000000",
+"B+ c #000000",
+"C+ c #000000",
+"D+ c #000000",
+"E+ c #000000",
+"F+ c #000000",
+"G+ c #000000",
+"H+ c #000000",
+" ",
+" - n n l h h : n - ~ ",
+" n - - l l h n n n n - ",
+" , 7 l l h h n : n n n n ~ ~ 7 , ",
+" c 7 = h l h h n n n n n - - ~ = 7 c ",
+" c , 7 , 7 ~ h h h n n n - - ~ ~ ~ 7 , 7 , c ",
+" , , 7 7 = ~ h h n n - - ~ ~ ~ ~ ~ = 7 7 , , ",
+" , 7 = - ~ l _ } b 4 4 b b b ~ ~ - = 7 , ",
+" ~ ~ 4 4 4 ~ m g 1 1 = = 1 1 d d h ~ 4 4 ~ ~ ",
+" ~ ~ ~ ~ 4 4 4 l g g 7 7 , 7 ; ; d { @ h 4 4 4 ~ ~ ~ ",
+" ~ ~ ~ ~ h h l l 0 g 7 7 , 7 ; ; d { @ @ h n 4 ~ ~ ~ n ",
+" @ @ @ @ @ @ l l 0 g } 7 , , ; d d { @ l h h n n n - - ",
+" @ @ | @ @ l 0 2 0 g } = = d d d { @ l h n n n n - - ",
+" @ @ & & @ @ l g + _ 2 2 6 6 ! @ @ l h n ^ n - - ",
+" @ & & @ @ l l } 2 _ _ 2 2 @ @ h h n n n n - - ",
+" @ @ @ | l l + _ _ } _ l @ h h h n n n - - ",
+" @ @ @ @ l l + _ _ _ } _ @ h h n n n n - - ",
+" @ @ @ l l h } _ _ } } h h h n n n - - ",
+" @ @ @ l l h h _ _ } } } h n ^ n - - - ",
+" @ n h h h h } _ _ } 2 2 n n - - - ",
+" @ n n h h h } _ _ _ 2 ~ n n ~ - - ",
+" n n n n | h ~ } } } ~ ~ - ~ ~ ~ - ",
+" h n n n h h h - ~ } } } - - ^ ~ ~ - ",
+" h n n h h h n - n - - * * ~ ~ ~ - ",
+" h n h h h h n - n - - - - ~ ~ ~ - - ",
+" h l h h h l h h n n : - - - ~ ~ ~ ~ ^ - ",
+" h @ h | l l h n n n - - - ~ ~ ~ ~ ~ ~ - ",
+" n l @ l l l l h n n - ~ - - ~ ~ ~ ^ ~ ~ ~ - ",
+" n l @ l l l h n n - - ~ ~ - ~ ~ ~ ~ ~ ~ ~ - ",
+" n | h h h = ; ; 4 ~ - ~ ~ ~ - = ; ; 4 ~ ~ ~ ^ - ",
+" n - h h = = ; ; 4 4 ~ ~ ~ ~ = = ; ; 4 4 ~ ~ ~ - ",
+" "};
diff --git a/games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild b/games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..eb6992134522
--- /dev/null
+++ b/games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/mirrormagic/mirrormagic-2.0.2-r1.ebuild,v 1.1 2010/04/03 18:03:45 nyhm Exp $
+
+EAPI=2
+inherit eutils toolchain-funcs games
+
+DESCRIPTION="a game like Deflektor (C 64) or Mindbender (Amiga)"
+HOMEPAGE="http://www.artsoft.org/mirrormagic/"
+SRC_URI="http://www.artsoft.org/RELEASES/unix/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="sdl"
+
+RDEPEND="!sdl? ( x11-libs/libX11 )
+ sdl? (
+ media-libs/libsdl[video]
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+ )"
+DEPEND="${RDEPEND}
+ !sdl? ( x11-libs/libXt )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc41.patch \
+ "${FILESDIR}"/${P}-64bit.patch
+ rm -f ${PN}
+}
+
+src_compile() {
+ emake \
+ -C src \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ RANLIB="$(tc-getRANLIB)" \
+ OPTIONS="${CFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ RO_GAME_DIR="${GAMES_DATADIR}"/${PN} \
+ RW_GAME_DIR="${GAMES_STATEDIR}"/${PN} \
+ TARGET=$(use sdl && echo sdl || echo x11) \
+ || die "emake failed"
+}
+
+src_install() {
+ dogamesbin ${PN} || die "dogamesbin failed"
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r graphics levels music sounds || die "doins failed"
+ doicon "${FILESDIR}"/${PN}.xpm
+ make_desktop_entry ${PN} "Mirror Magic II"
+ dodoc CHANGES CREDITS README TODO
+ prepgamesdirs
+}