git: 273abb319ffc - main - net-im/signal-desktop: Update to 6.1.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Sat, 17 Dec 2022 10:10:05 UTC
The branch main has been updated by mikael:

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

commit 273abb319ffcc05f59b2725480c49d40bd576fa5
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2022-12-17 10:04:26 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-12-17 10:09:36 +0000

    net-im/signal-desktop: Update to 6.1.0
    
    Changes:
      https://github.com/signalapp/Signal-Desktop/releases/tag/v5.57.0
      https://github.com/signalapp/Signal-Desktop/releases/tag/v5.61.0
      https://github.com/signalapp/Signal-Desktop/releases/tag/v5.61.1
      https://github.com/signalapp/Signal-Desktop/releases/tag/v5.62.0
      https://github.com/signalapp/Signal-Desktop/releases/tag/v6.0.0
      https://github.com/signalapp/Signal-Desktop/releases/tag/v6.1.0
---
 net-im/signal-desktop/Makefile                     | 20 ++++----
 net-im/signal-desktop/distinfo                     | 18 +++----
 net-im/signal-desktop/files/patch-package.json     | 10 ++--
 .../files/patch-ts_components_SearchInput.tsx      | 11 +++++
 .../files/patch-ts_scripts_copy-language-packs.ts  | 10 ++++
 .../signal-desktop/files/patch-ts_updater_index.ts | 10 ++++
 net-im/signal-desktop/files/sqlite3.gyp.diff       |  4 +-
 net-im/signal-desktop/get_deps.sh                  |  2 +-
 net-im/signal-desktop/pkg-plist                    | 57 +++++++++++++---------
 9 files changed, 92 insertions(+), 50 deletions(-)

diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile
index 49432b0769c0..19be85ba8bd5 100644
--- a/net-im/signal-desktop/Makefile
+++ b/net-im/signal-desktop/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	signal-desktop
 DISTVERSIONPREFIX=	v
-DISTVERSION=	5.56.0
-PORTREVISION=	1
+DISTVERSION=	6.1.0
 CATEGORIES=	net-im
 MASTER_SITES=	LOCAL/mikael/signal-desktop/:yarn \
 		LOCAL/mikael/signal-desktop/:electron_gyp \
@@ -78,13 +77,14 @@ MAKE_ENV+=	ESBUILD_BINARY_PATH=${WRKDIR}/esbuild-freebsd-64/package/bin/esbuild
 
 _BUILD_DATE=	$$(date +'%s')
 
-ELECTRON_VER_MAJOR=	19
+ELECTRON_VER_MAJOR=	21
 
-NPM_SIGNAL_DIR=		npm-@signalapp-libsignal-client-0.19.2-319da45eac91fe0809bd602528f841346050b7f4-integrity
-NPM_RINGRTC_DIR=	npm-ringrtc-2.20.14-928dae72e8009c5cc4dfb218d3007e2808acf5ab
-NPM_SQLITE3_DIR=	npm-better-sqlite3-7.5.0-3c4a7eebba3d5f5d8cb88fe83be1c01b8c0dea7d
+# ll work/.cache/yarn/v6 | egrep "ringrtc|signal-client|npm-better-sqlite3|esbuild-freebsd-64"
+NPM_SIGNAL_DIR=		npm-@signalapp-libsignal-client-0.21.1-381d6162ae0e7719dc625780c1d6c3f9f558c33d-integrity
+NPM_RINGRTC_DIR=	npm-ringrtc-2.22.0-9a9d9fbc1ca43e7a0707a960ce9642dbf82dc64a/
+NPM_SQLITE3_DIR=	npm-better-sqlite3-7.5.1-afdbd49cf18d0046d7385ca4d23da20c66f00d50/
 NPM_PLAYWRITE_DIR=	npm-playwright-core-1.17.1-a16e0f89284a0ed8ae6d77e1c905c84b8a2ba022-integrity
