pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sun Jul  7 11:00:37 UTC 2024

Modified Files:
        pkgsrc/lang/rust: platform.mk rust.mk

Log Message:
rust: for NetBSD/aarch64 and NetBSD/earmv7hf use rust176

switch to platform.mk version from wip/rust179 and add logic for the above


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/lang/rust/platform.mk
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/rust/rust.mk

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

Modified files:

Index: pkgsrc/lang/rust/platform.mk
diff -u pkgsrc/lang/rust/platform.mk:1.23 pkgsrc/lang/rust/platform.mk:1.24
--- pkgsrc/lang/rust/platform.mk:1.23   Thu Mar 21 02:14:14 2024
+++ pkgsrc/lang/rust/platform.mk        Sun Jul  7 11:00:37 2024
@@ -1,34 +1,25 @@
-# $NetBSD: platform.mk,v 1.23 2024/03/21 02:14:14 nia Exp $
+# $NetBSD: platform.mk,v 1.24 2024/07/07 11:00:37 wiz Exp $
 
 # This file encodes whether a given platform has support for rust.
 
-.if !defined(PLATFORM_SUPPORTS_RUST)
+# Platforms where rust ought to work but does not require a link to an
+# open PR.
 
-.include "../../mk/bsd.fast.prefs.mk"
+.if !defined(PLATFORM_SUPPORTS_RUST)
 
-# Little bit of future-proofing.
-.for i in 9 10 11
-RUST_PLATFORMS+=       NetBSD-${i}.*-aarch64
-RUST_PLATFORMS+=       NetBSD-${i}.*-aarch64eb
-RUST_PLATFORMS+=       NetBSD-${i}.*-earmv6hf
-RUST_PLATFORMS+=       NetBSD-${i}.*-earmv7hf
-RUST_PLATFORMS+=       NetBSD-${i}.*-i386
-RUST_PLATFORMS+=       NetBSD-${i}.*-mipsel
-RUST_PLATFORMS+=       NetBSD-${i}.*-powerpc
-RUST_PLATFORMS+=       NetBSD-${i}.*-riscv64
-RUST_PLATFORMS+=       NetBSD-${i}.*-sparc64
-RUST_PLATFORMS+=       NetBSD-${i}.*-x86_64
+# Rust needs NetBSD>7
+.for rust_arch in aarch64 earmv7hf i386 powerpc riscv64 sparc64 x86_64
+.  for rust_os in Darwin FreeBSD Linux NetBSD SunOS
+.    if ${OPSYS} != "NetBSD" || empty(OS_VERSION:M[0-7].*)
+RUST_PLATFORMS+=       ${rust_os}-*-${rust_arch}
+.    endif
+.  endfor
 .endfor
 
-RUST_PLATFORMS+=       Darwin-*-aarch64
-RUST_PLATFORMS+=       Darwin-*-x86_64
-RUST_PLATFORMS+=       FreeBSD-*-x86_64
-RUST_PLATFORMS+=       Linux-*-aarch64
-RUST_PLATFORMS+=       Linux-*-earmv6hf
-RUST_PLATFORMS+=       Linux-*-earmv7hf
-RUST_PLATFORMS+=       Linux-*-i386
-RUST_PLATFORMS+=       Linux-*-x86_64
-RUST_PLATFORMS+=       SunOS-*-x86_64
+.if ${OPSYS} == "NetBSD" && (${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "earmv7hf")
+RUST_DIR?=     ../../lang/rust176
+.endif
+RUST_DIR?=     ../../lang/rust
 
 .for rust_platform in ${RUST_PLATFORMS}
 .  if !empty(MACHINE_PLATFORM:M${rust_platform})

Index: pkgsrc/lang/rust/rust.mk
diff -u pkgsrc/lang/rust/rust.mk:1.8 pkgsrc/lang/rust/rust.mk:1.9
--- pkgsrc/lang/rust/rust.mk:1.8        Fri Jul  1 06:58:18 2022
+++ pkgsrc/lang/rust/rust.mk    Sun Jul  7 11:00:37 2024
@@ -1,4 +1,4 @@
-# $NetBSD: rust.mk,v 1.8 2022/07/01 06:58:18 pin Exp $
+# $NetBSD: rust.mk,v 1.9 2024/07/07 11:00:37 wiz Exp $
 #
 # This file determines the type of rust package to use.
 #
@@ -32,6 +32,7 @@
 #      Default: no
 
 .include "../../mk/bsd.fast.prefs.mk"
+.include "platform.mk"
 
 RUST_REQ?=     1.56.1
 RUST_RUNTIME?= no
@@ -43,7 +44,7 @@ RUST_TYPE?=   src
 BUILDLINK_DEPMETHOD.rust-bin?=         build
 .  endif
 BUILDLINK_API_DEPENDS.rust-bin+=       rust-bin>=${RUST_REQ}
-.  include "../../lang/rust-bin/buildlink3.mk"
+.  include "${RUST_DIR}-bin/buildlink3.mk"
 .endif
 
 .if ${RUST_TYPE} == "src"
@@ -51,5 +52,5 @@ BUILDLINK_API_DEPENDS.rust-bin+=      rust-bi
 BUILDLINK_DEPMETHOD.rust?=             build
 .  endif
 BUILDLINK_API_DEPENDS.rust+=           rust>=${RUST_REQ}
-.  include "../../lang/rust/buildlink3.mk"
+.  include "${RUST_DIR}/buildlink3.mk"
 .endif



Home | Main Index | Thread Index | Old Index