git: 0f349ce7fa5b - main - sysutils/freebsd-bsdlabel: Fix package on non-Intel architectures

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Fri, 23 Aug 2024 03:38:40 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0f349ce7fa5bdf9af2b908487ddba8fcbfec33f8

commit 0f349ce7fa5bdf9af2b908487ddba8fcbfec33f8
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-08-23 03:35:23 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-08-23 03:37:43 +0000

    sysutils/freebsd-bsdlabel: Fix package on non-Intel architectures
    
    FreeBSD never installed disklabel(8) on non-Intel architectures.
    
    MFH:    2024Q3
---
 sysutils/freebsd-bsdlabel/Makefile  | 8 ++++++++
 sysutils/freebsd-bsdlabel/pkg-plist | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/sysutils/freebsd-bsdlabel/Makefile b/sysutils/freebsd-bsdlabel/Makefile
index 14b4eab20485..0626b13dee90 100644
--- a/sysutils/freebsd-bsdlabel/Makefile
+++ b/sysutils/freebsd-bsdlabel/Makefile
@@ -24,4 +24,12 @@ MAKE_ENV+=		MAKESYSPATH=/usr/src/share/mk \
 
 WRKSRC_SUBDIR=		bsdlabel
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == "amd64" || ${ARCH} == "i386"
+PLIST_SUB=	DISKLABEL=""
+.else
+PLIST_SUB=	DISKLABEL="@comment "
+.endif
+
 .include <bsd.port.mk>
diff --git a/sysutils/freebsd-bsdlabel/pkg-plist b/sysutils/freebsd-bsdlabel/pkg-plist
index e45737f5dcb8..23491d438a4b 100644
--- a/sysutils/freebsd-bsdlabel/pkg-plist
+++ b/sysutils/freebsd-bsdlabel/pkg-plist
@@ -1,4 +1,4 @@
 sbin/bsdlabel
-sbin/disklabel
+%%DISKLABEL%%sbin/disklabel
 share/man/man8/bsdlabel.8.gz
-share/man/man8/disklabel.8.gz
+%%DISKLABEL%%share/man/man8/disklabel.8.gz