aboutsummaryrefslogtreecommitdiff
path: root/graphics/cuttlefish/Makefile
blob: e6416d392f5e334df258339c843d1b8267e6e665 (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
# Created by: Matthew Luckie <mjl@luckie.org.nz>

PORTNAME=	cuttlefish
PORTVERSION=	1.3
PORTREVISION=	4
CATEGORIES=	graphics geography
MASTER_SITES=	http://www.caida.org/tools/visualization/cuttlefish/code/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Plots diurnal and geographical patterns of supplied data

RUN_DEPENDS+=	p5-GD>=0:graphics/p5-GD \
		convert:graphics/ImageMagick6 \
		gifsicle:graphics/gifsicle

USES=		perl5 shebangfix
USE_PERL5=	run
NO_BUILD=	yes
SHEBANG_FILES=	bin/cuttlefish.pl

IMAGES=		caida_logo.gif caida_logo_gray.gif \
		japan-water-okinawa.jpg japan-water.jpg \
		world-day.jpg world-water.jpg

EXAMPLES=	japan-traces-small.config japan-traces.config \
		nyxem-hosts-both.config \
		witty-combined-small.config witty-combined.config

OPTIONS_DEFINE=	EXAMPLES

post-patch:
	@${REINPLACE_CMD} -e "s|../lib|../lib/cuttlefish|" \
		${WRKSRC}/bin/cuttlefish.pl
.for f in ${EXAMPLES}
	@${REINPLACE_CMD} -e "s|images|${PREFIX}/share/cuttlefish|" \
		${WRKSRC}/configs/${f}
.endfor

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/bin/cuttlefish.pl ${STAGEDIR}${PREFIX}/bin
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/cuttlefish
	@${MKDIR} ${STAGEDIR}${DATADIR}
	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
.for f in Canvas.pm Control.pm Histogram.pm Image.pm Legend.pm Map.pm Util.pm
	${INSTALL_DATA} ${WRKSRC}/lib/${f} ${STAGEDIR}${PREFIX}/lib/cuttlefish/${f}
.endfor
.for f in ${EXAMPLES}
	${INSTALL_DATA} ${WRKSRC}/configs/${f} ${STAGEDIR}${EXAMPLESDIR}/${f}
.endfor
.for f in ${IMAGES}
	${INSTALL_DATA} ${WRKSRC}/images/${f} ${STAGEDIR}${DATADIR}/${f}
.endfor

.include <bsd.port.mk>