On 2017/03/26 14:44, Frederic Cambus wrote:
> On Sat, Mar 25, 2017 at 04:58:09PM +0000, Christian Weisgerber wrote:
> > On 2017-03-24, Frederic Cambus <f...@statdns.com> wrote:
> > 
> > > 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 -0000      1.1.1.1
> +++ Makefile  26 Mar 2017 12:28:07 -0000
> @@ -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 <fcambus@op
>  # 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 -0000
> +++ patches/patch-makefile    26 Mar 2017 12:28:07 -0000
> @@ -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 +=
> 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 -0000      1.1.1.1
> +++ pkg/PLIST 26 Mar 2017 12:28:07 -0000
> @@ -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
> 

Reply via email to