summaryrefslogtreecommitdiff
path: root/math/R
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2015-09-11 13:16:16 +0000
committerjperkin <jperkin@pkgsrc.org>2015-09-11 13:16:16 +0000
commit9a1ddeb757dc25c73c695f86d03effe49268af63 (patch)
treeb3f4199c013540d5beff29cc2298e25f64698cb4 /math/R
parent915d02140dcc955e6b36ccd322b3c68c7b25105e (diff)
downloadpkgsrc-9a1ddeb757dc25c73c695f86d03effe49268af63.tar.gz
Use install_name_tool to fix up Darwin library names. Fixes check-shlib.
Diffstat (limited to 'math/R')
-rw-r--r--math/R/Makefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/math/R/Makefile b/math/R/Makefile
index ee6690af1c1..edf42357223 100644
--- a/math/R/Makefile
+++ b/math/R/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.161 2015/08/14 12:40:19 wen Exp $
+# $NetBSD: Makefile,v 1.162 2015/09/11 13:16:16 jperkin Exp $
DISTNAME= R-3.2.2
CATEGORIES= math
@@ -139,6 +139,24 @@ BUILDLINK_API_DEPENDS.bzip2+= bzip2>=1.0.5
CONFIGURE_ARGS+= --enable-mbcs=no
.endif
+# Fix library names. Relies on build system using -headerpad_max_install_names.
+.if ${OPSYS} == "Darwin"
+.PHONY: fix-darwin-install-name
+post-install: fix-darwin-install-name
+fix-darwin-install-name:
+ install_name_tool -id ${PREFIX}/lib/R/lib/libR.dylib \
+ ${DESTDIR}${PREFIX}/lib/R/lib/libR.dylib
+ install_name_tool -id ${PREFIX}/lib/R/lib/libRlapack.dylib \
+ ${DESTDIR}${PREFIX}/lib/R/lib/libRlapack.dylib
+ ${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} \
+ -change libR.dylib \
+ ${PREFIX}/lib/R/lib/libR.dylib $${lib}; \
+ done
+.endif
+
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../archivers/xz/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"