pkgsrc/math/R/Makefile
wen 9c8d2bed66 Update to 3.6.1
Upstream changes:
CHANGES IN R 3.6.1:

  INSTALLATION on a UNIX-ALIKE:

    * The default detection of the shell variable libNN is overridden
      for derivatives of Debian Linux, some of which have started to
      have a /usr/lib64 directory.  (E.g. Ubuntu 19.04.)  As before, it
      can be specified in config.site.

  UTILITIES:

    * R CMD config knows the values of AR and RANLIB, often set for LTO
      builds.

  DEPRECATED AND DEFUNCT:

    * The use of a character vector with .Fortran() is formally
      deprecated and gives a non-portability warning.  (It has long
      been strongly discouraged in 'Writing R Extensions'.)

  BUG FIXES:

    * On Windows, GUI package installation via menuInstallPkgs() works
      again, thanks to Len Weil's and Duncan Murdoch's PR#17556.

    * R CMD check on data() fixing PR#17558 thanks to Duncan Murdoch.

    * quasi(*, variance = list(..)) now works more efficiently, and
      should work in all cases fixing PR#17560.  Further, quasi(var =
      mu(1-mu)) and quasi(var = "mu ^ 3") now work, and quasi(variance
      = "log(mu)") now gives a correct error message.

    * Creation of lazy loading database during package installation is
      again robust to Rprofile changing the current working directory
      (PR#17559).

    * boxplot(y ~ f, horizontal=TRUE) now produces correct x- and
      y-labels.

    * rbind.data.frame() allows to keep <NA> levels from factor columns
      (PR#17562) via new option factor.exclude.

      Additionally, it works in one more case with matrix-columns which
      had been reported on 2017-01-16 by Krzysztof Banas.

    * Correct messaging in C++ pragma checks in tools code for R CMD
      check, fixing PR#17566 thanks to Xavier Robin.

    * print()ing and auto-printing no longer differs for functions with
      a user defined print.function, thanks to Bill Dunlap's report.

    * On Windows, writeClipboard(.., format = <n>) now does correctly
      pass format to the underlying C code, thanks to a bug report
      (with patch) by Jenny Bryan.

    * as.data.frame() treats 1D arrays the same as vectors, PR#17570.

    * Improvements in smoothEnds(x, *) working with NAs (towards
      runmed() working in that case, in the next version of R).

    * vcov(glm(<quasi>), dispersion = *) works correctly again, fixing
      PR#17571 thanks to Pavel Krivitsky.

    * R CMD INSTALL of binary packages on Windows now works also with
      per-directory locking.

    * R CMD INSTALL and install.packages() on Windows are now more
      robust against a locked file in an earlier installation of the
      package to be installed.  The default value of option
      install.lock on Windows has been changed to TRUE.

    * On Unix alikes (when readline is active), only expand tilde (~)
      file names starting with a tilde, instead of almost all tildes.

    * In R documentation (*.Rd) files, \item [..] is no longer treated
      specially when rendered in LaTeX and hence pdf, but rather shows
      the brackets in all cases.
2019-08-14 14:36:59 +00:00

195 lines
6.4 KiB
Makefile

# $NetBSD: Makefile,v 1.202 2019/08/14 14:36:59 wen Exp $
DISTNAME= R-3.6.1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_R_CRAN:=base/R-3/}
MAINTAINER= markd@NetBSD.org
HOMEPAGE= http://www.R-project.org/
COMMENT= Statistical language for data analysis and graphics
LICENSE= gnu-gpl-v2
USE_GCC_RUNTIME= yes
BUILD_TARGET= all info
INSTALL_TARGET= install install-info
TEST_TARGET= check
USE_LANGUAGES= c c++ fortran
USE_LIBTOOL= yes
USE_TOOLS+= aclocal autoconf autoreconf automake gmake gzip:run
USE_TOOLS+= makeinfo perl:run pkg-config sed unzip:run
TEXINFO_REQD= 5.1
INFO_FILES= yes
PTHREAD_AUTO_VARS= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-R-shlib
CONFIGURE_ARGS+= --with-readline
CONFIGURE_ARGS+= --with-lapack
CONFIGURE_ARGS+= --with-tcltk
CONFIGURE_ARGS+= --with-tcl-config=${BUILDLINK_PREFIX.tcl}/lib/tclConfig.sh
CONFIGURE_ARGS+= --with-tk-config=${BUILDLINK_PREFIX.tk}/lib/tkConfig.sh
CONFIGURE_ARGS+= --without-gnome # not yet stable
CONFIGURE_ARGS+= --with-system-zlib
CONFIGURE_ARGS+= --with-system-bzlib
CONFIGURE_ARGS+= --with-system-pcre
CONFIGURE_ARGS+= --with-system-xz
.include "../../mk/bsd.prefs.mk"
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD"
CONFIGURE_ARGS+= --enable-long-double=no
.endif
.if ${OPSYS} != "Linux"
USE_GNU_ICONV= yes # latin1 support, iconvlist
.endif
PLIST_VARS+= x11
# Disable Mac OS specific support used by R.app
.if ${OPSYS} == "Darwin"
CONFIGURE_ARGS+= --disable-R-framework
CONFIGURE_ARGS+= --with-aqua
CONFIGURE_ARGS+= --without-x
.else
USE_TOOLS+= xmkmf
CONFIGURE_ARGS+= --with-x
PLIST.x11= yes
.endif
# Use BLAS
.if exists(/System/Library/Frameworks/Accelerate.framework)
CONFIGURE_ARGS+= --with-blas="-framework Accelerate"
.else
CONFIGURE_ARGS+= --without-atlas
CONFIGURE_ARGS+= --disable-BLAS-shlib
CONFIGURE_ARGS+= --with-blas
CONFIGURE_ARGS+= --without-blas_risc
CONFIGURE_ARGS+= --without-dxml
CONFIGURE_ARGS+= --without-libmoto
.endif
# Work around missing MAIN__() definition used in -lF77 by AC_CHECK_LIB.
# and other failures due to not linking to support libs during testing
CONFIGURE_ENV+= ac_cv_lib_blas_dgemm=yes
CONFIGURE_ENV+= ac_cv_lib_blas_dgemm_=yes
CONFIGURE_ENV+= r_cv_complete_blas=yes
# Broken test for bzlib >= 1.0.5 in R 2.7.0
CONFIGURE_ENV+= r_cv_have_bzlib=yes
# Override zlib 1.2.5 requirement
CONFIGURE_ENV+= r_cv_header_zlib_h=yes
CONFIGURE_ENV+= GETWD=${TOOLS_PWD_CMD}
CONFIGURE_ENV+= lt_cv_path_LD=${LD:Q}
CONFIGURE_ENV+= lt_cv_path_SED=${TOOLS_SED}
CONFIGURE_ENV+= ac_cv_path_R_GZIPCMD=${TOOLS_GZIP_CMD}
CONFIGURE_ENV+= ac_cv_path_R_UNZIPCMD=${TOOLS_PATH.unzip}
CONFIGURE_ENV+= r_cv_prog_f77_flag_mieee=no
CONFIGURE_ENV+= ac_cv_path_PDFLATEX=""
# We don't want "lib64"
CONFIGURE_ENV+= LIBnn=lib
# Package assumes it can append to files (specifically DESCRIPTION) that have
# been installed SHAREMODE
SHAREMODE= 644
CONFIGURE_ARGS.Darwin+= --disable-openmp
# R_PAPERSIZE can be: A4, Letter, Legal, Executive
.if defined(PAPERSIZE)
R_PAPERSIZE?= ${PAPERSIZE}
.else
R_PAPERSIZE?= A4
.endif
.if (${R_PAPERSIZE} == "Letterdj")
R_PAPERSIZE= Letter
.endif
CONFIGURE_ENV+= R_PAPERSIZE=${R_PAPERSIZE:Q}
# These macros are used during the build, so strip off the -o,-g flags.
INSTALL_DATA= ${INSTALL} ${COPY} -m ${SHAREMODE}
INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE}
## to build NEWS.pdf
#BUILD_DEPENDS+= tex-latex-bin-[0-9]*:../../print/tex-latex-bin
#BUILD_DEPENDS+= tex-metafont-[0-9]*:../../fonts/tex-metafont
#BUILD_DEPENDS+= tex-ae-[0-9]*:../../fonts/tex-ae
#BUILD_DEPENDS+= tex-ec-[0-9]*:../../fonts/tex-ec
#BUILD_DEPENDS+= tex-tools-[0-9]*:../../print/tex-tools
#BUILD_DEPENDS+= tex-url-[0-9]*:../../print/tex-url
#BUILD_DEPENDS+= tex-oberdiek-[0-9]*:../../print/tex-oberdiek
#BUILD_DEPENDS+= tex-amsfonts-[0-9]*:../../fonts/tex-amsfonts
#BUILD_DEPENDS+= tex-cm-[0-9]*:../../fonts/tex-cm
#BUILD_DEPENDS+= tex-cm-super-[0-9]*:../../fonts/tex-cm-super
#BUILD_DEPENDS+= tex-fontname-[0-9]*:../../fonts/tex-fontname
#BUILD_DEPENDS+= tex-graphics-[0-9]*:../../print/tex-graphics
#BUILD_DEPENDS+= tex-hyperref-[0-9]*:../../print/tex-hyperref
#BUILD_DEPENDS+= tex-ifluatex-[0-9]*:../../print/tex-ifluatex
#BUILD_DEPENDS+= tex-ifxetex-[0-9]*:../../print/tex-ifxetex
#BUILD_DEPENDS+= tex-latex-[0-9]*:../../print/tex-latex
#BUILD_DEPENDS+= tex-latexconfig-[0-9]*:../../print/tex-latexconfig
#BUILD_DEPENDS+= tex-mptopdf-[0-9]*:../../graphics/tex-mptopdf
#BUILD_DEPENDS+= tex-pdftex-def-[0-9]*:../../print/tex-pdftex
SUBST_CLASSES+= fixwrap
SUBST_STAGE.fixwrap= post-build
SUBST_FILES.fixwrap= libtool
SUBST_SED.fixwrap= -e "s,${WRAPPER_BINDIR}/libtool,${PKG_LIBTOOL},g"
BUILDLINK_API_DEPENDS.bzip2+= bzip2>=1.0.5
# failed to convert strong functions and variables: Invalid type identifier
CTF_FILES_SKIP+= lib/R/library/mgcv/libs/mgcv.so
# Exposes PKG_CONFIG_LIBDIR buildlink paths in a comment.
CHECK_WRKREF_SKIP+= lib/R/etc/Makeconf
pre-configure:
${RUN} cd ${WRKSRC} && autoreconf -fvi
# Fix library names. Relies on build system using -headerpad_max_install_names.
.if ${OPSYS} == "Darwin"
.PHONY: fix-darwin-install-name
post-install: fix-darwin-install-name
fix-darwin-install-name:
${FIND} ${DESTDIR}${PREFIX} -name "*.so" | while read lib; do \
libname=`basename $${lib}`; \
libdir=`dirname $${lib} | sed -e 's,${DESTDIR},,'`; \
install_name_tool -id $${libdir}/$${libname} $${lib}; \
done
.endif
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../archivers/xz/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../devel/pango/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
# uses callback interface
.include "../../devel/readline/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/cairo/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
.include "../../graphics/tiff/buildlink3.mk"
.if !exists(/System/Library/Frameworks/Accelerate.framework)
.include "../../math/blas/buildlink3.mk"
.include "../../math/lapack/buildlink3.mk"
.endif
.include "../../www/curl/buildlink3.mk"
.include "../../x11/tk/buildlink3.mk"
.if ${OPSYS} != "Darwin"
.include "../../x11/libXt/buildlink3.mk"
.endif
INSTALL_TEMPLATES+= ../../math/R/files/pkg-index.tmpl
DEINSTALL_TEMPLATES+= ../../math/R/files/pkg-index.tmpl
PRINT_PLIST_AWK+= /^lib\/R\/doc\/html\/packages.html$$/ { next; }
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"