Re: [PATCH] lang/brandy (add an SDL flavor)
On 2017/03/26 14:44, Frederic Cambus wrote: > On Sat, Mar 25, 2017 at 04:58:09PM +, Christian Weisgerber wrote: > > On 2017-03-24, Frederic Cambuswrote: > > > > > Here is a diff to add an SDL flavor to lang/brandy. > > > > Why make this a flavor? Why not just add it unconditionally to the > > port? > > I suppose it wouldn't hurt indeed ;) > > Here is a new diff to build both versions. > > Comments? OK? > > Index: Makefile > === > RCS file: /cvs/ports/lang/brandy/Makefile,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 Makefile > --- Makefile 19 Mar 2017 21:49:31 - 1.1.1.1 > +++ Makefile 26 Mar 2017 12:28:07 - > @@ -3,6 +3,7 @@ > COMMENT =interpreter for BBC Basic (Basic V) > > DISTNAME = brandy-1.20.1 > +REVISION = 0 > > CATEGORIES = lang > > @@ -13,18 +14,27 @@ MAINTAINER = Frederic Cambus # GPLv2+ > PERMIT_PACKAGE_CDROM = Yes > > -WANTLIB += c m > +WANTLIB += SDL c m > > MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=brandy/} > > -MAKE_FLAGS = CC="${CC}" LD="${CC}" > +LIB_DEPENDS += devel/sdl > > -MAKE_FILE = makefile.text tbrandy > +CFLAGS +=-I${LOCALBASE}/include/SDL > +LDFLAGS += -L${LOCALBASE}/lib > + > +MAKE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS}" LD="${CC}" LDFLAGS="${LDFLAGS}" > + > +MAKE_FILE = makefile > > NO_TEST =Yes > > +post-build: > + cd ${WRKSRC}; make CC="${CC}" LD="${CC}" -f makefile.text Could you use the standard make invocation with MAKE_ENV etc. please? ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} [...] Otherwise OK. > 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 > Index: patches/patch-makefile > === > RCS file: patches/patch-makefile > diff -N patches/patch-makefile > --- /dev/null 1 Jan 1970 00:00:00 - > +++ patches/patch-makefile26 Mar 2017 12:28:07 - > @@ -0,0 +1,12 @@ > +$OpenBSD$ > +--- makefile.origSat Mar 18 21:34:08 2017 > makefile Sat Mar 18 21:35:05 2017 > +@@ -3,7 +3,7 @@ > + CC = gcc > + LD = gcc > + > +-CFLAGS += -g -DDEBUG -I/usr/include/SDL -DUSE_SDL > ++CFLAGS += -DUSE_SDL > + CFLAGS2 = -O2 -I/usr/include/SDL -DUSE_SDL > + > + LDFLAGS += > Index: pkg/PLIST > === > RCS file: /cvs/ports/lang/brandy/pkg/PLIST,v > retrieving revision 1.1.1.1 > diff -u -p -r1.1.1.1 PLIST > --- pkg/PLIST 19 Mar 2017 21:49:31 - 1.1.1.1 > +++ pkg/PLIST 26 Mar 2017 12:28:07 - > @@ -1,5 +1,6 @@ > @comment $OpenBSD: PLIST,v 1.1.1.1 2017/03/19 21:49:31 fcambus Exp $ > @bin bin/brandy > +@bin bin/brandy-sdl > share/doc/brandy/ > share/doc/brandy/basic > share/doc/brandy/messages >
Re: [PATCH] lang/brandy (add an SDL flavor)
On Sat, Mar 25, 2017 at 04:58:09PM +, Christian Weisgerber wrote: > On 2017-03-24, Frederic Cambuswrote: > > > Here is a diff to add an SDL flavor to lang/brandy. > > Why make this a flavor? Why not just add it unconditionally to the > port? I suppose it wouldn't hurt indeed ;) Here is a new diff to build both versions. Comments? OK? Index: Makefile === RCS file: /cvs/ports/lang/brandy/Makefile,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 Makefile --- Makefile19 Mar 2017 21:49:31 - 1.1.1.1 +++ Makefile26 Mar 2017 12:28:07 - @@ -3,6 +3,7 @@ COMMENT = interpreter for BBC Basic (Basic V) DISTNAME = brandy-1.20.1 +REVISION = 0 CATEGORIES = lang @@ -13,18 +14,27 @@ MAINTAINER =Frederic Cambus
Re: [PATCH] lang/brandy (add an SDL flavor)
On 2017-03-24, Frederic Cambuswrote: > Here is a diff to add an SDL flavor to lang/brandy. Why make this a flavor? Why not just add it unconditionally to the port? -- Christian "naddy" Weisgerber na...@mips.inka.de
[PATCH] lang/brandy (add an SDL flavor)
Hi ports@, Here is a diff to add an SDL flavor to lang/brandy. Comments? OK? Index: Makefile === RCS file: /cvs/ports/lang/brandy/Makefile,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 Makefile --- Makefile19 Mar 2017 21:49:31 - 1.1.1.1 +++ Makefile24 Mar 2017 14:01:53 - @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1.1.1 2017/03/19 21:49:31 fcambus Exp $ +# $OpenBSD: Makefile.template,v 1.75 2016/03/20 17:19:49 naddy Exp $ COMMENT = interpreter for BBC Basic (Basic V) @@ -19,12 +19,25 @@ MASTER_SITES = ${MASTER_SITE_SOURCEFORGE MAKE_FLAGS = CC="${CC}" LD="${CC}" -MAKE_FILE =makefile.text tbrandy +FLAVORS = sdl +FLAVOR ?= + +.if ${FLAVOR:Msdl} +WANTLIB += SDL +LIB_DEPENDS += devel/sdl +CFLAGS += -I${LOCALBASE}/include/SDL +MAKE_FLAGS += LDFLAGS="-L${LOCALBASE}/lib" +MAKE_FILE =makefile +BINARY = brandy +.else +MAKE_FILE =makefile.text +BINARY = tbrandy +.endif NO_TEST = Yes do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/tbrandy ${PREFIX}/bin/brandy + ${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${PREFIX}/bin/brandy ${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 Index: patches/patch-makefile === RCS file: patches/patch-makefile diff -N patches/patch-makefile --- /dev/null 1 Jan 1970 00:00:00 - +++ patches/patch-makefile 24 Mar 2017 14:01:53 - @@ -0,0 +1,12 @@ +$OpenBSD$ +--- 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 + +-CFLAGS += -g -DDEBUG -I/usr/include/SDL -DUSE_SDL ++CFLAGS += -DUSE_SDL + CFLAGS2 = -O2 -I/usr/include/SDL -DUSE_SDL + + LDFLAGS +=