pkgsrc-WIP-changes archive

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

rust-bin: Fix @rpath on Darwin



Module Name:	pkgsrc-wip
Committed By:	Min Kim <minskim%NetBSD.org@localhost>
Pushed By:	minskim
Date:		Tue Jan 29 03:04:39 2019 -0800
Changeset:	9f55d71e3729ec630e8855ddd072ad1ed2dd74f1

Modified Files:
	rust-bin/Makefile

Log Message:
rust-bin: Fix @rpath on Darwin

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=9f55d71e3729ec630e8855ddd072ad1ed2dd74f1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 rust-bin/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

diffs:
diff --git a/rust-bin/Makefile b/rust-bin/Makefile
index a9b4d055cd..d7a1c7a21e 100644
--- a/rust-bin/Makefile
+++ b/rust-bin/Makefile
@@ -95,6 +95,15 @@ fix-darwin-install-name:
 		    ${DESTDIR}${PREFIX}/bin/${bin};			\
 	done
 .  endfor
+.  for bin in llvm-nm llvm-objcopy llvm-objdump llvm-profdata \
+		llvm-readobj llvm-size llvm-strip rust-lld
+	otool -XL ${DESTDIR}${PREFIX}/lib/rustlib/${RUST_ARCH}/bin/${bin} \
+	    | ${GREP} '@rpath' | while read rpath rest; do		\
+		install_name_tool -change $$rpath			\
+		    `${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib/rustlib/${RUST_ARCH}/lib,g'` \
+		    ${DESTDIR}${PREFIX}/lib/rustlib/${RUST_ARCH}/bin/${bin}; \
+	done
+.  endfor
 .  for lib in lib lib/rustlib/${RUST_ARCH}/lib lib/rustlib/${RUST_ARCH}/codegen-backends
 	for f in ${DESTDIR}${PREFIX}/${lib}/lib*.dylib; do		\
 		[ ! -f $$f ] && continue;				\


Home | Main Index | Thread Index | Old Index