Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2026 14:22:54 +0000
From:      Robert Clausecker <fuz@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 41db1f44d647 - 2026Q1 - misc/bb: patch properly
Message-ID:  <6990853e.47da0.23fbcd92@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch 2026Q1 has been updated by fuz:

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

commit 41db1f44d64706a28a83532721f9ba7f13640893
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-02-12 17:51:28 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-02-14 14:22:25 +0000

    misc/bb: patch properly
    
     - remove REGPARM entirely, it doesn't do any good these days and
       blocks portability
     - remove use of gcc, no longer needed
     - patch some portability issues
    
    MFH:            2026Q1
    Sponsored by:   Raptor Computing Systems, LLC
    
    (cherry picked from commit 5cc28c8ebd451e1a34fed73e0998d42d5c5ad627)
---
 misc/bb/Makefile                | 13 ++-----------
 misc/bb/files/patch-Makefile.in |  6 +++---
 misc/bb/files/patch-bb.c        | 10 ++++++++++
 misc/bb/files/patch-formulas.h  | 11 +++++++++++
 misc/bb/files/patch-main.c      | 11 +++++++++++
 misc/bb/files/patch-tex.c       | 13 +++++++++++++
 misc/bb/files/patch-timers.h    | 13 +++++++++++++
 misc/bb/files/patch-zoom.c      | 43 +++++++++++++++++++++++++++++++++++++++++
 8 files changed, 106 insertions(+), 14 deletions(-)

diff --git a/misc/bb/Makefile b/misc/bb/Makefile
index 1070fe43c9e6..622b67e573de 100644
--- a/misc/bb/Makefile
+++ b/misc/bb/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	bb
 DISTVERSION=	1.3rc1
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	misc
 MASTER_SITES=	SF/aa-project/${PORTNAME}/${DISTVERSION}
 
@@ -19,21 +19,12 @@ WRKSRC=		${WRKDIR}/bb-1.3.0
 PORTDOCS=	README
 PLIST_FILES=	bin/bb share/man/man1/bb.1.gz share/bb/bb.s3m share/bb/bb2.s3m \
 		share/bb/bb3.s3m
+CFLAGS+=	-Wno-error=implicit-int -Wno-pointer-sign
 
 OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.options.mk>
 
-.if ${ARCH} != amd64 && ${ARCH} != i386
-USES+=		compiler:gcc-c++11-lib
-.elif ${OPSYS} == FreeBSD
-CFLAGS+=	-Wno-error=incompatible-function-pointer-types
-.endif
-
-pre-patch:
-	@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -E -e "s@#include +<malloc.h>@#include <stdlib.h>@g" \
-		-e 's, REGISTERS \(3\),,g'
-
 post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
diff --git a/misc/bb/files/patch-Makefile.in b/misc/bb/files/patch-Makefile.in
index c879f23a6657..a1628df9ff2f 100644
--- a/misc/bb/files/patch-Makefile.in
+++ b/misc/bb/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig	Wed Mar 27 19:09:08 2002
-+++ Makefile.in	Wed Mar 27 19:08:58 2002
-@@ -87,7 +87,7 @@
+--- Makefile.in.orig	2026-02-12 17:39:06 UTC
++++ Makefile.in
+@@ -87,7 +87,7 @@ LDFLAGS = @LDFLAGS@
  DEFS = @DEFS@ -I. -I$(srcdir) -I.
  CPPFLAGS = @CPPFLAGS@
  LDFLAGS = @LDFLAGS@