-NPM_ESBUILD_VERS=	0.14.28
+NPM_ESBUILD_VERS=	0.15.8
 
 ESBUILD_ARCH=		${ARCH:S/aarch64/arm/:S/amd64//}
 NODE_ARCH=		${ARCH:S/aarch64/arm64/:S/amd64/x64/}
@@ -100,8 +100,8 @@ post-patch:
 do-build:
 	${ECHO_CMD} 'yarn-offline-mirror "../yarn-cache"' > ${WRKSRC}/.yarnrc
 
-# electron-builder is stupid and tries to open ${LOCALBASE}/share/electron19/electron with WRITE priv
-# copy ${LOCALBASE}/share/electron19 in WRKDIR
+# electron-builder is stupid and tries to open ${LOCALBASE}/share/electron21/electron with WRITE priv
+# copy ${LOCALBASE}/share/electron21 in WRKDIR
 # it's needed for the do-install phase, it's here because of this issue
 # https://github.com/MikaelUrankar/signal-desktop/issues/6 (I don't know why it fails though)
 	@${RM} -r ${WRKDIR}/electron${ELECTRON_VER_MAJOR}
@@ -141,7 +141,7 @@ do-build:
 #	cd ${WRKSRC} && \
 #		${SETENV} ${MAKE_ENV} yarn build:webpack
 
- 	# For offline build
+	# For offline build
 	${ECHO_CMD} offline=true > ${WRKDIR}/.npmrc
 	cd ${WRKSRC} && \
 		${SETENV} ${MAKE_ENV} yarn install --frozen-lockfile --ignore-optional --offline
diff --git a/net-im/signal-desktop/distinfo b/net-im/signal-desktop/distinfo
index 01ec0a6b0ec7..cc8233d55117 100644
--- a/net-im/signal-desktop/distinfo
+++ b/net-im/signal-desktop/distinfo
@@ -1,11 +1,11 @@
-TIMESTAMP = 1668368500
-SHA256 (signal-desktop-5.56.0-yarn-cache.tar.gz) = bccabce101a998f26c45f2c21d6af2c00ba26f37c18678504c8017ec3b77f256
-SIZE (signal-desktop-5.56.0-yarn-cache.tar.gz) = 1008120275
-SHA256 (signal-desktop-5.56.0-electron-gyp-cache.tar.gz) = 25894bac4eb7fddf3e83325d14f5ce9fa236f8b11454a7c71350988914a66cda
-SIZE (signal-desktop-5.56.0-electron-gyp-cache.tar.gz) = 259813
-SHA256 (signal-desktop-5.56.0-npm-cache.tar.gz) = 43e30865913f241e16e704a124c685f42b81ad992188ee0611454724a7a13aa8
-SIZE (signal-desktop-5.56.0-npm-cache.tar.gz) = 4396873
+TIMESTAMP = 1671199606
+SHA256 (signal-desktop-6.1.0-yarn-cache.tar.gz) = 377cc4aef808c0dbdd939e5f6b101d67b41af36240f6153e83c4ea1242d933e5
+SIZE (signal-desktop-6.1.0-yarn-cache.tar.gz) = 1084112692
+SHA256 (signal-desktop-6.1.0-electron-gyp-cache.tar.gz) = 0cf1ecdb87c699e99ce3af4a2378d95e5440c7e532c209222ddd122deb1d3a4e
+SIZE (signal-desktop-6.1.0-electron-gyp-cache.tar.gz) = 267010
+SHA256 (signal-desktop-6.1.0-npm-cache.tar.gz) = 7695f2e5c39eb6aa36a704ba77f34925e5e1e54f65b8b2d8e1f2905730ee512a
+SIZE (signal-desktop-6.1.0-npm-cache.tar.gz) = 4429759
 SHA256 (sqlcipher.tar.gz) = fe8bdc5e2f182970fb63a71ec4c519c8192453800bf142f755d7ed99e79fff84
 SIZE (sqlcipher.tar.gz) = 25833894
-SHA256 (signalapp-Signal-Desktop-v5.56.0_GH0.tar.gz) = ddec149fcb53253a26e8436fd1157e28ccf32673663d3b6a51753af31efa883b
-SIZE (signalapp-Signal-Desktop-v5.56.0_GH0.tar.gz) = 38520711
+SHA256 (signalapp-Signal-Desktop-v6.1.0_GH0.tar.gz) = f981ca229651826dcf2b511499612217719827ab98edac46f931fe2751eccd6f
+SIZE (signalapp-Signal-Desktop-v6.1.0_GH0.tar.gz) = 38301590
diff --git a/net-im/signal-desktop/files/patch-package.json b/net-im/signal-desktop/files/patch-package.json
index 24e938ebe703..df02f10d522d 100644
--- a/net-im/signal-desktop/files/patch-package.json
+++ b/net-im/signal-desktop/files/patch-package.json
@@ -1,19 +1,19 @@
 --- package.json.orig	2022-08-05 12:53:58 UTC
 +++ package.json
-@@ -191,7 +191,6 @@
+@@ -192,7 +192,6 @@
      "@babel/preset-typescript": "7.17.12",
      "@electron/fuses": "1.5.0",
      "@mixer/parallel-prettier": "2.0.1",
--    "@signalapp/mock-server": "2.8.0",
+-    "@signalapp/mock-server": "2.11.0",
      "@storybook/addon-a11y": "6.5.6",
      "@storybook/addon-actions": "6.5.6",
      "@storybook/addon-controls": "6.5.6",
 @@ -319,7 +318,7 @@
-     "sharp/color/color-string": "1.9.0"
+     "read-last-lines/mz/thenify-all/thenify": "3.3.1"
    },
    "engines": {
--    "node": "16.13.2"
-+    "node": "16.18.1"
+-    "node": "16.16.0"
++    "node": "16.19.0"
    },
    "build": {
      "appId": "org.whispersystems.signal-desktop",
diff --git a/net-im/signal-desktop/files/patch-ts_components_SearchInput.tsx b/net-im/signal-desktop/files/patch-ts_components_SearchInput.tsx
new file mode 100644
index 000000000000..fe49c84b6323
--- /dev/null
+++ b/net-im/signal-desktop/files/patch-ts_components_SearchInput.tsx
@@ -0,0 +1,11 @@
+--- ts/components/SearchInput.tsx.orig	2022-12-04 09:59:26 UTC
++++ ts/components/SearchInput.tsx
+@@ -67,7 +67,7 @@ export const SearchInput = forwardRef<HTMLInputElement
+             const { ctrlKey, key } = event;
+ 
+             // On Linux, this key combo selects all text.
+-            if (window.platform === 'linux' && ctrlKey && key === '/') {
++            if ((window.platform === 'freebsd' || window.platform === 'linux') && ctrlKey && key === '/') {
+               event.preventDefault();
+               event.stopPropagation();
+             } else if (key === 'Escape' && onClear) {
diff --git a/net-im/signal-desktop/files/patch-ts_scripts_copy-language-packs.ts b/net-im/signal-desktop/files/patch-ts_scripts_copy-language-packs.ts
new file mode 100644
index 000000000000..ca37b76b5779
--- /dev/null
+++ b/net-im/signal-desktop/files/patch-ts_scripts_copy-language-packs.ts
@@ -0,0 +1,10 @@
+--- ts/scripts/copy-language-packs.ts.orig	2022-12-04 09:58:27 UTC
++++ ts/scripts/copy-language-packs.ts
+@@ -31,6 +31,7 @@ export async function afterPack({
+       'Resources'
+     );
+   } else if (
++    electronPlatformName === 'freebsd' ||
+     electronPlatformName === 'linux' ||
+     electronPlatformName === 'win32'
+   ) {
diff --git a/net-im/signal-desktop/files/patch-ts_updater_index.ts b/net-im/signal-desktop/files/patch-ts_updater_index.ts
new file mode 100644
index 000000000000..b2882bff6384
--- /dev/null
+++ b/net-im/signal-desktop/files/patch-ts_updater_index.ts
@@ -0,0 +1,10 @@
+--- ts/updater/index.ts.orig	2022-12-04 09:57:09 UTC
++++ ts/updater/index.ts
+@@ -61,6 +61,6 @@ function autoUpdateDisabled() {
+ 
+ function autoUpdateDisabled() {
+   return (
+-    process.platform === 'linux' || process.mas || !config.get('updatesEnabled')
++    process.platform === 'freebsd' || process.platform === 'linux' || process.mas || !config.get('updatesEnabled')
+   );
+ }
diff --git a/net-im/signal-desktop/files/sqlite3.gyp.diff b/net-im/signal-desktop/files/sqlite3.gyp.diff
index 81f31a90fa68..fc4d9b0fcaa0 100644
--- a/net-im/signal-desktop/files/sqlite3.gyp.diff
+++ b/net-im/signal-desktop/files/sqlite3.gyp.diff
@@ -1,5 +1,5 @@
---- npm-better-sqlite3-7.5.0-3c4a7eebba3d5f5d8cb88fe83be1c01b8c0dea7d/node_modules/better-sqlite3/deps/sqlite3.gyp.orig	2022-07-02 14:34:04 UTC
-+++ npm-better-sqlite3-7.5.0-3c4a7eebba3d5f5d8cb88fe83be1c01b8c0dea7d/node_modules/better-sqlite3/deps/sqlite3.gyp
+--- npm-better-sqlite3-7.5.1-afdbd49cf18d0046d7385ca4d23da20c66f00d50/node_modules/better-sqlite3/deps/sqlite3.gyp.orig	2022-07-02 14:34:04 UTC
++++ npm-better-sqlite3-7.5.1-afdbd49cf18d0046d7385ca4d23da20c66f00d50/node_modules/better-sqlite3/deps/sqlite3.gyp
 @@ -95,6 +95,14 @@
              ]
            }
diff --git a/net-im/signal-desktop/get_deps.sh b/net-im/signal-desktop/get_deps.sh
index a38fce05fda8..8ed23cfc5df1 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=v5.56.0
+SIGNAL_VERS=v6.1.0-beta.1
 
 ringrtc_hash=$(fetch -qo - https://raw.githubusercontent.com/signalapp/Signal-Desktop/${SIGNAL_VERS}/package.json | grep '"ringrtc": "https' | awk -F "#" '{print $2}' | sed 's#",##')
 # echo "RINGRTC_HASH= ${ringrtc_hash} ; https://raw.githubusercontent.com/signalapp/Signal-Desktop/${SIGNAL_VERS}/package.json"
diff --git a/net-im/signal-desktop/pkg-plist b/net-im/signal-desktop/pkg-plist
index 47e58e535055..6b3ac0810722 100644
--- a/net-im/signal-desktop/pkg-plist
+++ b/net-im/signal-desktop/pkg-plist
@@ -5,96 +5,107 @@ share/pixmaps/signal-desktop.png
 %%DATADIR%%/LICENSES.chromium.html
 %%DATADIR%%/chrome_100_percent.pak
 %%DATADIR%%/chrome_200_percent.pak
-%%DATADIR%%/icudtl.dat
 %%DATADIR%%/libEGL.so
 %%DATADIR%%/libGLESv2.so
 %%DATADIR%%/libffmpeg.so
 %%DATADIR%%/libvk_swiftshader.so
 %%DATADIR%%/libvulkan.so
+%%DATADIR%%/locales/af-ZA.pak
 %%DATADIR%%/locales/af.pak
 %%DATADIR%%/locales/am.pak
 %%DATADIR%%/locales/ar.pak
-%%DATADIR%%/locales/az.pak
+%%DATADIR%%/locales/az-AZ.pak
+%%DATADIR%%/locales/bg-BG.pak
 %%DATADIR%%/locales/bg.pak
+%%DATADIR%%/locales/bn-BD.pak
 %%DATADIR%%/locales/bn.pak
-%%DATADIR%%/locales/bs.pak
+%%DATADIR%%/locales/bs-BA.pak
 %%DATADIR%%/locales/ca.pak
 %%DATADIR%%/locales/cs.pak
-%%DATADIR%%/locales/cy.pak
 %%DATADIR%%/locales/da.pak
 %%DATADIR%%/locales/de.pak
 %%DATADIR%%/locales/el.pak
 %%DATADIR%%/locales/en-GB.pak
 %%DATADIR%%/locales/en-US.pak
-%%DATADIR%%/locales/eo.pak
 %%DATADIR%%/locales/es-419.pak
 %%DATADIR%%/locales/es.pak
+%%DATADIR%%/locales/et-EE.pak
 %%DATADIR%%/locales/et.pak
 %%DATADIR%%/locales/eu.pak
+%%DATADIR%%/locales/fa-IR.pak
 %%DATADIR%%/locales/fa.pak
 %%DATADIR%%/locales/fi.pak
 %%DATADIR%%/locales/fil.pak
 %%DATADIR%%/locales/fr.pak
-%%DATADIR%%/locales/gd.pak
-%%DATADIR%%/locales/gl.pak
+%%DATADIR%%/locales/ga-IE.pak
+%%DATADIR%%/locales/gl-ES.pak
+%%DATADIR%%/locales/gu-IN.pak
 %%DATADIR%%/locales/gu.pak
 %%DATADIR%%/locales/he.pak
+%%DATADIR%%/locales/hi-IN.pak
 %%DATADIR%%/locales/hi.pak
+%%DATADIR%%/locales/hr-HR.pak
 %%DATADIR%%/locales/hr.pak
 %%DATADIR%%/locales/hu.pak
 %%DATADIR%%/locales/id.pak
-%%DATADIR%%/locales/is.pak
 %%DATADIR%%/locales/it.pak
 %%DATADIR%%/locales/ja.pak
-%%DATADIR%%/locales/ka.pak
-%%DATADIR%%/locales/kk.pak
-%%DATADIR%%/locales/km.pak
+%%DATADIR%%/locales/ka-GE.pak
+%%DATADIR%%/locales/kk-KZ.pak
+%%DATADIR%%/locales/km-KH.pak
+%%DATADIR%%/locales/kn-IN.pak
 %%DATADIR%%/locales/kn.pak
 %%DATADIR%%/locales/ko.pak
-%%DATADIR%%/locales/ku.pak
-%%DATADIR%%/locales/ky.pak
-%%DATADIR%%/locales/lo.pak
+%%DATADIR%%/locales/ky-KG.pak
+%%DATADIR%%/locales/lt-LT.pak
 %%DATADIR%%/locales/lt.pak
+%%DATADIR%%/locales/lv-LV.pak
 %%DATADIR%%/locales/lv.pak
-%%DATADIR%%/locales/mk.pak
+%%DATADIR%%/locales/mk-MK.pak
+%%DATADIR%%/locales/ml-IN.pak
 %%DATADIR%%/locales/ml.pak
+%%DATADIR%%/locales/mr-IN.pak
 %%DATADIR%%/locales/mr.pak
 %%DATADIR%%/locales/ms.pak
 %%DATADIR%%/locales/my.pak
 %%DATADIR%%/locales/nb.pak
 %%DATADIR%%/locales/nl.pak
-%%DATADIR%%/locales/nn.pak
-%%DATADIR%%/locales/no.pak
-%%DATADIR%%/locales/pa.pak
+%%DATADIR%%/locales/pa-IN.pak
 %%DATADIR%%/locales/pl.pak
-%%DATADIR%%/locales/ps.pak
 %%DATADIR%%/locales/pt-BR.pak
 %%DATADIR%%/locales/pt-PT.pak
+%%DATADIR%%/locales/ro-RO.pak
 %%DATADIR%%/locales/ro.pak
 %%DATADIR%%/locales/ru.pak
+%%DATADIR%%/locales/sk-SK.pak
 %%DATADIR%%/locales/sk.pak
+%%DATADIR%%/locales/sl-SI.pak
 %%DATADIR%%/locales/sl.pak
-%%DATADIR%%/locales/sq.pak
+%%DATADIR%%/locales/sq-AL.pak
+%%DATADIR%%/locales/sr-RS.pak
+%%DATADIR%%/locales/sr-YR.pak
 %%DATADIR%%/locales/sr.pak
 %%DATADIR%%/locales/sv.pak
 %%DATADIR%%/locales/sw.pak
+%%DATADIR%%/locales/ta-IN.pak
 %%DATADIR%%/locales/ta.pak
+%%DATADIR%%/locales/te-IN.pak
 %%DATADIR%%/locales/te.pak
 %%DATADIR%%/locales/th.pak
+%%DATADIR%%/locales/tl-PH.pak
 %%DATADIR%%/locales/tr.pak
-%%DATADIR%%/locales/ug.pak
+%%DATADIR%%/locales/uk-UA.pak
 %%DATADIR%%/locales/uk.pak
 %%DATADIR%%/locales/ur.pak
 %%DATADIR%%/locales/vi.pak
-%%DATADIR%%/locales/yue.pak
 %%DATADIR%%/locales/zh-CN.pak
+%%DATADIR%%/locales/zh-HK.pak
 %%DATADIR%%/locales/zh-TW.pak
 %%DATADIR%%/resources.pak
 %%DATADIR%%/resources/app.asar
 %%DATADIR%%/resources/app.asar.unpacked/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-%%NODE_ARCH%%/node.napi.node
 %%DATADIR%%/resources/app.asar.unpacked/node_modules/better-sqlite3/build/Release/better_sqlite3.node
 %%DATADIR%%/resources/app.asar.unpacked/node_modules/ringrtc/build/freebsd/libringrtc-%%NODE_ARCH%%.node
-%%DATADIR%%/resources/app.asar.unpacked/node_modules/sharp/build/Release/sharp-freebsd-%%SHARP_ARCH%%.node
 @(,,755) %%DATADIR%%/signal-desktop
 %%DATADIR%%/snapshot_blob.bin
 %%DATADIR%%/v8_context_snapshot.bin