From 91e10fa049e2eee343917f2fa721d4447b0a866f Mon Sep 17 00:00:00 2001 From: reedts Date: Wed, 16 Jun 2021 09:56:32 +0200 Subject: [PATCH 1/2] Signal-Desktop: update to 5.4.1. --- .../patches/build-from-tarball.patch | 9 ----- .../expire-from-source-date-epoch.patch | 13 +++++++ srcpkgs/Signal-Desktop/template | 35 +++++++++++++------ 3 files changed, 38 insertions(+), 19 deletions(-) delete mode 100644 srcpkgs/Signal-Desktop/patches/build-from-tarball.patch create mode 100644 srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch diff --git a/srcpkgs/Signal-Desktop/patches/build-from-tarball.patch b/srcpkgs/Signal-Desktop/patches/build-from-tarball.patch deleted file mode 100644 index e8c3db0e087e..000000000000 --- a/srcpkgs/Signal-Desktop/patches/build-from-tarball.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- Gruntfile.js.orig 2020-04-26 23:32:09.861789510 +0200 -+++ Gruntfile.js 2020-04-26 23:32:21.424734031 +0200 -@@ -452,6 +452,5 @@ - 'concat', - 'copy:deps', - 'sass', -- 'date', - ]); - }; diff --git a/srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch b/srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch new file mode 100644 index 000000000000..a8a11ab72c45 --- /dev/null +++ b/srcpkgs/Signal-Desktop/patches/expire-from-source-date-epoch.patch @@ -0,0 +1,13 @@ +--- Gruntfile.js ++++ Gruntfile.js +@@ -203,9 +203,7 @@ module.exports = grunt => { + }); + + grunt.registerTask('getExpireTime', () => { +- grunt.task.requires('gitinfo'); +- const gitinfo = grunt.config.get('gitinfo'); +- const committed = gitinfo.local.branch.current.lastCommitTime; ++ const committed = parseInt(process.env.SOURCE_DATE_EPOCH, 10) * 1000; + const time = Date.parse(committed) + 1000 * 60 * 60 * 24 * 90; + grunt.file.write( + 'config/local-production.json', diff --git a/srcpkgs/Signal-Desktop/template b/srcpkgs/Signal-Desktop/template index 8999b6e483ff..43af7b54ce62 100644 --- a/srcpkgs/Signal-Desktop/template +++ b/srcpkgs/Signal-Desktop/template @@ -1,32 +1,45 @@ # Template file for 'Signal-Desktop' pkgname=Signal-Desktop -version=1.39.5 +version=5.4.1 revision=1 -# Due to electron +# Signal officially only supports x86_64 (also due to Electron) +# discontinued Electron 32-bit support: https://www.electronjs.org/blog/linux-32bit-support # 32-bit is not supported https://github.com/signalapp/Signal-Desktop/issues/1661 +# armv7hf/arm64: https://github.com/signalapp/Signal-Desktop/issues/3410 archs="x86_64" -hostmakedepends="git nodejs python tar yarn" -depends="libnotify libappindicator" +hostmakedepends="git git-lfs nodejs python3 tar yarn" +depends="cairo gtk+3 libvips pango" 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=60c3772c5951d95469e2ab491b2f09d7ee93c998909de8cb169e23b461b7ebbc nostrip_files="signal-desktop" -pre_build() { - vsed -e 's/"node": "/&>=/' -i package.json +post_extract() { + # git-lfs hook needs to be installed for one of the dependencies + git lfs install + + vsed 's/"node": "/&>=/' -i package.json + + # Dependencies have to be installed before applying patch + yarn install --ignore-engines --frozen-lockfile } do_build() { - yarn install --ignore-engines yarn grunt - yarn build-release --dir + yarn generate + yarn build-release } do_install() { vmkdir usr/lib/signal-desktop + + # Remove prebuilt binaries for foreign architectures (to not confuse strip) + for prebin in darwin-x64 linux-arm64 win32-ia32 win32-x64; do + rm -rf release/linux-unpacked/resources/app.asar.unpacked/node_modules/{ffi-napi,ref-napi}/prebuilds/$prebin + done vcopy release/linux-unpacked/* usr/lib/signal-desktop @@ -40,4 +53,6 @@ do_install() { for size in 16 32 48 128 256 1024; do vinstall images/icon_${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ signal.png done + + vlicense LICENSE } From 8dee2c454928980ea6b175e303bc676724e9ce35 Mon Sep 17 00:00:00 2001 From: reedts Date: Tue, 22 Jun 2021 10:43:17 +0200 Subject: [PATCH 2/2] Remove trailing whitespaces --- srcpkgs/Signal-Desktop/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/Signal-Desktop/template b/srcpkgs/Signal-Desktop/template index 43af7b54ce62..7a869e906a43 100644 --- a/srcpkgs/Signal-Desktop/template +++ b/srcpkgs/Signal-Desktop/template @@ -22,7 +22,7 @@ post_extract() { git lfs install vsed 's/"node": "/&>=/' -i package.json - + # Dependencies have to be installed before applying patch yarn install --ignore-engines --frozen-lockfile } @@ -35,7 +35,7 @@ do_build() { do_install() { vmkdir usr/lib/signal-desktop - + # Remove prebuilt binaries for foreign architectures (to not confuse strip) for prebin in darwin-x64 linux-arm64 win32-ia32 win32-x64; do rm -rf release/linux-unpacked/resources/app.asar.unpacked/node_modules/{ffi-napi,ref-napi}/prebuilds/$prebin