pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/rust rust: Only enable rust-cargo-static when bui...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b147a26318e6
branches:  trunk
changeset: 449492:b147a26318e6
user:      nia <nia%pkgsrc.org@localhost>
date:      Wed Mar 31 16:45:08 2021 +0000

description:
rust: Only enable rust-cargo-static when building bootstraps.

The final compiler will be dynamically linked with OpenSSL and curl,
but this is undesirable in the case of bootstraps where it might be
built against a version incompatible with version the user has.

Discussed with he@.

diffstat:

 lang/rust/Makefile   |  3 ++-
 lang/rust/options.mk |  8 ++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r ded22dd04a74 -r b147a26318e6 lang/rust/Makefile
--- a/lang/rust/Makefile        Wed Mar 31 13:43:24 2021 +0000
+++ b/lang/rust/Makefile        Wed Mar 31 16:45:08 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.221 2021/03/30 09:50:14 nia Exp $
+# $NetBSD: Makefile,v 1.222 2021/03/31 16:45:08 nia Exp $
 
 DISTNAME=      rustc-1.49.0-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
+PKGREVISION=   1
 CATEGORIES=    lang
 MASTER_SITES=  https://static.rust-lang.org/dist/
 
diff -r ded22dd04a74 -r b147a26318e6 lang/rust/options.mk
--- a/lang/rust/options.mk      Wed Mar 31 13:43:24 2021 +0000
+++ b/lang/rust/options.mk      Wed Mar 31 16:45:08 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.12 2021/03/30 09:50:14 nia Exp $
+# $NetBSD: options.mk,v 1.13 2021/03/31 16:45:08 nia Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.rust
 PKG_SUPPORTED_OPTIONS+=        rust-cargo-static
@@ -14,7 +14,11 @@
 .  endif
 .endif
 
-.if ${OPSYS} == "NetBSD"
+.include "cross.mk"
+
+# Bundle OpenSSL and curl into the cargo binary when producing
+# bootstraps.
+.if ${OPSYS} == "NetBSD" && !empty(TARGET)
 PKG_SUGGESTED_OPTIONS+=        rust-cargo-static
 .endif
 



Home | Main Index | Thread Index | Old Index