pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/rust rust: add platform.mk to provide list of sup...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5718120516f7
branches:  trunk
changeset: 334610:5718120516f7
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sat Jun 01 13:55:11 2019 +0000

description:
rust: add platform.mk to provide list of supported platforms

Based on code by dholland, pkglinted.

diffstat:

 lang/rust/platform.mk |  18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 56b7ffad6439 -r 5718120516f7 lang/rust/platform.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/rust/platform.mk     Sat Jun 01 13:55:11 2019 +0000
@@ -0,0 +1,18 @@
+# $NetBSD: platform.mk,v 1.1 2019/06/01 13:55:11 wiz Exp $
+
+.if !defined(PLATFORM_SUPPORTS_RUST)
+
+.for _rust_arch in aarch64 armv7 i386 powerpc sparc64 x86_64
+.for _rust_os in Darwin FreeBSD Linux NetBSD SunOS
+RUST_PLATFORMS+=        ${_rust_os}-*-${_rust_arch}
+.endfor
+.endfor
+
+.for _rust_platform in ${RUST_PLATFORMS}
+.if !empty(MACHINE_PLATFORM:M${_rust_platform})
+PLATFORM_SUPPORTS_RUST=         yes
+.endif
+.endfor
+PLATFORM_SUPPORTS_RUST?=        no
+
+.endif # !defined(PLATFORM_SUPPORTS_RUST)



Home | Main Index | Thread Index | Old Index