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:   nia
Date:           Sat Apr 30 21:02:39 UTC 2022

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

Log Message:
rust: future-proof by using OPSYS_VERSION for NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 pkgsrc/lang/rust/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/lang/rust/platform.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/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.254 pkgsrc/lang/rust/Makefile:1.255
--- pkgsrc/lang/rust/Makefile:1.254     Sat Apr 23 15:55:31 2022
+++ pkgsrc/lang/rust/Makefile   Sat Apr 30 21:02:39 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.254 2022/04/23 15:55:31 he Exp $
+# $NetBSD: Makefile,v 1.255 2022/04/30 21:02:39 nia Exp $
 
 DISTNAME=      rustc-1.59.0-src
 PKGNAME=       ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -21,9 +21,6 @@ USE_LANGUAGES=                c c++11
 USE_LIBTOOL=           yes
 USE_TOOLS+=            bash grep gmake perl:build pkg-config
 
-# The NetBSD bootstraps are built for NetBSD 8 (because rust doesn't
-# build on 7).  Mark earlier versions as broken.
-BROKEN_ON_PLATFORM+=   NetBSD-[1-7].*-*
 # Bootstrap is built for NetBSD 9.x on these platforms:
 BROKEN_ON_PLATFORM+=   NetBSD-8.*-*arm*
 BROKEN_ON_PLATFORM+=   NetBSD-8.*-aarch64
@@ -82,6 +79,10 @@ CHECK_SSP_SUPPORTED= no
 
 .include "../../mk/bsd.prefs.mk"
 
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 080000
+BROKEN+=               "Bootstrap unavailable for old NetBSD version"
+.endif
+
 # Allow overriding MAKE_JOBS_SAFE
 # some may chose to mostly build faster,
 # and deal with any failures due to deadlocks
@@ -292,7 +293,7 @@ RUST_STAGE0_VER=    1.58.1
 RUST_ARCH=             powerpc-unknown-netbsd
 
 # Cross-built against NetBSD 9.0
-.  if empty(OS_VERSION:M8.*) || make(distinfo) || make(makesum) || make(mdi)
+.  if ${OPSYS_VERSION} >= 090000 || make(distinfo) || make(makesum) || make(mdi)
 RUST_STAGE0:=                  rust-${RUST_STAGE0_VER}-${RUST_ARCH}90.tar.gz
 RUST_STD_STAGE0:=              rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}90.tar.gz
 DISTFILES:=                    ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
@@ -301,7 +302,7 @@ SITES.${RUST_STD_STAGE0}=   ${MASTER_SITE_
 .  endif
 
 # Cross-built against NetBSD 8.0
-.  if !empty(OS_VERSION:M8.*) || make(distinfo) || make(makesum) || make(mdi)
+.  if ${OPSYS_VERSION} < 090000 || make(distinfo) || make(makesum) || make(mdi)
 RUST_STAGE0:=                  rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
 RUST_STD_STAGE0:=              rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
 DISTFILES:=                    ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
@@ -598,7 +599,7 @@ stage0-bootstrap: install
 
 # rust i386 bootstraps are built for 8.0 and still depend on libstdc++.so.8.
 # Pull in compat80 on 9.x and newer.
-.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) && empty(OS_VERSION:M8.*)
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) && ${OPSYS_VERSION} >= 090000
 BUILD_DEPENDS+=        compat80>=0:../../emulators/compat80
 .endif
 

Index: pkgsrc/lang/rust/platform.mk
diff -u pkgsrc/lang/rust/platform.mk:1.13 pkgsrc/lang/rust/platform.mk:1.14
--- pkgsrc/lang/rust/platform.mk:1.13   Sat Nov 20 16:09:46 2021
+++ pkgsrc/lang/rust/platform.mk        Sat Apr 30 21:02:39 2022
@@ -1,4 +1,4 @@
-# $NetBSD: platform.mk,v 1.13 2021/11/20 16:09:46 he Exp $
+# $NetBSD: platform.mk,v 1.14 2022/04/30 21:02:39 nia Exp $
 
 # This file encodes whether a given platform has support for rust.
 
@@ -7,20 +7,23 @@
 
 .if !defined(PLATFORM_SUPPORTS_RUST)
 
-# Rust needs NetBSD>7
+.  include "../../mk/bsd.fast.prefs.mk"
+
 .  for rust_arch in aarch64 earmv7hf i386 powerpc 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
 
-.  for rust_platform in ${RUST_PLATFORMS}
-.    if !empty(MACHINE_PLATFORM:M${rust_platform})
+.  if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 080000
+PLATFORM_SUPPORTS_RUST?=       no
+.  else
+.    for rust_platform in ${RUST_PLATFORMS}
+.      if !empty(MACHINE_PLATFORM:M${rust_platform})
 PLATFORM_SUPPORTS_RUST=                yes
-.    endif
-.  endfor
+.      endif
+.    endfor
 PLATFORM_SUPPORTS_RUST?=       no
+.  endif
 
 .endif # !defined(PLATFORM_SUPPORTS_RUST)



Home | Main Index | Thread Index | Old Index