pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/emulators/libretro-vba-next
Module Name: pkgsrc
Committed By: nia
Date: Tue May 13 13:39:52 UTC 2025
Modified Files:
pkgsrc/emulators/libretro-vba-next: distinfo
Added Files:
pkgsrc/emulators/libretro-vba-next/patches: patch-src_port.h
Log Message:
libretro-vba-next: Fix build on sparc64.
The portable C code doesn't work, so use the <sys/endian.h> or
<sys/byteorder.h> (on SunOS) functions instead.
This actually affects all bigendian platforms except for PowerPC
(for which vba-next has inline assembler and the portable C code is
not used).
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 pkgsrc/emulators/libretro-vba-next/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/emulators/libretro-vba-next/patches/patch-src_port.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/emulators/libretro-vba-next/distinfo
diff -u pkgsrc/emulators/libretro-vba-next/distinfo:1.6 pkgsrc/emulators/libretro-vba-next/distinfo:1.7
--- pkgsrc/emulators/libretro-vba-next/distinfo:1.6 Tue Oct 26 10:23:57 2021
+++ pkgsrc/emulators/libretro-vba-next/distinfo Tue May 13 13:39:51 2025
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.6 2021/10/26 10:23:57 nia Exp $
+$NetBSD: distinfo,v 1.7 2025/05/13 13:39:51 nia Exp $
BLAKE2s (libretro-vba-next-20200106-019132daf41e33a9529036b8728891a221a8ce2e.tar.gz) = e7c564b8d9b81fcf1ac98c887727f5e252894c79604f727f9a8096c19631cb41
SHA512 (libretro-vba-next-20200106-019132daf41e33a9529036b8728891a221a8ce2e.tar.gz) =
7b99342cce7548e537a107c7060209195bb9bee6ba7b0b949a346356206d7152fdd4d61156087f2b6ea8b194d64b6f81e49753a42babf169a00789b220c26600
Size (libretro-vba-next-20200106-019132daf41e33a9529036b8728891a221a8ce2e.tar.gz) = 202237 bytes
+SHA1 (patch-src_port.h) = de2cbaa475583b6247efb310a60b2db15099dbfb
Added files:
Index: pkgsrc/emulators/libretro-vba-next/patches/patch-src_port.h
diff -u /dev/null pkgsrc/emulators/libretro-vba-next/patches/patch-src_port.h:1.1
--- /dev/null Tue May 13 13:39:52 2025
+++ pkgsrc/emulators/libretro-vba-next/patches/patch-src_port.h Tue May 13 13:39:52 2025
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_port.h,v 1.1 2025/05/13 13:39:52 nia Exp $
+
+Fix the broken byte swapping code for non-PowerPC big endian platforms.
+
+--- src/port.h.orig 2020-01-06 22:55:53.000000000 +0000
++++ src/port.h
+@@ -75,11 +75,18 @@
+ #define READ32LE( base) _byteswap_ulong(*((u32 *)(base)))
+ #define WRITE16LE(base, value) *((u16 *)(base)) = _byteswap_ushort((value))
+ #define WRITE32LE(base, value) *((u32 *)(base)) = _byteswap_ulong((value))
++#elif defined(__sun)
++#include <sys/byteorder.h>
++#define READ16LE(x) BSWAP_16(*((u16 *)(x)))
++#define READ32LE(x) BSWAP_32(*((u32 *)(x)))
++#define WRITE16LE(x,v) *((u16 *)(x)) = BSWAP_16((v))
++#define WRITE32LE(x,v) *((u32 *)(x)) = BSWAP_32((v))
+ #else
+-#define READ16LE(x) (*((u16 *)(x))<<8)|(*((u16 *)(x))>>8);
+-#define READ32LE(x) (*((u32 *)(x))<<24)|((*((u32 *)(x))<<8)&0xff0000)|((((*((u32 *)(x))(x)>>8)&0xff00)|(*((u32 *)(x))>>24);
+-#define WRITE16LE(x,v) *((u16 *)(x)) = (*((u16 *)(v))<<8)|(*((u16 *)(v))>>8);
+-#define WRITE32LE(x,v) *((u32 *)(x)) = ((v)<<24)|(((v)<<8)&0xff0000)|(((v)>>8)&0xff00)|((v)>>24);
++#include <sys/endian.h>
++#define READ16LE(x) le16toh(*((u16 *)(x)))
++#define READ32LE(x) le32toh(*((u32 *)(x)))
++#define WRITE16LE(x,v) *((u16 *)(x)) = htole16((v))
++#define WRITE32LE(x,v) *((u32 *)(x)) = htole32((v))
+ #endif
+ #else
+ #define READ16LE(x) *((u16 *)(x))
Home |
Main Index |
Thread Index |
Old Index