Ah makes sense! Ok here's the patch without the conversions.

OK?

On Sat, 2024-08-03 at 07:01 +0100, Stuart Henderson wrote:
> On 2024/08/02 00:02, Jag Talon wrote:
> > Aside from bumping the version, I also made patches to switch out
> > strcat/strcpy/strcmp/sprintf where I can as recommended by
> > https://www.openbsd.org/faq/ports/guide.html
> 
> hmm, we generally don't do that in ports. patches like that are quite
> invasive and hard to handle when updating, so if done at all are
> better
> off going upstream rather than being done in ports. (also we've had
> bugs
> introduced in ports before, sometimes quite nasty, in sprintf/etc
> conversion patches).
> 
> that point in guide.html specifically refers to network servers
> (though
> for a network server, seeing loads of unsafe string functions would
> more
> likely be a reason not to have it in ports at all rather than to
> patch
> it).
> 
> the rest looks alright but I'd orefer to drop the string patches.
> 

-- 
he/him
jagtalon.net
weirder.earth/@jag
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/brandy/Makefile,v
diff -u -p -u -r1.6 Makefile
--- Makefile	26 Sep 2023 12:02:00 -0000	1.6
+++ Makefile	3 Aug 2024 12:41:04 -0000
@@ -1,42 +1,50 @@
-COMMENT =	interpreter for BBC Basic (Basic V)
+COMMENT =	interpreter for BBC Basic (Basic VI)
 
-DISTNAME =	brandy-1.20.1
-REVISION =	1
+V =		1.23.2
+DISTNAME =	MatrixBrandy-${V}
+PKGNAME =	brandy-${V}
+EXTRACT_SUFX =	.tar.xz
 
 CATEGORIES =	lang
 
-HOMEPAGE =	http://jaguar.orpheusweb.co.uk/branpage.html
+HOMEPAGE =	http://brandy.matrixnetwork.co.uk/
+MAINTAINER =	Jag Talon <jag@aangat.lahat.computer>
 
 # GPLv2+
 PERMIT_PACKAGE =	Yes
 
-WANTLIB +=	SDL c m
+WANTLIB +=	SDL c m pthread X11
 
-SITES =		${SITE_SOURCEFORGE:=brandy/}
+SITES =		http://brandy.matrixnetwork.co.uk/releases/
 
 LIB_DEPENDS +=	devel/sdl
+USE_GMAKE =	Yes
 
-CFLAGS +=	-I${LOCALBASE}/include/SDL
-LDFLAGS +=	-L${LOCALBASE}/lib
-
-MAKE_FLAGS =	CC="${CC}" CFLAGS="${CFLAGS}" LD="${CC}" LDFLAGS="${LDFLAGS}"
-
+MAKE_FLAGS =	CC="${CC}" LD="${CC}"
 MAKE_FILE =	makefile
 
 NO_TEST =	Yes
 
 post-build:
 	cd ${WRKSRC}; \
-	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f makefile.text
+	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f makefile.text clean
+
+	cd ${WRKSRC}; \
+	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f makefile.text all
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/tbrandy ${PREFIX}/bin/brandy
 	${INSTALL_PROGRAM} ${WRKSRC}/brandy ${PREFIX}/bin/brandy-sdl
