summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2016-08-05 02:30:18 +0000
committerJohn Marino <marino@FreeBSD.org>2016-08-05 02:30:18 +0000
commitb95421020da70c3d4ae85d4b9a337ec7fab7385b (patch)
tree3d7020d923865aa36aa981d09ef856af27139126 /math
parentaudio/alsa-{lib,utils}: update to 1.1.2 (diff)
math/R: maintainer rework
See PR for signficant changes to math/R port including options, build defaults, and patch updates. PR: 211393 Submitted by: Joseph Mingrone (maintainer)
Notes
Notes: svn path=/head/; revision=419666
Diffstat (limited to 'math')
-rw-r--r--math/R/Makefile164
-rw-r--r--math/R/compiler.mk8
-rw-r--r--math/R/distinfo2
-rw-r--r--math/R/files/patch-configure113
-rw-r--r--math/R/files/patch-src__nmath__standalone__test.c11
-rw-r--r--math/R/files/patch-src_extra_tre_tre-internal.h20
6 files changed, 59 insertions, 259 deletions
diff --git a/math/R/Makefile b/math/R/Makefile
index 5527d88a7541..09dbad9e7133 100644
--- a/math/R/Makefile
+++ b/math/R/Makefile
@@ -3,7 +3,7 @@
PORTNAME?= R
PORTVERSION= 3.3.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= math lang
MASTER_SITES= http://cran.r-project.org/%SUBDIR%/ \
ftp://cran.r-project.org/pub/R/%SUBDIR%/ \
@@ -29,16 +29,19 @@ LICENSE= GPLv2
LIB_DEPENDS= libcurl.so:ftp/curl \
libpcre.so:devel/pcre
+CONFIGURE_ARGS= --disable-java \
+ --with-readline \
+ rdocdir=${DOCSDIR}
GNU_CONFIGURE= yes
-USES= fortran iconv objc:compiler perl5
-USE_PERL5= build
-USE_LDCONFIG= ${PREFIX}/lib/R/lib
-CONFIGURE_ARGS= --disable-java --enable-memory-profiling rdocdir=${DOCSDIR}
INSTALL_TARGET= install-strip
+ONLY_FOR_ARCHS= i386 amd64
+USES= fortran iconv libtool localbase objc:compiler perl5 \
+ readline
+USE_PERL5= build
-OPTIONS_DEFINE= DOCS ICU INFO LETTER LIBR LDOUBLE LTO MISSING NLS \
- OPENMP THREADS X11
-OPTIONS_GROUP= NEEDX11
+OPTIONS_DEFINE= DOCS ICU INFO LDOUBLE LETTER LIBR MEMPROF NLS RPROF X11
+OPTIONS_GROUP= NEEDGCC NEEDX11
+OPTIONS_GROUP_NEEDGCC= LTO OPENMP
OPTIONS_GROUP_NEEDX11= GHOSTSCRIPT JPEG CAIROPANGO PDF PNG TCLTK TIFF
OPTIONS_SINGLE= BLAS
OPTIONS_SINGLE_BLAS= ATLAS OPENBLAS NETLIB RBLAS
@@ -46,109 +49,83 @@ OPTIONS_SINGLE_BLAS= ATLAS OPENBLAS NETLIB RBLAS
OPTIONS_SUB= YES
ATLAS_DESC= ATLAS BLAS implementation
-GHOSTSCRIPT_DESC= Graphics Device for Bitmap Files via Ghostscript
+GHOSTSCRIPT_DESC= Graphics device for bitmap files via Ghostscript
CAIROPANGO_DESC= Cairo graphics device and Pango multi-language text
INFO_DESC= GNU info manuals
JPEG_DESC= JPEG graphics device
-LDOUBLE_DESC= Enable long double data type
-LETTER_DESC= US Letter paper
-LIBR_DESC= Build dynamic (shared) R library
-LTO_DESC= Try to produce faster code through LTO
-MISSING_DESC= Use libmissing rather than libquadmath
-NEEDX11_DESC= X11-Implying Options
+LDOUBLE_DESC= Long double data type
+LETTER_DESC= US letter paper
+LIBR_DESC= Shared R library
+LTO_DESC= Use Link Time Optimization
+MEMPROF_DESC= Memory profiling via Rprofmem() and tracemem()
+NEEDGCC_DESC= Require GCC
+NEEDX11_DESC= Require X11
NETLIB_DESC= Netlib BLAS implementation
OPENBLAS_DESC= OpenBLAS BLAS implementation
PDF_DESC= PDF manuals (requires TeX)
PNG_DESC= PNG graphics device
RBLAS_DESC= Use R-bundled BLAS implementation
+RPROF_DESC= R profiling via Rprof()
X11_DESC= X11 graphics device
-OPTIONS_DEFAULT= GHOSTSCRIPT ICU INFO JPEG LTO LIBR OPENBLAS OPENMP \
- CAIROPANGO PNG TCLTK TIFF THREADS X11
-
-OPTIONS_DEFAULT_armv6+= MISSING
-OPTIONS_DEFAULT_powerpc+= MISSING
-OPTIONS_DEFAULT_powerpc64+= MISSING
-OPTIONS_DEFAULT_sparc64+= MISSING
+OPTIONS_DEFAULT= CAIROPANGO GHOSTSCRIPT ICU INFO JPEG LDOUBLE LIBR PNG \
+ RBLAS RPROF TCLTK TIFF X11
ATLAS_USES= blaslapack:atlas
-.if defined(BATCH) || defined(PACKAGE_BUILDING)
-ATLAS_IGNORE= Choose a BLAS option other than ATLAS for package building.
-.endif
-
+ALTAS_CONFIGURE_ON= --disable-BLAS-shlib
+ATLAS_VARS= MANUAL_PACKAGE_BUILD=\
+"Choose a BLAS option other than ATLAS for package building."
+CAIROPANGO_IMPLIES= X11
+CAIROPANGO_CONFIGURE_WITH=cairo
+CAIROPANGO_USES= gettext jpeg pkgconfig
+CAIROPANGO_USE= gnome=pango,cairo
DOCS_BUILD_DEPENDS= texi2any:print/texinfo
-
GHOSTSCRIPT_IMPLIES= X11
GHOSTSCRIPT_USES= ghostscript
-
ICU_CONFIGURE_WITH= ICU
ICU_LIB_DEPENDS= libicui18n.so:devel/icu
-
INFO_IMPLIES= DOCS
INFO_INSTALL_TARGET= install-info
INFO_INFO= R-FAQ R-admin R-data R-exts R-ints R-intro R-lang
-
JPEG_IMPLIES= X11
JPEG_CONFIGURE_WITH= jpeglib
-
+JPEG_CONFIGURE_ENV= r_cv_header_jpeglib_h=yes
+JPEG_USES= jpeg
+LDOUBLE_CONFIGURE_ENABLE=long-double
LETTER_CONFIGURE_ENV= R_PAPERSIZE=letter
-
LIBR_CONFIGURE_ENABLE= R-shlib
-
-LDOUBLE_CONFIGURE_ENABLE=long-double
-
LTO_CONFIGURE_ENABLE= lto
-
-.for i in acos asin atan cos cosh exp log pow sin sinh tan tanh
-MISSING_CONFIGURE_ENV+= ac_cv_have_decl_c${i}=yes
-.endfor
-MISSING_LIB_DEPENDS= libmissing.so:math/libmissing
-MISSING_VARS= LIBM="-L${LOCALBASE}/lib -lmissing -lm" \
- LIBMH=<missing_math.h>
-MISSING_VARS_OFF= LIBM='-lquadmath -lm' \
- LIBMH=<quadmath.h>
-
+LTO_USE= gcc=yes
+MEMPROF_CONFIGURE_ENABLE=memory-profiling
NETLIB_USES= blaslapack:netlib
-
+NETLIB_CONFIGURE_ON= --disable-BLAS-shlib
NLS_CONFIGURE_OFF= --disable-nls
NLS_USES= gettext
-
OPENBLAS_USES= blaslapack:openblas
-
+OPENBLAS_CONFIGURE_ON= --disable-BLAS-shlib
OPENMP_CONFIGURE_ENABLE=openmp
-
-CAIROPANGO_IMPLIES= X11
-CAIROPANGO_CONFIGURE_WITH=cairo
-CAIROPANGO_USES= gettext jpeg pkgconfig
-CAIROPANGO_USE= gnome=pango,cairo
-
+OPENMP_USE= compiler:openmp
PDF_IMPLIES= DOCS X11
PDF_USE= tex=dvipsk:build,kpathsea:build,pdftex:build
PDF_INSTALL_TARGET= install-pdf
.for i in KPSEWHICH MAKEINDEX PDFLATEX PDFTEX TEX TEXI2DVI
PDF_CONFIGURE_ENV_OFF+= ac_cv_path_${i}=""
.endfor
-
PNG_IMPLIES= X11
PNG_LIB_DEPENDS= libpng.so:graphics/png
PNG_CONFIGURE_WITH= libpng
-
RBLAS_CONFIGURE_ON= --without-blas \
- --without-lapack
+ --without-lapack \
+ --enable-BLAS-shlib
RBLAS_CONFIGURE_OFF= --with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \
--with-lapack="${LAPACKLIB}"
-
+RPROF_CONFIGURE_ENABLE= R-profiling
TCLTK_IMPLIES= X11
TCLTK_USES= tcl tk:84+
TCLTK_CONFIGURE_WITH= tcltk
-
-THREADS_CONFIGURE_ON= --enable-threads=posix
-THREADS_CONFIGURE_OFF= --disable-threads
-
TIFF_IMPLIES= X11
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
TIFF_CONFIGURE_WITH= libtiff
-
X11_CONFIGURE_WITH= x
X11_USE= xorg=ice,sm,x11,xext,xmu,xscrnsaver,xt
@@ -160,70 +137,21 @@ PLIST_SUB= R_SOVERSION="${R_SOVERSION}" \
RBLAS_SOVERSION="${RBLAS_SOVERSION}" \
RLAPACK_SOVERSION="${RLAPACK_SOVERSION}"
-.include "compiler.mk"
.include <bsd.port.options.mk>
+.include "compiler.mk"
-.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1000052 && \
-(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || \
-${ARCH} == sparc64)
-.for i in coshl erfcl erfl lgammal powl sinhl tanhl tgammal
-CFLAGS+= -fno-builtin-${i}
-LDFLAGS+= -fno-builtin-${i}
-.endfor
+# OPT_USE= ldconfig=${PREFIX}/lib/R/lib is broken.
+# It adds /lib/R/lib (without PREFIX) to ${PREFIX}/libdata/R.
+.if ${PORT_OPTIONS:MLIBR} || ${PORT_OPTIONS:MRBLAS}
+USE_LDCONFIG= ${PREFIX}/lib/R/lib
.endif
post-patch:
-.if ${OPSYS} == FreeBSD
-.if !${PORT_OPTIONS:MMISSING}
-.if ${OSVERSION} < 1000016
- @${REINPLACE_CMD} -e \
-'s/# define EXP expl/# define EXP(x) (long double)expq((__float128)(x))/' \
- ${WRKSRC}/src/nmath/pnchisq.c \
- ${WRKSRC}/src/nmath/pgamma.c
- @${REINPLACE_CMD} -e \
-'s/# define LOG logl/# define LOG(x) (long double)logq((__float128)(x))/' \
- ${WRKSRC}/src/nmath/pnchisq.c \
- ${WRKSRC}/src/nmath/pgamma.c
-.endif
-.if ${OSVERSION} < 1000034
- @${REINPLACE_CMD} -Ee 's/(log)(1p)?l\(/(long double)\1\2q((__float128)/'\
- ${WRKSRC}/src/nmath/dnbeta.c \
- ${WRKSRC}/src/nmath/pnbeta.c
-.endif
- @${REINPLACE_CMD} -Ee \
-'s/powl\((.*)(long double)/(long double)powq((__float128)\1__float128/' \
- ${WRKSRC}/src/main/format.c
-.else # !PORT_OPTIONS:MMISSING
-.if ${OSVERSION} > 1000052 && \
-(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || \
-${ARCH} == sparc64)
- @${REINPLACE_CMD} -e '\|^FLIBS="$$ac_cv_f77_libs"|s|"|&${LIBM} |' \
- ${WRKSRC}/configure
-.endif
- @${REINPLACE_CMD} -e \
-'\|#[[:blank:]]*include[[:blank:]]*<complex.h>|{x;s|^.*$$|#include "missing_complex.h"|;H;x;}' \
- ${WRKSRC}/src/main/complex.c
-.endif # !PORT_OPTIONS:MMISSING
-.endif # ${OPSYS} == FreeBSD
- @${REINPLACE_CMD} -e \
-'\|#[[:blank:]]*include[[:blank:]]*<math.h>|{x;s|^.*$$|#include ${LIBMH}|;H;x;}'\
- ${WRKSRC}/src/nmath/nmath.h \
- ${WRKSRC}/src/include/Rmath.h0.in
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g'\
${WRKSRC}/src/nmath/standalone/Makefile.in \
${WRKSRC}/src/unix/Makefile.in
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \
- ${WRKSRC}/configure \
- ${WRKSRC}/src/library/profile/Rprofile.unix \
- ${WRKSRC}/src/scripts/javareconf.in
-
-.if !${PORT_OPTIONS:MMISSING}
-pre-configure:
- @if [ ! -f ${_GCC_RUNTIME}/libquadmath.a ] ; then \
- IGNORE="\n\n\n%s\n\n\n" "libquadmath is not available for your\
- compiler and architecture: please enable the MISSING option."; \
- fi
-.endif
+ ${WRKSRC}/configure
post-install:
.for L in R Rblas Rlapack
diff --git a/math/R/compiler.mk b/math/R/compiler.mk
index 6a3352b0d345..51ce77479d6f 100644
--- a/math/R/compiler.mk
+++ b/math/R/compiler.mk
@@ -1,2 +1,10 @@
# Compiler settings required for R and the R-cran ports.
+.if ${OPSYS} == FreeBSD
+. if ${OSVERSION} < 1000015
USE_GCC= yes
+. endif
+.else
+. if ${OPSYS} == DragonFly
+USE_GCC= 6
+. endif
+.endif
diff --git a/math/R/distinfo b/math/R/distinfo
index 882438c3fe0f..f63322597f89 100644
--- a/math/R/distinfo
+++ b/math/R/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1467276607
+TIMESTAMP = 1470250856
SHA256 (R-3.3.1.tar.gz) = 3dc59ae5831f5380f83c169bac2103ad052efe0ecec4ffa74bde4d85a0fda9e2
SIZE (R-3.3.1.tar.gz) = 29848329
diff --git a/math/R/files/patch-configure b/math/R/files/patch-configure
deleted file mode 100644
index da96c4789130..000000000000
--- a/math/R/files/patch-configure
+++ /dev/null
@@ -1,113 +0,0 @@
---- configure.orig 2016-04-25 22:17:08 UTC
-+++ configure
-@@ -22470,13 +22470,13 @@ if test "x$ac_cv_lib_mw__mwvalidcheckl"
- LIBM=-lmw
- fi
-
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
--$as_echo_n "checking for cos in -lm... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lquadmath -lquadmath -lm" >&5
-+$as_echo_n "checking for cos in -lquadmath -lquadmath -lm... " >&6; }
- if ${ac_cv_lib_m_cos+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lm $LIBS"
-+LIBS="-lquadmath -lquadmath -lm $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-@@ -22507,18 +22507,18 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
- $as_echo "$ac_cv_lib_m_cos" >&6; }
- if test "x$ac_cv_lib_m_cos" = xyes; then :
-- LIBM="$LIBM -lm"
-+ LIBM="$LIBM -lquadmath -lquadmath -lm"
- fi
-
- ;;
- *)
-- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
--$as_echo_n "checking for cos in -lm... " >&6; }
-+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lquadmath -lquadmath -lm" >&5
-+$as_echo_n "checking for cos in -lquadmath -lquadmath -lm... " >&6; }
- if ${ac_cv_lib_m_cos+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lm $LIBS"
-+LIBS="-lquadmath -lquadmath -lm $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-@@ -22549,7 +22549,7 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
- $as_echo "$ac_cv_lib_m_cos" >&6; }
- if test "x$ac_cv_lib_m_cos" = xyes; then :
-- LIBM=-lm
-+ LIBM="-lquadmath -lquadmath -lm"
- fi
-
- ;;
-@@ -22560,13 +22560,13 @@ esac
- ## </NOTE>
- ## AC_CHECK_LIBM computes LIBM but does not add to LIBS, hence we do
- ## the following as well.
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
--$as_echo_n "checking for sin in -lm... " >&6; }
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lquadmath -lquadmath -lm" >&5
-+$as_echo_n "checking for sin in -lquadmath -lquadmath -lm... " >&6; }
- if ${ac_cv_lib_m_sin+:} false; then :
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lm $LIBS"
-+LIBS="-lquadmath -lquadmath -lm $LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-@@ -22601,7 +22601,7 @@ if test "x$ac_cv_lib_m_sin" = xyes; then
- #define HAVE_LIBM 1
- _ACEOF
-
-- LIBS="-lm $LIBS"
-+ LIBS="-lquadmath -lquadmath -lm $LIBS"
-
- fi
-
-@@ -27958,7 +27958,7 @@ fi
- ## if nothing was obtained for SHLIB_CXXLDFLAGS.
- ##
- ## Note also that some systems (formerly AIX) do not allow for unresolved
--## symbols at link time. For such systems, we link against -lm (in case
-+## symbols at link time. For such systems, we link against -lquadmath -lm (in case
- ## it exists) when building a shlib module via SHLIB_LIBADD.
-
- main_ld="${CC}"
-@@ -30147,7 +30147,7 @@ if ${ac_cv_lib_rt_clock_gettime+:} false
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lrt $LIBS"
-+LIBS="$LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-@@ -30190,7 +30190,7 @@ if test "x$ac_cv_lib_rt_clock_gettime" =
- #define HAVE_LIBRT 1
- _ACEOF
-
-- LIBS="-lrt $LIBS"
-+ LIBS="$LIBS"
-
- fi
-
-@@ -35109,7 +35109,7 @@ fi
- ## Part 2. Try finding the tk library.
- if test -n "${TK_CONFIG}"; then
- . ${TK_CONFIG}
-- TCLTK_LIBS="${TCLTK_LIBS} ${TK_LIB_SPEC} ${TK_XLIBSW}"
-+ TCLTK_LIBS="${TCLTK_LIBS} ${TK_LIB_SPEC} ${TK_XLIBSW} ${TCL_LD_FLAGS}"
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk_Init in -ltk" >&5
- $as_echo_n "checking for Tk_Init in -ltk... " >&6; }
diff --git a/math/R/files/patch-src__nmath__standalone__test.c b/math/R/files/patch-src__nmath__standalone__test.c
deleted file mode 100644
index 0aefc4bf9fc6..000000000000
--- a/math/R/files/patch-src__nmath__standalone__test.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/nmath/standalone/test.c.orig 2015-08-25 22:18:53 UTC
-+++ src/nmath/standalone/test.c
-@@ -38,7 +38,7 @@ main(int argc, char** argv)
- qnorm(0.7, 0.0, 1.0, 0, 0);
- printf("*** loaded '%s'\n", argv[0]);
- set_seed(123, 456);
-- N01_kind = AHRENS_DIETER;
-+ N01type N01_kind = AHRENS_DIETER;
- printf("one normal %f\n", norm_rand());
- set_seed(123, 456);
- N01_kind = BOX_MULLER;
diff --git a/math/R/files/patch-src_extra_tre_tre-internal.h b/math/R/files/patch-src_extra_tre_tre-internal.h
index 9648c7b240ce..1f059c45942e 100644
--- a/math/R/files/patch-src_extra_tre_tre-internal.h
+++ b/math/R/files/patch-src_extra_tre_tre-internal.h
@@ -1,22 +1,10 @@
---- src/extra/tre/tre-internal.h.orig 2016-05-05 10:54:54 UTC
+--- src/extra/tre/tre-internal.h.orig 2016-07-23 16:50:17 UTC
+++ src/extra/tre/tre-internal.h
-@@ -17,6 +17,7 @@
- #include <wctype.h>
+@@ -18,6 +18,7 @@
#endif /* !HAVE_WCTYPE_H */
-+#include <limits.h>
#include <ctype.h>
++#include <stdint.h>
#include "tre.h"
-@@ -47,7 +48,11 @@
- #ifdef TRE_WCHAR
-
- /* Wide characters. */
-+#if WCHAR_MAX <= INT_MAX
- typedef wint_t tre_cint_t;
-+#else /* WCHAR_MAX > INT_MAX */
-+#define TRE_CHAR_MAX INT_MAX
-+#endif
- /* Workaround problem seen on AIX, (2010 & 2015), e.g.,
- https://stat.ethz.ch/pipermail/r-devel/2015-October/071902.html
- WCHAR_MAX = UINT32_MAX on AIX and that is "not possible to work"
+ #ifdef TRE_DEBUG