git: 9ca231ec4120 - main - net-im/signal-desktop: Update to 7.21.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Tue, 27 Aug 2024 15:58:00 UTC
The branch main has been updated by mikael:

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

commit 9ca231ec4120a445965e771c4532b2f5b7c5580a
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2024-08-26 15:55:34 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2024-08-27 15:57:56 +0000

    net-im/signal-desktop: Update to 7.21.0
    
    Fix build on aarch64 by using esbuild from ports
    instead of the npm one. [1]
    
    PR:             281039 [1]
    Tested by:      jhibbits [1]
---
 net-im/signal-desktop/Makefile                 |  11 +-
 net-im/signal-desktop/distinfo                 |  10 +-
 net-im/signal-desktop/files/dns-fallback.json  | 223 -------------------------
 net-im/signal-desktop/files/patch-package.json |  10 --
 net-im/signal-desktop/get_deps.sh              |   2 +-
 5 files changed, 13 insertions(+), 243 deletions(-)

diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile
index 4121324477bf..32e5f1a21a55 100644
--- a/net-im/signal-desktop/Makefile
+++ b/net-im/signal-desktop/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	signal-desktop
 DISTVERSIONPREFIX=	v
-DISTVERSION=	7.20.1
+DISTVERSION=	7.21.0
 CATEGORIES=	net-im
 MASTER_SITES=	LOCAL/mikael/signal-desktop/:npm \
 		https://build-artifacts.signal.org/desktop/:sqlcipher
@@ -26,6 +26,7 @@ BUILD_DEPENDS=	${LOCALBASE}/lib/libcrypto.a:security/openssl \
 		${LOCALBASE}/lib/libsignal_tokenizer.a:devel/signal-fts5-extension \
 		app-builder>0:devel/app-builder \
 		electron${ELECTRON_VER_MAJOR}:devel/electron${ELECTRON_VER_MAJOR} \
+		esbuild:devel/esbuild \
 		jq:textproc/jq \
 		npm:www/npm-node20
 LIB_DEPENDS=	libasound.so:audio/alsa-lib \
@@ -81,9 +82,12 @@ 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=${LOCALBASE}/bin/esbuild
+
 _BUILD_DATE=	$$(date +'%s')
 
 ELECTRON_VER_MAJOR=	30
+ESBUILD_VERSION=	0.21.2
 
 SQLCIPHER=	sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b
 
@@ -106,7 +110,8 @@ PLIST_SUB+=	NOT_AARCH64=""
 post-extract:
 	# Update node engine
 	${PREFIX}/bin/jq '.engines.node = ""' ${WRKSRC}/package.json > ${WRKSRC}/package.json.tmp.1
-	${MV} ${WRKSRC}/package.json.tmp.1 ${WRKSRC}/package.json
+	${PREFIX}/bin/jq '.devDependencies.esbuild = "${ESBUILD_VERSION}"' ${WRKSRC}/package.json.tmp.1 > ${WRKSRC}/package.json.tmp.2
+	${MV} ${WRKSRC}/package.json.tmp.2 ${WRKSRC}/package.json
 	# remove mock-server as it doesn't build and is useless
 	${PREFIX}/bin/jq 'del(.devDependencies."@signalapp/mock-server")' ${WRKSRC}/package.json > ${WRKSRC}/package.json.tmp
 	${MV} ${WRKSRC}/package.json.tmp ${WRKSRC}/package.json
@@ -142,8 +147,6 @@ do-build:
 	# patch-package can't patch sqlite3 on aarch64, patch the yarn cache instead
 	cd ${WRKSRC} && ${PATCH} -s -N -i ${FILESDIR}/sqlite3.gyp.diff
 
-	${CP} ${FILESDIR}/dns-fallback.json ${WRKSRC}/build
-
 	@${RM} -r ${WRKSRC}/node_modules/fs-xattr
 
 #	# online build
diff --git a/net-im/signal-desktop/distinfo b/net-im/signal-desktop/distinfo
index 5b23023271aa..0b23d38fade7 100644
--- a/net-im/signal-desktop/distinfo
+++ b/net-im/signal-desktop/distinfo
@@ -1,7 +1,7 @@
-TIMESTAMP = 1724162534
-SHA256 (signal-desktop-7.20.1-npm-cache.tar.gz) = d540be9fe682918e44ad2aebafbe29696249c809d2de9679a52dc594af3d748d
-SIZE (signal-desktop-7.20.1-npm-cache.tar.gz) = 320272079
+TIMESTAMP = 1724671750
+SHA256 (signal-desktop-7.21.0-npm-cache.tar.gz) = 6904ef3a6e5906fa451995be2519053bb24d82ed4c8f4eca3c765c4d12c693e5
+SIZE (signal-desktop-7.21.0-npm-cache.tar.gz) = 323140115
 SHA256 (sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b.tar.gz) = ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b
 SIZE (sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b.tar.gz) = 75708533
