summaryrefslogtreecommitdiffstats
path: root/math/R/Makefile
blob: a1f98ccee088cb45dda54c03abfcb77d9f533e43 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# ex: ts=8 sts=0 noet
# New ports collection makefile for:	R
# Date created:			Fri Feb  9 10:50:25 EST 2001
# Whom:				Maurice Castro <maurice@serc.rmit.edu.au>
#
# $FreeBSD$
#

PORTNAME=	R
PORTVERSION=	1.9.1
CATEGORIES=	math lang
MASTER_SITES=	http://cran.r-project.org/src/base/ \
		ftp://cran.r-project.org/pub/R/src/base/ \
		http://cran.at.r-project.org/src/base/ \
		http://cran.au.r-project.org/src/base/ \
		http://cran.br.r-project.org/src/base/ \
		http://cran.ch.r-project.org/src/base/ \
		http://cran.es.r-project.org/src/base/ \
		http://cran.dk.r-project.org/src/base/ \
		http://cran.hu.r-project.org/src/base/ \
		http://cran.uk.r-project.org/src/base/ \
		http://cran.us.r-project.org/src/base/ \
		http://cran.za.r-project.org/src/base/ \
		ftp://ftp.u-aizu.ac.jp/pub/lang/R/CRAN/src/base/ \
		http://lib.stat.cmu.edu/R/CRAN/src/base/ \
		http://cran.stat.ucla.edu/src/base/ \
		http://probability.ca/cran/src/base/ \
		http://www.ibiblio.org/pub/languages/R/CRAN/src/base/ \
		http://www.bioconductor.org/CRAN/src/base/
EXTRACT_SUFX=	.tgz

MAINTAINER=	vangyzen@stat.duke.edu
COMMENT=	A language for statistical computing and graphics

LIB_DEPENDS=	tcl84:${PORTSDIR}/lang/tcl84 \
		tk84:${PORTSDIR}/x11-toolkits/tk84 \
		jpeg.9:${PORTSDIR}/graphics/jpeg \
		png.5:${PORTSDIR}/graphics/png \
		pcre.0:${PORTSDIR}/devel/pcre

.if defined(WITH_ATLAS)
LIB_DEPENDS+=	f77blas.1:${PORTSDIR}/math/atlas
CONFIGURE_ARGS=	--with-lapack="-lalapack -lcblas" --with-blas="-lf77blas"
.else
LIB_DEPENDS+=	lapack.3:${PORTSDIR}/math/lapack
CONFIGURE_ARGS=	--with-lapack="-llapack" --with-blas="-lblas"
.endif

MAN1=		R.1

GNU_CONFIGURE=	yes
USE_XLIB=	yes
USE_PERL5=	yes
CONFIGURE_ENV=	FFLAGS="${FFLAGS}" \
		INSTALL_DATA="${INSTALL} ${COPY} ${_SHROWNGRP} -m 644"
CONFIGURE_ARGS+=--enable-R-shlib --with-bzlib --with-pcre --with-zlib

# NB: R requires zlib 1.2.1, but the system zlib is currently
# only 1.1.4.  Thus, R compiles its own bundled version of zlib
# despite configuring with --with-zlib.

.include <bsd.port.pre.mk>

pre-fetch:
.if !defined(PAPERSIZE)
	@${ECHO}
	@${ECHO} "    The default paper size for printing from R is A4."
	@${ECHO} "    You can change it by setting the PAPERSIZE"
	@${ECHO} "    make variable to one of:"
	@${ECHO} "        a4 letter legal executive"
	@${ECHO} "    For example:"
	@${ECHO} "        # make PAPERSIZE=letter install clean"
	@${ECHO}
.else
CONFIGURE_ENV+=	R_PAPERSIZE=${PAPERSIZE}
.endif

# Build the four documentation formats sequentially (instead of simultaneously)
# to prevent perl 5.8 from using too much memory (> 512 MB) and being killed.
.if ${PERL_LEVEL} >= 500800
ALL_TARGET=	Makefile Makeconf R help html latex examples docs stamp-recommended
.endif

test check: build
	@(cd ${WRKSRC}; ${MAKE} check)
check-all: build
	@(cd ${WRKSRC}; ${MAKE} check-all)

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