aboutsummaryrefslogtreecommitdiff
path: root/graphics/dataplot/Makefile
blob: 0af9dab54f5457a7279d5df18dbb3dd1104fd72f (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
# Created by: Pedro F. Giffuni <pfgshield-freebsd@yahoo.com>
# $FreeBSD$

PORTNAME=	dataplot
PORTVERSION=	20132012
PORTREVISION=	1
CATEGORIES=	graphics
MASTER_SITES=	ftp://ftp.nist.gov/pub/dataplot/unix/:source \
		LOCAL/beech:source \
		http://www.itl.nist.gov/div898/software/dataplot.html/:doc \
		LOCAL/beech:doc
DISTFILES=	dpsrc${EXTRACT_SUFX}:source
DIST_SUBDIR=	dataplot
EXTRACT_ONLY=	dpsrc${EXTRACT_SUFX}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Free software system for statistical visualization

LIB_DEPENDS=	libgd.so:${PORTSDIR}/graphics/gd \
		libpng15.so:${PORTSDIR}/graphics/png \
		libjpeg.so:${PORTSDIR}/graphics/jpeg

OPTIONS_DEFINE=	DOCS
DOCS_DISTFILES=	dpsnapsh.pdf:doc

USES=		fortran
USE_XORG=	x11 xi
NO_WRKSUBDIR=	yes
MAXOBV?=	400000	# Change if you need more observations/variable

.include <bsd.port.options.mk>

.if ((${ARCH}=="amd64") || (${ARCH}=="sparc64") || (${ARCH}=="ia64"))
FFLAGS+= -DDD -DI32 -fdefault-real-8 -fdefault-double-8
.else
FFLAGS+= -DSD -DI32 -fdefault-real-8 -fdefault-double-8
.endif

post-extract:
	@${INSTALL_DATA} ${FILESDIR}/Makefile.tmpl ${WRKSRC}/Makefile
	@${REINPLACE_CMD} \
		-e 's;%%CFLAGS%%;${CFLAGS};' \
		-e 's;%%FFLAGS%%;${FFLAGS};' \
		-e 's;%%LDFLAGS%%;${LDFLAGS};' \
		-e 's;%%LOCALBASE%%;${LOCALBASE};g' ${WRKSRC}/Makefile
# Ensure preprocessing is done
	@${CP} ${WRKSRC}/dp1_linux.f ${WRKSRC}/dp1_linux.F
# Turn off some dependencies
	@${MV} ${WRKSRC}/aqua_src.c ${WRKSRC}/aqua_src.c.nop
	@${MV} ${WRKSRC}/gl_src.c ${WRKSRC}/gl_src.c.nop
	@${MV} ${WRKSRC}/libplot_src.c ${WRKSRC}/libplot_src.c.nop
	@${MV} ${WRKSRC}/rldp.c ${WRKSRC}/rldp.c.nop

pre-patch:
	@${REINPLACE_CMD} -e 's/MAXOBV=1000000/MAXOBV=${MAXOBV}/' \
	${WRKSRC}/DPCOPA.INC

post-install:
.if ${PORT_OPTIONS:MDOCS}
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/dpsnapsh.pdf \
		${STAGEDIR}${DOCSDIR}
.endif

.include <bsd.port.mk>