summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2016-02-29 20:05:00 +0000
committerjperkin <jperkin@pkgsrc.org>2016-02-29 20:05:00 +0000
commitb5f14071604b9afc49fd64abc2f96d434a4bd4f7 (patch)
treef78289b9f4a7464df4ecc07f4fff787091d88ba3
parentc8924ba03ed351f30b210cbcd6e398ac7aea635f (diff)
downloadpkgsrc-b5f14071604b9afc49fd64abc2f96d434a4bd4f7.tar.gz
Apply Darwin install_name fix to R extensions.
-rw-r--r--math/R/Makefile.extension15
1 files changed, 14 insertions, 1 deletions
diff --git a/math/R/Makefile.extension b/math/R/Makefile.extension
index e195b07d7fb..c7ee161b3c7 100644
--- a/math/R/Makefile.extension
+++ b/math/R/Makefile.extension
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.extension,v 1.19 2014/10/09 14:06:41 wiz Exp $
+# $NetBSD: Makefile.extension,v 1.20 2016/02/29 20:05:00 jperkin Exp $
#
# This Makefile fragment is included by packages for R library packages.
#
@@ -26,6 +26,19 @@ do-install:
${PKGSRC_SETENV} ${INSTALL_ENV} ${MAKE_ENV} ${LOCALBASE}/bin/R \
CMD INSTALL ${R_PKG_INSTALL_ARGS} ${WRKDIR}/${R_PKGNAME}
+.include "../../mk/bsd.fast.prefs.mk"
+
+.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
+
R_LIB= lib/R/library
R_INST_DIRS?= ${R_PKGNAME}
R_HOMEPAGE_BASE= http://cran.r-project.org/web/packages