diff options
author | David Holm <dholm@gentoo.org> | 2004-02-15 11:56:09 +0000 |
---|---|---|
committer | David Holm <dholm@gentoo.org> | 2004-02-15 11:56:09 +0000 |
commit | 59e30ef7b6dc4e462ce8850e901b258c63a5f620 (patch) | |
tree | 62a306ec893594c7fce30f2b9389a0d06178d762 /games-emulation/xmame | |
parent | Added to ~ppc (Manifest recommit) (diff) | |
download | gentoo-2-59e30ef7b6dc4e462ce8850e901b258c63a5f620.tar.gz gentoo-2-59e30ef7b6dc4e462ce8850e901b258c63a5f620.tar.bz2 gentoo-2-59e30ef7b6dc4e462ce8850e901b258c63a5f620.zip |
Added big-endian fix from Maciej J. Woloszyk, closing bug #40327
Diffstat (limited to 'games-emulation/xmame')
-rw-r--r-- | games-emulation/xmame/ChangeLog | 8 | ||||
-rw-r--r-- | games-emulation/xmame/files/0.78.1-big_endian.patch | 102 | ||||
-rw-r--r-- | games-emulation/xmame/xmame-0.78.1.ebuild | 5 |
3 files changed, 112 insertions, 3 deletions
diff --git a/games-emulation/xmame/ChangeLog b/games-emulation/xmame/ChangeLog index 40c706b95c39..8e0836c62746 100644 --- a/games-emulation/xmame/ChangeLog +++ b/games-emulation/xmame/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-emulation/xmame -# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/xmame/ChangeLog,v 1.12 2004/01/14 21:40:24 vapier Exp $ +# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-emulation/xmame/ChangeLog,v 1.13 2004/02/15 11:56:08 dholm Exp $ + + 15 Feb 2004; David Holm <dholm@gentoo.org> xmame-0.78.1.ebuild, + files/0.78.1-big_endian.patch: + Added big-endian fix from Maciej J. Woloszyk, closing bug #40327. *xmame-0.78.1 (14 Jan 2004) diff --git a/games-emulation/xmame/files/0.78.1-big_endian.patch b/games-emulation/xmame/files/0.78.1-big_endian.patch new file mode 100644 index 000000000000..3314d3ef4900 --- /dev/null +++ b/games-emulation/xmame/files/0.78.1-big_endian.patch @@ -0,0 +1,102 @@ +--- src/unix/video-drivers/x11_window.c 2003-12-27 00:29:16.000000000 +0100 ++++ src/unix/video-drivers/x11_window.c 2004-02-03 23:04:22.000000000 +0100 +@@ -1463,7 +1463,11 @@ + + /* Storing this data in YUYV order simplifies using the data for + YUY2, both with and without smoothing... */ ++#ifdef LSB_FIRST + hwscale_yuvlookup[i]=(y<<0) | (u<<8) | (y<<16) | (v<<24); ++#else ++ hwscale_yuvlookup[i]=(y<<24) | (u<<16) | (y<<8) | (v<<0); ++#endif + } + } + } +--- src/unix/video-drivers/blit.h 2003-12-27 00:29:16.000000000 +0100 ++++ src/unix/video-drivers/blit.h 2004-02-04 01:17:56.000000000 +0100 +@@ -72,6 +72,7 @@ + }\ + } + #elif defined BLIT_HWSCALE_YUY2 ++#ifdef LSB_FIRST /* x86 etc */ + #define COPY_LINE2(SRC, END, DST) \ + {\ + SRC_PIXEL *src = SRC; \ +@@ -89,6 +90,25 @@ + *dst++=y|y2|((uv1+uv2)&0xff00ff00);\ + } \ + } ++#else /* ppc etc */ ++#define COPY_LINE2(SRC, END, DST) \ ++ {\ ++ SRC_PIXEL *src = SRC; \ ++ SRC_PIXEL *end = END; \ ++ unsigned long *dst = (unsigned long *)DST; \ ++ unsigned int r,y,y2,uv1,uv2; \ ++ for(;src<end;) \ ++ { \ ++ r=INDIRECT[*src++]; \ ++ y=r&0xff000000 ; \ ++ uv1=(r&0x00ff00ff); \ ++ r=INDIRECT[*src++]; \ ++ uv2=(uv1+(r&0x00ff00ff))>>1; \ ++ y2=r&0xff00; \ ++ *dst++=y|y2|(uv2&0x00ff00ff); \ ++ } \ ++ } ++#endif + #else /* normal indirect */ + #define COPY_LINE2(SRC, END, DST) \ + {\ +@@ -428,24 +448,43 @@ + *(dst+2) = (INDIRECT[*(src+2)]>>16) | (INDIRECT[*(src+3)]<< 8); \ + } + #elif defined BLIT_HWSCALE_YUY2 ++#ifdef LSB_FIRST /* x86 etc */ + #define COPY_LINE2(SRC, END, DST) \ + {\ + SRC_PIXEL *src = SRC; \ + SRC_PIXEL *end = END; \ + unsigned long *dst = (unsigned long *)DST; \ +- unsigned int r,r2,y,y2,uv1,uv2; \ ++ unsigned int r,y,y2,uv1,uv2; \ + for(;src<end;) \ + { \ + r=INDIRECT[*src++]; \ +- r2=INDIRECT[*src++]; \ +- y=r&0xff; \ +- y2=r2&0xff0000; \ ++ y=r&255; \ + uv1=(r&0xff00ff00)>>1; \ +- uv2=(r2&0xff00ff00)>>1; \ +- uv1=(uv1+uv2)&0xff00ff00; \ +- *dst++=y|y2|uv1; \ ++ r=INDIRECT[*src++]; \ ++ uv2=(r&0xff00ff00)>>1; \ ++ y2=r&0xff0000; \ ++ *dst++=y|y2|((uv1+uv2)&0xff00ff00);\ ++ } \ ++ } ++#else /* ppc etc */ ++#define COPY_LINE2(SRC, END, DST) \ ++ {\ ++ SRC_PIXEL *src = SRC; \ ++ SRC_PIXEL *end = END; \ ++ unsigned long *dst = (unsigned long *)DST; \ ++ unsigned int r,y,y2,uv1,uv2; \ ++ for(;src<end;) \ ++ { \ ++ r=INDIRECT[*src++]; \ ++ y=r&0xff000000 ; \ ++ uv1=(r&0x00ff00ff); \ ++ r=INDIRECT[*src++]; \ ++ uv2=(uv1+(r&0x00ff00ff))>>1; \ ++ y2=r&0xff00; \ ++ *dst++=y|y2|(uv2&0x00ff00ff); \ + } \ + } ++#endif + #else /* normal indirect */ + #define COPY_LINE2(SRC, END, DST) \ + SRC_PIXEL *src = SRC; \ + diff --git a/games-emulation/xmame/xmame-0.78.1.ebuild b/games-emulation/xmame/xmame-0.78.1.ebuild index 62d4f0d097fe..4efd9b8c44f3 100644 --- a/games-emulation/xmame/xmame-0.78.1.ebuild +++ b/games-emulation/xmame/xmame-0.78.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/xmame/xmame-0.78.1.ebuild,v 1.4 2004/02/12 15:28:30 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-emulation/xmame/xmame-0.78.1.ebuild,v 1.5 2004/02/15 11:56:08 dholm Exp $ inherit games flag-o-matic gcc eutils @@ -56,16 +56,19 @@ src_unpack() { sed -i \ -e '/^MY_CPU/s:i386:risc:' Makefile \ || die "sed Makefile (ppc|sparc) failed" + epatch ${FILESDIR}/${PV}-big_endian.patch ;; alpha) sed -i \ -e '/^MY_CPU/s:i386:alpha:' Makefile \ || die "sed Makefile (alpha) failed" + epatch ${FILESDIR}/${PV}-big_endian.patch ;; mips) sed -i \ -e '/^MY_CPU/s:i386:mips:' Makefile \ || die "sed Makefile (mips) failed" + epatch ${FILESDIR}/${PV}-big_endian.patch ;; esac |