git: da0540fa457e - main - net-im/signal-desktop: Use nodedir to point to the node headers

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Tue, 09 May 2023 17:33:29 UTC
The branch main has been updated by mikael:

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

commit da0540fa457e9f59530218a7a9e9ed47218c4dc4
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2023-05-01 17:46:54 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-05-09 17:33:00 +0000

    net-im/signal-desktop: Use nodedir to point to the node headers
    
    We can drop the node distfiles as it's not used anymore.
---
 net-im/signal-desktop/Makefile | 17 ++---------------
 net-im/signal-desktop/distinfo |  6 +-----
 2 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile
index 6f07619a0aef..6d3fdb11a2ab 100644
--- a/net-im/signal-desktop/Makefile
+++ b/net-im/signal-desktop/Makefile
@@ -6,13 +6,9 @@ CATEGORIES=	net-im
 MASTER_SITES=	LOCAL/mikael/signal-desktop/:npm \
 		LOCAL/mikael/signal-desktop/:sqlite \
 		LOCAL/mikael/signal-desktop/:yarn \
-		https://nodejs.org/download/release/v${NODE_VERSION}/:node \
-		https://electronjs.org/headers/v${ELECTRON_GYP_VERSION}/:electron_gyp \
 		https://build-artifacts.signal.org/desktop/:sqlcipher
 DISTFILES=	signal-desktop-${DISTVERSION}-yarn-cache.tar.gz:yarn \
 		signal-desktop-6.4.1-npm-cache.tar.gz:npm \
-		node-v${NODE_VERSION}-headers.tar.gz:node \
-		node-v${ELECTRON_GYP_VERSION}-headers.tar.gz:electron_gyp \
 		${SQLCIPHER}.tar.gz:sqlcipher
 
 MAINTAINER=	mikael@FreeBSD.org
@@ -84,10 +80,6 @@ MAKE_ENV+=	ESBUILD_BINARY_PATH=${WRKDIR}/esbuild-freebsd-64/package/bin/esbuild
 _BUILD_DATE=	$$(date +'%s')
 
 ELECTRON_VER_MAJOR=	22
-# keep NODE_VERSION in sync with www/node16 DISTVERSION
-NODE_VERSION=		16.20.0
-# bump ELECTRON_GYP_VERSION when ELECTRON_VER_MAJOR is changed
-ELECTRON_GYP_VERSION=	22.3.5
 
 # sh get_deps.sh
 NPM_SIGNAL_DIR=		npm-@signalapp-libsignal-client-0.22.0-d57441612df46f90df68fc5d9ad45b857b9d2c44-integrity
@@ -132,15 +124,9 @@ post-patch:
 		${WRKSRC}/ts/scripts/get-expire-time.ts
 
 post-extract:
-	${MKDIR} ${WRKDIR}/.cache/node-gyp/${NODE_VERSION} \
-		 ${WRKDIR}/.electron-gyp/${ELECTRON_GYP_VERSION}
-	${MV} ${WRKDIR}/node-v${NODE_VERSION}/include ${WRKDIR}/.cache/node-gyp/${NODE_VERSION}
-	${MV} ${WRKDIR}/node_headers/include ${WRKDIR}/.electron-gyp/${ELECTRON_GYP_VERSION}
-	${ECHO_CMD} '9' > ${WRKDIR}/.cache/node-gyp/${NODE_VERSION}/installVersion
-	${ECHO_CMD} '9' > ${WRKDIR}/.electron-gyp/${ELECTRON_GYP_VERSION}/installVersion
-
 	# install yarn modules and fail silently
 	${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc
+	${ECHO_CMD} 'nodedir "${LOCALBASE}"' >> ${WRKSRC}/.yarnrc
 	# Update node engine
 	${PREFIX}/bin/jq '.engines.node = "${NODE_VERSION}"' ${WRKSRC}/package.json > ${WRKSRC}/package.json.tmp
 	${MV} ${WRKSRC}/package.json.tmp ${WRKSRC}/package.json
@@ -152,6 +138,7 @@ post-extract:
 
 do-build:
 	${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc
+	${ECHO_CMD} 'nodedir "/usr/local/share/electron22/node_headers"' >> ${WRKSRC}/.yarnrc
 
 # electron-builder is stupid and tries to open ${LOCALBASE}/share/electron22/electron with WRITE priv
 # copy ${LOCALBASE}/share/electron22 in WRKDIR
diff --git a/net-im/signal-desktop/distinfo b/net-im/signal-desktop/distinfo
index 77099c2e54be..4c648485b3df 100644
--- a/net-im/signal-desktop/distinfo
+++ b/net-im/signal-desktop/distinfo
@@ -1,12 +1,8 @@
-TIMESTAMP = 1682081842
+TIMESTAMP = 1683650577
 SHA256 (signal-desktop-6.15.0-yarn-cache.tar.gz) = d61d4177e2d71e19c941831b109018c274f64fa4b48b1a5f64c9c8404d163224
 SIZE (signal-desktop-6.15.0-yarn-cache.tar.gz) = 356106776
 SHA256 (signal-desktop-6.4.1-npm-cache.tar.gz) = 8acc503a579760faf8ea660d504f3b3ffadc495bf09584228da4cc9af20e33fe
 SIZE (signal-desktop-6.4.1-npm-cache.tar.gz) = 4466353
-SHA256 (node-v16.20.0-headers.tar.gz) = 4ab673791303ba8284c6230a401b4e6054acfbbde05f4b4937769692cb3e80ed
-SIZE (node-v16.20.0-headers.tar.gz) = 568323
-SHA256 (node-v22.3.5-headers.tar.gz) = a500a44d7bdb1b1747fedbc254385afd1730a4707e645757e30c6cac9c8d41a8
-SIZE (node-v22.3.5-headers.tar.gz) = 263704
 SHA256 (sqlcipher-4.5.3-fts--3.0.7--0.2.1-b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986.tar.gz) = b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986
 SIZE (sqlcipher-4.5.3-fts--3.0.7--0.2.1-b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986.tar.gz) = 74755812
 SHA256 (signalapp-Signal-Desktop-v6.15.0_GH0.tar.gz) = 7c3426a3829e0856940650423043711ad15c53dab554f1084c18ac81e828013e