aboutsummaryrefslogtreecommitdiff
path: root/emulators/mupen64plus-video-glide64
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2013-10-04 17:18:44 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2013-10-04 17:18:44 +0000
commit32e23fd557590dc701727b6cd7502f7ada719f9f (patch)
tree8935b7a0d59262e885998d0d32697c8fd34e2726 /emulators/mupen64plus-video-glide64
parent30d7d310d36b3284ac883203f9d89422852e824a (diff)
downloadports-32e23fd557590dc701727b6cd7502f7ada719f9f.tar.gz
ports-32e23fd557590dc701727b6cd7502f7ada719f9f.zip
Notes
Diffstat (limited to 'emulators/mupen64plus-video-glide64')
-rw-r--r--emulators/mupen64plus-video-glide64/Makefile4
-rw-r--r--emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Main.cpp16
-rw-r--r--emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Util.h30
-rw-r--r--emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_rdp.cpp24
4 files changed, 72 insertions, 2 deletions
diff --git a/emulators/mupen64plus-video-glide64/Makefile b/emulators/mupen64plus-video-glide64/Makefile
index 9c523086c259..da9b07ee703d 100644
--- a/emulators/mupen64plus-video-glide64/Makefile
+++ b/emulators/mupen64plus-video-glide64/Makefile
@@ -1,9 +1,9 @@
# Created by: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
# $FreeBSD$
-PORTREVISION= 2
+PORTREVISION= 0
PKGNAMESUFFIX= -video-glide64
-DISTFILES= ${PORTNAME}${PKGNAMESUFFIX}-src-${PORTVERSION}${EXTRACT_SUFX}:plugin
+DISTFILES= ${PORTNAME}${PKGNAMESUFFIX}-src-${PORTVERSION}.0${EXTRACT_SUFX}:plugin
COMMENT= Glide64 video plugin for Mupen64Plus
diff --git a/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Main.cpp b/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Main.cpp
new file mode 100644
index 000000000000..858f6bcaa23d
--- /dev/null
+++ b/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Main.cpp
@@ -0,0 +1,16 @@
+--- mupen64plus-video-glide64/src/Main.cpp 2013-10-04 03:40:24.000000000 -0500
++++ mupen64plus-video-glide64/src/Main.cpp 2013-10-04 03:41:24.000000000 -0500
+@@ -634,11 +634,8 @@
+ for (i=0; i<0x200; i++)
+ {
+ // cur = ~*(data++), byteswapped
+-#if !defined(__GNUC__)
+- cur = _byteswap_ulong(~*(data++));
+-#else
+- cur = __builtin_bswap32(~*(data++));
+-#endif
++
++ cur = bswap32(~*(data++));
+
+ for (b=0x80000000; b!=0; b>>=1)
+ {
diff --git a/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Util.h b/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Util.h
new file mode 100644
index 000000000000..b906e205286b
--- /dev/null
+++ b/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_Util.h
@@ -0,0 +1,30 @@
+--- mupen64plus-video-glide64/src/Util.h 2013-10-04 03:39:06.000000000 -0500
++++ mupen64plus-video-glide64/src/Util.h 2013-10-04 03:43:01.000000000 -0500
+@@ -37,6 +37,8 @@
+ #ifndef Util_H
+ #define Util_H
+
++#include <stdint.h>
++
+ #include "winlnxdefs.h"
+ #include "rdp.h"
+
+@@ -91,5 +93,17 @@
+ lx = lc; \
+ }
+
+-#endif // ifndef Util_H
++#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
++ #include <stdlib.h>
++ #define bswap32(x) _byteswap_ulong(x)
++#else
++static inline uint32_t bswap32(uint32_t val)
++{
++ return (((val & 0xff000000) >> 24) |
++ ((val & 0x00ff0000) >> 8) |
++ ((val & 0x0000ff00) << 8) |
++ ((val & 0x000000ff) << 24));
++}
++#endif
+
++#endif // ifndef Util_H
diff --git a/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_rdp.cpp b/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_rdp.cpp
new file mode 100644
index 000000000000..542674074d4e
--- /dev/null
+++ b/emulators/mupen64plus-video-glide64/files/patch-mupen64plus-video-glide64-src_rdp.cpp
@@ -0,0 +1,24 @@
+--- mupen64plus-video-glide64/src/rdp.cpp 2013-10-04 03:41:54.000000000 -0500
++++ mupen64plus-video-glide64/src/rdp.cpp 2013-10-04 03:43:26.000000000 -0500
+@@ -67,21 +67,6 @@
+
+ int drawFlag = 1; // draw flag for rendering callback
+
+-#if defined(__GNUC__)
+- #define bswap32(x) __builtin_bswap32(x)
+-#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
+- #include <stdlib.h>
+- #define bswap32(x) _byteswap_ulong(x)
+-#else
+-static inline uint32_t bswap32(uint32_t val)
+-{
+- return (((val & 0xff000000) >> 24) |
+- ((val & 0x00ff0000) >> 8) |
+- ((val & 0x0000ff00) << 8) |
+- ((val & 0x000000ff) << 24));
+-}
+-#endif
+-
+ // global strings
+ const char *ACmp[4] = { "NONE", "THRESHOLD", "UNKNOWN", "DITHER" };
+