diff -ruN R-3.6.3-orig/Makefile.fw R-3.6.3/Makefile.fw --- R-3.6.3-orig/Makefile.fw 2018-09-25 04:47:00.000000000 -0400 +++ R-3.6.3/Makefile.fw 2021-01-13 11:12:28.000000000 -0500 @@ -8,7 +8,7 @@ install install-strip: install-R-framework @(sed 's|^LIBR =.*|LIBR = -F$(R_FRAMEWORK_DIR)/.. -framework R|' \ - $(top_builddir)/etc/Makeconf > "$(rhome)/etc${R_ARCH}/Makeconf") + $(top_builddir)/etc/Makeconf > "$(DESTDIR)$(R_FRAMEWORK_DIR)/Resources/etc${R_ARCH}/Makeconf") @(sed 's/Versions\/$(FW_VERSION)\/Resources/Resources/' \ "$(DESTDIR)$(R_FRAMEWORK_DIR)/Resources/bin/R" > \ "$(DESTDIR)$(R_FRAMEWORK_DIR)/Resources/bin/RR") @@ -37,7 +37,7 @@ ln -f -s -n Versions/Current/Resources Resources) @## the resulting libR will point dyld to the fat libR regardless of its origin @(cd "$(DESTDIR)$(R_FRAMEWORK_DIR)/Resources/lib" && \ - install_name_tool -id "$(R_FRAMEWORK_DIR)/Versions/$(FW_VERSION)/Resources/lib/libR.dylib" $(Rexeclibdir)/libR.dylib) + install_name_tool -id "$(R_FRAMEWORK_DIR)/Versions/$(FW_VERSION)/Resources/lib/libR.dylib" $(DESTDIR)$(Rexeclibdir)/libR.dylib) @( otool=otool ; if otool -D "$(DESTDIR)$(Rexeclibdir)/libR.dylib"|grep 'not an object'>/dev/null; then otool=otool64; fi; \ for lib in Rlapack Rblas R; do \ if test -e "$(DESTDIR)$(Rexeclibdir)/lib$${lib}.dylib"; then $(ECHO) " lib$${lib}"; \ diff -Nurd R-3.6.3.orig/configure R-3.6.3/configure --- R-3.6.3.orig/configure 2020-02-21 18:16:00.000000000 -0500 +++ R-3.6.3/configure 2023-10-14 14:59:41.000000000 -0400 @@ -3874,8 +3874,8 @@ ## As from R 3.2.0 split up -L... and -lR if test "${want_R_shlib}" = yes; then - LIBR0="-L\"\$(R_HOME)/lib\$(R_ARCH)\"" - LIBR1=-lR + LIBR0="\$(R_HOME)/lib\$(R_ARCH)/libR\$(DYLIB_EXT)" + LIBR1= else LIBR0= LIBR1= @@ -38938,7 +38938,7 @@ if test "${use_blas_shlib}" = yes; then ## set BLAS_LIBS to point at local version - BLAS_LIBS="-L\"\$(R_HOME)/lib\$(R_ARCH)\" -lRblas" + BLAS_LIBS="\$(R_HOME)/lib\$(R_ARCH)/libRblas\$(DYLIB_EXT)" fi if test "x${use_veclib_g95fix}" = xyes; then @@ -39103,7 +39103,7 @@ fi if test "${acx_lapack_ok}" != "yes"; then - LAPACK_LIBS="-L\"\$(R_HOME)/lib\$(R_ARCH)\" -lRlapack" + LAPACK_LIBS="\$(R_HOME)/lib\$(R_ARCH)/libRlapack\$(DYLIB_EXT)" fi if test "${acx_lapack_ok}" = "yes"; then @@ -42238,6 +42238,8 @@ /* end confdefs.h. */ #ifdef HAVE_BZLIB_H +#include // for exit +#include // for strcmp #include #endif int main() { @@ -42888,8 +42890,8 @@ if test "x${have_libcurl}" = "xyes"; then -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcurl is version 7 and >= 7.22.0" >&5 -$as_echo_n "checking if libcurl is version 7 and >= 7.22.0... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcurl is >= 7.22.0" >&5 +$as_echo_n "checking if libcurl is >= 7.22.0... " >&6; } if ${r_cv_have_curl722+:} false; then : $as_echo_n "(cached) " >&6 else @@ -42905,7 +42907,7 @@ { #ifdef LIBCURL_VERSION_MAJOR #if LIBCURL_VERSION_MAJOR > 7 - exit(1); + exit(0); #elif LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 22 exit(0); #else @@ -42946,6 +42948,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include #include #include int main() diff -ruN R-3.6.3-orig/m4/R.m4 R-3.6.3/m4/R.m4 --- R-3.6.3-orig/m4/R.m4 2019-09-06 18:15:02.000000000 -0400 +++ R-3.6.3/m4/R.m4 2021-01-13 12:18:38.000000000 -0500 @@ -3189,6 +3189,8 @@ LIBS="-lbz2 ${LIBS}" AC_RUN_IFELSE([AC_LANG_SOURCE([[ #ifdef HAVE_BZLIB_H +#include // for exit +#include // for strcmp #include #endif int main() { @@ -4184,6 +4186,7 @@ if test "x${have_libcurl}" = "xyes"; then AC_CACHE_CHECK([if libcurl supports https], [r_cv_have_curl_https], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include #include #include int main() diff -ruN R-3.6.3-orig/src/extra/intl/vasnprintf.c R-3.6.3/src/extra/intl/vasnprintf.c --- R-3.6.3-orig/src/extra/intl/vasnprintf.c 2018-09-25 04:46:48.000000000 -0400 +++ R-3.6.3/src/extra/intl/vasnprintf.c 2021-01-13 11:12:28.000000000 -0500 @@ -4006,7 +4006,7 @@ #endif *fbp = dp->conversion; #if USE_SNPRINTF -# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) +# if !defined(__APPLE__) && !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) fbp[1] = '%'; fbp[2] = 'n'; fbp[3] = '\0'; diff -ruN R-3.6.3-orig/src/main/Makefile.in R-3.6.3/src/main/Makefile.in --- R-3.6.3-orig/src/main/Makefile.in 2019-03-28 19:02:31.000000000 -0400 +++ R-3.6.3/src/main/Makefile.in 2021-01-13 11:12:28.000000000 -0500 @@ -101,7 +101,7 @@ R_bin_OBJECTS = Rmain.o @WANT_R_SHLIB_FALSE@$(OBJECTS) @WANT_R_SHLIB_FALSE@R_bin_LDADD = $(MAIN_OBJS) $(EXTRA_STATIC_LIBS) $(EXTRA_LIBS) ## Linked against -lRblas becasue -lR is and otherwise ld complains. -@WANT_R_SHLIB_TRUE@R_bin_LDADD = -lR @BLAS_SHLIB_TRUE@-lRblas +@WANT_R_SHLIB_TRUE@R_bin_LDADD = ../../lib@R_ARCH@/libR$(DYLIB_EXT) @BLAS_SHLIB_TRUE@../../lib@R_ARCH@/libRblas$(DYLIB_EXT) @BUILD_LTO_FALSE@R_bin_DEPENDENCIES =@WANT_R_SHLIB_FALSE@ libR.a @USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp libR_la = libR$(R_DYLIB_EXT) diff -ruN R-3.6.3-orig/src/nmath/standalone/Makefile.in R-3.6.3/src/nmath/standalone/Makefile.in --- R-3.6.3-orig/src/nmath/standalone/Makefile.in 2019-03-28 19:02:35.000000000 -0400 +++ R-3.6.3/src/nmath/standalone/Makefile.in 2021-01-13 11:12:28.000000000 -0500 @@ -131,7 +131,7 @@ test: $(srcdir)/test.c $(CC) -o $@ $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(srcdir)/test.c \ - -L. -lRmath $(LIBM) + libRmath$(DYLIB_EXT) $(LIBM) install: installdirs install-header @WANT_R_FRAMEWORK_FALSE@ install-pc @WANT_R_FRAMEWORK_FALSE@ @!(test -f $(libRmath_la)) || $(SHELL) $(top_srcdir)/tools/copy-if-change $(libRmath_la) $(DESTDIR)$(libdir)/$(libRmath_la) diff -ruN R-3.6.3-orig/tests/reg-packages.R R-3.6.3/tests/reg-packages.R --- R-3.6.3-orig/tests/reg-packages.R 2019-04-12 18:15:01.000000000 -0400 +++ R-3.6.3/tests/reg-packages.R 2023-03-12 13:16:27.000000000 -0400 @@ -46,14 +46,20 @@ ## failed for several reasons in R < 2.7.0 ## ## Part 2: -- build, install, load and "inspect" the package: -build.pkg <- function(dir) { +build.pkg <- function(dir, destdir = NULL, ignore.stderr = FALSE, no.latex=TRUE) { + dir <- normalizePath(dir) + if(length(dir) > 1) + return(lapply(dir, build.pkg, destdir=destdir, + ignore.stderr=ignore.stderr, no.latex=no.latex)) + ## else one 'dir': stopifnot(dir.exists(dir), file.exists(DESC <- file.path(dir, "DESCRIPTION"))) pkgName <- sub("^[A-Za-z]+: ", "", grep("^Package: ", readLines(DESC), value=TRUE)) patt <- paste(pkgName, ".*tar\\.gz$", sep="_") unlink(dir('.', pattern = patt)) Rcmd <- paste(shQuote(file.path(R.home("bin"), "R")), "CMD") - r <- system(paste(Rcmd, "build --keep-empty-dirs", shQuote(dir)), - intern = TRUE) + r <- system(paste(Rcmd, "build --keep-empty-dirs", + if(no.latex) "--no-manual", shQuote(dir)), + ignore.stderr=ignore.stderr, intern = TRUE) ## return name of tar file built structure(dir('.', pattern = patt), log3 = r) }