pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/rust-bin rust-bin: fix FreeBSD and NetBSD packagi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b0a80ffc0b3d
branches:  trunk
changeset: 458036:b0a80ffc0b3d
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Wed Sep 08 02:36:18 2021 +0000

description:
rust-bin: fix FreeBSD and NetBSD packaging of some binaries

Re-do my previous Linux packaging fix in r. 1.26. FreeBSD and NetBSD
both don't need a particular code block that runs patchelf; doing so
only mangles the resulting binaries, so things can be simplified.

diffstat:

 lang/rust-bin/Makefile |  22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diffs (43 lines):

diff -r df984c2981e5 -r b0a80ffc0b3d lang/rust-bin/Makefile
--- a/lang/rust-bin/Makefile    Wed Sep 08 02:24:26 2021 +0000
+++ b/lang/rust-bin/Makefile    Wed Sep 08 02:36:18 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.26 2021/08/25 02:33:00 gutteridge Exp $
+# $NetBSD: Makefile,v 1.27 2021/09/08 02:36:18 gutteridge Exp $
 
 DISTNAME=      rust-1.52.1
 PKGNAME=       ${DISTNAME:S/rust/rust-bin/1}
@@ -204,13 +204,6 @@
 .    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:
@@ -218,11 +211,14 @@
        ${PREFIX}/bin/patchelf ${FORCE_RPATH} --set-rpath \
                ${PREFIX}/lib ${DESTDIR}${PREFIX}/bin/${bin}
 .  endfor
-.  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
+# Only Linux builds link these binaries against an LLVM library
+.  if ${OPSYS} == "Linux"
+.    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-lld
+        ${PREFIX}/bin/patchelf ${FORCE_RPATH} --set-rpath ${RUST_LLVM_RPATH} \
+          ${DESTDIR}${PREFIX}/lib/rustlib/${RUST_ARCH}/bin/${bin}
+.    endfor
+.  endif
 .  for lib in lib lib/rustlib/${RUST_ARCH}/lib \
                lib/rustlib/${RUST_ARCH}/codegen-backends
        for f in ${DESTDIR}${PREFIX}/${lib}/lib*.so; do                 \



Home | Main Index | Thread Index | Old Index