Wed Jun 3 10:45:04 2020 UTC ()
rust*: Add PKG_SKIP_REASON depending on the value of RUST_TYPE


(nia)
diff -r1.170 -r1.171 pkgsrc/lang/rust/Makefile
diff -r1.6 -r1.7 pkgsrc/lang/rust-bin/Makefile

cvs diff -r1.170 -r1.171 pkgsrc/lang/rust/Makefile (expand / switch to context diff)
--- pkgsrc/lang/rust/Makefile 2020/05/24 16:58:43 1.170
+++ pkgsrc/lang/rust/Makefile 2020/06/03 10:45:04 1.171
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.170 2020/05/24 16:58:43 triaxx Exp $
+# $NetBSD: Makefile,v 1.171 2020/06/03 10:45:04 nia Exp $
 
 DISTNAME=	rustc-1.43.1-src
 PKGNAME=	${DISTNAME:S/rustc/rust/:S/-src//}
@@ -19,6 +19,12 @@
 # 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].*-*
+
+.include "type.mk"
+
+.if ${RUST_TYPE} != "src"
+PKG_SKIP_REASON+=	"Rust source package, RUST_TYPE is bin"
+.endif
 
 HAS_CONFIGURE=			yes
 PYTHON_FOR_BUILD_ONLY=		yes

cvs diff -r1.6 -r1.7 pkgsrc/lang/rust-bin/Makefile (expand / switch to context diff)
--- pkgsrc/lang/rust-bin/Makefile 2020/05/25 17:53:21 1.6
+++ pkgsrc/lang/rust-bin/Makefile 2020/06/03 10:45:04 1.7
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2020/05/25 17:53:21 he Exp $
+# $NetBSD: Makefile,v 1.7 2020/06/03 10:45:04 nia Exp $
 
 DISTNAME=	rust-1.42.0
 CATEGORIES=	lang
@@ -9,6 +9,12 @@
 HOMEPAGE=	https://rust-lang.org/
 COMMENT=	Safe, concurrent, practical language (official binaries)
 LICENSE=	mit OR apache-2.0
+
+.include "../../lang/rust/type.mk"
+
+.if ${RUST_TYPE} != "bin"
+PKG_SKIP_REASON+=	"Rust binary package, RUST_TYPE is src"
+.endif
 
 ONLY_FOR_PLATFORM+=	Darwin-*-x86_64
 ONLY_FOR_PLATFORM+=	FreeBSD-*-i386