summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <drac@gentoo.org>2007-11-02 21:23:53 +0000
committerSamuli Suominen <drac@gentoo.org>2007-11-02 21:23:53 +0000
commit46917dbb2771a4f8abea2bf35e85ba1cab2f72b8 (patch)
tree0d250832b198500344c1f54e9f79605adeb41623 /games-arcade
parentstable ppc, bug #197742 (diff)
downloadgentoo-2-46917dbb2771a4f8abea2bf35e85ba1cab2f72b8.tar.gz
gentoo-2-46917dbb2771a4f8abea2bf35e85ba1cab2f72b8.tar.bz2
gentoo-2-46917dbb2771a4f8abea2bf35e85ba1cab2f72b8.zip
While keywording for AMD64, add a new patch from Debian, courtesy of Darren Salt: fix wrong assumption that long is a 32 bit type. Also fix desktop file to meet f.d.o standard, Icon= should not be suffixed if full path is not specified. Bug 166049.
(Portage version: 2.1.3.16)
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/amphetamine/ChangeLog9
-rw-r--r--games-arcade/amphetamine/amphetamine-0.8.10.ebuild22
-rw-r--r--games-arcade/amphetamine/files/020_assumed_sizeof_long.diff72
3 files changed, 91 insertions, 12 deletions
diff --git a/games-arcade/amphetamine/ChangeLog b/games-arcade/amphetamine/ChangeLog
index a30d328776cd..a77a7ca451e4 100644
--- a/games-arcade/amphetamine/ChangeLog
+++ b/games-arcade/amphetamine/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for games-arcade/amphetamine
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-arcade/amphetamine/ChangeLog,v 1.3 2007/04/09 21:43:16 welp Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/amphetamine/ChangeLog,v 1.4 2007/11/02 21:23:52 drac Exp $
+
+ 02 Nov 2007; Samuli Suominen <drac@gentoo.org>
+ +files/020_assumed_sizeof_long.diff, amphetamine-0.8.10.ebuild:
+ While keywording for AMD64, add a new patch from Debian, courtesy of Darren
+ Salt: fix wrong assumption that long is a 32 bit type. Also fix desktop file
+ to meet f.d.o standard, Icon= should not be suffixed if full path is not
+ specified. Bug #166049.
09 Apr 2007; Peter Weller <welp@gentoo.org> amphetamine-0.8.10.ebuild:
Keyworded ~x86-fbsd wrt bug 173405
diff --git a/games-arcade/amphetamine/amphetamine-0.8.10.ebuild b/games-arcade/amphetamine/amphetamine-0.8.10.ebuild
index 23bf3a9cd7ec..5c236b33d470 100644
--- a/games-arcade/amphetamine/amphetamine-0.8.10.ebuild
+++ b/games-arcade/amphetamine/amphetamine-0.8.10.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-arcade/amphetamine/amphetamine-0.8.10.ebuild,v 1.3 2007/04/09 21:43:16 welp Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/amphetamine/amphetamine-0.8.10.ebuild,v 1.4 2007/11/02 21:23:52 drac Exp $
-inherit eutils games
+inherit eutils games toolchain-funcs
DESCRIPTION="a cool Jump'n Run game offering some unique visual effects."
HOMEPAGE="http://n.ethz.ch/student/loehrerl/amph/amph.html"
@@ -11,28 +11,28 @@ SRC_URI="http://n.ethz.ch/student/loehrerl/amph/files/${P}.tar.bz2
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~ppc ~x86 ~x86-fbsd"
+KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
IUSE=""
DEPEND="media-libs/libsdl
x11-libs/libXpm"
src_compile() {
- epatch "${FILESDIR}/${P}"-gentoo.patch
- sed -i -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
- Makefile
- emake || die "emake failed"
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ epatch "${FILESDIR}"/020_assumed_sizeof_long.diff
+ sed -i -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" Makefile
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" || die "emake failed."
}
src_install() {
newgamesbin amph ${PN}
- insinto "${GAMES_DATADIR}/${PN}"
- doins -r ../amph/* || die "installing data failed"
+ insinto "${GAMES_DATADIR}"/${PN}
+ doins -r ../amph/* || die "doins failed."
- dodoc BUGS ChangeLog NEWS README || die "Installing doc"
+ dodoc BUGS ChangeLog NEWS README || die "dodoc failed."
newicon amph.xpm ${PN}.xpm
- make_desktop_entry ${PN} "Amphetamine" ${PN}.xpm
+ make_desktop_entry ${PN} Amphetamine ${PN}
prepgamesdirs
}
diff --git a/games-arcade/amphetamine/files/020_assumed_sizeof_long.diff b/games-arcade/amphetamine/files/020_assumed_sizeof_long.diff
new file mode 100644
index 000000000000..b7588face714
--- /dev/null
+++ b/games-arcade/amphetamine/files/020_assumed_sizeof_long.diff
@@ -0,0 +1,72 @@
+--- amphetamine-0.8.10.orig/src/Shape.cpp
++++ amphetamine-0.8.10/src/Shape.cpp
+@@ -56,12 +56,12 @@
+ */
+ #ifdef __OPT_MEM_ACCESS__
+
+-#define GET_LONG(adr) *(unsigned long *)adr
+-#define SET_LONG(adr, l) *(unsigned long *)adr = l
++#define GET_LONG(adr) *(uint32_t *)adr
++#define SET_LONG(adr, l) *(uint32_t *)adr = l
+
+ #else
+
+-#define GET_LONG(adr) ((long)((unsigned char *)(adr))[0] << 24) + ((long)((unsigned char *)(adr))[1] << 16) + ((long)((unsigned char *)(adr))[2] << 8) + ((long)((unsigned char *)(adr))[3])
++#define GET_LONG(adr) ((uint32_t)((unsigned char *)(adr))[0] << 24) + ((uint32_t)((unsigned char *)(adr))[1] << 16) + ((uint32_t)((unsigned char *)(adr))[2] << 8) + ((uint32_t)((unsigned char *)(adr))[3])
+ #define SET_LONG(adr, l) ((unsigned char *)adr)[0] = (unsigned char)((l) >> 24); \
+ ((unsigned char *)adr)[1] = (unsigned char)((l) >> 16); \
+ ((unsigned char *)adr)[2] = (unsigned char)((l) >> 8); \
+@@ -116,7 +116,7 @@
+ {
+ // store the location of this line start
+ lineStartPtr = destPtr;
+- destPtr += sizeof( unsigned long );
++ destPtr += sizeof( uint32_t );
+
+ // at the beginning of each row we are not in any run
+ drawRunFlag = kFalse;
+@@ -160,7 +160,7 @@
+ // create the skip token
+ //*( ( unsigned long * )destPtr ) = ( kSkipPixelsToken << 24 ) + runCounter;
+ SET_LONG(destPtr, ( kSkipPixelsToken << 24 ) + runCounter);
+- destPtr += sizeof( unsigned long );
++ destPtr += sizeof( uint32_t );
+ }
+
+ // are we in a draw run
+@@ -179,7 +179,7 @@
+
+ // save the location of the token (so we can fill it in later)
+ runTokenPtr = destPtr;
+- destPtr += sizeof( unsigned long );
++ destPtr += sizeof( uint32_t );
+
+ // copy the pixel
+ *destPtr = *srcPtr;
+@@ -215,7 +215,7 @@
+
+ // create the end of shape token
+ SET_LONG(destPtr, kEndShapeToken << 24);
+- destPtr += sizeof( unsigned long );
++ destPtr += sizeof( uint32_t );
+
+ // Resize the handle to match the real size of the shape
+ //SetHandleSize( shapeHandle, destPtr - ( unsigned char * )( *shapeHandle ) );
+@@ -280,7 +280,7 @@
+ // get a token
+ tokenOp = GET_LONG(srcPtr ) >> 24;
+ tokenData = GET_LONG(srcPtr ) & 0x00ffffff;
+- srcPtr += sizeof( unsigned long );
++ srcPtr += sizeof( uint32_t );
+
+ // depending on the token
+ switch( tokenOp )
+@@ -435,7 +435,7 @@
+ // get a token
+ tokenOp = GET_LONG(srcPtr) >> 24;
+ tokenData = GET_LONG(srcPtr) & 0x00ffffff;
+- srcPtr += sizeof( unsigned long );
++ srcPtr += sizeof( uint32_t );
+
+ // depending on the token
+ switch( tokenOp )