git: 076733902c86 - main - lang/bun: fix fetch with new do-fetch.sh

From: Mathieu Arnold <mat_at_FreeBSD.org>
Date: Sat, 19 Sep 2026 18:01:34 UTC
The branch main has been updated by mat:

URL: https://cgit.FreeBSD.org/ports/commit/?id=076733902c86aff6a7e8ef2375fda8bd5db82b0a

commit 076733902c86aff6a7e8ef2375fda8bd5db82b0a
Author:     Mathieu Arnold <mat@FreeBSD.org>
AuthorDate: 2026-09-19 17:55:59 +0000
Commit:     Mathieu Arnold <mat@FreeBSD.org>
CommitDate: 2026-09-19 18:00:42 +0000

    lang/bun: fix fetch with new do-fetch.sh
---
 lang/bun/Makefile | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/lang/bun/Makefile b/lang/bun/Makefile
index 7207da301545..4d3022924eca 100644
--- a/lang/bun/Makefile
+++ b/lang/bun/Makefile
@@ -114,14 +114,26 @@ _BUN_CPU_FLAGS=	--cpu=${CPUTYPE} --baseline=false
 do-fetch:
 	@${MKDIR} ${DD}
 	# Fetch directly-downloadable distfiles (GH0 uses DEFAULT master site, no group suffix)
-	@${SETENV} ${_DO_FETCH_ENV} ${_MASTER_SITES_ENV} dp_SITE_FLAVOR=MASTER \
-		${SH} ${SCRIPTSDIR}/do-fetch.sh \
-			${DISTNAME}${EXTRACT_SUFX} \
+	@${MKDIR} ${WRKDIR}; \
+	${RM} ${_MASTER_SITES_FILE} ${_DISTFILES_FILE}; \
+	for site in ${_MASTER_SITES_ENV}; do \
+		printf '%s\n' "$${site}" | sed -e 's/ /\\ /g' >> ${_MASTER_SITES_FILE}; \
+	done; \
+	for file in ${DISTNAME}${EXTRACT_SUFX} \
 			${DISTFILES:M*\:ovenzig} \
 			${DISTFILES:M*\:webkit} \
 			${DISTFILES:M*\:nodejshdr} \
 			${DISTFILES:M*\:simdutf_src} \
-			${DISTFILES:M*\:bootstrap:N*node-modules-*:N*dep-tarballs-*:N*cargo-vendor-*}
+			${DISTFILES:M*\:bootstrap:N*node-modules-*:N*dep-tarballs-*:N*cargo-vendor-*} \
+			; do \
+		printf '%s\n' "$${file}" >> ${_DISTFILES_FILE}; \
+	done; \
+	${SETENV} \
+			${_DO_FETCH_ENV} \
+			dp_SITES_FILE=${_MASTER_SITES_FILE} \
+			dp_FILES_FILE=${_DISTFILES_FILE} \
+			dp_SITE_FLAVOR=MASTER \
+			${SH} ${SCRIPTSDIR}/do-fetch.sh
 	# Build bun-node-modules tarball (npm ci with vendored package-lock*.json).
 	# Uses deterministic tar so the checksum is reproducible across builds.
 	@if ! [ -f "${DD}/bun-node-modules-${DISTVERSION}.tar.gz" ]; then \