summaryrefslogtreecommitdiff
path: root/math/R
diff options
context:
space:
mode:
authorbrook <brook@pkgsrc.org>2022-03-19 23:13:59 +0000
committerbrook <brook@pkgsrc.org>2022-03-19 23:13:59 +0000
commit6815b5739cc7f5ac5436b091fc430a32e6b784a3 (patch)
tree641b2e0452b249c45fa598fe81e74ae92228402d /math/R
parent3f17a0524147eb4734b3952f504875938749f66a (diff)
downloadpkgsrc-6815b5739cc7f5ac5436b091fc430a32e6b784a3.tar.gz
math/R: fix compiler flags embedded within Makeconf
The R package installs the file lib/R/etc/Makeconf, which is intended to be used by R packages that themselves compile programs. This feature is rarely used, but the math/R-nimble package is an example of one that does. For this to work, the compiler flags embedded within Makeconf must be compatible with the system compiler. At least on MacOS, this is not the case by default, and so nimble compilations fail. This substitutes ${COMPILER_RPATH_FLAG} into configure.ac, so that it is used when creating Makeconf. Since neither R itself nor most R packages compile other programs, Makeconf is generally not used and this fix will have no impact.
Diffstat (limited to 'math/R')
-rw-r--r--math/R/Makefile7
-rw-r--r--math/R/distinfo5
-rw-r--r--math/R/patches/patch-configure.ac4
3 files changed, 10 insertions, 6 deletions
diff --git a/math/R/Makefile b/math/R/Makefile
index 59d93fd2393..4aaccc6b1ad 100644
--- a/math/R/Makefile
+++ b/math/R/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.230 2022/03/11 10:27:29 wen Exp $
+# $NetBSD: Makefile,v 1.231 2022/03/19 23:13:59 brook Exp $
#
# If updating this package, please try to ensure PLIST.Darwin is kept in sync
@@ -137,6 +137,11 @@ INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE}
#BUILD_DEPENDS+= tex-mptopdf-[0-9]*:../../graphics/tex-mptopdf
#BUILD_DEPENDS+= tex-pdftex-def-[0-9]*:../../print/tex-pdftex
+SUBST_CLASSES+= rpath
+SUBST_STAGE.rpath= pre-configure
+SUBST_FILES.rpath= configure.ac
+SUBST_VARS.rpath= COMPILER_RPATH_FLAG
+
SUBST_CLASSES+= fixwrap
SUBST_STAGE.fixwrap= post-build
SUBST_FILES.fixwrap= libtool
diff --git a/math/R/distinfo b/math/R/distinfo
index a876502d20d..721ba8c72bd 100644
--- a/math/R/distinfo
+++ b/math/R/distinfo
@@ -1,10 +1,9 @@
-$NetBSD: distinfo,v 1.93 2022/03/11 10:27:29 wen Exp $
+$NetBSD: distinfo,v 1.94 2022/03/19 23:13:59 brook Exp $
BLAKE2s (R-4.1.3.tar.gz) = bee2174be0be0102367553b25fbf38b1ed2324a9193310a3fe98babec69b7988
SHA512 (R-4.1.3.tar.gz) = cb71cc6c9551cc9cef4819ed778a8d0ef40490ec2bed27669c8e93d464a93bef5e73c2a03a714db03c87112b291a752ec2d21194e5abef81d85cb6c62643127c
Size (R-4.1.3.tar.gz) = 35026517 bytes
-SHA1 (patch-configure.ac) = 2732e3e0a39ee64ae4cba5c476f4754ecbd14942
+SHA1 (patch-configure.ac) = 967450ec49d375cce254e108b062ad73857d261d
SHA1 (patch-m4_R.m4) = 704d5514e10adf0b5217bb71b06f44a612eca6e0
SHA1 (patch-src_library_stats_src_Makefile.in) = 4eb93292858392792c37a706399e2cef91821bbe
SHA1 (patch-src_main_character.c) = 842ae5d291f36f2beead4d32c1d41b18cbff878d
-SHA1 (patch-src_main_printutils.c) = ce8bafa2525a91eca3adc3d9a60724d145116ce1
diff --git a/math/R/patches/patch-configure.ac b/math/R/patches/patch-configure.ac
index ab8699b694f..ff4b43489d6 100644
--- a/math/R/patches/patch-configure.ac
+++ b/math/R/patches/patch-configure.ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure.ac,v 1.4 2019/06/09 13:39:12 wen Exp $
+$NetBSD: patch-configure.ac,v 1.5 2022/03/19 23:13:59 brook Exp $
Do not include system paths in R_LD_LIBRARY_PATH.
NetBSD, FreeBSD, DragonFly, Darwin and Solaris fixes
@@ -18,7 +18,7 @@ NetBSD, FreeBSD, DragonFly, Darwin and Solaris fixes
## 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)\""
-+ LIBR0="-Wl,-R${prefix}/lib/R/lib\$(R_ARCH) -L\"\$(R_HOME)/lib\$(R_ARCH)\""
++ LIBR0="-Wl,@COMPILER_RPATH_FLAG@${prefix}/lib/R/lib\$(R_ARCH) -L\"\$(R_HOME)/lib\$(R_ARCH)\""
LIBR1=-lR
else
LIBR0=