diff options
author | gutteridge <gutteridge@pkgsrc.org> | 2021-08-25 02:33:00 +0000 |
---|---|---|
committer | gutteridge <gutteridge@pkgsrc.org> | 2021-08-25 02:33:00 +0000 |
commit | d4c20d052a508466c6ac79023049128e5631bb80 (patch) | |
tree | 3b8d8ddcb37dfa064baba67b8dfe4d646bc0d8a0 /lang | |
parent | dc3c36075a335f4f7ad1158a1c067086c1628a7c (diff) | |
download | pkgsrc-d4c20d052a508466c6ac79023049128e5631bb80.tar.gz |
rust-bin: Linux repackaging fix
Some upstream-provided binaries weren't covered in a code block that
uses patch-elf to tinker with their RPATH entries. There's also an
extra binary provided vs. the NetBSD package, and possibly those for
other OSes. (I don't have Darwin or FreeBSD test environments; those
OSes could need tweaking for this, too.)
Diffstat (limited to 'lang')
-rw-r--r-- | lang/rust-bin/Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lang/rust-bin/Makefile b/lang/rust-bin/Makefile index 681f5aa34bd..dcda41bdf56 100644 --- a/lang/rust-bin/Makefile +++ b/lang/rust-bin/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2021/08/21 22:06:29 gutteridge Exp $ +# $NetBSD: Makefile,v 1.26 2021/08/25 02:33:00 gutteridge Exp $ DISTNAME= rust-1.52.1 PKGNAME= ${DISTNAME:S/rust/rust-bin/1} @@ -204,6 +204,13 @@ FORCE_RPATH= --force-rpath . include "../../devel/libatomic/buildlink3.mk" . endif +# Upstream packages for Linux ship with an extra binary vs. some other OSes. +. if ${OPSYS} == "Linux" +RUST_BIN_EXTRA= rust-lld +. else +RUST_BIN_EXTRA= # empty +. endif + .PHONY: fix-relative-rpath post-install: fix-relative-rpath fix-relative-rpath: @@ -211,8 +218,8 @@ fix-relative-rpath: ${PREFIX}/bin/patchelf ${FORCE_RPATH} --set-rpath \ ${PREFIX}/lib ${DESTDIR}${PREFIX}/bin/${bin} . endfor -. for bin in llvm-ar llvm-nm llvm-objcopy llvm-objdump \ - llvm-profdata llvm-readobj llvm-size llvm-strip +. for bin in llc llvm-ar llvm-as llvm-cov llvm-dis llvm-nm llvm-objcopy \ + llvm-objdump llvm-profdata llvm-readobj llvm-size llvm-strip opt ${RUST_BIN_EXTRA} ${PREFIX}/bin/patchelf ${FORCE_RPATH} --set-rpath ${RUST_LLVM_RPATH} \ ${DESTDIR}${PREFIX}/lib/rustlib/${RUST_ARCH}/bin/${bin} . endfor |