pkgsrc-WIP-changes archive

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

rust-bin: Fix relative rpath on Linux



Module Name:	pkgsrc-wip
Committed By:	Min Sik Kim <minskim%NetBSD.org@localhost>
Pushed By:	minskim
Date:		Wed Sep 26 06:30:46 2018 -0700
Changeset:	e021376b7d5da0339572b114ee2e7f62d9ab6fc7

Modified Files:
	rust-bin/Makefile

Log Message:
rust-bin: Fix relative rpath on Linux

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

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

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

diffs:
diff --git a/rust-bin/Makefile b/rust-bin/Makefile
index 20070f9d40..83072cbe87 100644
--- a/rust-bin/Makefile
+++ b/rust-bin/Makefile
@@ -2,7 +2,7 @@
 
 DISTNAME=	rust-1.29.0
 PKGNAME=	${DISTNAME:S/rust/rust-bin/}
-PKGREVISION=	2
+PKGREVISION=	3
 CATEGORIES=	lang
 MASTER_SITES=	https://static.rust-lang.org/dist/
 
@@ -100,6 +100,21 @@ fix-darwin-install-name:
 		done;							\
 	done
 .  endfor
+.elif ${OPSYS} == "Linux"
+BUILD_DEPENDS+=		patchelf-[0-9]*:../../devel/patchelf
+
+.PHONY: fix-relative-rpath
+post-install: fix-relative-rpath
+fix-relative-rpath:
+.  for bin in clippy-driver rls rustc rustdoc
+	${PREFIX}/bin/patchelf --set-rpath ${PREFIX}/lib ${DESTDIR}${PREFIX}/bin/${bin}
+.  endfor
+.  for lib in lib lib/rustlib/${RUST_ARCH}/lib lib/rustlib/${RUST_ARCH}/codegen-backends
+	for f in ${DESTDIR}${PREFIX}/${lib}/lib*.so; do			\
+		[ ! -f $$f ] && continue;				\
+		${PREFIX}/bin/patchelf --set-rpath ${PREFIX}/lib $$f;			\
+	done
+.  endfor
 .endif
 
 .include "../../mk/bsd.pkg.mk"


Home | Main Index | Thread Index | Old Index