pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/libretro-fbalpha libretro-fbalpha: Attempt t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ab93ed8b12c4
branches:  trunk
changeset: 315014:ab93ed8b12c4
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Nov 13 17:16:25 2018 +0000

description:
libretro-fbalpha: Attempt to fix the big endian build

diffstat:

 emulators/libretro-fbalpha/Makefile                                         |   3 +-
 emulators/libretro-fbalpha/distinfo                                         |   3 +-
 emulators/libretro-fbalpha/patches/patch-src_burner_libretro_burn__endian.h |  33 ++++++++++
 3 files changed, 37 insertions(+), 2 deletions(-)

diffs (62 lines):

diff -r d603d2b92d18 -r ab93ed8b12c4 emulators/libretro-fbalpha/Makefile
--- a/emulators/libretro-fbalpha/Makefile       Tue Nov 13 16:35:06 2018 +0000
+++ b/emulators/libretro-fbalpha/Makefile       Tue Nov 13 17:16:25 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2018/10/31 18:40:41 nia Exp $
+# $NetBSD: Makefile,v 1.5 2018/11/13 17:16:25 nia Exp $
 
 DISTNAME=      libretro-fbalpha-0.2.97.43.20181022
+PKGREVISION=   1
 CATEGORIES=    emulators
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=libretro/}
 GITHUB_PROJECT=        fbalpha2018
diff -r d603d2b92d18 -r ab93ed8b12c4 emulators/libretro-fbalpha/distinfo
--- a/emulators/libretro-fbalpha/distinfo       Tue Nov 13 16:35:06 2018 +0000
+++ b/emulators/libretro-fbalpha/distinfo       Tue Nov 13 17:16:25 2018 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.3 2018/10/31 18:40:41 nia Exp $
+$NetBSD: distinfo,v 1.4 2018/11/13 17:16:25 nia Exp $
 
 SHA1 (libretro-fbalpha-0.2.97.43.20181022-20daa807957d7fce64371620271b502811318163.tar.gz) = 45025f8fb79afcbb65d3de7d927f5eeed709faaf
 RMD160 (libretro-fbalpha-0.2.97.43.20181022-20daa807957d7fce64371620271b502811318163.tar.gz) = d42603bb5298965cbcc0565846b893a2fef7685d
 SHA512 (libretro-fbalpha-0.2.97.43.20181022-20daa807957d7fce64371620271b502811318163.tar.gz) = 
a5aee22e6e17905ac33bd221efced9844579ec11dfe7ba55755fdd327099f1017ec7d83ff5dbb5390ddfb4fe5661d792ffda204cbe3e14bd8598ae5800f77f4c
 Size (libretro-fbalpha-0.2.97.43.20181022-20daa807957d7fce64371620271b502811318163.tar.gz) = 10216979 bytes
 SHA1 (patch-makefile.libretro) = 53580ffc41c22c745d70aa9949c5df2affc783d4
+SHA1 (patch-src_burner_libretro_burn__endian.h) = fbca4fbadbc6a15630719ab6d9494d00a36f226a
diff -r d603d2b92d18 -r ab93ed8b12c4 emulators/libretro-fbalpha/patches/patch-src_burner_libretro_burn__endian.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-fbalpha/patches/patch-src_burner_libretro_burn__endian.h       Tue Nov 13 17:16:25 2018 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_burner_libretro_burn__endian.h,v 1.1 2018/11/13 17:16:25 nia Exp $
+
+More than games consoles are big endian.
+
+--- src/burner/libretro/burn_endian.h.orig     2018-11-13 16:00:03.905824261 +0000
++++ src/burner/libretro/burn_endian.h
+@@ -1,7 +1,7 @@
+ #ifndef _FBA_ENDIAN_H
+ #define _FBA_ENDIAN_H
+ 
+-#ifndef _XBOX
++#if !defined(_XBOX) && !defined(__NetBSD__)
+ #define NO_64BIT_BYTESWAP
+ #endif
+ 
+@@ -49,6 +49,17 @@ typedef union {
+ /* Not sure the asm stuff is working properly, so trying something else for debugging (may be slower) */
+ //#define BURN_ENDIAN_SWAP_INT16(x)                           (((x) >> 8) | (((x) & 0xFF) << 8))
+ //#define BURN_ENDIAN_SWAP_INT32(x)                           (((x) >> 24) | (((x) & 0x00FF0000) >> 8) | (((x) & 0x0000FF00) << 8) | (((x) & 0xFF) << 24))
++#elif defined(__NetBSD__)
++#include <sys/types.h>
++#include <machine/bswap.h>
++#define BURN_ENDIAN_SWAP_INT8(x)                              (x^1)
++#define BURN_ENDIAN_SWAP_INT16(x)                             (bswap16(x))
++#define BURN_ENDIAN_SWAP_INT32(x)                             (bswap32(x))
++#define BURN_ENDIAN_SWAP_INT64(x)                             (bswap64(x))
++#else
++#define BURN_ENDIAN_SWAP_INT8(x)                              (x^1)
++#define BURN_ENDIAN_SWAP_INT16(x)                             ((((x) << 8) & 0xff00) | (((x) >> 8) & 0x00ff))
++#define BURN_ENDIAN_SWAP_INT32(x)                             ((((x) << 24) & 0xff000000) | (((x) << 8) & 0x00ff0000) | (((x) >> 8) & 0x0000ff00) | (((x) >> 24) & 0x000000ff))
+ #endif
+ 
+ #ifdef NO_64BIT_BYTESWAP



Home | Main Index | Thread Index | Old Index