Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: [update] Brandy 1.20.1 -> 1.23.2
To:
Stuart Henderson <stu@spacehopper.org>
Cc:
Jag Talon <jag@aangat.lahat.computer>, ports@openbsd.org
Date:
Mon, 05 Aug 2024 19:36:47 +0200

Download raw body.

Thread
On 2024/08/05 18:18:00 +0100, Stuart Henderson <stu@spacehopper.org> wrote:
> On 2024/08/05 09:05, Jag Talon wrote:
> > I think I'm having trouble applying the patch I'm getting the following
> > .rej files:
> > 
> > https://okturing.com/src/20543/body
> 
> No issue patching here. Perhaps your mail client mangles something,
> Try the "download raw body" link from marc.info.
> 
> > One thing I'd like to add is -DBRANDY_NOVERCHECK so that Brandy doesn't
> > check for new versions whenever it starts up.
> 
> Makes sense.

added in the revised diff.

> > On Sun, 2024-08-04 at 20:54 +0200, Omar Polo wrote:
> > > +SDL_CFLAGS !!=	sdl-config --cflags
> > > +SDL_LDFLAGS !!=	sdl-config --libs
> ..
> > > +CFLAGS +=	${SDL_CFLAGS} -DDEFAULT_IGNORE -Wall
> > > +LDFLAGS +=	${SDL_LDFLAGS} -lm -pthread -L${X11BASE}/lib/ -lX11
> 
> I don't really like the make parse-time interpolation with !!=,
> could you switch to this instead please?
> 
> CFLAGS +=       `sdl-config --cflags` -DDEFAULT_IGNORE -Wall
> LDFLAGS +=      `sdl-config --libs` -lm -pthread -L${X11BASE}/lib/ -lX11

Sure, here's a fixed diff.

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/lang/brandy/Makefile,v
diff -u -p -r1.6 Makefile
--- Makefile	26 Sep 2023 12:02:00 -0000	1.6
+++ Makefile	5 Aug 2024 17:35:27 -0000
@@ -1,42 +1,53 @@
-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 X11 c m pthread
 
-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
+# since we disable git
+CFLAGS +=	-DBRANDY_RELEASE
 
-MAKE_FLAGS =	CC="${CC}" CFLAGS="${CFLAGS}" LD="${CC}" LDFLAGS="${LDFLAGS}"
+CFLAGS +=	`sdl-config --cflags` -DDEFAULT_IGNORE -DBRANDY_NOVERCHECK -Wall
+LDFLAGS +=	`sdl-config --libs` -lm -pthread -L${X11BASE}/lib/ -lX11
 
+MAKE_FLAGS =	CC="${CC}" LD="${CC}" LIBS="${LDFLAGS}" CFLAGS="${CFLAGS}"
 MAKE_FILE =	makefile
 
 NO_TEST =	Yes
 
-post-build:
-	cd ${WRKSRC}; \
-	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} -f makefile.text
+do-build:
+	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -f makefile -C "${WRKSRC}" \
+		${MAKE_FLAGS} CFLAGS="${CFLAGS} -DUSE_SDL" all
+	${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} -f makefile.text -C "${WRKSRC}" \
+		${MAKE_FLAGS} CFLAGS="${CFLAGS} -DNO_SDL" clean 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: /home/cvs/ports/lang/brandy/distinfo,v
diff -u -p -r1.1.1.1 distinfo
--- distinfo	19 Mar 2017 21:49:31 -0000	1.1.1.1
+++ distinfo	4 Aug 2024 18:16:30 -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: /home/cvs/ports/lang/brandy/patches/patch-makefile,v
diff -u -p -r1.2 patch-makefile
--- patches/patch-makefile	11 Mar 2022 19:28:51 -0000	1.2
+++ patches/patch-makefile	4 Aug 2024 18:29:59 -0000
@@ -1,11 +1,25 @@
---- 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
+- show commands ran by make
+
+Index: makefile
+--- makefile.orig
++++ makefile
+@@ -5,8 +5,6 @@ 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)
+@@ -78,8 +76,7 @@ brandy:	$(OBJ)
  
- LDFLAGS +=
+ include build/depends.mk
+ 
+-.c.o:; 	@echo -n "$@ "
+-	@$(CC) $(CFLAGS) $< -c -o $@ >/dev/null
++.c.o:; 	$(CC) $(CFLAGS) $< -c -o $@
+ 
+ recompile:
+ 	$(CC) $(CFLAGS) $(SRC) $(LIBS) -o brandy
Index: patches/patch-makefile_text
===================================================================
RCS file: /home/cvs/ports/lang/brandy/patches/patch-makefile_text,v
diff -u -p -r1.2 patch-makefile_text
--- patches/patch-makefile_text	11 Mar 2022 19:28:51 -0000	1.2
+++ patches/patch-makefile_text	4 Aug 2024 18:30:52 -0000
@@ -1,11 +1,25 @@
---- 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
+- show commands ran by make
+
+Index: makefile.text
+--- makefile.text.orig
++++ makefile.text
+@@ -5,8 +5,6 @@ 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)
+@@ -57,8 +55,7 @@ sbrandy:	$(OBJ) $(SIMPLETEXTOBJ)
+ include build/depends.mk
  
- LDFLAGS =
+ .c.o:
+-	@echo -n "$@ "
+-	@$(CC) $(CFLAGS) $< -c -o $@
++	$(CC) $(CFLAGS) $< -c -o $@
+ 
+ trecompile:
+ 	$(CC) $(CFLAGS) $(SRC) $(TEXTONLYSRC) $(LIBS) -o tbrandy
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	4 Aug 2024 18:24:28 -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: /home/cvs/ports/lang/brandy/pkg/DESCR,v
diff -u -p -r1.1.1.1 DESCR
--- pkg/DESCR	19 Mar 2017 21:49:31 -0000	1.1.1.1
+++ pkg/DESCR	4 Aug 2024 18:15:40 -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: /home/cvs/ports/lang/brandy/pkg/PLIST,v
diff -u -p -r1.3 PLIST
--- pkg/PLIST	11 Mar 2022 19:28:52 -0000	1.3
+++ pkg/PLIST	4 Aug 2024 18:15:40 -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