Skip to content

Commit

Permalink
rust-bin: reduce repetition in NetBSD section, fix aarch64eb entry.
Browse files Browse the repository at this point in the history
Thanks to pkglint for the need to fix aarch64eb.
  • Loading branch information
he32 committed Sep 4, 2022
1 parent f9329ca commit 841556a
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions lang/rust-bin/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.39 2022/09/04 06:58:57 he Exp $
# $NetBSD: Makefile,v 1.40 2022/09/04 09:57:13 he Exp $

DISTNAME= rust-1.62.1
PKGNAME= ${DISTNAME:S/rust/rust-bin/1}
Expand All @@ -23,6 +23,7 @@ ONLY_FOR_PLATFORM+= Linux-*-x86_64

# [email protected] provided binaries
ONLY_FOR_PLATFORM+= NetBSD-*-aarch64
ONLY_FOR_PLATFORM+= NetBSD-*-aarch64eb
ONLY_FOR_PLATFORM+= NetBSD-*-earmv7hf
ONLY_FOR_PLATFORM+= NetBSD-*-i386
ONLY_FOR_PLATFORM+= NetBSD-*-powerpc
Expand Down Expand Up @@ -98,51 +99,58 @@ NBSUF=
RUST_ARCH:= aarch64-unknown-netbsd
DN:= ${DISTNAME}${NBSUF}
EXTRACT_SUFX= .tar.xz
DISTFILES:= ${DISTFILES} ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
SITES.${DN}-${RUST_ARCH}${EXTRACT_SUFX}= ${NETBSD_REPO}
DF:= ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
DISTFILES:= ${DISTFILES} ${DF}
SITES.${DF}= ${NETBSD_REPO}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64_be) || make(distinfo) || make(makesum) || make(mdi)
.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64eb) || make(distinfo) || make(makesum) || make(mdi)
RUST_ARCH:= aarch64_be-unknown-netbsd
DN:= ${DISTNAME}${NBSUF}
EXTRACT_SUFX= .tar.xz
DISTFILES:= ${DISTFILES} ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
SITES.${DN}-${RUST_ARCH}${EXTRACT_SUFX}= ${NETBSD_REPO}
DF:= ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
DISTFILES:= ${DISTFILES} ${DF}
SITES.${DF}= ${NETBSD_REPO}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make(makesum) || make(mdi)
RUST_ARCH:= armv7-unknown-netbsd-eabihf
DN:= ${DISTNAME}${NBSUF}
EXTRACT_SUFX= .tar.xz
DISTFILES:= ${DISTFILES} ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
SITES.${DN}-${RUST_ARCH}${EXTRACT_SUFX}= ${NETBSD_REPO}
DF:= ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
DISTFILES:= ${DISTFILES} ${DF}
SITES.${DF}= ${NETBSD_REPO}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) || make(makesum) || make(mdi)
RUST_ARCH:= i586-unknown-netbsd
DN:= ${DISTNAME}${NBSUF}
EXTRACT_SUFX= .tar.xz
DISTFILES:= ${DISTFILES} ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
SITES.${DN}-${RUST_ARCH}${EXTRACT_SUFX}= ${NETBSD_REPO}
DF:= ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
DISTFILES:= ${DISTFILES} ${DF}
SITES.${DF}= ${NETBSD_REPO}
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || make(distinfo) || make(makesum) || make(mdi)
. if ${OPSYS_VERSION} >= 090000
RUST_ARCH:= powerpc-unknown-netbsd90
DN:= ${DISTNAME}${NBSUF}
EXTRACT_SUFX= .tar.xz
DISTFILES:= ${DISTFILES} ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
SITES.${DN}-${RUST_ARCH}${EXTRACT_SUFX}= ${NETBSD_REPO}
DF:= ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
DISTFILES:= ${DISTFILES} ${DF}
SITES.${DF}= ${NETBSD_REPO}
. else
RUST_ARCH:= powerpc-unknown-netbsd
DN:= ${DISTNAME}${NBSUF}
EXTRACT_SUFX= .tar.xz
DISTFILES:= ${DISTFILES} ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
SITES.${DN}-${RUST_ARCH}${EXTRACT_SUFX}= ${NETBSD_REPO}
DF:= ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
DISTFILES:= ${DISTFILES} ${DF}
SITES.${DF}= ${NETBSD_REPO}
. endif
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make(makesum) || make(mdi)
RUST_ARCH:= sparc64-unknown-netbsd
DN:= ${DISTNAME}${NBSUF}
EXTRACT_SUFX= .tar.xz
DISTFILES:= ${DISTFILES} ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
SITES.${DN}-${RUST_ARCH}${EXTRACT_SUFX}= ${NETBSD_REPO}
DF:= ${DN}-${RUST_ARCH}${EXTRACT_SUFX}
DISTFILES:= ${DISTFILES} ${DF}
SITES.${DF}= ${NETBSD_REPO}
.endif

# Binary still extracts to plain non-nb'ed directory
Expand Down

0 comments on commit 841556a

Please sign in to comment.