pkgsrc-WIP-changes archive

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

rust: Sync various changes from pkgsrc.



Module Name:	pkgsrc-wip
Committed By:	Jonathan Perkin <jonathan%perkin.org.uk@localhost>
Pushed By:	jperkin
Date:		Thu Jul 14 10:08:01 2022 +0100
Changeset:	e5c20242fb27649d9a1d5da8cbef47e44cc10e1c

Modified Files:
	rust/Makefile
	rust/cargo.mk
	rust/do-cross.mk
	rust/options.mk

Log Message:
rust: Sync various changes from pkgsrc.

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

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

diffstat:
 rust/Makefile    |  5 +++--
 rust/cargo.mk    |  2 +-
 rust/do-cross.mk |  2 +-
 rust/options.mk  | 27 ++++++++++++++-------------
 4 files changed, 19 insertions(+), 17 deletions(-)

diffs:
diff --git a/rust/Makefile b/rust/Makefile
index cd0b2eadb8..4bd5b22d1c 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -69,6 +69,7 @@ MAKE_ENV+=		CARGO_BUILD_JOBS=${_MAKE_JOBS_N}
 MAKE_ENV.Darwin+=	MACOSX_DEPLOYMENT_TARGET="10.7"
 
 CFLAGS.SunOS+=		-D_POSIX_PTHREAD_SEMANTICS
+MAKE_ENV.SunOS+=	AR=gar
 
 UNLIMIT_RESOURCES+=	cputime datasize virtualsize
 
@@ -150,7 +151,7 @@ CONFIGURE_ARGS+=	--set llvm.targets="ARM;X86"
 #
 # If we aren't on 9-current, and are on 8.x or 9.x, avoid parallel.
 # \todo Consider avoiding setting this on netbsd-9 past the fix.
-.  if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*}
+.  if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099957
 MAKE_JOBS_SAFE?=	no
 .  endif
 
@@ -241,7 +242,7 @@ pre-build-fix:
 RUST_STAGE0_VER=	1.61.0
 RUST_ARCH:=		x86_64-unknown-illumos
 RUST_STAGE0:=		rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
-SITES.${RUST_STAGE0}=	https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
+SITES.${RUST_STAGE0}=	https://us-central.manta.mnx.io/pkgsrc/public/pkg-bootstraps/
 DISTFILES:=		${DISTFILES} ${RUST_STAGE0}
 RUST_BOOTSTRAP_PATH?=	${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}
 # Override default "x86_64-sun-solaris" selection
diff --git a/rust/cargo.mk b/rust/cargo.mk
index f6dd04c541..a0e70fd58b 100644
--- a/rust/cargo.mk
+++ b/rust/cargo.mk
@@ -39,7 +39,7 @@ EXTRACT_DIR.${crate}.crate?=	${CARGO_VENDOR_DIR}
 .include "../../mk/bsd.prefs.mk"
 # Triggers NetBSD ld.so bug (PR toolchain/54192)
 # See Makefile for further information.
-.if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*}
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099957
 MAKE_JOBS_SAFE=	no
 .endif
 
diff --git a/rust/do-cross.mk b/rust/do-cross.mk
index ae734f8cea..3649f8bad9 100644
--- a/rust/do-cross.mk
+++ b/rust/do-cross.mk
@@ -12,7 +12,7 @@ SHORT_TARGETS+=	arm64
 SHORT_TARGETS+=	arm64_be
 SHORT_TARGETS+=	i386
 
-# Local overrides to ROOT.* variables:
+# Conditional local overrides of ROOT.* variables:
 .sinclude "local-roots.mk"
 
 # Root of target directories.
diff --git a/rust/options.mk b/rust/options.mk
index 4ed5fd4530..1fd629a171 100644
--- a/rust/options.mk
+++ b/rust/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.8 2021/01/01 20:44:48 he Exp $
+# $NetBSD: options.mk,v 1.26 2022/07/11 20:13:50 jperkin Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.rust
 PKG_SUPPORTED_OPTIONS+=	rust-cargo-static rust-docs
@@ -7,17 +7,17 @@ PKG_SUPPORTED_OPTIONS+=	rust-cargo-static rust-docs
 
 # The bundled LLVM current has issues building on SunOS.
 .if ${OPSYS} != "SunOS"
-PKG_SUPPORTED_OPTIONS+=		rust-llvm
-# There may be compatibility issues with base LLVM.
-.  if !empty(HAVE_LLVM)
-PKG_SUGGESTED_OPTIONS+=		rust-llvm
+PKG_SUPPORTED_OPTIONS+=		rust-internal-llvm
+# There may be compatibility issues with the base LLVM on e.g. NetBSD.
+.  if !empty(HAVE_LLVM) || !empty(MACHINE_PLATFORM:MDarwin-*-aarch64)
+PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
+.  endif
+# As of 1.61, the pkgsrc LLVM causes build failure on i386 and powerpc
+.  if ${OPSYS} == "NetBSD"
+.    if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc"
+PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
+.    endif
 .  endif
-.endif
-
-# As of 1.61,
-# The pkgsrc LLVM causes build failure on i386 and powerpc
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc"
-PKG_SUGGESTED_OPTIONS+=		rust-llvm
 .endif
 
 # Bundle OpenSSL and curl into the cargo binary when producing
@@ -26,13 +26,14 @@ PKG_SUGGESTED_OPTIONS+=		rust-llvm
 PKG_SUGGESTED_OPTIONS+=	rust-cargo-static
 .endif
 
+PKG_OPTIONS_LEGACY_OPTS+=	rust-llvm:rust-internal-llvm
+
 .include "../../mk/bsd.options.mk"
 
 #
 # Use the internal copy of LLVM or the external one?
-# The internal one contains some extra optimizations.
 #
-.if empty(PKG_OPTIONS:Mrust-llvm)
+.if empty(PKG_OPTIONS:Mrust-internal-llvm)
 BUILDLINK_API_DEPENDS.llvm+=	llvm>=12.0.0
 .include "../../lang/llvm/buildlink3.mk"
 CONFIGURE_ARGS+=	--enable-llvm-link-shared


Home | Main Index | Thread Index | Old Index