summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2007-04-30 16:23:19 +0000
committerChristian Heim <phreak@gentoo.org>2007-04-30 16:23:19 +0000
commitdc83a9eb16f565343a8feac86b4199e7e5ccf967 (patch)
tree22ba8603fa692c76f497f9addce104bf444f84cf
parentPreliminary b2 ebuild for VPS testing. (diff)
downloadphreak-dc83a9eb16f565343a8feac86b4199e7e5ccf967.tar.gz
phreak-dc83a9eb16f565343a8feac86b4199e7e5ccf967.tar.bz2
phreak-dc83a9eb16f565343a8feac86b4199e7e5ccf967.zip
Providing a fixed ebuild/package to use w/ hardened-gcc's.
svn path=/; revision=328
-rw-r--r--bugfixes/games-emulation/visualboyadvance/Manifest28
-rw-r--r--bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc34.patch41
-rw-r--r--bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc41.patch27
-rw-r--r--bugfixes/games-emulation/visualboyadvance/files/1.7.2-homedir.patch11
-rw-r--r--bugfixes/games-emulation/visualboyadvance/files/digest-visualboyadvance-1.7.2-r13
-rw-r--r--bugfixes/games-emulation/visualboyadvance/files/visualboyadvance20
-rw-r--r--bugfixes/games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-asm-fixes.patch266
-rw-r--r--bugfixes/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r1.ebuild77
8 files changed, 473 insertions, 0 deletions
diff --git a/bugfixes/games-emulation/visualboyadvance/Manifest b/bugfixes/games-emulation/visualboyadvance/Manifest
new file mode 100644
index 0000000..bc46699
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/Manifest
@@ -0,0 +1,28 @@
+AUX 1.7.2-gcc34.patch 1354 RMD160 6a3764040df0e166ca7c9e984bd6553264685460 SHA1 8e4b8f2abb93119c0fd7576bff981cf0d771076c SHA256 82c4ec3170fc982eaf5665c44ce2b767868d81f522adf45325df4a7a680d9ac5
+MD5 04a0915b7a414f5065dfb2510cc5a677 files/1.7.2-gcc34.patch 1354
+RMD160 6a3764040df0e166ca7c9e984bd6553264685460 files/1.7.2-gcc34.patch 1354
+SHA256 82c4ec3170fc982eaf5665c44ce2b767868d81f522adf45325df4a7a680d9ac5 files/1.7.2-gcc34.patch 1354
+AUX 1.7.2-gcc41.patch 1445 RMD160 50ca8184ad16e86be8abcbf2dd9ce4ed3958f4c2 SHA1 010a8737e5f0eab2b200b7005db08aa348de79e2 SHA256 1178f0ca6590ed8f4156918ab143aa8b9bcc49a050ace391f5fe93d1b0015403
+MD5 139bedc9500277f7787eed14fb71ee99 files/1.7.2-gcc41.patch 1445
+RMD160 50ca8184ad16e86be8abcbf2dd9ce4ed3958f4c2 files/1.7.2-gcc41.patch 1445
+SHA256 1178f0ca6590ed8f4156918ab143aa8b9bcc49a050ace391f5fe93d1b0015403 files/1.7.2-gcc41.patch 1445
+AUX 1.7.2-homedir.patch 415 RMD160 c617252b5cf61a829bd25c4821c684791ac9c58e SHA1 4458dbb1b111356c22b46c84266c48cab5238c00 SHA256 c49ac18ac3a71355bc7fb790da176a45fe558d4e4f08366045d34f8c801cc05c
+MD5 ef02d9be59ab74afa9a8f12e17e359d4 files/1.7.2-homedir.patch 415
+RMD160 c617252b5cf61a829bd25c4821c684791ac9c58e files/1.7.2-homedir.patch 415
+SHA256 c49ac18ac3a71355bc7fb790da176a45fe558d4e4f08366045d34f8c801cc05c files/1.7.2-homedir.patch 415
+AUX visualboyadvance 634 RMD160 e98a182e2df04b452fee68240c8bf1b6a34472a2 SHA1 964410cb7c92803dcf1ce442ac6dffa758a5388f SHA256 60cef94c41f16d9865d174be6174922db192173c143d6bcc1cae4b25f932cb34
+MD5 c938cbae5d1d2692c81231506568457a files/visualboyadvance 634
+RMD160 e98a182e2df04b452fee68240c8bf1b6a34472a2 files/visualboyadvance 634
+SHA256 60cef94c41f16d9865d174be6174922db192173c143d6bcc1cae4b25f932cb34 files/visualboyadvance 634
+AUX visualboyadvance-1.7.2-asm-fixes.patch 8939 RMD160 941f2336c2af6794bcdac505e682d5235356b276 SHA1 6b4026b45f7d5aa9b1d8d5c1d24d412cd3d00b36 SHA256 21c75870b11b880233478cf2cf37790c7f1c21ba1348fbfadded7b2d2334f5e1
+MD5 ae20f2d1ee155a6d62d43d8085bb0644 files/visualboyadvance-1.7.2-asm-fixes.patch 8939
+RMD160 941f2336c2af6794bcdac505e682d5235356b276 files/visualboyadvance-1.7.2-asm-fixes.patch 8939
+SHA256 21c75870b11b880233478cf2cf37790c7f1c21ba1348fbfadded7b2d2334f5e1 files/visualboyadvance-1.7.2-asm-fixes.patch 8939
+DIST VisualBoyAdvance-src-1.7.2.tar.gz 1410762 RMD160 44f94a4f270f2cda25879681c52892f6978caf99 SHA1 04d82406079563fd17cda07f72488185e9152f51 SHA256 f4114f921a4fd4bf2ccfc68a46b9c5aa9c71cd94519fbe9ec0be992462e129b7
+EBUILD visualboyadvance-1.7.2-r1.ebuild 1898 RMD160 5c07fec7af15d30c22f973490aad12123dc02046 SHA1 1e3bc1939d1946819937a7c1d911e65660664e6f SHA256 f0db477af871920b532621044e8c5d789c4b4c45b7be1e4e017ccc2fbaa165e8
+MD5 784d58ac2c27cea2d1ad3e7a0cb16d45 visualboyadvance-1.7.2-r1.ebuild 1898
+RMD160 5c07fec7af15d30c22f973490aad12123dc02046 visualboyadvance-1.7.2-r1.ebuild 1898
+SHA256 f0db477af871920b532621044e8c5d789c4b4c45b7be1e4e017ccc2fbaa165e8 visualboyadvance-1.7.2-r1.ebuild 1898
+MD5 b964aaf93d522f3ee903d5a8d4da2ac5 files/digest-visualboyadvance-1.7.2-r1 283
+RMD160 09c852b5f54c540714618644527326d5f29f628c files/digest-visualboyadvance-1.7.2-r1 283
+SHA256 17c8c0a1c947b5f0ed452c3fa5ed0b1892f9c35ae1ec41d4bb0897d827e6b8b0 files/digest-visualboyadvance-1.7.2-r1 283
diff --git a/bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc34.patch b/bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc34.patch
new file mode 100644
index 0000000..5ce4802
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc34.patch
@@ -0,0 +1,41 @@
+diff -ur VisualBoyAdvance-1.7.2.orig/src/gtk/joypadconfig.h VisualBoyAdvance-1.7.2/src/gtk/joypadconfig.h
+--- VisualBoyAdvance-1.7.2.orig/src/gtk/joypadconfig.h 2004-05-10 16:43:21.000000000 +0200
++++ VisualBoyAdvance-1.7.2/src/gtk/joypadconfig.h 2004-08-12 22:30:20.838039064 +0200
+@@ -22,8 +22,8 @@
+
+ #include <vector>
+
+-#include <libglademm.h>
+ #include <gtkmm.h>
++#include <libglademm.h>
+
+ #ifndef GTKMM20
+ # include "sigccompat.h"
+diff -ur VisualBoyAdvance-1.7.2.orig/src/gtk/main.cpp VisualBoyAdvance-1.7.2/src/gtk/main.cpp
+--- VisualBoyAdvance-1.7.2.orig/src/gtk/main.cpp 2004-05-21 18:02:35.000000000 +0200
++++ VisualBoyAdvance-1.7.2/src/gtk/main.cpp 2004-08-12 22:39:08.633801912 +0200
+@@ -22,10 +22,10 @@
+
+ #include <list>
+
+-#include <libglademm.h>
+ #include <gtkmm/main.h>
+ #include <gtkmm/window.h>
+ #include <gtkmm/messagedialog.h>
++#include <libglademm.h>
+
+ #include "images/vba-wm-pixbufs.h"
+
+diff -ur VisualBoyAdvance-1.7.2.orig/src/gtk/window.h VisualBoyAdvance-1.7.2/src/gtk/window.h
+--- VisualBoyAdvance-1.7.2.orig/src/gtk/window.h 2004-05-21 15:25:41.000000000 +0200
++++ VisualBoyAdvance-1.7.2/src/gtk/window.h 2004-08-12 22:30:58.650290728 +0200
+@@ -23,8 +23,8 @@
+ #include <sys/types.h>
+ #include <stdarg.h>
+
+-#include <libglademm.h>
+ #include <gtkmm.h>
++#include <libglademm.h>
+
+ #ifndef GTKMM20
+ # include "sigccompat.h"
diff --git a/bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc41.patch b/bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc41.patch
new file mode 100644
index 0000000..764e376
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/files/1.7.2-gcc41.patch
@@ -0,0 +1,27 @@
+diff -ru /root/VisualBoyAdvance-1.7.2/src/prof/prof.cpp VisualBoyAdvance-1.7.2/src/prof/prof.cpp
+--- /root/VisualBoyAdvance-1.7.2/src/prof/prof.cpp 2004-05-14 00:31:58.000000000 +1000
++++ VisualBoyAdvance-1.7.2/src/prof/prof.cpp 2006-06-03 13:49:41.000000000 +1000
+@@ -266,7 +266,7 @@
+ for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link) {
+ if(profWrite8(fd, GMON_TAG_CG_ARC) ||
+ profWrite32(fd, (u32)frompc) ||
+- profWrite32(fd, (u32)tos[toindex].selfpc) ||
++ profWrite32(fd, (u32)(intptr_t)tos[toindex].selfpc) ||
+ profWrite32(fd, tos[toindex].count)) {
+ systemMessage(0, "mcount: arc");
+ fclose(fd);
+diff -ru /root/VisualBoyAdvance-1.7.2/src/sdl/debugger.cpp VisualBoyAdvance-1.7.2/src/sdl/debugger.cpp
+--- /root/VisualBoyAdvance-1.7.2/src/sdl/debugger.cpp 2004-05-14 00:13:14.000000000 +1000
++++ VisualBoyAdvance-1.7.2/src/sdl/debugger.cpp 2006-06-03 13:49:57.000000000 +1000
+@@ -950,9 +950,9 @@
+ {
+ u32 address = 0;
+ if(mem >= (u32*)&workRAM[0] && mem <= (u32*)&workRAM[0x3ffff])
+- address = 0x2000000 + ((u32)mem - (u32)&workRAM[0]);
++ address = 0x2000000 + ((u32)(intptr_t)mem - (u32)(intptr_t)&workRAM[0]);
+ else
+- address = 0x3000000 + ((u32)mem - (u32)&internalRAM[0]);
++ address = 0x3000000 + ((u32)(intptr_t)mem - (u32)(intptr_t)&internalRAM[0]);
+
+ if(size == 2)
+ printf("Breakpoint (on write) address %08x old:%08x new:%08x\n",
diff --git a/bugfixes/games-emulation/visualboyadvance/files/1.7.2-homedir.patch b/bugfixes/games-emulation/visualboyadvance/files/1.7.2-homedir.patch
new file mode 100644
index 0000000..e93d32c
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/files/1.7.2-homedir.patch
@@ -0,0 +1,11 @@
+--- src/sdl/SDL.cpp.orig 2004-08-15 02:43:28.232750688 -0400
++++ src/sdl/SDL.cpp 2004-08-15 02:44:01.557684528 -0400
+@@ -887,7 +887,7 @@
+
+ if(home != NULL) {
+ fprintf(stderr, "Searching home directory: %s\n", home);
+- sprintf(path, "%s%c%s", home, FILE_SEP, name);
++ sprintf(path, "%s%c.%s%c%s", home, FILE_SEP, EXE_NAME, FILE_SEP, name);
+ f = fopen(path, "r");
+ if(f != NULL)
+ return f;
diff --git a/bugfixes/games-emulation/visualboyadvance/files/digest-visualboyadvance-1.7.2-r1 b/bugfixes/games-emulation/visualboyadvance/files/digest-visualboyadvance-1.7.2-r1
new file mode 100644
index 0000000..ae894e5
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/files/digest-visualboyadvance-1.7.2-r1
@@ -0,0 +1,3 @@
+MD5 cc02339e3fd8efd9f23121b0a2f81fd8 VisualBoyAdvance-src-1.7.2.tar.gz 1410762
+RMD160 44f94a4f270f2cda25879681c52892f6978caf99 VisualBoyAdvance-src-1.7.2.tar.gz 1410762
+SHA256 f4114f921a4fd4bf2ccfc68a46b9c5aa9c71cd94519fbe9ec0be992462e129b7 VisualBoyAdvance-src-1.7.2.tar.gz 1410762
diff --git a/bugfixes/games-emulation/visualboyadvance/files/visualboyadvance b/bugfixes/games-emulation/visualboyadvance/files/visualboyadvance
new file mode 100644
index 0000000..6be625c
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/files/visualboyadvance
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/visualboyadvance/files/visualboyadvance,v 1.5 2007/03/07 16:49:27 wolf31o2 Exp $
+
+PN=VisualBoyAdvance
+if ! [[ -d ~/.${PN}/save ]] ; then
+ mkdir -p ~/.${PN}/save
+ cd ~/.${PN}
+ ln -s `which ${PN}` .
+ cp /usr/share/games/${PN}/${PN}.cfg .
+ sed -i \
+ -e "s:#saveDir.*:saveDir ${HOME}/.${PN}/save:" \
+ -e "s:#captureDir.*:captureDir ${HOME}/.${PN}:" \
+ -e "s:#batteryDir.*:batteryDir ${HOME}/.${PN}/save:" \
+ ${PN}.cfg
+fi
+
+cd ~/.${PN}
+exec ./${PN} "$@"
diff --git a/bugfixes/games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-asm-fixes.patch b/bugfixes/games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-asm-fixes.patch
new file mode 100644
index 0000000..c4dfcd6
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/files/visualboyadvance-1.7.2-asm-fixes.patch
@@ -0,0 +1,266 @@
+2007-04-30 Danny van Dyk <kugelfang@gentoo.org>
+
+* src/arm-new.h, src/thumb.h: Fix compilation on hardened platforms that do not
+ leave %ebx available to the programmer. Example for this is IA32/pie.
+
+--- a/src/arm-new.h 2004-05-13 15:57:11.000000000 +0200
++++ b/src/arm-new.h 2007-04-30 17:47:26.000000000 +0200
+@@ -536,97 +536,97 @@
+ }
+ #else
+ #define OP_SUB \
+- asm ("sub %1, %%ebx;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ asm ("sub %1, %0;"\
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+
+ #define OP_SUBS \
+- asm ("sub %1, %%ebx;"\
++ asm ("sub %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+
+ #define OP_RSB \
+- asm ("sub %1, %%ebx;"\
+- : "=b" (reg[dest].I)\
+- : "r" (reg[base].I), "b" (value));
++ asm ("sub %1, %0;"\
++ : "=r" (reg[dest].I)\
++ : "r" (reg[base].I), "r" (value));
+
+ #define OP_RSBS \
+- asm ("sub %1, %%ebx;"\
++ asm ("sub %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (reg[base].I), "b" (value));
++ : "=r" (reg[dest].I)\
++ : "r" (reg[base].I), "r" (value));
+
+ #define OP_ADD \
+- asm ("add %1, %%ebx;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ asm ("add %1, %0;"\
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+
+ #define OP_ADDS \
+- asm ("add %1, %%ebx;"\
++ asm ("add %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setcb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+
+ #define OP_ADC \
+ asm ("bt $0, C_FLAG;"\
+- "adc %1, %%ebx;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ "adc %1, %0;"\
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+
+ #define OP_ADCS \
+ asm ("bt $0, C_FLAG;"\
+- "adc %1, %%ebx;"\
++ "adc %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setcb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+
+ #define OP_SBC \
+ asm ("bt $0, C_FLAG;"\
+ "cmc;"\
+- "sbb %1, %%ebx;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ "sbb %1, %0;"\
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+
+ #define OP_SBCS \
+ asm ("bt $0, C_FLAG;"\
+ "cmc;"\
+- "sbb %1, %%ebx;"\
++ "sbb %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[base].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[base].I));
+ #define OP_RSC \
+ asm ("bt $0, C_FLAG;"\
+ "cmc;"\
+- "sbb %1, %%ebx;"\
+- : "=b" (reg[dest].I)\
+- : "r" (reg[base].I), "b" (value));
++ "sbb %1, %0;"\
++ : "=r" (reg[dest].I)\
++ : "r" (reg[base].I), "r" (value));
+
+ #define OP_RSCS \
+ asm ("bt $0, C_FLAG;"\
+ "cmc;"\
+- "sbb %1, %%ebx;"\
++ "sbb %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (reg[base].I), "b" (value));
++ : "=r" (reg[dest].I)\
++ : "r" (reg[base].I), "r" (value));
+ #define OP_CMP \
+ asm ("sub %0, %1;"\
+ "setsb N_FLAG;"\
+--- a/src/thumb.h 2007-04-30 17:52:09.000000000 +0200
++++ b/src/thumb.h 2007-04-30 17:52:33.000000000 +0200
+@@ -423,29 +423,29 @@
+ }
+ #else
+ #define ADD_RD_RS_RN \
+- asm ("add %1, %%ebx;"\
++ asm ("add %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setcb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[source].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[source].I));
+ #define ADD_RD_RS_O3 \
+- asm ("add %1, %%ebx;"\
++ asm ("add %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setcb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[source].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[source].I));
+ #define ADD_RN_O8(d) \
+- asm ("add %1, %%ebx;"\
++ asm ("add %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setcb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[(d)].I)\
+- : "r" (opcode & 255), "b" (reg[(d)].I));
++ : "=r" (reg[(d)].I)\
++ : "r" (opcode & 255), "r" (reg[(d)].I));
+ #define CMN_RD_RS \
+ asm ("add %0, %1;"\
+ "setsb N_FLAG;"\
+@@ -456,37 +456,37 @@
+ : "r" (value), "r" (reg[dest].I):"1");
+ #define ADC_RD_RS \
+ asm ("bt $0, C_FLAG;"\
+- "adc %1, %%ebx;"\
++ "adc %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setcb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[dest].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[dest].I));
+ #define SUB_RD_RS_RN \
+- asm ("sub %1, %%ebx;"\
++ asm ("sub %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[source].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[source].I));
+ #define SUB_RD_RS_O3 \
+- asm ("sub %1, %%ebx;"\
++ asm ("sub %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[source].I));
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[source].I));
+ #define SUB_RN_O8(d) \
+- asm ("sub %1, %%ebx;"\
++ asm ("sub %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[(d)].I)\
+- : "r" (opcode & 255), "b" (reg[(d)].I));
++ : "=r" (reg[(d)].I)\
++ : "r" (opcode & 255), "r" (reg[(d)].I));
+ #define CMP_RN_O8(d) \
+ asm ("sub %0, %1;"\
+ "setsb N_FLAG;"\
+@@ -498,13 +498,13 @@
+ #define SBC_RD_RS \
+ asm volatile ("bt $0, C_FLAG;"\
+ "cmc;"\
+- "sbb %1, %%ebx;"\
++ "sbb %1, %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "r" (value), "b" (reg[dest].I) : "cc", "memory");
++ : "=r" (reg[dest].I)\
++ : "r" (value), "r" (reg[dest].I) : "cc", "memory");
+ #define LSL_RD_RM_I5 \
+ asm ("shl %%cl, %%eax;"\
+ "setcb C_FLAG;"\
+@@ -541,13 +541,13 @@
+ : "=a" (value)\
+ : "a" (reg[dest].I), "c" (value));
+ #define NEG_RD_RS \
+- asm ("neg %%ebx;"\
++ asm ("neg %0;"\
+ "setsb N_FLAG;"\
+ "setzb Z_FLAG;"\
+ "setncb C_FLAG;"\
+ "setob V_FLAG;"\
+- : "=b" (reg[dest].I)\
+- : "b" (reg[source].I));
++ : "=r" (reg[dest].I)\
++ : "r" (reg[source].I));
+ #define CMP_RD_RS \
+ asm ("sub %0, %1;"\
+ "setsb N_FLAG;"\ \ No newline at end of file
diff --git a/bugfixes/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r1.ebuild b/bugfixes/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r1.ebuild
new file mode 100644
index 0000000..2e28baa
--- /dev/null
+++ b/bugfixes/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-emulation/visualboyadvance/visualboyadvance-1.7.2-r1.ebuild,v 1.11 2006/12/11 22:27:52 nyhm Exp $
+
+inherit eutils flag-o-matic games
+
+DESCRIPTION="gameboy, gameboy color, and gameboy advance emulator"
+HOMEPAGE="http://vba.ngemu.com/"
+SRC_URI="mirror://sourceforge/vba/VisualBoyAdvance-src-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="gtk mmx nls"
+
+RDEPEND="media-libs/libpng
+ media-libs/libsdl
+ gtk? (
+ >=x11-libs/gtk+-2.4
+ >=dev-cpp/gtkmm-2.4
+ >=dev-cpp/libglademm-2.4
+ )
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ mmx? ( dev-lang/nasm )
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/VisualBoyAdvance-${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ sed -i \
+ -e 's:$(localedir):/usr/share/locale:' \
+ -e 's:$(datadir)/locale:/usr/share/locale:' \
+ $(find . -name 'Makefile.in*') \
+ || die "sed failed"
+
+ cat >> src/i386/2xSaImmx.asm <<-EOF
+ %ifidn __OUTPUT_FORMAT__,elf
+ section .note.GNU-stack noalloc noexec nowrite progbits
+ %endif
+ EOF
+
+ epatch "${FILESDIR}"/${PV}-homedir.patch
+ epatch "${FILESDIR}"/${PV}-gcc34.patch
+ epatch "${FILESDIR}"/${PV}-gcc41.patch
+
+ # Reported as UPSTREAM issue #1710154
+ epatch "${FILESDIR}"/${P}-asm-fixes.patch
+}
+
+src_compile() {
+ # -O3 causes GCC to behave badly and hog memory, bug #64670.
+ replace-flags -O3 -O2
+
+ # Removed --enable-c-core as it *should* determine this based on arch
+ egamesconf \
+ --disable-dependency-tracking \
+ $(use_with mmx) \
+ $(use_enable gtk gtk 2.4) \
+ $(use_enable nls) \
+ || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog NEWS README README-win.txt
+ if use gtk ; then
+ newicon src/gtk/images/vba-64.png ${PN}.png
+ make_desktop_entry gvba VisualBoyAdvance
+ fi
+ prepgamesdirs
+}