diff --git a/misc/bb/files/patch-bb.c b/misc/bb/files/patch-bb.c
new file mode 100644
index 000000000000..a8879f1a2a4b
--- /dev/null
+++ b/misc/bb/files/patch-bb.c
@@ -0,0 +1,10 @@
+--- bb.c.orig	2026-02-12 17:43:44 UTC
++++ bb.c
+@@ -24,6 +24,7 @@
+ #include <string.h>
+ #include <stdlib.h>
+ #include <ctype.h>
++#include <time.h>
+ #include <aalib.h>
+ #include "bb.h"
+ 
diff --git a/misc/bb/files/patch-formulas.h b/misc/bb/files/patch-formulas.h
new file mode 100644
index 000000000000..8d14d2e1fdef
--- /dev/null
+++ b/misc/bb/files/patch-formulas.h
@@ -0,0 +1,11 @@
+--- formulas.h.orig	2001-04-09 13:00:19 UTC
++++ formulas.h
+@@ -50,7 +50,7 @@ struct formula {
+ #define FORMULAMAGIC 1121
+ struct formula {
+     int magic;
+-    int (*calculate) (number_t, number_t, number_t, number_t) REGISTERS(3);
++    int (*calculate) (number_t, number_t, number_t, number_t);
+     char *name[2];
+     vinfo v;
+     int mandelbrot;
diff --git a/misc/bb/files/patch-main.c b/misc/bb/files/patch-main.c
new file mode 100644
index 000000000000..c5b4772b3dc8
--- /dev/null
+++ b/misc/bb/files/patch-main.c
@@ -0,0 +1,11 @@
+--- main.c.orig	2026-02-12 17:45:38 UTC
++++ main.c
+@@ -21,6 +21,8 @@
+  * 675 Mass Ave, Cambridge, MA 02139, USA.
+  */
+ 
++#include <ctype.h>
++#include <string.h>
+ #include <unistd.h>
+ #include "timers.h"
+ #include "bb.h"
diff --git a/misc/bb/files/patch-tex.c b/misc/bb/files/patch-tex.c
new file mode 100644
index 000000000000..7016bb1ee70a
--- /dev/null
+++ b/misc/bb/files/patch-tex.c
@@ -0,0 +1,13 @@
+--- tex.c.orig	2026-02-12 17:46:39 UTC
++++ tex.c
+@@ -128,8 +128,8 @@ static inline void makej(long x1, long x2, long n1z, l
+     off1 = off + x2 - x1;
+     for (; off <= off1;) {
+ 
+-	ry = (abs(n3y) >> 7) + 64;
+-	rx = (abs(n3x) >> 7) + 64;
++	ry = (labs(n3y) >> 7) + 64;
++	rx = (labs(n3x) >> 7) + 64;
+ 	if (((n3z >> 8) - *zbptr) < 500) {
+ 	    *off = *(envmapa + (((unsigned int) ((ry << 7) + rx)) & (128 * 128 - 1)));
+ 	    *zbptr = n3z >> 8;
diff --git a/misc/bb/files/patch-timers.h b/misc/bb/files/patch-timers.h
new file mode 100644
index 000000000000..cacd79788e76
--- /dev/null
+++ b/misc/bb/files/patch-timers.h
@@ -0,0 +1,13 @@
+--- timers.h.orig	2001-04-26 15:04:22 UTC
++++ timers.h
+@@ -49,8 +49,8 @@ void tl_allegromode (int mode);	/*Just for djgpp */
+ extern tl_group *syncgroup, *asyncgroup;
+ void tl_sleep (int);
+ void tl_allegromode (int mode);	/*Just for djgpp */
+-int tl_lookup_timer (tl_timer * t) REGISTERS (3);
+-void tl_reset_timer (tl_timer * t) REGISTERS (3);
++int tl_lookup_timer (tl_timer * t);
++void tl_reset_timer (tl_timer * t);
+ 
+ struct timeemulator *tl_create_emulator(void);
+ void tl_free_emulator(struct timeemulator *t);
diff --git a/misc/bb/files/patch-zoom.c b/misc/bb/files/patch-zoom.c
new file mode 100644
index 000000000000..51cd50c0b9b4
--- /dev/null
+++ b/misc/bb/files/patch-zoom.c
@@ -0,0 +1,43 @@
+--- zoom.c.orig	2026-02-12 17:47:35 UTC
++++ zoom.c
+@@ -241,13 +241,13 @@ static /*INLINE */ void mkrealloc_table(register numbe
+ #endif
+     if (dyndata == NULL) {
+ 	fprintf(stderr, "XaoS fatal error:Could not allocate memory for"
+-		"temporary dynamical data of size:%i\n"
++		"temporary dynamical data of size:%zu\n"
+ 		"I am unable to handle this problem so please resize to lower window\n", (size) * (DSIZE + 1) * sizeof(struct dyn_data) + size * sizeof(int) + size * sizeof(int));
+ 	return;
+     }
+     if (best == NULL) {
+ 	fprintf(stderr, "XaoS fatal error:Could not allocate memory for"
+-		"temporary dynamical data of size:%i\n"
++		"temporary dynamical data of size:%zu\n"
+ 		"I am unable to handle this problem so please resize to lower window\n", (size) * (DSIZE + 1) * sizeof(struct dyn_data) + size * sizeof(int) + size * sizeof(int));
+ #ifndef HAVE_ALLOCA
+ 	free(dyndata);
+@@ -256,7 +256,7 @@ static /*INLINE */ void mkrealloc_table(register numbe
+     }
+     if (best1 == NULL) {
+ 	fprintf(stderr, "XaoS fatal error:Could not allocate memory for"
+-		"temporary dynamical data of size:%i\n"
++		"temporary dynamical data of size:%zu\n"
+ 		"I am unable to handle this problem so please resize to lower window\n", (size) * (DSIZE + 1) * sizeof(struct dyn_data) + size * sizeof(int) + size * sizeof(int));
+ #ifndef HAVE_ALLOCA
+ 	free(dyndata);
+@@ -586,13 +586,13 @@ static /*INLINE */ void moveoldpoints(void)
+ #endif
+     if (size == NULL) {
+ 	fprintf(stderr, "XaoS fratal error:Could not allocate memory for"
+-		"temporary dynamical data of size:%i\n"
++		"temporary dynamical data of size:%zu\n"
+ 		"I am unable to handle this problem so please resize to lower window\n", 2 * d->width * sizeof(int));
+ 	return;
+     }
+     if (start == NULL) {
+ 	fprintf(stderr, "XaoS fratal error:Could not allocate memory for"
+-		"temporary dynamical data of size:%i\n"
++		"temporary dynamical data of size:%zu\n"
+ 		"I am unable to handle this problem so please resize to lower window\n", 2 * d->width * sizeof(int));
+ #ifndef HAVE_ALLOCA
+ 	free(size);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6990853e.47da0.23fbcd92>