+
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/brandy
-	${INSTALL_DATA} ${WRKSRC}/docs/basic ${PREFIX}/share/doc/brandy
-	${INSTALL_DATA} ${WRKSRC}/docs/messages ${PREFIX}/share/doc/brandy
-	${INSTALL_DATA} ${WRKSRC}/docs/use ${PREFIX}/share/doc/brandy
+	${INSTALL_DATA} ${WRKSRC}/docs/* ${PREFIX}/share/doc/brandy
+
 	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/brandy
-	${INSTALL_DATA} ${WRKSRC}/examples/* ${PREFIX}/share/examples/brandy
+	${INSTALL_DATA} ${WRKSRC}/examples/[!Mode7]* ${PREFIX}/share/examples/brandy
+
+	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/brandy/Mode7
+	${INSTALL_DATA} ${WRKSRC}/examples/Mode7/* ${PREFIX}/share/examples/brandy/Mode7
+
+
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/brandy/distinfo,v
diff -u -p -u -r1.1.1.1 distinfo
--- distinfo	19 Mar 2017 21:49:31 -0000	1.1.1.1
+++ distinfo	3 Aug 2024 12:41:04 -0000
@@ -1,2 +1,2 @@
-SHA256 (brandy-1.20.1.tar.gz) = YiPgbFQf7qxKWrrXM/3g0Uxuveta0DbAPQ+r5C/vA+w=
-SIZE (brandy-1.20.1.tar.gz) = 422587
+SHA256 (MatrixBrandy-1.23.2.tar.xz) = CI8WhMIBtzn6MObxvjlDNGNitQjbMpUWoZWN9tAXyQA=
+SIZE (MatrixBrandy-1.23.2.tar.xz) = 461888
Index: patches/patch-makefile
===================================================================
RCS file: /cvs/ports/lang/brandy/patches/patch-makefile,v
diff -u -p -u -r1.2 patch-makefile
--- patches/patch-makefile	11 Mar 2022 19:28:51 -0000	1.2
+++ patches/patch-makefile	3 Aug 2024 12:41:04 -0000
@@ -1,11 +1,24 @@
---- makefile.orig	Sat Mar 18 21:34:08 2017
-+++ makefile	Sat Mar 18 21:35:05 2017
-@@ -3,7 +3,7 @@
- CC = gcc
- LD = gcc
+- remove git.mk since we're not in a git repo
+- remove -ldl and -lrt since they're not needed
+
+Index: makefile
+--- makefile.orig
++++ makefile
+@@ -5,15 +5,13 @@ LD = gcc
+ STRIP = strip
+ ADDFLAGS = ${BRANDY_BUILD_FLAGS}
  
--CFLAGS += -g -DDEBUG -I/usr/include/SDL -DUSE_SDL
-+CFLAGS += -DUSE_SDL
- CFLAGS2 = -O2 -I/usr/include/SDL -DUSE_SDL
+-include build/git.mk
+-
+ #CFLAGS = -g -DDEBUG $(shell sdl-config --cflags)  -I/usr/local/include/SDL -DUSE_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
+ #CFLAGS = -g $(shell sdl-config --cflags)  -I/usr/local/include/SDL -DUSE_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
+-CFLAGS = -O3 -fPIE $(shell sdl-config --cflags) -DUSE_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
++CFLAGS = -O3 -fPIE $(shell sdl-config --cflags) -DUSE_SDL -DDEFAULT_IGNORE -Wall -DBRANDY_RELEASE $(ADDFLAGS)
  
  LDFLAGS +=
+ 
+-LIBS = -lm $(shell sdl-config --libs) -ldl -pthread -lrt -lX11
++LIBS = -lm $(shell sdl-config --libs) -pthread -lX11
+ 
+ SRCDIR = src
+ 
Index: patches/patch-makefile_text
===================================================================
RCS file: /cvs/ports/lang/brandy/patches/patch-makefile_text,v
diff -u -p -u -r1.2 patch-makefile_text
--- patches/patch-makefile_text	11 Mar 2022 19:28:51 -0000	1.2
+++ patches/patch-makefile_text	3 Aug 2024 12:41:04 -0000
@@ -1,11 +1,24 @@
---- makefile.text.orig	Thu Jun 27 14:56:55 2013
-+++ makefile.text	Tue Mar 14 22:53:59 2017
-@@ -3,7 +3,7 @@
- CC = gcc
- LD = gcc
+- remove git.mk since we're not in a git repo
+- remove -ldl and -lrt since they're not needed
+
+Index: makefile.text
+--- makefile.text.orig
++++ makefile.text
+@@ -5,15 +5,13 @@ LD = gcc
+ STRIP = strip
+ ADDFLAGS = ${BRANDY_BUILD_FLAGS}
  
--CFLAGS += -g -DDEBUG -DNO_SDL
-+CFLAGS += -DNO_SDL
- CFLAGS2 = -O2 -DNO_SDL
+-include build/git.mk
+-
+ #CFLAGS = -g -DDEBUG -I/usr/include/SDL -DNO_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
+ #CFLAGS = -g -I/usr/include/SDL -DNO_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
+-CFLAGS = -O3 -fPIE -I/usr/include/SDL -DNO_SDL -DDEFAULT_IGNORE -Wall $(GITFLAGS) $(ADDFLAGS)
++CFLAGS = -O3 -fPIE -I/usr/include/SDL -DNO_SDL -DDEFAULT_IGNORE -Wall -DBRANDY_RELEASE $(ADDFLAGS)
  
  LDFLAGS =
+ 
+-LIBS = -lm -ldl -lpthread -lrt
++LIBS = -lm -lpthread
+ 
+ SRCDIR = src
+ 
Index: patches/patch-src_keyboard_c
===================================================================
RCS file: patches/patch-src_keyboard_c
diff -N patches/patch-src_keyboard_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_keyboard_c	3 Aug 2024 12:41:04 -0000
@@ -0,0 +1,11 @@
+Index: src/keyboard.c
+--- src/keyboard.c.orig
++++ src/keyboard.c
+@@ -108,6 +108,7 @@
+ **
+ */
+ 
++#include <sys/select.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/lang/brandy/pkg/DESCR,v
diff -u -p -u -r1.1.1.1 DESCR
--- pkg/DESCR	19 Mar 2017 21:49:31 -0000	1.1.1.1
+++ pkg/DESCR	3 Aug 2024 12:41:04 -0000
@@ -1,5 +1,5 @@
-Brandy implements Basic V, the dialect of Basic that Acorn Computers
+Brandy implements Basic VI, the dialect of Basic that Acorn Computers
 supplied with their ranges of desktop computers that use the ARM
