pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/rust lang/rust: Fix install_name on Darwin



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f5bfe190de4c
branches:  trunk
changeset: 404977:f5bfe190de4c
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Wed Nov 20 19:07:12 2019 +0000

description:
lang/rust: Fix install_name on Darwin

diffstat:

 lang/rust/Makefile |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r d17d81fba993 -r f5bfe190de4c lang/rust/Makefile
--- a/lang/rust/Makefile        Wed Nov 20 18:58:22 2019 +0000
+++ b/lang/rust/Makefile        Wed Nov 20 19:07:12 2019 +0000
@@ -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 @@
 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.
 #



Home | Main Index | Thread Index | Old Index