aboutsummaryrefslogtreecommitdiff
path: root/lang/nbc/Makefile
blob: f482d0fd70a0df5c28c58eb1645ef8d856dac94b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:	nbc
# Date created:				4 April 2007
# Whom:					Ivan "Rambius" Ivanov <rambiusparkisanius@gmail.com>
#					Jason Bacon <jwbacon@tds.net>
# $FreeBSD$
#

PORTNAME=		nbc
PORTVERSION=		1.2.1.r4
PORTREVISION=	4
CATEGORIES=		lang
MASTER_SITES=		SF
MASTER_SITE_SUBDIR=	bricxcc/NBC_NXC/NBC%20release%20${PORTVERSION:S/.r/%20r/}
DISTNAME=		${PORTNAME}-${PORTVERSION}.src
EXTRACT_SUFX=		.tgz

MAINTAINER=		rene@FreeBSD.org
COMMENT=		NBC is a programming language for the LEGO MINDSTORMS NXT product

MAKE_JOBS_UNSAFE=	yes
MAKEFILE=		nbcunix.mak

OPTIONS=	ROBOCTL	"Include roboctl to communicate with the NXT"	off

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_ROBOCTL)
RUN_DEPENDS=		legoctl:${PORTSDIR}/devel/roboctl
.endif

.if ${OSVERSION} < 800069
LIB_DEPENDS=		usb:${PORTSDIR}/devel/libusb
.endif

USE_GMAKE=		yes
USE_DOS2UNIX=		yes
USE_FPC=		fcl-base fcl-image

WRKSRC=			${WRKDIR}/NXT

PLIST_FILES=		bin/nbc \
			include/nbc/NXCDefs.h \
			include/nbc/NBCCommon.h \
			include/nbc/NXTDefs.h
PLIST_DIRS=		include/nbc

.if !defined(NOPORTDOCS)
PORTDOCS=		Changelog \
			Readme
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/${MAKEFILE}
	@${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|' ${WRKSRC}/${MAKEFILE}

do-install:
	${MKDIR} ${PREFIX}/include/nbc
	${INSTALL_PROGRAM} ${WRKSRC}/nbc ${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/*.h ${PREFIX}/include/nbc
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKDIR}/doc/Changelog ${DOCSDIR}
	${INSTALL_DATA} ${WRKDIR}/doc/Readme ${DOCSDIR}
.endif

.include <bsd.port.post.mk>