git: 2a58fba4156b - main - subpackages: fix make flavors-package-names

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Mon, 05 Feb 2024 16:27:06 UTC
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2a58fba4156bf6c95d594aed77a7bb64e08ff3ba

commit 2a58fba4156bf6c95d594aed77a7bb64e08ff3ba
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-02-05 16:24:51 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-02-05 16:26:54 +0000

    subpackages: fix make flavors-package-names
    
    if the ports has flavors and subpackages then the list of names
    are properly displayed 1 per line, but if the ports as no flavors
    then it reported everything inline, breaking pkg version and
    probably other tools
    
    Reported by:    many
---
 Mk/bsd.port.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 617844d979f0..448056ca1c17 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -4844,7 +4844,7 @@ pretty-flavors-package-names: .PHONY
 
 flavors-package-names: .PHONY
 .    if empty(FLAVORS)
-	@${ECHO_CMD} "${PKGNAMES}"
+	@${ECHO_CMD} "${PKGNAMES}" | ${XARGS} -n 1
 .    else
 .      for f in ${FLAVORS}
 	@cd ${.CURDIR} && ${SETENV} -i FLAVOR=${f} ${MAKE} -B -V PKGNAMES | ${XARGS} -n 1