ports/116274: New port: lang/nbc NBC is a programming language for the LEGO MINDSTORMS NXT product

Ivan Rambius Ivanov rambiusparkisanius at gmail.com
Tue Sep 11 02:50:02 UTC 2007


>Number:         116274
>Category:       ports
>Synopsis:       New port: lang/nbc NBC is a programming language for the LEGO MINDSTORMS NXT product
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 11 02:50:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Ivan "Rambius" Ivanov
>Release:        FreeBSD 6.2
>Organization:
>Environment:
FreeBSD petya.earthlink.net 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #0: Fri Sep  7 07:52:41 EEST 2007     root at petya.earthlink.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
NBC is the programming language for Lego Mindstorm NXT robot and lang/nbc port contains a compiler for it. The official home page of this compiler is http://bricxcc.sourceforge.net/nbc/ and I will be the maintainer of its FreeBSD port.
>How-To-Repeat:

>Fix:
I am attaching the output of
shar `find nbc`
as described in the Porter's Handbook

Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	nbc
#	nbc/files
#	nbc/files/fpc.options
#	nbc/files/nbc.1
#	nbc/distinfo
#	nbc/pkg-message
#	nbc/pkg-descr
#	nbc/Makefile
#
echo c - nbc
mkdir -p nbc > /dev/null 2>&1
echo c - nbc/files
mkdir -p nbc/files > /dev/null 2>&1
echo x - nbc/files/fpc.options
sed 's/^X//' >nbc/files/fpc.options << 'END-of-nbc/files/fpc.options'
X 'END-of-/usr/ports/lang/nbc/files/fpc.options'
X# This file is auto-generated by 'make config'.
X# No user-servicable parts inside!
X# Options for fpc-ibase-2.0.4_1
X_OPTIONS_READ=fpc-ibase-2.0.4_1
XWITHOUT_IBASE=true
XEND-of-/usr/ports/lang/nbc/files/fpc.options
Xecho x - /usr/ports/lang/nbc/files/nbc.1
Xsed 's/^X//' >/usr/ports/lang/nbc/files/nbc.1 <<EOF
X 'END-of-/usr/ports/lang/nbc/files/nbc.1'
X.TH NBC 1
X.SH NAME    \" Section header
X.PP
X
XNBC - NXT Byte Codes and Not eXactly C
X
X\" Convention:
X\" Underline anything that is typed verbatim - commands, etc.
X.SH SYNOPSIS
X.PP
X.nf
X.na
Xnbc [flags] source-file.nbc
Xnbc -help
X
Xnxc [flags] source-file.nxc
Xnxc -help
X.ad
X.fi
X
X\" Optional sections
X.SH "DESCRIPTION"
X
XNBC (NXT Byte Codes) is an assembly language for the Lego NXT robotic
Xsystem.  NXC (Not eXactly C) is a high-level programming language similar
Xto the C language, for
Xthe NXT system.  NXC is built on top of NBC.  These languages offer
Xan alternative to the drag-and-drop programming interfaces of the Lego
XMindstorms and Robolab software.  The drag-and-drop systems are probably
Xeasier for non-programmers to learn, but NBC and NXC provide more
Xprogramming flexibility, and full access to the functionality of the NXT
Xcomputer.
X
XNXC is similar to NQC (Not Quite C), a popular programming language for
Xthe Original Lego Mindstorms RCX computer.
X
XFor full documentation on these languages, please visit the WEB site:
Xhttp://bricxcc.sourceforge.net/nbc/.
X
X.SH OPTIONS
X.TP
X.B -x
Xdecompiles a program
X.TP
X.B -Z[1|2]
Xturns on compiler optimizations
X.TP
X.B -O=<outfile>
Xspecify output file
X.TP
X.B -E=<filename>
Xwrite compiler errors to <filename>
X.TP
X.B -I=<path>
Xsearch <path> for include files
X.TP
X.B -nbc=<filename>
Xsave NXC intermediate NBC code to <filename>
X.TP
X.B -L=<filename>
Xgenerate code listing to <filename>
X.TP
X.B -Y=<filename>
Xgenerate symbol table to <filename>
X.TP
X.B -w[-|+]
Xwarnings off or on [default is off]
X
X.SH "SEE ALSO"
Xnqc(1), legochat(1), linxt(1)
X
X.SH AUTHOR
X.nf
X.na
XJohn Hansen
X
XEND-of-/usr/ports/lang/nbc/files/nbc.1
Xecho x - /usr/ports/lang/nbc/distinfo
Xsed 's/^X//' >/usr/ports/lang/nbc/distinfo <<EOF
X 'END-of-/usr/ports/lang/nbc/distinfo'
XMD5 (nbc-1.0.1.b32.src.tgz) = d82928f6935367a3d648fbd3f9dc049f
XSHA256 (nbc-1.0.1.b32.src.tgz) = 80e0f69e5b103b5c2da8f748b194017e3a7ab11d0e6c5fc8ead9c2b23bd035f8
XSIZE (nbc-1.0.1.b32.src.tgz) = 348768
XEND-of-/usr/ports/lang/nbc/distinfo
Xecho x - /usr/ports/lang/nbc/pkg-message
Xsed 's/^X//' >/usr/ports/lang/nbc/pkg-message <<EOF
X 'END-of-/usr/ports/lang/nbc/pkg-message'
X
XPlease visit http://bricxcc.sourceforge.net/nbc/ for documentation on NBC.
XEND-of-/usr/ports/lang/nbc/pkg-message
Xecho x - /usr/ports/lang/nbc/pkg-descr
Xsed 's/^X//' >/usr/ports/lang/nbc/pkg-descr <<EOF
X 'END-of-/usr/ports/lang/nbc/pkg-descr'
XNBC (Next Byte Codes) is a programming language for the LEGO
XMINDSTORMS NXT product. NBC's syntax is based on assembler programming
Xlangauges, so experienced assembler programmers (or just about any
Xprogrammers) should find it very easy to get started with. Even if you
Xaren't an experienced programmer, NBC is relatively easy to learn.
X
XWWW: http://bricxcc.sourceforge.net/nbc/
XEND-of-/usr/ports/lang/nbc/pkg-descr
Xecho x - /usr/ports/lang/nbc/Makefile
Xsed 's/^X//' >/usr/ports/lang/nbc/Makefile <<EOF
X 'END-of-/usr/ports/lang/nbc/Makefile'
X# New ports collection makefile for:   nbcx
X# Date created:                                4 April 2007
X# Whom:                                        Ivan "Rambius" Ivanov <rambiusparkisanius at gmail.com>, Jason Bacon <jwbacon at tds.net>
X#
X# $
X#
X
XPORTNAME=              nbc
XPORTVERSION=           1.0.1.b32
XCATEGORIES=            lang
XMASTER_SITES=          
XMASTER_SITE_SUBDIR=    bricxcc
XDISTNAME=              -.src
XEXTRACT_SUFX=          .tgz
X
XMAINTAINER=            rambiusparkisanius at gmail.com
XCOMMENT=               NBC is a programming language for the LEGO MINDSTORMS NXT product
X
XBUILD_DEPENDS=         fpc:/lang/fpc X                       /lib/fpc/2.0.4/units/i386-freebsd/fcl:/devel/fpc-fcl
XRUN_DEPENDS=           legoctl:/devel/legoctl
X
XWRKSRC=                        /nxt
X
XUSE_GMAKE=             yes
X
XUSE_DOS2UNIX=          yes
X
XMAN1=                  nbc.1 nxc.1
X
XPKG_MESSAGE=           pkg-message
X
XPLIST_FILES=           bin/nbc X                       share/nbc/history.txt X                       share/nbc/readme.txt X                       include/nbc/NXCDefs.h X                       include/nbc/NBCCommon.h X                       include/nbc/NXTDefs.h
X
Xpost-patch:
X        -sf /nbcfreebsd.mak /Makefile
X# fpc-ibase is a dependency, but it won't build with default OPTIONS.
X# Force-disable Firebird client as an fpc-ibase OPTION to allow the
X# dependency builds to complete.
X.if exists(/fpc/options)
X        "s|WITH_IBASE=true|WITHOUT_IBASE=true|g" X               /fpc/options
X.else
X        /fpc
X        /fpc.options /fpc/options
X.endif
X
Xdo-install:
X        /include/nbc /man/man1 /share/nbc
X        /nbc /bin
X        /*.h /include/nbc
X        /*.txt /share/nbc
X        /nbc.1 /man/man1
X        /nbc.1 /man/man1/nxc.1
X
Xpost-install:
X       @;  ; 
X
X.include <bsd.port.mk>
XEND-of-/usr/ports/lang/nbc/Makefile
Xexit
END-of-nbc/files/fpc.options
echo x - nbc/files/nbc.1
sed 's/^X//' >nbc/files/nbc.1 << 'END-of-nbc/files/nbc.1'
X.TH NBC 1
X.SH NAME    \" Section header
X.PP
X 
XNBC - NXT Byte Codes and Not eXactly C
X
X\" Convention:
X\" Underline anything that is typed verbatim - commands, etc.
X.SH SYNOPSIS
X.PP
X.nf 
X.na 
Xnbc [flags] source-file.nbc
Xnbc -help
X
Xnxc [flags] source-file.nxc
Xnxc -help
X.ad
X.fi
X
X\" Optional sections
X.SH "DESCRIPTION"
X
XNBC (NXT Byte Codes) is an assembly language for the Lego NXT robotic
Xsystem.  NXC (Not eXactly C) is a high-level programming language similar
Xto the C language, for
Xthe NXT system.  NXC is built on top of NBC.  These languages offer
Xan alternative to the drag-and-drop programming interfaces of the Lego
XMindstorms and Robolab software.  The drag-and-drop systems are probably
Xeasier for non-programmers to learn, but NBC and NXC provide more
Xprogramming flexibility, and full access to the functionality of the NXT
Xcomputer.
X
XNXC is similar to NQC (Not Quite C), a popular programming language for
Xthe Original Lego Mindstorms RCX computer.
X
XFor full documentation on these languages, please visit the WEB site:
Xhttp://bricxcc.sourceforge.net/nbc/.
X
X.SH OPTIONS
X.TP
X.B -x
Xdecompiles a program
X.TP
X.B -Z[1|2]
Xturns on compiler optimizations
X.TP
X.B -O=<outfile>
Xspecify output file
X.TP
X.B -E=<filename>
Xwrite compiler errors to <filename>
X.TP
X.B -I=<path>
Xsearch <path> for include files
X.TP
X.B -nbc=<filename>
Xsave NXC intermediate NBC code to <filename>
X.TP
X.B -L=<filename>
Xgenerate code listing to <filename>
X.TP
X.B -Y=<filename>
Xgenerate symbol table to <filename>
X.TP
X.B -w[-|+]
Xwarnings off or on [default is off]
X
X.SH "SEE ALSO"
Xnqc(1), legochat(1), linxt(1)
X
X.SH AUTHOR
X.nf
X.na
XJohn Hansen
X
END-of-nbc/files/nbc.1
echo x - nbc/distinfo
sed 's/^X//' >nbc/distinfo << 'END-of-nbc/distinfo'
XMD5 (nbc-1.0.1.b32.src.tgz) = d82928f6935367a3d648fbd3f9dc049f
XSHA256 (nbc-1.0.1.b32.src.tgz) = 80e0f69e5b103b5c2da8f748b194017e3a7ab11d0e6c5fc8ead9c2b23bd035f8
XSIZE (nbc-1.0.1.b32.src.tgz) = 348768
END-of-nbc/distinfo
echo x - nbc/pkg-message
sed 's/^X//' >nbc/pkg-message << 'END-of-nbc/pkg-message'
X
XPlease visit http://bricxcc.sourceforge.net/nbc/ for documentation on NBC.
END-of-nbc/pkg-message
echo x - nbc/pkg-descr
sed 's/^X//' >nbc/pkg-descr << 'END-of-nbc/pkg-descr'
XNBC (Next Byte Codes) is a programming language for the LEGO
XMINDSTORMS NXT product. NBC's syntax is based on assembler programming
Xlangauges, so experienced assembler programmers (or just about any
Xprogrammers) should find it very easy to get started with. Even if you
Xaren't an experienced programmer, NBC is relatively easy to learn.
X
XWWW: http://bricxcc.sourceforge.net/nbc/
END-of-nbc/pkg-descr
echo x - nbc/Makefile
sed 's/^X//' >nbc/Makefile << 'END-of-nbc/Makefile'
X# New ports collection makefile for:	nbcx
X# Date created:				4 April 2007
X# Whom:					Ivan "Rambius" Ivanov <rambiusparkisanius at gmail.com>, Jason Bacon <jwbacon at tds.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=		nbc
XPORTVERSION=		1.0.1.b32
XCATEGORIES=		lang
XMASTER_SITES=		${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	bricxcc
XDISTNAME=		${PORTNAME}-${PORTVERSION}.src
XEXTRACT_SUFX=		.tgz
X
XMAINTAINER=		rambiusparkisanius at gmail.com
XCOMMENT=		NBC is a programming language for the LEGO MINDSTORMS NXT product
X
XBUILD_DEPENDS=		fpc:${PORTSDIR}/lang/fpc \
X			${LOCALBASE}/lib/fpc/2.0.4/units/i386-freebsd/fcl:${PORTSDIR}/devel/fpc-fcl
XRUN_DEPENDS=		legoctl:${PORTSDIR}/devel/legoctl
X
XWRKSRC=			${WRKDIR}/nxt
X
XUSE_GMAKE=		yes
X
XUSE_DOS2UNIX=		yes
X
XMAN1=			nbc.1 nxc.1
X
XPKG_MESSAGE=		pkg-message
X
XPLIST_FILES=		bin/nbc \
X			share/nbc/history.txt \
X			share/nbc/readme.txt \
X			include/nbc/NXCDefs.h \
X			include/nbc/NBCCommon.h \
X			include/nbc/NXTDefs.h
X
Xpost-patch:
X	${LN} -sf ${WRKSRC}/nbcfreebsd.mak ${WRKSRC}/Makefile
X# fpc-ibase is a dependency, but it won't build with default OPTIONS.
X# Force-disable Firebird client as an fpc-ibase OPTION to allow the
X# dependency builds to complete.
X.if exists(${PORT_DBDIR}/fpc/options)
X	${REINPLACE_CMD} "s|WITH_IBASE=true|WITHOUT_IBASE=true|g" \
X		${PORT_DBDIR}/fpc/options
X.else
X	${MKDIR} ${PORT_DBDIR}/fpc
X	${CP} ${FILESDIR}/fpc.options ${PORT_DBDIR}/fpc/options
X.endif
X
Xdo-install:
X	${MKDIR} ${PREFIX}/include/nbc ${PREFIX}/man/man1 ${PREFIX}/share/nbc
X	${INSTALL_PROGRAM} ${WRKSRC}/nbc ${PREFIX}/bin
X	${INSTALL_DATA} ${WRKSRC}/*.h ${PREFIX}/include/nbc
X	${INSTALL_DATA} ${WRKSRC}/*.txt ${PREFIX}/share/nbc
X	${INSTALL_MAN} ${FILESDIR}/nbc.1 ${PREFIX}/man/man1
X	${INSTALL_MAN} ${FILESDIR}/nbc.1 ${PREFIX}/man/man1/nxc.1
X
Xpost-install:
X	@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
X
X.include <bsd.port.mk>
END-of-nbc/Makefile
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list