Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jul 2022 18:51:14 GMT
From:      Mikael Urankar <mikael@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2b58d08a515a - main - net-im/signal-desktop: Simplify handling of esbuild
Message-ID:  <202207291851.26TIpESd034837@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mikael:

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

commit 2b58d08a515aa8aea6b37e0d41b433840c619514
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2022-07-27 17:41:27 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-07-29 18:51:09 +0000

    net-im/signal-desktop: Simplify handling of esbuild
    
    npm is inconsistent between archs: the path and binary name is different
    on aarch64 and amd64. Pass the binary path in ESBUILD_BINARY_PATH
    
    It fixes the build on aarch64
---
 net-im/signal-desktop/Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile
index 50b1d4b80dad..adaf0007cd5b 100644
--- a/net-im/signal-desktop/Makefile
+++ b/net-im/signal-desktop/Makefile
@@ -79,6 +79,8 @@ MAKE_ENV+=	ELECTRON_SKIP_BINARY_DOWNLOAD=1
 # This is a workaround to avoid filesystem violations during poudriere build
 MAKE_ENV+=	PYTHONDONTWRITEBYTECODE=1
 
+MAKE_ENV+=	ESBUILD_BINARY_PATH=${WRKDIR}/esbuild-freebsd-64/package/bin/esbuild
+
 _BUILD_DATE=	$$(date +'%s')
 
 ELECTRON_VER_MAJOR=	19
@@ -88,8 +90,8 @@ NPM_RINGRTC_DIR=	npm-ringrtc-2.20.11-3e05d7ec7b1878df69e0d7b215b693d82b3b3791
 NPM_SQLITE3_DIR=	npm-better-sqlite3-7.5.0-3c4a7eebba3d5f5d8cb88fe83be1c01b8c0dea7d
 NPM_PLAYWRITE_DIR=	npm-playwright-core-1.17.1-a16e0f89284a0ed8ae6d77e1c905c84b8a2ba022-integrity
 NPM_ESBUILD_VERS=	0.14.28
-NPM_ESBUILD_DIR=	npm-esbuild-freebsd-64-${NPM_ESBUILD_VERS}-3579fd41f4c090d52e1a9134743e591c6aea49d7-integrity
 
+ESBUILD_ARCH=		${ARCH:S/aarch64/arm/:S/amd64//}
 NODE_ARCH=		${ARCH:S/aarch64/arm64/:S/amd64/x64/}
 APP_OUT_DIR=		linux-${ARCH:S/aarch64/arm64-/:S/amd64//}unpacked
 
@@ -132,11 +134,8 @@ do-build:
 	# patch-package can't patch sqlite3 on aarch64, patch the yarn cache instead
 	cd ${WRKDIR}/.cache/yarn/v6 && ${PATCH} -s -N -i ${FILESDIR}/sqlite3.gyp.diff
 
-	${MKDIR} ${WRKDIR}/esbuild-freebsd-64-${NPM_ESBUILD_VERS} \
-		${WRKDIR}/.cache/yarn/v6/${NPM_ESBUILD_DIR}/node_modules/esbuild/lib/downloaded-esbuild-freebsd-64-esbuild
-	${TAR} -xf ${WRKDIR}/yarn-cache/esbuild-freebsd-64-${NPM_ESBUILD_VERS}.tgz -C ${WRKDIR}/esbuild-freebsd-64-${NPM_ESBUILD_VERS}
-	${CP} ${WRKDIR}/esbuild-freebsd-64-${NPM_ESBUILD_VERS}/package/bin/esbuild \
-		${WRKDIR}/.cache/yarn/v6/${NPM_ESBUILD_DIR}/node_modules/esbuild/lib/downloaded-esbuild-freebsd-64-esbuild
+	${MKDIR} ${WRKDIR}/esbuild-freebsd-64
+	${TAR} -xf ${WRKDIR}/yarn-cache/esbuild-freebsd-${ESBUILD_ARCH}64-${NPM_ESBUILD_VERS}.tgz -C ${WRKDIR}/esbuild-freebsd-64
 
 # 	# For online build
 #	${RM} ${WRKDIR}/.npmrc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291851.26TIpESd034837>