git: 8b37f0f0e6aa - main - www/immich-cli: Unbreak the build with BUILD_AS_NON_ROOT

From: Jochen Neumeister <joneum_at_FreeBSD.org>
Date: Sun, 04 Oct 2026 07:29:04 UTC
The branch main has been updated by joneum:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8b37f0f0e6aaf50c110bd625fb1be2c8e491ddd3

commit 8b37f0f0e6aaf50c110bd625fb1be2c8e491ddd3
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2026-10-04 07:28:11 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2026-10-04 07:28:54 +0000

    www/immich-cli: Unbreak the build with BUILD_AS_NON_ROOT
    
    npm then has no writable HOME and cannot create its cache.  Restrict the
    port to 64-bit, the TypeScript compiler has no FreeBSD/i386 binary.
    
    PR:             299082
    Reported by:    otis
    Sponsored by:   Netzkommune GmbH
---
 www/immich-cli/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www/immich-cli/Makefile b/www/immich-cli/Makefile
index 385da0e1b90c..7c6259acc1d2 100644
--- a/www/immich-cli/Makefile
+++ b/www/immich-cli/Makefile
@@ -12,6 +12,9 @@ WWW=		https://immich.app/
 LICENSE=	AGPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+ONLY_FOR_ARCHS=	aarch64 amd64
+ONLY_FOR_ARCHS_REASON=	the TypeScript compiler ships no FreeBSD/i386 binary
+
 BUILD_DEPENDS=	${LOCALBASE}/bin/npm:www/npm-node22
 
 USES=		cpe nodejs:22,build,run
@@ -29,7 +32,8 @@ PNPM=		${WRKDIR}/pnpm-prefix/bin/pnpm
 PNPM_VERSION=	11.22.0
 
 MAKE_ENV=	CI=1 \
-		COREPACK_ENABLE_STRICT=0
+		COREPACK_ENABLE_STRICT=0 \
+		HOME=${WRKDIR}
 
 SUB_FILES=	immich
 SUB_LIST=	NODE=${LOCALBASE}/bin/node
@@ -37,7 +41,7 @@ SUB_LIST=	NODE=${LOCALBASE}/bin/node
 NO_ARCH=	yes
 
 pre-build:
-	cd ${WRKDIR} && ${SETENV} PATH=${PATH} \
+	cd ${WRKDIR} && ${SETENV} ${MAKE_ENV} PATH=${PATH} \
 		${LOCALBASE}/bin/npm install -g --prefix ${WRKDIR}/pnpm-prefix \
 		${BUILDKIT}/pnpm-${PNPM_VERSION}.tgz