diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile index 2077c8073916..ef66773ebdf2 100644 --- a/net-im/signal-desktop/Makefile +++ b/net-im/signal-desktop/Makefile @@ -1,190 +1,200 @@ PORTNAME= signal-desktop DISTVERSIONPREFIX= v -DISTVERSION= 7.15.0 -PORTREVISION= 1 +DISTVERSION= 7.16.0 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 +# 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 +# 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 - ${ECHO_CMD} ${PATH} - ${ECHO_CMD} a >> ${WRKSRC}/todo cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} npm_config_nodedir=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers npm install --ignore-optional --offline - ${ECHO_CMD} b >> ${WRKSRC}/todo 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 9012d9b5d0a5..87017b0e4703 100644 --- a/net-im/signal-desktop/distinfo +++ b/net-im/signal-desktop/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1720443621 -SHA256 (signal-desktop-7.15.0-npm-cache.tar.gz) = 28c79209e84d991b6a42fc9403d484d438b576f3c3457a595657d25c37e6a7e4 -SIZE (signal-desktop-7.15.0-npm-cache.tar.gz) = 325615757 +TIMESTAMP = 1721311427 +SHA256 (signal-desktop-7.16.0-npm-cache.tar.gz) = 954b5510cb7889cecb970196abe432318cdcb7adc9cec1b094af1b023c3a7a15 +SIZE (signal-desktop-7.16.0-npm-cache.tar.gz) = 322698652 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.15.0_GH0.tar.gz) = f92ba15a86920861b4cd53cd5218934128508682d82120f195a59e9deef8e272 -SIZE (signalapp-Signal-Desktop-v7.15.0_GH0.tar.gz) = 42189716 +SHA256 (signalapp-Signal-Desktop-v7.16.0_GH0.tar.gz) = faf2597e80616ff791860e5b7ee40c503366b567aa5bb8bfa5967c92d88aa0cd +SIZE (signalapp-Signal-Desktop-v7.16.0_GH0.tar.gz) = 42220016 diff --git a/net-im/signal-desktop/files/patch-package.json b/net-im/signal-desktop/files/patch-package.json index bc4779258a72..f4d3e78d2b39 100644 --- a/net-im/signal-desktop/files/patch-package.json +++ b/net-im/signal-desktop/files/patch-package.json @@ -1,11 +1,11 @@ ---- package.json.orig 2024-07-08 15:06:16 UTC -+++ package.json +--- 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'", diff --git a/net-im/signal-desktop/get_deps.sh b/net-im/signal-desktop/get_deps.sh index 97986da7af09..0dc268be29fe 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.15.0 +SIGNAL_VERS=v7.16.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') 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') diff --git a/net-im/signal-desktop/pkg-descr b/net-im/signal-desktop/pkg-descr index 9b48caaad419..b313e128bb25 100644 --- a/net-im/signal-desktop/pkg-descr +++ b/net-im/signal-desktop/pkg-descr @@ -1,5 +1,5 @@ Signal is a cross-platform centralized encrypted messaging service developed by the Signal Technology Foundation and Signal Messenger LLC. It uses the Internet to send one-to-one and group messages, which can include files, voice notes, images and videos. It can also be used to make one-to-one -and group voice and video calls. +and group voice and video calls.