-SHA256 (signalapp-Signal-Desktop-v7.20.1_GH0.tar.gz) = 871c5583a68c71c1ca5189b120106c764ffde0400daa9c095617f7594c9081a8
-SIZE (signalapp-Signal-Desktop-v7.20.1_GH0.tar.gz) = 42301457
+SHA256 (signalapp-Signal-Desktop-v7.21.0_GH0.tar.gz) = 4506a3639685dd191f713d70ed3c6624a77cafe8fd6ff3f113b340d2cd337526
+SIZE (signalapp-Signal-Desktop-v7.21.0_GH0.tar.gz) = 42308410
diff --git a/net-im/signal-desktop/files/dns-fallback.json b/net-im/signal-desktop/files/dns-fallback.json
deleted file mode 100644
index 4a87ba42f08b..000000000000
--- a/net-im/signal-desktop/files/dns-fallback.json
+++ /dev/null
@@ -1,223 +0,0 @@
-[
-  {
-    "domain": "cdn.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "99.84.9.12"
-      },
-      {
-        "family": "ipv4",
-        "address": "99.84.9.126"
-      },
-      {
-        "family": "ipv4",
-        "address": "99.84.9.19"
-      },
-      {
-        "family": "ipv4",
-        "address": "99.84.9.49"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:1c00:1d:4f32:50c0:93a1"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:5000:1d:4f32:50c0:93a1"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:5a00:1d:4f32:50c0:93a1"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:600:1d:4f32:50c0:93a1"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:6a00:1d:4f32:50c0:93a1"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:6c00:1d:4f32:50c0:93a1"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:9200:1d:4f32:50c0:93a1"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:215b:ae00:1d:4f32:50c0:93a1"
-      }
-    ]
-  },
-  {
-    "domain": "cdn2.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "104.18.37.148"
-      },
-      {
-        "family": "ipv4",
-        "address": "172.64.150.108"
-      },
-      {
-        "family": "ipv6",
-        "address": "2606:4700:4400::6812:2594"
-      },
-      {
-        "family": "ipv6",
-        "address": "2606:4700:4400::ac40:966c"
-      }
-    ]
-  },
-  {
-    "domain": "cdn3.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "104.18.37.148"
-      },
-      {
-        "family": "ipv4",
-        "address": "172.64.150.108"
-      },
-      {
-        "family": "ipv6",
-        "address": "2606:4700:4400::6812:2594"
-      },
-      {
-        "family": "ipv6",
-        "address": "2606:4700:4400::ac40:966c"
-      }
-    ]
-  },
-  {
-    "domain": "cdsi.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "40.122.45.194"
-      },
-      {
-        "family": "ipv6",
-        "address": "2603:1030:7::1"
-      }
-    ]
-  },
-  {
-    "domain": "chat.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "13.248.212.111"
-      },
-      {
-        "family": "ipv4",
-        "address": "76.223.92.165"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:a507:ab6d:4ce3:2f58:25d7:9cbf"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:9000:a61f:527c:d5eb:a431:5239:3232"
-      }
-    ]
-  },
-  {
-    "domain": "create.signal.art",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "44.207.181.6"
-      },
-      {
-        "family": "ipv4",
-        "address": "52.204.93.252"
-      },
-      {
-        "family": "ipv4",
-        "address": "52.21.33.241"
-      },
-      {
-        "family": "ipv4",
-        "address": "54.161.129.211"
-      },
-      {
-        "family": "ipv4",
-        "address": "54.82.41.49"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:1f18:3b01:a400:50a:6a97:cc05:a890"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:1f18:3b01:a401:7a9c:f91f:e59c:5150"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:1f18:3b01:a402:7a63:4b38:fc8e:c770"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:1f18:3b01:a403:2ddd:bb5a:737f:803a"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:1f18:3b01:a404:d873:8664:8149:d8bd"
-      }
-    ]
-  },
-  {
-    "domain": "sfu.voip.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "34.36.104.134"
-      },
-      {
-        "family": "ipv6",
-        "address": "2600:1901:0:8755::"
-      }
-    ]
-  },
-  {
-    "domain": "storage.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "216.58.213.83"
-      },
-      {
-        "family": "ipv6",
-        "address": "2a00:1450:4007:80e::2013"
-      }
-    ]
-  },
-  {
-    "domain": "updates2.signal.org",
-    "endpoints": [
-      {
-        "family": "ipv4",
-        "address": "104.18.43.97"
-      },
-      {
-        "family": "ipv4",
-        "address": "172.64.144.159"
-      },
-      {
-        "family": "ipv6",
-        "address": "2606:4700:4400::6812:2b61"
-      },
-      {
-        "family": "ipv6",
-        "address": "2606:4700:4400::ac40:909f"
-      }
-    ]
-  }
-]
diff --git a/net-im/signal-desktop/files/patch-package.json b/net-im/signal-desktop/files/patch-package.json
deleted file mode 100644
index 90f469c31af1..000000000000
--- a/net-im/signal-desktop/files/patch-package.json
+++ /dev/null
@@ -1,10 +0,0 @@
---- package.json.orig	2024-07-08 15:06:16 UTC
-+++ package.json
-@@ -76,7 +76,6 @@
-     "build": "run-s --print-label generate build:esbuild:prod build:release",
-     "build-linux": "run-s generate build:esbuild:prod && npm run build:release -- --publish=never",
-     "build:acknowledgments": "node scripts/generate-acknowledgments.js",
--    "build:dns-fallback": "node ts/scripts/generate-dns-fallback.js",
-     "build:icu-types": "node ts/scripts/generate-icu-types.js",
-     "build:compact-locales": "node ts/scripts/generate-compact-locales.js",
-     "build:dev": "run-s --print-label generate build:esbuild:prod",
diff --git a/net-im/signal-desktop/get_deps.sh b/net-im/signal-desktop/get_deps.sh
index 7d2b47293476..b749a0c5d1ac 100644
--- a/net-im/signal-desktop/get_deps.sh
+++ b/net-im/signal-desktop/get_deps.sh
@@ -1,5 +1,5 @@
 #!/bin/sh
-SIGNAL_VERS=v7.20.1
+SIGNAL_VERS=v7.21.0
 
 fetch -qo /tmp/package.json https://raw.githubusercontent.com/signalapp/Signal-Desktop/${SIGNAL_VERS}/package.json
 node_version=$(awk /'"node":'/'{print $2}' /tmp/package.json | sed 's/"//g')