summaryrefslogtreecommitdiff
path: root/lang/rust
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2019-11-20 19:07:12 +0000
committerminskim <minskim@pkgsrc.org>2019-11-20 19:07:12 +0000
commit243bf0baa3b41e842c26a8e8eb3a42dc3036e852 (patch)
treed9c860bd3fad3ecfab7defddb2fdd04b15f76047 /lang/rust
parentb62d19b5b54daa146f37c00e1fe56510a7dc2015 (diff)
downloadpkgsrc-243bf0baa3b41e842c26a8e8eb3a42dc3036e852.tar.gz
lang/rust: Fix install_name on Darwin
Diffstat (limited to 'lang/rust')
-rw-r--r--lang/rust/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 8035c82bb2f..ba14ec20300 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.130 2019/11/20 09:53:13 he Exp $
+# $NetBSD: Makefile,v 1.131 2019/11/20 19:07:12 minskim Exp $
DISTNAME= rustc-1.39.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -360,6 +360,16 @@ do-install:
GENERATE_PLIST+= find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \
sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ;
+.if ${OPSYS} == "Darwin"
+.PHONY: fix-darwin-install-name
+post-install: fix-darwin-install-name
+fix-darwin-install-name:
+ for f in ${DESTDIR}${PREFIX}/lib/librustc_macros-*.dylib \
+ ${DESTDIR}${PREFIX}/lib/rustlib/${RUST_ARCH}/lib/librustc_macros-*.dylib; do \
+ install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \
+ done
+.endif
+
# Create a relocatable stage2 bootstrap from the bits we just built that can be
# used to build the next version of rust. Currently only tested on SmartOS.
#