diff options
author | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-02-21 13:11:49 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-02-21 13:12:52 +0700 |
commit | 8ec3ec0bba2428596ad71bd3fcb19c4049cb7630 (patch) | |
tree | 4985f4fb512032dfa730d19ba65e75ea3e67d07d | |
parent | 41f347e62dba61be81615657aaf76c1e96b99f10 (diff) | |
download | slackbuilds-8ec3ec0bba2428596ad71bd3fcb19c4049cb7630.tar.gz |
games/vbam: Fix build on x86.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | games/vbam/c++11.patch | 54 | ||||
-rw-r--r-- | games/vbam/vbam.SlackBuild | 3 |
2 files changed, 56 insertions, 1 deletions
diff --git a/games/vbam/c++11.patch b/games/vbam/c++11.patch new file mode 100644 index 0000000000..700802c902 --- /dev/null +++ b/games/vbam/c++11.patch @@ -0,0 +1,54 @@ +diff -uprb vbam.orig/src/gba/GBA-arm.cpp vbam/src/gba/GBA-arm.cpp +--- vbam.orig/src/gba/GBA-arm.cpp 2015-12-07 23:23:30.613871906 +0200 ++++ vbam/src/gba/GBA-arm.cpp 2015-12-07 23:25:49.425706904 +0200 +@@ -298,18 +298,18 @@ static void count(u32 opcode, int cond_r + #ifdef __GNUC__ + #define ALU_HEADER asm("mov %%ecx, %%edi; " + #define ALU_TRAILER : "=D" (opcode) : "c" (opcode) : "eax", "ebx", "edx", "esi") +- #define EMIT0(op) #op"; " +- #define EMIT1(op,arg) #op" "arg"; " +- #define EMIT2(op,src,dest) #op" "src", "dest"; " +- #define KONST(val) "$"#val ++ #define EMIT0(op) #op "; " ++ #define EMIT1(op,arg) #op " " arg "; " ++ #define EMIT2(op,src,dest) #op " " src ", " dest "; " ++ #define KONST(val) "$" #val + #define ASMVAR(cvar) ASMVAR2 (__USER_LABEL_PREFIX__, cvar) + #define ASMVAR2(prefix,cvar) STRING (prefix) cvar + #define STRING(x) #x + #define VAR(var) ASMVAR(#var) + #define VARL(var) ASMVAR(#var) +- #define REGREF1(index) ASMVAR("reg("index")") +- #define REGREF2(index,scale) ASMVAR("reg(,"index","#scale")") +- #define LABEL(n) #n": " ++ #define REGREF1(index) ASMVAR("reg(" index ")") ++ #define REGREF2(index,scale) ASMVAR("reg(," index "," #scale ")") ++ #define LABEL(n) #n ": " + #define LABELREF(n,dir) #n#dir + #define al "%%al" + #define ah "%%ah" +diff -uprb vbam.orig/src/gba/GBA-thumb.cpp vbam/src/gba/GBA-thumb.cpp +--- vbam.orig/src/gba/GBA-thumb.cpp 2015-12-07 23:23:30.613871906 +0200 ++++ vbam/src/gba/GBA-thumb.cpp 2015-12-07 23:26:23.646159392 +0200 +@@ -305,15 +305,15 @@ static INSN_REGPARM void thumbBreakpoint + V_FLAG = (Flags >> 26) & 1; \ + } + #else +- #define EMIT1(op,arg) #op" "arg"; " +- #define EMIT2(op,src,dest) #op" "src", "dest"; " +- #define KONST(val) "$"#val ++ #define EMIT1(op,arg) #op " " arg "; " ++ #define EMIT2(op,src,dest) #op " " src ", " dest "; " ++ #define KONST(val) "$" #val + #define ASMVAR(cvar) ASMVAR2 (__USER_LABEL_PREFIX__, cvar) + #define ASMVAR2(prefix,cvar) STRING (prefix) cvar + #define STRING(x) #x + #define VAR(var) ASMVAR(#var) +- #define REGREF1(index) ASMVAR("reg("index")") +- #define REGREF2(index,scale) ASMVAR("reg(,"index","#scale")") ++ #define REGREF1(index) ASMVAR("reg(" index ")") ++ #define REGREF2(index,scale) ASMVAR("reg(," index "," #scale ")") + #define eax "%%eax" + #define ecx "%%ecx" + #define edx "%%edx" + diff --git a/games/vbam/vbam.SlackBuild b/games/vbam/vbam.SlackBuild index f3098296ab..9320c1036a 100644 --- a/games/vbam/vbam.SlackBuild +++ b/games/vbam/vbam.SlackBuild @@ -23,7 +23,7 @@ PRGNAM=vbam VERSION=${VERSION:-r1231} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} # Set to ON to enable FFMPEG A/V recording. @@ -75,6 +75,7 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/c++11.patch mkdir -p build cd build cmake \ |