pkgsrc-WIP-changes archive

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

rust181: reduce diff to main pkgsrc lang/rust package.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Sun Nov 24 14:21:32 2024 +0000
Changeset:	0809f1f1a910f7896971c0b29b45a2a7bbfde28c

Modified Files:
	rust181/Makefile
	rust181/cargo.mk
	rust181/options.mk
	rust181/rust.mk

Log Message:
rust181: reduce diff to main pkgsrc lang/rust package.

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

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

diffstat:
 rust181/Makefile   | 2 --
 rust181/cargo.mk   | 9 +++++++--
 rust181/options.mk | 6 +++---
 rust181/rust.mk    | 2 +-
 4 files changed, 11 insertions(+), 8 deletions(-)

diffs:
diff --git a/rust181/Makefile b/rust181/Makefile
index 8fa1c3f72d..419502a1b7 100644
--- a/rust181/Makefile
+++ b/rust181/Makefile
@@ -209,8 +209,6 @@ BUILDLINK_TRANSFORM+=	opt:x86_64:arm64
 #
 DISTFILES:=		${DEFAULT_DISTFILES}
 
-NB=
-
 .if ${MACHINE_PLATFORM:MDarwin-*-aarch64} || make(distinfo) || make (makesum) || make(mdi)
 RUST_STAGE0_VER=	1.80.1
 RUST_ARCH:=		aarch64-apple-darwin
diff --git a/rust181/cargo.mk b/rust181/cargo.mk
index b57d01de95..5813c04321 100644
--- a/rust181/cargo.mk
+++ b/rust181/cargo.mk
@@ -70,6 +70,11 @@ print-cargo-depends:
 			print "CARGO_CRATE_DEPENDS+=\t" name "-" vers;	\
 			}' ${CARGO_WRKSRC}/Cargo.lock
 
+.if ${RUST_TYPE} == "native"
+CARGO=			cargo
+.else
+CARGO=			${PREFIX}/bin/cargo
+.endif
 DEFAULT_CARGO_ARGS=	--offline -j${_MAKE_JOBS_N}	\
 			  ${CARGO_NO_DEFAULT_FEATURES:M[yY][eE][sS]:C/[yY][eE][sS]/--no-default-features/}	\
 			  ${CARGO_FEATURES:C/.*/--features/W}	\
@@ -86,7 +91,7 @@ do-build: do-cargo-build
 
 .PHONY: do-cargo-build
 do-cargo-build:
-	${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_ARGS}
+	${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO} ${CARGO_ARGS}
 
 .if !target(do-install) && ${GNU_CONFIGURE:Uno:tl} == no
 do-install: do-cargo-install
@@ -94,7 +99,7 @@ do-install: do-cargo-install
 
 .PHONY: do-cargo-install
 do-cargo-install:
-	${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_INSTALL_ARGS}
+	${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${CARGO} ${CARGO_INSTALL_ARGS}
 	# remove files cargo uses for tracking installations
 	${RM} -f ${DESTDIR}${PREFIX}/.crates.toml
 	${RM} -f ${DESTDIR}${PREFIX}/.crates2.json
diff --git a/rust181/options.mk b/rust181/options.mk
index 3a6b4659ac..7da7699718 100644
--- a/rust181/options.mk
+++ b/rust181/options.mk
@@ -19,14 +19,14 @@ PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
 PKG_SUGGESTED_OPTIONS+=		rust-internal-llvm
 .endif
 
+PKG_OPTIONS_LEGACY_OPTS+=	rust-llvm:rust-internal-llvm
+
 # Bundle OpenSSL and curl into the cargo binary when producing
 # bootstraps on NetBSD.
 .if ${OPSYS} == "NetBSD" && ${BUILD_TARGET} == "dist"
 PKG_SUGGESTED_OPTIONS+=	rust-cargo-static
 .endif
 
-PKG_OPTIONS_LEGACY_OPTS+=	rust-llvm:rust-internal-llvm
-
 .include "../../mk/bsd.options.mk"
 
 # NetBSD/sparc64 when using the internal LLVM needs
@@ -35,7 +35,7 @@ PKG_OPTIONS_LEGACY_OPTS+=	rust-llvm:rust-internal-llvm
 # (however, gcc from 9.x produces a working LLVM, go figure).
 .if ${MACHINE_PLATFORM:MNetBSD-10.*-sparc64}
 .  if !empty(PKG_OPTIONS:Mrust-internal-llvm)
-# Require GCC 12 (from pkgsrc) to correctly build the embedded LLVM (17.x).
+# Require GCC 12 (from pkgsrc) to correctly build the embedded LLVM (18.x).
 GCC_REQD+=	12
 .  endif
 .endif
diff --git a/rust181/rust.mk b/rust181/rust.mk
index 2a29bc959e..5ecb4c2e46 100644
--- a/rust181/rust.mk
+++ b/rust181/rust.mk
@@ -14,7 +14,7 @@
 #	Official Rust binaries are only published for certain platforms,
 #	including Darwin, FreeBSD, Linux, and NetBSD x86_64.
 #
-#	Possible values: src bin
+#	Possible values: src bin native
 #	Default: src
 #
 # === Package-settable variables ===


Home | Main Index | Thread Index | Old Index