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 Sik Kim <minskim%NetBSD.org@localhost>
Pushed By:	minskim
Date:		Mon Sep 24 08:56:56 2018 -0700
Changeset:	134b357285d07de5422f623eea87edc136ec4d1d

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=134b357285d07de5422f623eea87edc136ec4d1d

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

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

diffs:
diff --git a/rust-bin/Makefile b/rust-bin/Makefile
index b34bc9b54c..d12c8a00a4 100644
--- a/rust-bin/Makefile
+++ b/rust-bin/Makefile
@@ -2,6 +2,7 @@
 
 DISTNAME=	rust-1.29.0
 PKGNAME=	${DISTNAME:S/rust/rust-bin/}
+PKGREVISION=	1
 CATEGORIES=	lang
 MASTER_SITES=	https://static.rust-lang.org/dist/
 
@@ -77,7 +78,7 @@ do-install:
 .PHONY: fix-darwin-install-name
 post-install: fix-darwin-install-name
 fix-darwin-install-name:
-.  for bin in rls rustc rustdoc
+.  for bin in clippy-driver rls rustc rustdoc
 	otool -XL ${DESTDIR}${PREFIX}/bin/${bin}			\
 	    | ${GREP} '@rpath' | while read rpath rest; do		\
 		install_name_tool -change $$rpath			\
@@ -85,6 +86,17 @@ fix-darwin-install-name:
 		    ${DESTDIR}${PREFIX}/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;				\
+		install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \
+		otool -XL $$f | grep '@rpath' | while read rpath rest; do \
+			install_name_tool -change $$rpath \
+			    `${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \
+			    $$f;					\
+		done;							\
+	done
+.  endfor
 .endif
 
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index