From ca832a0c769939ab918bd63b21fe01dea4f2597c Mon Sep 17 00:00:00 2001 From: lane-brain Date: Wed, 5 May 2021 18:42:00 -0400 Subject: [PATCH] Signal-Desktop: update to 5.0.0. --- .../files/openssl-linking.patch | 19 ++++++++++++ .../patches/update-dep-versions.patch | 29 +++++++++++++++++++ srcpkgs/Signal-Desktop/template | 29 ++++++++++++++----- 3 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 srcpkgs/Signal-Desktop/files/openssl-linking.patch create mode 100644 srcpkgs/Signal-Desktop/patches/update-dep-versions.patch diff --git a/srcpkgs/Signal-Desktop/files/openssl-linking.patch b/srcpkgs/Signal-Desktop/files/openssl-linking.patch new file mode 100644 index 000000000000..7745f4f2b20e --- /dev/null +++ b/srcpkgs/Signal-Desktop/files/openssl-linking.patch @@ -0,0 +1,19 @@ +--- a/node_modules/@journeyapps/sqlcipher/deps/sqlite3.gyp 2019-10-27 01:53:29.860275405 -0400 ++++ b/node_modules/@journeyapps/sqlcipher/deps/sqlite3.gyp 2019-10-27 01:51:32.001730882 -0400 +@@ -73,7 +73,7 @@ + 'link_settings': { + 'libraries': [ + # This statically links libcrypto, whereas -lcrypto would dynamically link it +- '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/OpenSSL-Linux/libcrypto.a' ++ '-lcrypto' + ] + } + }] +@@ -141,7 +141,6 @@ + { # linux + 'include_dirs': [ + '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/', +- '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/openssl-include/' + ] + }] + ], diff --git a/srcpkgs/Signal-Desktop/patches/update-dep-versions.patch b/srcpkgs/Signal-Desktop/patches/update-dep-versions.patch new file mode 100644 index 000000000000..de9c5cd52de0 --- /dev/null +++ b/srcpkgs/Signal-Desktop/patches/update-dep-versions.patch @@ -0,0 +1,29 @@ +# * Set node to accept newer versions to fulfill dep +# * Select node-gyp versions with python3 support +# - https://github.com/sass/node-sass/pull/2841 +# - https://github.com/sass/node-sass/issues/2716 +--- package.json.orig 2021-04-15 21:50:37.757593564 -0400 ++++ package.json 2021-04-15 21:51:37.819672207 -0400 +@@ -251,7 +251,7 @@ + "jsdoc": "3.6.2", + "mocha": "4.1.0", + "mocha-testcheck": "1.0.0-rc.0", +- "node-gyp": "5.0.3", ++ "node-gyp": "6.1.0", + "node-sass": "4.14.1", + "node-sass-import-once": "1.2.0", + "npm-run-all": "4.1.5", +@@ -273,11 +273,11 @@ + "webpack-cli": "3.3.7", + "webpack-dev-server": "3.8.0" + }, +- "resolutions": { ++ "resolutions": {"node-sass/node-gyp": "^6.0.0", + "@storybook/react/@storybook/core/node-fetch": "2.6.1" + }, + "engines": { +- "node": "12.18.3" ++ "node": ">=12.18.3" + }, + "build": { + "appId": "org.whispersystems.signal-desktop", diff --git a/srcpkgs/Signal-Desktop/template b/srcpkgs/Signal-Desktop/template index 8999b6e483ff..a9cf87c29540 100644 --- a/srcpkgs/Signal-Desktop/template +++ b/srcpkgs/Signal-Desktop/template @@ -1,26 +1,37 @@ # Template file for 'Signal-Desktop' pkgname=Signal-Desktop -version=1.39.5 +version=5.0.0 revision=1 # Due to electron # 32-bit is not supported https://github.com/signalapp/Signal-Desktop/issues/1661 archs="x86_64" -hostmakedepends="git nodejs python tar yarn" -depends="libnotify libappindicator" +hostmakedepends="git git-lfs nodejs python3 tar yarn openssl" +depends="gtk+3 libnotify libappindicator libvips" short_desc="Signal Private Messenger for Linux" maintainer="Julio Galvan " -license="GPL-3.0-only" +license="AGPL-3.0-only" homepage="https://github.com/signalapp/Signal-Desktop" distfiles="https://github.com/signalapp/Signal-Desktop/archive/v${version}.tar.gz" -checksum=f9f55c0195579b43712bf370b753337432eda4bcf89809d1c8f3deb0b4ee4400 +checksum=4ff58f5ab5f4de6477dd92069d8c2e9a830513acca527b51e0ee1c7cbe7d8627 nostrip_files="signal-desktop" pre_build() { - vsed -e 's/"node": "/&>=/' -i package.json + # git-lfs hook needs to be installed for sqlcipher dependency + git-lfs install + + # `yarn cache clean` needed for sqlcipher dependency to install. + # Unfortunately, because we build from tarball we can't do this + # step at the beginning but only after we generate node_modules + # See: https://github.com/signalapp/Signal-Desktop/issues/5032 + yarn install --ignore-engines || rm -r node_modules; yarn cache clean + yarn install --ignore-engines + + # Have SQLCipher dynamically link from OpenSSL + # See https://github.com/signalapp/Signal-Desktop/issues/2634 + patch --forward --strip=1 --input="${FILESDIR}/openssl-linking.patch" } do_build() { - yarn install --ignore-engines yarn grunt yarn build-release --dir } @@ -41,3 +52,7 @@ do_install() { vinstall images/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ signal.png done } + +post_install() { + vlicense LICENSE +}