From b5f14071604b9afc49fd64abc2f96d434a4bd4f7 Mon Sep 17 00:00:00 2001 From: jperkin Date: Mon, 29 Feb 2016 20:05:00 +0000 Subject: Apply Darwin install_name fix to R extensions. --- math/R/Makefile.extension | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3