diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile index ad2b4a8fe94c..4121324477bf 100644 --- a/net-im/signal-desktop/Makefile +++ b/net-im/signal-desktop/Makefile @@ -1,201 +1,200 @@ PORTNAME= signal-desktop DISTVERSIONPREFIX= v -DISTVERSION= 7.16.0 -PORTREVISION= 3 +DISTVERSION= 7.20.1 CATEGORIES= net-im MASTER_SITES= LOCAL/mikael/signal-desktop/:npm \ https://build-artifacts.signal.org/desktop/:sqlcipher DISTFILES= signal-desktop-${DISTVERSION}-npm-cache.tar.gz:npm \ ${SQLCIPHER}.tar.gz:sqlcipher # for online build #DISTFILES= ${SQLCIPHER}.tar.gz:sqlcipher MAINTAINER= mikael@FreeBSD.org COMMENT= Cross-platform centralized encrypted messaging service WWW= https://signal.org/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 EXTRACT_DEPENDS=jq:textproc/jq \ npm:www/npm-node20 BUILD_DEPENDS= ${LOCALBASE}/lib/libcrypto.a:security/openssl \ ${LOCALBASE}/lib/libringrtc.so:multimedia/ringrtc \ ${LOCALBASE}/lib/libsignal_node.so:net-im/libsignal-node \ ${LOCALBASE}/lib/libsignal_tokenizer.a:devel/signal-fts5-extension \ app-builder>0:devel/app-builder \ electron${ELECTRON_VER_MAJOR}:devel/electron${ELECTRON_VER_MAJOR} \ jq:textproc/jq \ npm:www/npm-node20 LIB_DEPENDS= libasound.so:audio/alsa-lib \ libatk-bridge-2.0.so:accessibility/at-spi2-core \ libatspi.so:accessibility/at-spi2-core \ libcups.so:print/cups \ libdbus-1.so:devel/dbus \ libdrm.so:graphics/libdrm \ libepoll-shim.so:devel/libepoll-shim \ libevent.so:devel/libevent \ libexpat.so:textproc/expat2 \ libFLAC.so:audio/flac \ libffi.so:devel/libffi \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libicuuc.so:devel/icu \ libnspr4.so:devel/nspr \ libnss3.so:security/nss \ libopenh264.so:multimedia/openh264 \ libopus.so:audio/opus \ libpci.so:devel/libpci \ libpng16.so:graphics/png \ libsnappy.so:archivers/snappy \ libwayland-client.so:graphics/wayland \ libwebp.so:graphics/webp \ libxkbcommon.so:x11/libxkbcommon \ libxshmfence.so:x11/libxshmfence USES= desktop-file-utils gettext-runtime gl gnome jpeg xorg USE_GITHUB= yes GH_ACCOUNT= signalapp GH_PROJECT= Signal-Desktop USE_GL= gbm gl USE_GNOME= atk cairo gdkpixbuf2 glib20 gtk30 libxml2 libxslt pango USE_XORG= x11 xcb xcomposite xdamage xext xfixes xi xrandr xrender xtst PACKAGE_ENV= SIGNAL_ENV=production \ npm_config_runtime=electron \ npm_config_target=${ELECTRON_VER_MAJOR} \ npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers MAKE_ENV+= ELECTRON_OVERRIDE_DIST_PATH=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} \ HOME=${WRKDIR} \ USE_SYSTEM_APP_BUILDER=true \ SOURCE_DATE_EPOCH=${_BUILD_DATE} \ PATH=${WRKSRC}/node_modules/.bin:${LOCALBASE}/bin:${PATH} # Don't download electron binary distribution on electron node_modules installation MAKE_ENV+= ELECTRON_SKIP_BINARY_DOWNLOAD=1 # Don't create __pycache__ directory when executing node-gyp # This is a workaround to avoid filesystem violations during poudriere build MAKE_ENV+= PYTHONDONTWRITEBYTECODE=1 _BUILD_DATE= $$(date +'%s') ELECTRON_VER_MAJOR= 30 SQLCIPHER= sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b NODE_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/} APP_OUT_DIR= linux-${ARCH:S/aarch64/arm64-/:S/amd64//}unpacked PLIST_SUB= NODE_ARCH=${NODE_ARCH} \ SHARP_ARCH=${ARCH:S/aarch64/arm64v8/:S/amd64/x64/} NPM_TIMESTAMP= 1661146515 .include .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .elif ${ARCH} == amd64 PLIST_SUB+= NOT_AARCH64="" .endif 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 # 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 - # for online build +# # for online build # cd ${WRKSRC} && \ # ${SETENV} ${MAKE_ENV} npm install --ignore-optional --ignore-scripts || ${TRUE} # for offline build cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} npm install --ignore-optional --ignore-scripts --offline || ${TRUE} do-build: # electron-builder is stupid and tries to open ${LOCALBASE}/share/electron30/electron with WRITE priv # copy ${LOCALBASE}/share/electron30 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} @${CP} -pR ${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} ${WRKDIR}/electron${ELECTRON_VER_MAJOR} ${CHMOD} -R a+w ${WRKDIR}/electron${ELECTRON_VER_MAJOR} # Install libsignal_node.so and libringrtc.so binaries in node_modules ${MKDIR} ${WRKSRC}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH} \ ${WRKSRC}/node_modules/@signalapp/ringrtc/build/freebsd ${CP} ${LOCALBASE}/lib/libsignal_node.so \ ${WRKSRC}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH}/@signalapp+libsignal-client.node ${CP} ${LOCALBASE}/lib/libringrtc.so \ ${WRKSRC}/node_modules/@signalapp/ringrtc/build/freebsd/libringrtc-${NODE_ARCH}.node ${CP} ${DISTDIR}/${SQLCIPHER}.tar.gz \ ${WRKSRC}/node_modules/@signalapp/better-sqlite3/deps/sqlcipher.tar.gz # 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 +# # online build # cd ${WRKSRC} && \ # ${SETENV} ${MAKE_ENV} npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers npm install --ignore-optional # cd ${WRKSRC} && \ # ${SETENV} ${MAKE_ENV} npm run generate # offline build ${ECHO_CMD} offline=true >> ${WRKSRC}/.npmrc cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers npm install --ignore-optional --offline cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} npm run generate --offline do-install: # taken from https://github.com/tagattie/FreeBSD-Electron/blob/master/Mk/Uses/electron.mk#L387 # and editors/vscode cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${PACKAGE_ENV} npm run build:electron -- \ --linux --dir --config.npmRebuild=false \ --config.electronVersion=${ELECTRON_VER} \ --config.electronDist=${WRKDIR}/electron${ELECTRON_VER_MAJOR} ${MKDIR} ${STAGEDIR}${DATADIR} cd ${BUILD_WRKSRC}/dist/${APP_OUT_DIR} && \ ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${INSTALL_DATA} ${WRKSRC}/images/signal-logo-desktop-linux.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/signal-desktop.png ${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.desktop \ ${STAGEDIR}${PREFIX}/share/applications .for f in chromedriver mksnapshot v8_context_snapshot_generator ${RM} ${STAGEDIR}${DATADIR}/${f} .endfor ${RM} -r ${STAGEDIR}${DATADIR}/gen ${RM} -r ${STAGEDIR}${DATADIR}/node_headers ${RM} -r ${STAGEDIR}${DATADIR}/resources/completions ${RLN} ${STAGEDIR}${DATADIR}/signal-desktop ${STAGEDIR}${PREFIX}/bin # This seems to be only required for Windows: ${RM} -r ${STAGEDIR}${DATADIR}/resources/app.asar.unpacked/node_modules/@nodert-win10-rs4 ${RM} -r ${STAGEDIR}${DATADIR}/resources/app.asar.unpacked/node_modules/@signalapp/windows-dummy-keystroke create-caches-tarball: # do some cleanup first ${RM} -r ${WRKDIR}/.npm/_logs ${WRKDIR}/.npm/_update-notifier-last-checked cd ${WRKDIR} && \ ${TAR} czf signal-desktop-${DISTVERSION}-npm-cache.tar.gz .npm .include diff --git a/net-im/signal-desktop/distinfo b/net-im/signal-desktop/distinfo index 87017b0e4703..5b23023271aa 100644 --- a/net-im/signal-desktop/distinfo +++ b/net-im/signal-desktop/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1721311427 -SHA256 (signal-desktop-7.16.0-npm-cache.tar.gz) = 954b5510cb7889cecb970196abe432318cdcb7adc9cec1b094af1b023c3a7a15 -SIZE (signal-desktop-7.16.0-npm-cache.tar.gz) = 322698652 +TIMESTAMP = 1724162534 +SHA256 (signal-desktop-7.20.1-npm-cache.tar.gz) = d540be9fe682918e44ad2aebafbe29696249c809d2de9679a52dc594af3d748d +SIZE (signal-desktop-7.20.1-npm-cache.tar.gz) = 320272079 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.16.0_GH0.tar.gz) = faf2597e80616ff791860e5b7ee40c503366b567aa5bb8bfa5967c92d88aa0cd -SIZE (signalapp-Signal-Desktop-v7.16.0_GH0.tar.gz) = 42220016 +SHA256 (signalapp-Signal-Desktop-v7.20.1_GH0.tar.gz) = 871c5583a68c71c1ca5189b120106c764ffde0400daa9c095617f7594c9081a8 +SIZE (signalapp-Signal-Desktop-v7.20.1_GH0.tar.gz) = 42301457 diff --git a/net-im/signal-desktop/files/patch-package.json b/net-im/signal-desktop/files/patch-package.json index f4d3e78d2b39..90f469c31af1 100644 --- a/net-im/signal-desktop/files/patch-package.json +++ b/net-im/signal-desktop/files/patch-package.json @@ -1,11 +1,10 @@ ---- package.json.orig 2024-07-08 15:06:16.491473000 +0200 -+++ package.json 2024-07-08 15:06:50.596796000 +0200 -@@ -19,7 +19,7 @@ - "postinstall": "npm run build:acknowledgments && patch-package && npm run electron:install-app-deps", - "postuninstall": "npm run build:acknowledgments", - "start": "electron .", -- "generate": "npm-run-all build-protobuf build:esbuild build:dns-fallback build:icu-types build:compact-locales sass get-expire-time copy-components", -+ "generate": "npm-run-all build-protobuf build:esbuild build:icu-types build:compact-locales sass get-expire-time copy-components", - "build-release": "npm run build", - "sign-release": "node ts/updater/generateSignature.js", - "notarize": "echo 'No longer necessary'", +--- 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 0dc268be29fe..7d2b47293476 100644 --- a/net-im/signal-desktop/get_deps.sh +++ b/net-im/signal-desktop/get_deps.sh @@ -1,20 +1,20 @@ #!/bin/sh -SIGNAL_VERS=v7.16.0 +SIGNAL_VERS=v7.20.1 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') echo "NODE_VERSION= ${node_version}" ringrtc_version=$(grep '@signalapp/ringrtc"' /tmp/package.json | awk -F ":" '{print $2}' | sed -E 's#("|,| )##g') echo "RINGRTC_VERSION= ${ringrtc_version}" webrtc_version=$(fetch -qo - https://raw.githubusercontent.com/signalapp/ringrtc/v${ringrtc_version}/config/version.properties | grep 'webrtc.version' | awk -F '=' '{print $2}') echo "WEBRTC_REV= ${webrtc_version}" libsignalclient_version=$(grep '@signalapp/libsignal-client' /tmp/package.json | awk -F ":" '{print $2}' | sed -E 's#("|,| )##g') echo "LIBSIGNAL_VERSION= ${libsignalclient_version}" electron_version=$(grep '"electron":' /tmp/package.json | awk -F ":" '{print $2}' | sed -E 's#("|,| )##g') echo "ELECTRON_VERSION= ${electron_version}" bsqlite3_version=$(grep '@signalapp/better-sqlite3' /tmp/package.json | awk -F ":" '{print $2}' | sed -E 's#("|,| )##g')