summaryrefslogtreecommitdiffstats
path: root/devel/ncc/Makefile
blob: f0566443729d0464c8ffcb06153e6e41ea19e4ec (plain)
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
# Created by: Volker Stolz <vs@FreeBSD.org>
# $FreeBSD$

PORTNAME=	ncc
PORTVERSION=	2.8
PORTREVISION=	1
CATEGORIES=	devel
MASTER_SITES=	http://students.ceid.upatras.gr/~sxanth/ncc/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Program analysis tool and call-graph navigator

LICENSE=	ART10
LICENSE_FILE=	${WRKSRC}/doc/LICENSE

ALL_TARGET=	# empty
MAKE_ARGS+=	CC="${CXX}" LCFLAGS="${CFLAGS}"
USES=		ncurses python:run
CFLAGS+=	-DNOGNU='\"${PREFIX}/include/ncc/nognu\"' -fpermissive

PLIST_FILES=	bin/ncc bin/nccnav bin/nccnavi bin/ncc-gengraph.py \
		${LINKS:S+^+bin/+} include/ncc/nognu bin/nccstrip2.py \
		man/man1/ncc.1.gz
PORTDOCS=	*

LINKS=		nccar nccld nccc++ nccg++

OPTIONS_DEFINE=	DOCS

post-patch:
	@${REINPLACE_CMD} -e '/NOGNU/d' ${WRKSRC}/config.h
	@${REINPLACE_CMD} -e '/#include <alloca.h>/d' ${WRKSRC}/dbstree.h
	@${REINPLACE_CMD} -e 's|-lncurses|$$(CFLAGS) $$(LDFLAGS) -lncurses|' \
		${WRKSRC}/nccnav/Makefile

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/objdir/ncc ${STAGEDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/gengraph.py \
		${STAGEDIR}${PREFIX}/bin/ncc-gengraph.py
	${INSTALL_SCRIPT} ${WRKSRC}/scripts/nccstrip2.py \
		${STAGEDIR}${PREFIX}/bin/nccstrip2.py
	${INSTALL_PROGRAM} ${WRKSRC}/nccnav/nccnav ${STAGEDIR}${PREFIX}/bin
.for i in ${LINKS}
	${LN} -sf ${PREFIX}/bin/ncc ${STAGEDIR}${PREFIX}/bin/$i
.endfor
	${LN} -sf ${PREFIX}/bin/nccnav ${STAGEDIR}${PREFIX}/bin/nccnavi
	@${MKDIR} ${STAGEDIR}${PREFIX}/include/ncc
	${INSTALL_DATA}	${WRKSRC}/doc/nognu ${STAGEDIR}${PREFIX}/include/ncc
	${INSTALL_MAN} ${WRKSRC}/ncc.1 ${STAGEDIR}${MANPREFIX}/man/man1

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/doc/* ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>
OpenPOWER on IntegriCloud