diff options
author | Mikael Urankar <mikael@FreeBSD.org> | 2023-03-09 12:06:14 +0100 |
---|---|---|
committer | Mikael Urankar <mikael@FreeBSD.org> | 2023-03-09 12:09:18 +0100 |
commit | bc5ccf784aad758b3e48e3ce9ae6672f8cb54b06 (patch) | |
tree | fd8dc49a7c34165d5559a86b0cab7b8939880824 /net-im | |
parent | multimedia/ringrtc: Update to 2.25.0 (diff) |
net-im/signal-desktop: Update to 6.8.0
Changes:
https://github.com/signalapp/Signal-Desktop/releases/tag/v6.8.0
Diffstat (limited to 'net-im')
-rw-r--r-- | net-im/signal-desktop/Makefile | 45 | ||||
-rw-r--r-- | net-im/signal-desktop/distinfo | 10 | ||||
-rw-r--r-- | net-im/signal-desktop/get_deps.sh | 12 |
3 files changed, 43 insertions, 24 deletions
diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile index de18683d2dd1..0b293d7b3a7c 100644 --- a/net-im/signal-desktop/Makefile +++ b/net-im/signal-desktop/Makefile @@ -1,14 +1,14 @@ PORTNAME= signal-desktop DISTVERSIONPREFIX= v -DISTVERSION= 6.7.0 -PORTREVISION= 1 +DISTVERSION= 6.8.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 \ +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 \ @@ -23,12 +23,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 -FETCH_DEPENDS= yarn-node16>0:www/yarn-node16 -EXTRACT_DEPENDS=yarn-node16>0:www/yarn-node16 +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/openssl-devel \ @@ -67,9 +68,6 @@ 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} \ - PLAYWRIGHT_BROWSERS_PATH=${WRKDIR}/.cache \ - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=true \ - PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true \ USE_SYSTEM_APP_BUILDER=true \ SOURCE_DATE_EPOCH=${_BUILD_DATE} @@ -90,9 +88,9 @@ NODE_VERSION= 16.19.1 # bump ELECTRON_GYP_VERSION when ELECTRON_VER_MAJOR is changed ELECTRON_GYP_VERSION= 22.2.0 -# ll work/.cache/yarn/v6 | egrep "@signalapp|esbuild-freebsd" +# sh get_deps.sh NPM_SIGNAL_DIR= npm-@signalapp-libsignal-client-0.22.0-d57441612df46f90df68fc5d9ad45b857b9d2c44-integrity -NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.24.0-634160d24b2e13967a634e0f3236b2b4b5854091-integrity +NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.25.0-dfa75860c69dd6a81aef568d9fe3fb1a0573a4f7-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 @@ -106,13 +104,19 @@ PLIST_SUB= NODE_ARCH=${NODE_ARCH} \ YARN_TIMESTAMP= 1661146515 -pre-fetch: - if [ ! -f ${DISTDIR}/signal-desktop-${DISTVERSION}-yarn-cache.tar.gz ]; \ - then ${MKDIR} ${WRKDIR}; \ +fetch-yarn: + if [ ! -f ${DISTDIR}/signal-desktop-${DISTVERSION}-yarn-cache.tar.gz ]; then \ + ${MKDIR} /tmp/signal-desktop; \ + # fetch package.json and update node engine + ${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"' >> \ - ${WRKDIR}/.yarnrc; \ - ${CP} ${FILESDIR}/package.json ${FILESDIR}/yarn.lock ${WRKDIR}; \ - cd ${WRKDIR} && ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache \ + /tmp/signal-desktop/.yarnrc; \ + # remove mock-server as it doesn't build and is useless + ${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:' \ @@ -137,13 +141,18 @@ post-extract: ${ECHO_CMD} '9' > ${WRKDIR}/.electron-gyp/${ELECTRON_GYP_VERSION}/installVersion # install yarn modules and fail silently - ${CP} ${FILESDIR}/package.json ${WRKSRC}/ ${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-cache"' > ${WRKSRC}/.yarnrc + ${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 diff --git a/net-im/signal-desktop/distinfo b/net-im/signal-desktop/distinfo index 1362102b3877..09439fdd2560 100644 --- a/net-im/signal-desktop/distinfo +++ b/net-im/signal-desktop/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1677404119 -SHA256 (signal-desktop-6.7.0-yarn-cache.tar.gz) = 39d371c2500966b1c8766bf25753980a9559bd73a3c304bf4dddfa2dbd151bb1 -SIZE (signal-desktop-6.7.0-yarn-cache.tar.gz) = 373590604 +TIMESTAMP = 1678031122 +SHA256 (signal-desktop-6.8.0-yarn-cache.tar.gz) = 18f292ac8c53901ff1a36fefc70b8ec6b9b7128517ae9066e713063947933aa3 +SIZE (signal-desktop-6.8.0-yarn-cache.tar.gz) = 368458040 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 @@ -9,5 +9,5 @@ SHA256 (node-v22.2.0-headers.tar.gz) = 5eae2935fc89486e4b6ce020bd23df2069edb21e1 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.7.0_GH0.tar.gz) = 578be2af88704f022425c325b98d6bb4a84b22597a9c138655d5f1df3f1f57b7 -SIZE (signalapp-Signal-Desktop-v6.7.0_GH0.tar.gz) = 38651978 +SHA256 (signalapp-Signal-Desktop-v6.8.0_GH0.tar.gz) = 0f216192e73f5481682ac683ccc05e134c3f0a386e058944467008f3b24af53c +SIZE (signalapp-Signal-Desktop-v6.8.0_GH0.tar.gz) = 38655554 diff --git a/net-im/signal-desktop/get_deps.sh b/net-im/signal-desktop/get_deps.sh index 8d8fa37f4bf9..4a660ae3800a 100644 --- a/net-im/signal-desktop/get_deps.sh +++ b/net-im/signal-desktop/get_deps.sh @@ -1,5 +1,5 @@ #!/bin/sh -SIGNAL_VERS=v6.7.0 +SIGNAL_VERS=v6.8.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') @@ -26,3 +26,13 @@ TOKENIZER_VERSION=$(awk /"TOKENIZER_VERSION ="/'{print $4}' /tmp/download.js | s TAG="${SQLCIPHER_VERSION}--${OPENSSL_VERSION}--${TOKENIZER_VERSION}" echo "Signal-FTS5-Extension= ${TOKENIZER_VERSION}" echo "SQLCIPHER= sqlcipher-${TAG}-${HASH}" + +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" + +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" + +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" |