2005-10-12 07:31:55 +00:00
|
|
|
# vim: tabstop=8 softtabstop=0 noexpandtab
|
2006-04-18 14:19:20 +00:00
|
|
|
# New ports collection makefile for: R
|
2005-10-12 07:31:55 +00:00
|
|
|
# Date created: Fri Feb 9 10:50:25 EST 2001
|
|
|
|
# Whom: Maurice Castro <maurice@serc.rmit.edu.au>
|
1998-05-04 17:53:35 +00:00
|
|
|
#
|
1999-08-25 07:05:28 +00:00
|
|
|
# $FreeBSD$
|
1998-05-04 17:53:35 +00:00
|
|
|
#
|
|
|
|
|
2000-04-14 07:20:58 +00:00
|
|
|
PORTNAME= R
|
2009-12-25 14:34:35 +00:00
|
|
|
PORTVERSION= 2.10.1
|
2004-06-25 16:14:44 +00:00
|
|
|
CATEGORIES= math lang
|
2004-10-12 21:02:12 +00:00
|
|
|
MASTER_SITES= http://cran.r-project.org/src/base/R-2/ \
|
|
|
|
ftp://cran.r-project.org/pub/R/src/base/R-2/ \
|
|
|
|
http://cran.at.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.au.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.br.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.ch.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.es.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.dk.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.hu.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.uk.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.us.r-project.org/src/base/R-2/ \
|
|
|
|
http://cran.za.r-project.org/src/base/R-2/ \
|
|
|
|
ftp://ftp.u-aizu.ac.jp/pub/lang/R/CRAN/src/base/R-2/ \
|
|
|
|
http://lib.stat.cmu.edu/R/CRAN/src/base/R-2/ \
|
|
|
|
http://cran.stat.ucla.edu/src/base/R-2/ \
|
|
|
|
http://probability.ca/cran/src/base/R-2/ \
|
|
|
|
http://www.ibiblio.org/pub/languages/R/CRAN/src/base/R-2/ \
|
|
|
|
http://www.bioconductor.org/CRAN/src/base/R-2/
|
1998-05-04 17:53:35 +00:00
|
|
|
|
2009-06-07 18:51:21 +00:00
|
|
|
MAINTAINER= bf1783@gmail.com
|
2003-02-21 12:51:06 +00:00
|
|
|
COMMENT= A language for statistical computing and graphics
|
1998-05-04 17:53:35 +00:00
|
|
|
|
2009-06-15 21:07:11 +00:00
|
|
|
OPTIONS= ATLAS "Use ATLAS instead of BLAS/LAPACK" off \
|
|
|
|
GHOSTSCRIPT "Enable the [dev2]bitmap() graphics devices" on \
|
|
|
|
ICU "Improve collation in multibyte locales with ICU" on \
|
|
|
|
JPEG "Enable the jpeg() graphics device" on \
|
|
|
|
LETTER_PAPER "Use US Letter paper" off \
|
|
|
|
NLS "Build with NLS support" on \
|
|
|
|
PCRE_PORT "Use PCRE port instead of bundled source" on \
|
|
|
|
PNG "Enable the png() graphics device" on \
|
|
|
|
TCLTK "Use Tcl/Tk (for the tcltk package)" on \
|
|
|
|
THREADS "Build a multithreaded R" on \
|
|
|
|
X11 "Enable the X11() graphics device" on \
|
|
|
|
DVI_MANUALS "Install DVI manuals (requires TeX)" off \
|
|
|
|
INFO_MANUALS "Install GNU info manuals" on \
|
|
|
|
PDF_MANUALS "Install PDF manuals (requires TeX)" off
|
2002-08-05 05:06:21 +00:00
|
|
|
|
2007-05-30 14:10:18 +00:00
|
|
|
MAN1= R.1 Rscript.1
|
2004-04-19 22:19:14 +00:00
|
|
|
|
2006-08-15 00:29:13 +00:00
|
|
|
USE_LDCONFIG= yes
|
2008-07-29 14:13:14 +00:00
|
|
|
USE_FORTRAN= yes
|
|
|
|
|
2005-10-12 07:31:55 +00:00
|
|
|
INSTALL_TARGET= install install-libR
|
|
|
|
ALL_TARGET= all
|
1998-05-04 17:53:35 +00:00
|
|
|
GNU_CONFIGURE= yes
|
2005-10-12 07:31:55 +00:00
|
|
|
USE_ICONV= yes
|
1998-05-04 17:53:35 +00:00
|
|
|
USE_PERL5= yes
|
2009-08-27 09:16:19 +00:00
|
|
|
CONFIGURE_ENV= INSTALL_DATA="${INSTALL} ${COPY} ${_SHROWNGRP} -m 644" \
|
2009-12-25 14:34:35 +00:00
|
|
|
FCFLAGS="${FFLAGS}" TAR="${TAR}"
|
2005-10-12 07:31:55 +00:00
|
|
|
CONFIGURE_ARGS= --enable-R-shlib --with-system-bzlib --with-system-zlib \
|
2006-01-09 23:36:48 +00:00
|
|
|
rdocdir=${DOCSDIR}
|
2005-10-12 07:31:55 +00:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
2004-04-19 22:19:14 +00:00
|
|
|
|
2005-10-12 07:31:55 +00:00
|
|
|
.if defined(WITH_ATLAS)
|
2007-01-12 21:23:50 +00:00
|
|
|
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
|
2007-02-14 01:45:28 +00:00
|
|
|
CONFIGURE_ARGS+=--with-blas="-lf77blas -latlas"
|
|
|
|
# A workaround to prevent hangs up during the build.
|
|
|
|
.if ${ARCH} != "i386"
|
|
|
|
CONFIGURE_ARGS+=--with-lapack="-lalapack -lcblas"
|
|
|
|
.endif
|
|
|
|
.else
|
2009-12-25 14:34:35 +00:00
|
|
|
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas \
|
2008-07-29 14:13:14 +00:00
|
|
|
lapack.4:${PORTSDIR}/math/lapack
|
|
|
|
CONFIGURE_ARGS+=--with-blas="-lblas" --with-lapack="-llapack -lblas"
|
2005-10-12 07:31:55 +00:00
|
|
|
.endif
|
|
|
|
|
2009-06-15 21:07:11 +00:00
|
|
|
.if !defined(WITHOUT_GHOSTSCRIPT)
|
|
|
|
USE_GHOSTSCRIPT_RUN=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_ICU)
|
|
|
|
CONFIGURE_ARGS+=--without-ICU
|
2005-10-12 07:31:55 +00:00
|
|
|
.else
|
2009-06-15 21:07:11 +00:00
|
|
|
LIB_DEPENDS+= icui18n:${PORTSDIR}/devel/icu
|
|
|
|
CONFIGURE_ARGS+=--with-ICU
|
2005-10-12 07:31:55 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_JPEG)
|
|
|
|
CONFIGURE_ARGS+=--without-jpeglib
|
|
|
|
.else
|
2009-07-18 11:11:29 +00:00
|
|
|
LIB_DEPENDS+= jpeg.10:${PORTSDIR}/graphics/jpeg
|
2005-10-12 07:31:55 +00:00
|
|
|
CONFIGURE_ARGS+=--with-jpeglib
|
|
|
|
.endif
|
|
|
|
|
2009-06-15 21:07:11 +00:00
|
|
|
.if defined(WITH_LETTER_PAPER)
|
|
|
|
CONFIGURE_ENV+= R_PAPERSIZE=letter
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITHOUT_NLS)
|
|
|
|
USE_GETTEXT= yes
|
|
|
|
PLIST_SUB+= NLS=""
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--disable-nls
|
|
|
|
PLIST_SUB+= NLS="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_PCRE_PORT)
|
|
|
|
CONFIGURE_ARGS+=--without-system-pcre
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
|
|
|
|
CONFIGURE_ARGS+=--with-system-pcre
|
|
|
|
.endif
|
|
|
|
|
2005-10-12 07:31:55 +00:00
|
|
|
.if defined(WITHOUT_PNG)
|
|
|
|
CONFIGURE_ARGS+=--without-libpng
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
|
|
|
|
CONFIGURE_ARGS+=--with-libpng
|
|
|
|
.endif
|
|
|
|
|
2009-06-15 21:07:11 +00:00
|
|
|
.if defined(WITHOUT_TCLTK)
|
|
|
|
CONFIGURE_ARGS+=--without-tcltk
|
|
|
|
PLIST_SUB+= TCLTK="@comment "
|
|
|
|
.else
|
2009-08-27 09:16:19 +00:00
|
|
|
USE_TK_NO_THREADS= yes
|
2009-06-15 21:07:11 +00:00
|
|
|
USE_TK = 83+
|
|
|
|
.include "${PORTSDIR}/Mk/bsd.tcl.mk"
|
2009-08-27 09:16:19 +00:00
|
|
|
CONFIGURE_ARGS+=--with-tcltk \
|
|
|
|
--with-tcl-config=${TCL_LIBDIR}/tclConfig.sh \
|
|
|
|
--with-tk-config=${TK_LIBDIR}/tkConfig.sh
|
2009-06-15 21:07:11 +00:00
|
|
|
PLIST_SUB+= TCLTK=""
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITHOUT_THREADS)
|
|
|
|
CONFIGURE_ARGS+=--disable-threads
|
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--enable-threads=posix
|
|
|
|
.endif
|
|
|
|
|
2005-10-12 07:31:55 +00:00
|
|
|
.if defined(WITHOUT_X11)
|
|
|
|
CONFIGURE_ARGS+=--without-x
|
2006-04-18 14:19:20 +00:00
|
|
|
PLIST_SUB+= X11="@comment "
|
2005-10-12 07:31:55 +00:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+=--with-x
|
2008-07-29 14:13:14 +00:00
|
|
|
USE_XORG= x11 xt
|
2006-04-18 14:19:20 +00:00
|
|
|
PLIST_SUB+= X11=""
|
2005-10-12 07:31:55 +00:00
|
|
|
.endif
|
|
|
|
|
2008-07-29 14:13:14 +00:00
|
|
|
.if defined(WITH_DVI_MANUALS) && !defined(NOPORTDOCS)
|
2009-08-27 09:16:19 +00:00
|
|
|
BUILD_DEPENDS+= texi2dvi:${PORTSDIR}/print/teTeX-base
|
2005-10-12 07:31:55 +00:00
|
|
|
ALL_TARGET+= dvi
|
|
|
|
INSTALL_TARGET+=install-dvi
|
2006-04-18 14:19:20 +00:00
|
|
|
PLIST_SUB+= DVI_MANUAL=""
|
2005-10-12 07:31:55 +00:00
|
|
|
.else
|
2006-04-18 14:19:20 +00:00
|
|
|
PLIST_SUB+= DVI_MANUAL="@comment "
|
2005-10-12 07:31:55 +00:00
|
|
|
.endif
|
|
|
|
|
2008-07-29 14:13:14 +00:00
|
|
|
.if defined(WITH_INFO_MANUALS) && !defined(NOPORTDOCS)
|
2005-10-12 07:31:55 +00:00
|
|
|
ALL_TARGET+= info
|
|
|
|
INFO= R-FAQ R-admin R-data R-exts R-intro R-lang
|
|
|
|
.endif
|
|
|
|
|
2009-06-15 21:07:11 +00:00
|
|
|
.if defined(WITH_PDF_MANUALS) && !defined(NOPORTDOCS)
|
|
|
|
PLIST_SUB+= PDF_MANUAL=""
|
|
|
|
BUILD_DEPENDS+= pdflatex:${PORTSDIR}/print/teTeX-base
|
|
|
|
ALL_TARGET+= pdf
|
|
|
|
INSTALL_TARGET+= install-pdf
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PDF_MANUAL="@comment "
|
2005-10-12 07:31:55 +00:00
|
|
|
.endif
|
2005-07-03 16:45:58 +00:00
|
|
|
|
2007-05-30 14:10:18 +00:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g' \
|
|
|
|
${WRKSRC}/src/nmath/standalone/Makefile.in \
|
|
|
|
${WRKSRC}/src/unix/Makefile.in
|
2009-08-27 09:16:19 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \
|
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/src/scripts/javareconf
|
|
|
|
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \
|
|
|
|
${WRKSRC}/configure \
|
|
|
|
${WRKSRC}/config.site \
|
|
|
|
${WRKSRC}/src/extra/tzone/tzfile.h \
|
|
|
|
${WRKSRC}/src/scripts/javareconf
|
2009-06-15 21:07:11 +00:00
|
|
|
.if defined(WITHOUT_NLS)
|
2009-08-27 09:16:19 +00:00
|
|
|
@(cd ${WRKSRC}/src/library/Recommended; \
|
2009-06-15 21:07:11 +00:00
|
|
|
for tarfile in *.tgz *.tar.gz ; do \
|
|
|
|
${TAR} -czf temptgz --exclude='*/po/*' @$$tarfile ; \
|
|
|
|
${MV} temptgz $$tarfile ; \
|
|
|
|
done)
|
|
|
|
.endif
|
2007-05-30 14:10:18 +00:00
|
|
|
|
2008-07-29 14:13:14 +00:00
|
|
|
regression-test: build
|
|
|
|
@(cd ${WRKSRC}; ${MAKE} check)
|
|
|
|
|
|
|
|
check-all: build
|
|
|
|
@(cd ${WRKSRC}; ${MAKE} check-all)
|
|
|
|
|
2006-04-29 12:08:28 +00:00
|
|
|
post-install:
|
|
|
|
${MV} ${PREFIX}/lib/libR.so ${PREFIX}/lib/libR.so.0
|
|
|
|
${LN} -sf ${PREFIX}/lib/libR.so.0 ${PREFIX}/lib/libR.so
|
2008-07-29 14:13:14 +00:00
|
|
|
.if defined(WITH_INFO_MANUALS) && !defined(NOPORTDOCS)
|
2009-08-27 09:16:19 +00:00
|
|
|
@(cd ${WRKSRC}/doc/manual; \
|
2006-04-29 12:08:28 +00:00
|
|
|
for infofile in ${INFO}; do \
|
|
|
|
${INSTALL_DATA} $${infofile}.info* ${PREFIX}/${INFO_PATH}/; \
|
|
|
|
done)
|
|
|
|
.endif
|
|
|
|
|
2005-07-03 16:45:58 +00:00
|
|
|
.include <bsd.port.post.mk>
|