diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile index 33ca7600579c..db5712519bf0 100644 --- a/net-im/signal-desktop/Makefile +++ b/net-im/signal-desktop/Makefile @@ -1,243 +1,243 @@ PORTNAME= signal-desktop DISTVERSIONPREFIX= v -DISTVERSION= 6.10.0 +DISTVERSION= 6.11.0 CATEGORIES= net-im MASTER_SITES= LOCAL/mikael/signal-desktop/:npm \ LOCAL/mikael/signal-desktop/:sqlite \ LOCAL/mikael/signal-desktop/:yarn \ https://nodejs.org/download/release/v${NODE_VERSION}/:node \ https://electronjs.org/headers/v${ELECTRON_GYP_VERSION}/:electron_gyp \ https://build-artifacts.signal.org/desktop/:sqlcipher DISTFILES= signal-desktop-${DISTVERSION}-yarn-cache.tar.gz:yarn \ signal-desktop-6.4.1-npm-cache.tar.gz:npm \ node-v${NODE_VERSION}-headers.tar.gz:node \ node-v${ELECTRON_GYP_VERSION}-headers.tar.gz:electron_gyp \ ${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 \ yarn-node16>0:www/yarn-node16 BUILD_DEPENDS= ${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 \ jq:textproc/jq \ electron${ELECTRON_VER_MAJOR}:devel/electron${ELECTRON_VER_MAJOR} \ npm:www/npm-node16 \ ${LOCALBASE}/lib/libcrypto.a:security/openssl30 \ vips>0:graphics/vips \ yarn:www/yarn-node16 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 \ libexpat.so:textproc/expat2 \ libFLAC.so:audio/flac \ libfontconfig.so:x11-fonts/fontconfig \ libharfbuzz.so:print/harfbuzz \ 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 \ 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 MAKE_ENV+= ELECTRON_OVERRIDE_DIST_PATH=${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR} \ HOME=${WRKDIR} \ USE_SYSTEM_APP_BUILDER=true \ SOURCE_DATE_EPOCH=${_BUILD_DATE} # 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=${WRKDIR}/esbuild-freebsd-64/package/bin/esbuild _BUILD_DATE= $$(date +'%s') ELECTRON_VER_MAJOR= 22 # keep NODE_VERSION in sync with www/node16 DISTVERSION NODE_VERSION= 16.19.1 # bump ELECTRON_GYP_VERSION when ELECTRON_VER_MAJOR is changed ELECTRON_GYP_VERSION= 22.2.0 # sh get_deps.sh NPM_SIGNAL_DIR= npm-@signalapp-libsignal-client-0.22.0-d57441612df46f90df68fc5d9ad45b857b9d2c44-integrity -NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.25.1-d41c35a42bb9036129b78dda209ba063eefde6f6-integrity +NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.25.2-6e6e32fe3e507f1ead7cd287d53eb35d1f9b5ef9-integrity NPM_SQLITE3_DIR= npm-@signalapp-better-sqlite3-8.4.3-7ffa8d03d2a12543247936bfb7b9f74cdbc6fe9b-integrity NPM_ESBUILD_VERS= 0.17.2 SQLCIPHER= sqlcipher-4.5.3-fts--3.0.7--0.2.1-b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986 ESBUILD_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/} 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/} YARN_TIMESTAMP= 1661146515 fetch-yarn: if [ ! -f ${DISTDIR}/signal-desktop-${DISTVERSION}-yarn-cache.tar.gz ]; then \ ${MKDIR} /tmp/signal-desktop; \ ${FETCH_CMD} -o - https://raw.githubusercontent.com/signalapp/Signal-Desktop/v${DISTVERSION}/package.json | \ ${PREFIX}/bin/jq '.engines.node = "${NODE_VERSION}"' > /tmp/signal-desktop/package.json; \ ${FETCH_CMD} -o /tmp/signal-desktop/yarn.lock https://raw.githubusercontent.com/signalapp/Signal-Desktop/v${DISTVERSION}/yarn.lock; \ ${ECHO_CMD} 'yarn-offline-mirror "./yarn-offline-cache"' >> \ /tmp/signal-desktop/.yarnrc; \ ${PREFIX}/bin/jq 'del(.devDependencies."@signalapp/mock-server")' /tmp/signal-desktop/package.json > /tmp/signal-desktop/package.json.tmp; \ ${MV} /tmp/signal-desktop/package.json.tmp /tmp/signal-desktop/package.json; \ cd /tmp/signal-desktop && ${SETENV} HOME=/tmp/signal-desktop XDG_CACHE_HOME=/tmp/signal-desktop/.cache \ yarn --frozen-lockfile --ignore-scripts; \ ${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \ -e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \ -e 's:\([gu]id\)=[0-9]*:\1=0:g' \ -e 's:flags=.*:flags=none:' \ -e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \ ${TAR} cJf ${DISTDIR}/signal-desktop-${DISTVERSION}-yarn-cache.tar.gz \ @yarn-offline-cache.mtree; \ ${RM} -r ${WRKDIR}; \ fi post-patch: ${REINPLACE_CMD} "s#%%EPOCH%%#${_BUILD_DATE}#" \ ${WRKSRC}/ts/scripts/get-expire-time.ts post-extract: ${MKDIR} ${WRKDIR}/.cache/node-gyp/${NODE_VERSION} \ ${WRKDIR}/.electron-gyp/${ELECTRON_GYP_VERSION} ${MV} ${WRKDIR}/node-v${NODE_VERSION}/include ${WRKDIR}/.cache/node-gyp/${NODE_VERSION} ${MV} ${WRKDIR}/node_headers/include ${WRKDIR}/.electron-gyp/${ELECTRON_GYP_VERSION} ${ECHO_CMD} '9' > ${WRKDIR}/.cache/node-gyp/${NODE_VERSION}/installVersion ${ECHO_CMD} '9' > ${WRKDIR}/.electron-gyp/${ELECTRON_GYP_VERSION}/installVersion # install yarn modules and fail silently ${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc # Update node engine ${PREFIX}/bin/jq '.engines.node = "${NODE_VERSION}"' ${WRKSRC}/package.json > ${WRKSRC}/package.json.tmp ${MV} ${WRKSRC}/package.json.tmp ${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 cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} yarn install --frozen-lockfile --ignore-optional --offline || ${TRUE} do-build: ${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc # electron-builder is stupid and tries to open ${LOCALBASE}/share/electron22/electron with WRITE priv # copy ${LOCALBASE}/share/electron22 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 the yarn cache ${MKDIR} ${WRKDIR}/.cache/yarn/v6/${NPM_SIGNAL_DIR}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH} \ ${WRKDIR}/.cache/yarn/v6/${NPM_RINGRTC_DIR}/node_modules/@signalapp/ringrtc/build/freebsd ${CP} ${LOCALBASE}/lib/libsignal_node.so \ ${WRKDIR}/.cache/yarn/v6/${NPM_SIGNAL_DIR}/node_modules/@signalapp/libsignal-client/prebuilds/freebsd-${NODE_ARCH}/node.napi.node ${CP} ${LOCALBASE}/lib/libringrtc.so \ ${WRKDIR}/.cache/yarn/v6/${NPM_RINGRTC_DIR}/node_modules/@signalapp/ringrtc/build/freebsd/libringrtc-${NODE_ARCH}.node ${MKDIR} ${WRKDIR}/.cache/yarn/v6/${NPM_SQLITE3_DIR}/node_modules/@signalapp/better-sqlite3/deps ${CP} ${DISTDIR}/${SQLCIPHER}.tar.gz \ ${WRKDIR}/.cache/yarn/v6/${NPM_SQLITE3_DIR}/node_modules/@signalapp/better-sqlite3/deps/sqlcipher.tar.gz ${CP} ${FILESDIR}/fetch-prebuild.js \ ${WRKDIR}/.cache/yarn/v6/${NPM_RINGRTC_DIR}/node_modules/@signalapp/ringrtc/scripts/fetch-prebuild.js ${CP} ${FILESDIR}/download.js \ ${WRKDIR}/.cache/yarn/v6/${NPM_SQLITE3_DIR}/node_modules/@signalapp/better-sqlite3/deps/download.js # patch-package can't patch sqlite3 on aarch64, patch the yarn cache instead cd ${WRKDIR}/.cache/yarn/v6 && ${PATCH} -s -N -i ${FILESDIR}/sqlite3.gyp.diff ${MKDIR} ${WRKDIR}/esbuild-freebsd-64 ${TAR} -xf ${WRKDIR}/yarn-offline-cache/@esbuild-freebsd-${ESBUILD_ARCH}-${NPM_ESBUILD_VERS}.tgz -C ${WRKDIR}/esbuild-freebsd-64 # # For online build # ${RM} ${WRKDIR}/.npmrc # cd ${WRKSRC} && \ # ${SETENV} ${MAKE_ENV} yarn install --frozen-lockfile --ignore-optional # cd ${WRKSRC} && \ # ${SETENV} ${MAKE_ENV} yarn generate # cd ${WRKSRC} && \ # ${SETENV} ${MAKE_ENV} yarn build:webpack # For offline build ${ECHO_CMD} offline=true > ${WRKDIR}/.npmrc cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} yarn install --frozen-lockfile --ignore-optional --offline cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} yarn --offline generate cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} yarn --offline build:webpack 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} yarn run electron-builder \ --linux --dir --config.npmRebuild=false \ --config.electronVersion=${ELECTRON_VER_MAJOR} \ --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 create-caches-tarball: # do some cleanup first ${RM} -r ${WRKDIR}/.npm/_logs ${WRKDIR}/.npm/_update-notifier-last-checked ${WRKDIR}/.cache/yarn/v6/.tmp ${FIND} ${WRKDIR}/.cache -type f -perm 755 -exec file {} \; | ${EGREP} "ELF|PE32+|Mach-O" | ${AWK} -F ':' '{print $$1}' | ${XARGS} ${RM} cd ${WRKDIR} && \ ${TAR} czf signal-desktop-${DISTVERSION}-yarn-cache.tar.gz .cache yarn-cache cd ${WRKDIR} && \ ${TAR} czf signal-desktop-${DISTVERSION}-electron-gyp-cache.tar.gz .electron-gyp 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 9ee2dc69170b..b04a54c2d1a8 100644 --- a/net-im/signal-desktop/distinfo +++ b/net-im/signal-desktop/distinfo @@ -1,13 +1,13 @@ -TIMESTAMP = 1678967232 -SHA256 (signal-desktop-6.10.0-yarn-cache.tar.gz) = eddb1f047d877f7b14b9d951ee55584e58465f030bb22ffbb90095947bf54358 -SIZE (signal-desktop-6.10.0-yarn-cache.tar.gz) = 368451180 +TIMESTAMP = 1679672861 +SHA256 (signal-desktop-6.11.0-yarn-cache.tar.gz) = 5edc8deca063fa403df0abf67994e0251b6202edb19f74211c8d9be7837607bd +SIZE (signal-desktop-6.11.0-yarn-cache.tar.gz) = 372418128 SHA256 (signal-desktop-6.4.1-npm-cache.tar.gz) = 8acc503a579760faf8ea660d504f3b3ffadc495bf09584228da4cc9af20e33fe SIZE (signal-desktop-6.4.1-npm-cache.tar.gz) = 4466353 SHA256 (node-v16.19.1-headers.tar.gz) = b2d010190ad40b52ab2fb92131db51375ef682a37f924fe2ce3813767d68fee9 SIZE (node-v16.19.1-headers.tar.gz) = 568325 SHA256 (node-v22.2.0-headers.tar.gz) = 5eae2935fc89486e4b6ce020bd23df2069edb21e1105c7e09a1766cc7be41daf SIZE (node-v22.2.0-headers.tar.gz) = 263490 SHA256 (sqlcipher-4.5.3-fts--3.0.7--0.2.1-b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986.tar.gz) = b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986 SIZE (sqlcipher-4.5.3-fts--3.0.7--0.2.1-b633825cf7e0fdd39a6cdf128f2bd76552a88d325f2b9cd07bb87a457cefb986.tar.gz) = 74755812 -SHA256 (signalapp-Signal-Desktop-v6.10.0_GH0.tar.gz) = aec9001aa11f3a96807b67678996796b43140d0b51cf58db0a6aa011c72e5a28 -SIZE (signalapp-Signal-Desktop-v6.10.0_GH0.tar.gz) = 38819508 +SHA256 (signalapp-Signal-Desktop-v6.11.0_GH0.tar.gz) = 1dfc7ce32b663c37513303fe102fd154ae767b5b425885b9e56fc1e46c2af2fd +SIZE (signalapp-Signal-Desktop-v6.11.0_GH0.tar.gz) = 38742279 diff --git a/net-im/signal-desktop/get_deps.sh b/net-im/signal-desktop/get_deps.sh index e1415936e847..56b29e266114 100644 --- a/net-im/signal-desktop/get_deps.sh +++ b/net-im/signal-desktop/get_deps.sh @@ -1,38 +1,38 @@ #!/bin/sh -SIGNAL_VERS=v6.10.0 +SIGNAL_VERS=v6.11.0 fetch -qo /tmp/package.json https://raw.githubusercontent.com/signalapp/Signal-Desktop/${SIGNAL_VERS}/package.json 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 fetch -qo /tmp/yarn.lock https://raw.githubusercontent.com/signalapp/Signal-Desktop/${SIGNAL_VERS}/yarn.lock npm_signal_hash=$(grep libsignal-client /tmp/yarn.lock | awk -F '#' /resolved/'{print $2}' | sed 's/"//g') echo "NPM_SIGNAL_DIR=npm-@signalapp-libsignal-client-${libsignalclient_version}-${npm_signal_hash}-integrity" | portedit merge -i Makefile npm_ringrtc_hash=$(grep ringrtc /tmp/yarn.lock | awk -F '#' /resolved/'{print $2}' | sed 's/"//g') echo "NPM_RINGRTC_DIR=npm-@signalapp-ringrtc-${ringrtc_version}-${npm_ringrtc_hash}-integrity" | portedit merge -i Makefile npm_bsqlite3_hash=$(grep better-sqlite3 /tmp/yarn.lock | awk -F '#' /resolved/'{print $2}' | sed 's/"//g') echo "NPM_SQLITE3_DIR=npm-@signalapp-better-sqlite3-${bsqlite3_version}-${npm_bsqlite3_hash}-integrity" | portedit merge -i Makefile