Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 2026 20:24:13 +0000
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c653d172b267 - main - graphics/s10sh: fix endianess code
Message-ID:  <6a2dbc6d.33734.7e441a6e@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c653d172b2678fed4bdd92782c593b995d41c5e5

commit c653d172b2678fed4bdd92782c593b995d41c5e5
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-11 15:10:15 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-13 20:23:20 +0000

    graphics/s10sh: fix endianess code
    
    Instead of hard-coding a list of architectures, defer to <endian.h>.
    This fixes the build on all platforms tested.
    
    MFH:            2026Q2
---
 graphics/s10sh/Makefile              |  5 -----
 graphics/s10sh/files/patch-bytesex.h | 28 +++++++++++++++++++---------
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/graphics/s10sh/Makefile b/graphics/s10sh/Makefile
index 334f30fdd19e..eb27e7525428 100644
--- a/graphics/s10sh/Makefile
+++ b/graphics/s10sh/Makefile
@@ -12,11 +12,6 @@ WWW=		http://www.reynoldsnet.org/s10sh/
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN_aarch64=	Fails to build: error: cannot find the byte order for this architecture, fix bytesex.h
-BROKEN_armv6=	Fails to build: error: cannot find the byte order for this architecture, fix bytesex.h
-BROKEN_armv7=	Fails to build: error: cannot find the byte order for this architecture, fix bytesex.h
-BROKEN_riscv64=	Fails to build: error: cannot find the byte order for this architecture, fix bytesex.h
-
 USES=		ncurses readline
 
 # Don't extract the libusb bundled with s10sh:
diff --git a/graphics/s10sh/files/patch-bytesex.h b/graphics/s10sh/files/patch-bytesex.h
index 2c1472da9dc3..35256e46013c 100644
--- a/graphics/s10sh/files/patch-bytesex.h
+++ b/graphics/s10sh/files/patch-bytesex.h
@@ -1,12 +1,22 @@
---- bytesex.h.orig	Sat Mar 17 22:27:18 2007
-+++ bytesex.h	Sat Mar 17 22:30:35 2007
-@@ -5,7 +5,8 @@
+--- bytesex.h.orig	2003-08-09 16:42:24 UTC
++++ bytesex.h
+@@ -3,15 +3,11 @@
+ #ifndef S10SH_BYTESEX_H
+ #define S10SH_BYTESEX_H
  
- #if 	defined(__i386__) \
- 	|| defined(__alpha__) \
+-#if 	defined(__i386__) \
+-	|| defined(__alpha__) \
 -	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
-+	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__))) \
-+	|| defined(__amd64__) || defined(__ia64__)
++#include <endian.h>
++
++#if BYTE_ORDER == LITTLE_ENDIAN
  #define BYTE_ORDER_LITTLE_ENDIAN
- #elif 	defined(__mc68000__) \
- 	|| defined (__sparc__) \
+-#elif 	defined(__mc68000__) \
+-	|| defined (__sparc__) \
+-	|| defined (__sparc) \
+-	|| defined (__PPC__) \
+-	|| (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
++#elif BYTE_ORDER == BIG_ENDIAN
+ #define BYTE_ORDER_BIG_ENDIAN
+ #else
+ # error can not find the byte order for this architecture, fix bytesex.h


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a2dbc6d.33734.7e441a6e>