-processor such as the Archimedes and RiscPC. Basic V is an extended
+processor such as the Archimedes and RiscPC. Basic VI is an extended
 version of BBC Basic. This was the Basic used on the BBC Micro that
 Acorn made during the early 1980s.
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/brandy/pkg/PLIST,v
diff -u -p -u -r1.3 PLIST
--- pkg/PLIST	11 Mar 2022 19:28:52 -0000	1.3
+++ pkg/PLIST	3 Aug 2024 12:41:04 -0000
@@ -1,24 +1,67 @@
 @bin bin/brandy
 @bin bin/brandy-sdl
 share/doc/brandy/
-share/doc/brandy/basic
-share/doc/brandy/messages
-share/doc/brandy/use
+share/doc/brandy/COPYING
+share/doc/brandy/ChangeLog
+share/doc/brandy/Config.txt
+share/doc/brandy/Mode7.txt
+share/doc/brandy/README
+share/doc/brandy/ScreenModes.txt
+share/doc/brandy/banana-bugs.txt
+share/doc/brandy/basic.txt
+share/doc/brandy/compiling.txt
+share/doc/brandy/extensions.txt
+share/doc/brandy/graphics.txt
+share/doc/brandy/history.txt
+share/doc/brandy/identification.txt
+share/doc/brandy/internals.txt
+share/doc/brandy/jgh-notes.txt
+share/doc/brandy/keyboard-codes
+share/doc/brandy/keymap.txt
+share/doc/brandy/messages.txt
+share/doc/brandy/networking.txt
+share/doc/brandy/osbyte.txt
+share/doc/brandy/raspi-gpio.txt
+share/doc/brandy/standalone-app.txt
+share/doc/brandy/sys-calls.txt
+share/doc/brandy/use.txt
 share/examples/brandy/
+share/examples/brandy/BubbleUniverse
+share/examples/brandy/Mode7/
+share/examples/brandy/Mode7/M7terminal
+share/examples/brandy/Mode7/README
+share/examples/brandy/Mode7/SAA505xDemo
+share/examples/brandy/Mode7/m7point
+share/examples/brandy/Mode7/mode7demo
+share/examples/brandy/Mode7/telstar
+share/examples/brandy/Mode7/ttxtedit
 share/examples/brandy/README
+share/examples/brandy/SAA505Xlib
+share/examples/brandy/Snow
+share/examples/brandy/bin2c
 share/examples/brandy/cmdline
 share/examples/brandy/combsort
 share/examples/brandy/cricket
-share/examples/brandy/dow
+share/examples/brandy/gpiolib
 share/examples/brandy/graphdemo
 share/examples/brandy/hanoi
 share/examples/brandy/hex
 share/examples/brandy/lands
+share/examples/brandy/mouse-doodle
 share/examples/brandy/pastriang
+share/examples/brandy/platformcheck
+share/examples/brandy/shroud
+share/examples/brandy/sierpinski
 share/examples/brandy/sieve
+share/examples/brandy/sine
+share/examples/brandy/sphere
+share/examples/brandy/spiral
+share/examples/brandy/spiral-pattern
+share/examples/brandy/splash
 share/examples/brandy/tekdemo1
 share/examples/brandy/tekdemo2
 share/examples/brandy/teklib
+share/examples/brandy/tekspiral
 share/examples/brandy/trees1
 share/examples/brandy/trees2
 share/examples/brandy/tvtime

Reply via email to