summaryrefslogtreecommitdiff
path: root/devel/urjtag/Makefile
blob: d15094a6395991f73b99684e553d9249b91a79f9 (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
67
68
69
70
# New ports collection makefile for:	urjtag
# Date created:		2008-01-05
# Whom:			Bruce M. Simpson
#
# $FreeBSD$
#

PORTNAME=	urjtag
PORTVERSION=	0.10
PORTREVISION=	3
CATEGORIES=	devel
MASTER_SITES=	SF

MAINTAINER=	bahamasfranks@gmail.com
COMMENT=	Extended utility to work with JTAG-aware boards

BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex

USE_BZIP2=	yes
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	LEX=${LOCALBASE}/bin/flex \
		CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib"

CFLAGS+=	--std=c99

MAN1=		jtag.1 bsdl2jtag.1

OPTIONS=	\
	USB	"Build support for USB JTAG adapters"		 On	\
	FTDI	"Build support for FTDI-based USB JTAG adapters" On	\
	JEDEC	"Enable experimental JEDEC flash detection"	 Off

.include <bsd.port.pre.mk>

.if defined(WITH_JEDEC)
CONFIGURE_ARGS+=	--enable-jedec
.endif

.if !defined(WITHOUT_USB)
CONFIGURE_ARGS+=	--with-libusb
.if ${OSVERSION} < 800069
LIB_DEPENDS+=	usb:${PORTSDIR}/devel/libusb
.else
EXTRA_PATCHES=	${FILESDIR}/extra-patch-usb
. endif
.endif

.if !defined(WITHOUT_FTDI)
CONFIGURE_ARGS+=	--with-libftdi
LIB_DEPENDS+=	ftdi.19:${PORTSDIR}/devel/libftdi
.endif

.if exists(${LOCALBASE}/lib/libreadline.so.6)
LIB_DEPENDS+=	readline.6:${PORTSDIR}/devel/readline
.endif

.if !defined(WITHOUT_NLS)
USE_GETTEXT=	yes
PLIST_SUB+=	NLS=""
.else
PLIST_SUB+=	NLS="@comment "
CONFIGURE_ARGS+=--disable-nls
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|^SVN=.*|SVN=''|' ${WRKSRC}/configure

.include <bsd.port.post.mk>