diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile index b61cdbbed03f..5c04e285558b 100644 --- a/net-im/signal-desktop/Makefile +++ b/net-im/signal-desktop/Makefile @@ -1,204 +1,203 @@ PORTNAME= signal-desktop DISTVERSIONPREFIX= v -DISTVERSION= 7.23.0 -PORTREVISION= 1 +DISTVERSION= 7.25.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} \ esbuild:devel/esbuild \ 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 MAKE_ENV+= ESBUILD_BINARY_PATH=${LOCALBASE}/bin/esbuild _BUILD_DATE= $$(date +'%s') ELECTRON_VER_MAJOR= 30 ESBUILD_VERSION= 0.21.2 SQLCIPHER= sqlcipher-4.6.1--3.0.7--0.2.1-7c30de8bcb5d21127803f5ab19a097e1b508d05744aca3ac6166352506b5f451 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 ${PREFIX}/bin/jq '.devDependencies.esbuild = "${ESBUILD_VERSION}"' ${WRKSRC}/package.json.tmp.1 > ${WRKSRC}/package.json.tmp.2 ${MV} ${WRKSRC}/package.json.tmp.2 ${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 @${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 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 5df0b7d74d9b..fe69ac742e33 100644 --- a/net-im/signal-desktop/distinfo +++ b/net-im/signal-desktop/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1726037877 -SHA256 (signal-desktop-7.23.0-npm-cache.tar.gz) = 1c2f8c03c4676c73ba368e919a3005e0ce1bfd773b3e329fe0c042f977a53123 -SIZE (signal-desktop-7.23.0-npm-cache.tar.gz) = 324496050 +TIMESTAMP = 1726819903 +SHA256 (signal-desktop-7.25.0-npm-cache.tar.gz) = a83de274030194c90cb046592a1f4a0cef777342ba567a08575f9c2da751638f +SIZE (signal-desktop-7.25.0-npm-cache.tar.gz) = 320989367 SHA256 (sqlcipher-4.6.1--3.0.7--0.2.1-7c30de8bcb5d21127803f5ab19a097e1b508d05744aca3ac6166352506b5f451.tar.gz) = 7c30de8bcb5d21127803f5ab19a097e1b508d05744aca3ac6166352506b5f451 SIZE (sqlcipher-4.6.1--3.0.7--0.2.1-7c30de8bcb5d21127803f5ab19a097e1b508d05744aca3ac6166352506b5f451.tar.gz) = 75824751 -SHA256 (signalapp-Signal-Desktop-v7.23.0_GH0.tar.gz) = 00b3d03050545cc5f6d3fc9c729627ca7068d75476fc33c791c171530689ed5d -SIZE (signalapp-Signal-Desktop-v7.23.0_GH0.tar.gz) = 42326613 +SHA256 (signalapp-Signal-Desktop-v7.25.0_GH0.tar.gz) = 836220d3e3962c1072d3263d2c8b52873fe9d32ccfe6a83249cfe14364a7d553 +SIZE (signalapp-Signal-Desktop-v7.25.0_GH0.tar.gz) = 42352046 diff --git a/net-im/signal-desktop/get_deps.sh b/net-im/signal-desktop/get_deps.sh index 284303f8693a..eba5a85aad56 100644 --- a/net-im/signal-desktop/get_deps.sh +++ b/net-im/signal-desktop/get_deps.sh @@ -1,32 +1,32 @@ #!/bin/sh -SIGNAL_VERS=v7.23.0 +SIGNAL_VERS=v7.25.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') fetch -qo /tmp/download.js https://raw.githubusercontent.com/signalapp/better-sqlite3/v${bsqlite3_version}/deps/download.js BASE_URI=https://build-artifacts.signal.org/desktop HASH=$(awk /"HASH ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g") SQLCIPHER_VERSION=$(awk /"SQLCIPHER_VERSION ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g") OPENSSL_VERSION=$(awk /"OPENSSL_VERSION ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g") TOKENIZER_VERSION=$(awk /"TOKENIZER_VERSION ="/'{print $4}' /tmp/download.js | sed -e 's#;##g' -e "s#'##g") TAG="${SQLCIPHER_VERSION}--${OPENSSL_VERSION}--${TOKENIZER_VERSION}" echo "Signal-FTS5-Extension= ${TOKENIZER_VERSION}" echo "SQLCIPHER=sqlcipher-${TAG}-${HASH}" | portedit merge -i Makefile echo "fetch https://build-artifacts.signal.org/desktop/sqlcipher-${TAG}-${HASH}.tar.gz"