diff --git a/multimedia/ringrtc/Makefile b/multimedia/ringrtc/Makefile index 8780438ae88e..e57a707c6119 100644 --- a/multimedia/ringrtc/Makefile +++ b/multimedia/ringrtc/Makefile @@ -1,158 +1,158 @@ PORTNAME= ringrtc DISTVERSIONPREFIX= v DISTVERSION= 2.37.0 PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= LOCAL/mikael/ringrtc/:base \ LOCAL/mikael/ringrtc/:boringssl \ LOCAL/mikael/ringrtc/:build \ LOCAL/mikael/ringrtc/:buildtools \ LOCAL/mikael/ringrtc/:catapult \ LOCAL/mikael/ringrtc/:icu \ LOCAL/mikael/ringrtc/:nasm \ LOCAL/mikael/ringrtc/:libjpeg_turbo \ LOCAL/mikael/ringrtc/:libsrtp \ LOCAL/mikael/ringrtc/:libvpx \ LOCAL/mikael/ringrtc/:libyuv \ LOCAL/mikael/ringrtc/:third_party \ LOCAL/mikael/ringrtc/:testing \ LOCAL/mikael/ringrtc/:opus DISTFILES= base-${BASE_REV}.tar.gz:base \ boringssl-${BORINGSSL_REV}.tar.gz:boringssl \ build-${BUILD_REV}.tar.gz:build \ buildtools-${BUILDTOOLS_REV}.tar.gz:buildtools \ catapult-${CATAPULT_REV}.tar.gz:catapult \ icu-${ICU_REV}.tar.gz:icu \ nasm-${NASM_REV}.tar.gz:nasm \ libjpeg_turbo-${LIBJPEG_TURBO_REV}.tar.gz:libjpeg_turbo \ libsrtp-${LIBSRTP_REV}.tar.gz:libsrtp \ libvpx-${LIBVPX_REV}.tar.gz:libvpx \ libyuv-${LIBYUV_REV}.tar.gz:libyuv \ third_party-${THIRD_PARTY_REV}.tar.gz:third_party \ testing-${TESTING_REV}.tar.gz:testing \ opus-${OPUS_REV}.tar.gz:opus -MAINTAINER= mikael@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Middleware library for Signal-Desktop WWW= https://github.com/signalapp/ringrtc LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 BUILD_DEPENDS= gn:devel/gn \ protoc:devel/protobuf LIB_DEPENDS= libasound.so:audio/alsa-lib \ libfreetype.so:print/freetype2 \ libpulse.so:audio/pulseaudio USES= cargo gnome localbase:ldflags ninja pkgconfig python:build \ tar:xz USE_GNOME= glib20 USE_GITHUB= yes GH_ACCOUNT= signalapp GH_TUPLE= signalapp:ringrtc:${DISTVERSIONPREFIX}${DISTVERSION} \ signalapp:webrtc:${WEBRTC_REV}:webrtc # sh net-im/signal-desktop/get_deps.sh WEBRTC_REV= 6099a # modify webrtc_fetch.sh, then sh webrtc_fetch.sh BASE_REV= 1546e3adb67bb711ca2fd39c3913cb56bd889748 BORINGSSL_REV= c38dc29860a72540eb2c4fdb8a8bfb27ef94ddf3 BUILD_REV= a21fc6065131d0442e8a54c3ca2638e393b69438 BUILDTOOLS_REV= 6f834e2039daedfc68a2749c217922b26d5e8497 CATAPULT_REV= 47efdb4b1428e549c58a6d6c2fa79c4a8ceaf9b4 ICU_REV= a622de35ac311c5ad390a7af80724634e5dc61ed LIBJPEG_TURBO_REV= 9b894306ec3b28cea46e84c32b56773a98c483da LIBSRTP_REV= 5b7c744eb8310250ccc534f3f86a2015b3887a0a LIBVPX_REV= 424723dc025ce451dab9568239a46b18d0919b4d LIBYUV_REV= 04821d1e7d60845525e8db55c7bcd41ef5be9406 NASM_REV= 7fc833e889d1afda72c06220e5bed8fb43b2e5ce TESTING_REV= 46366a7e4d08bf9fceeb3c1c3b5eab8a6a5024b5 THIRD_PARTY_REV= 64d9ec3158b4629163f88b779a53e16f1cc24f81 OPUS_REV= 593419e833acab4d15b4901fe156177fb7315468 BINARY_ALIAS= vpython3=${PYTHON_CMD} # Keep in sync with https://github.com/signalapp/ringrtc/blob/v${DISTVERSION}/bin/build-electron#L101 # Run "gn args out/Release --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= rtc_build_examples=false \ rtc_build_tools=false \ rtc_include_tests=false \ rtc_enable_protobuf=false \ rtc_use_x11=false \ rtc_enable_sctp=false \ rtc_libvpx_build_vp9=true \ rtc_include_ilbc=false \ use_custom_libcxx=false \ is_debug=false \ is_clang=true \ clang_use_chrome_plugins=false \ treat_warnings_as_errors=false \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.36.0-67d1b48bd4c1ea31c155ea14a0bd28f04e46eff5-integrity NPM_SIGNAL_DIR= npm-@signalapp-libsignal-client-0.39.1-15b41f15c516ae3eecf8a098a9c9c7aac00444d7-integrity NPM_SQLITE3_DIR= npm-@signalapp-better-sqlite3-8.6.0-0413f4d0626b99838cd64ad09c88720aa2bec6ed-integrity SQLCIPHER= sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b MAKE_ARGS= -C out/${BUILDTYPE} WEBRTCDIR= ${WRKDIR}/${PORTNAME}-${DISTVERSION}/src/webrtc/src CARGO_BUILD_ARGS= --package ringrtc --features electron CARGO_INSTALL= no USE_LDCONFIG= yes MAKE_ENV= OUTPUT_DIR=${WEBRTCDIR}/out PLIST_FILES= lib/libringrtc.so post-extract: ${MKDIR} ${WRKDIR}/${PORTNAME}-${DISTVERSION}/src/webrtc ${MV} ${WRKDIR}/webrtc-${WEBRTC_REV} ${WEBRTCDIR} ${MV} ${WRKDIR}/base ${WEBRTCDIR} ${MV} ${WRKDIR}/build ${WEBRTCDIR} ${MV} ${WRKDIR}/buildtools ${WEBRTCDIR} ${MV} ${WRKDIR}/testing ${WEBRTCDIR} ${MV} ${WRKDIR}/third_party ${WEBRTCDIR} ${MV} ${WRKDIR}/catapult ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/boringssl ${WEBRTCDIR}/third_party/boringssl/src ${MV} ${WRKDIR}/icu ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/libjpeg_turbo ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/libsrtp ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/libvpx ${WEBRTCDIR}/third_party/libvpx/source ${MV} ${WRKDIR}/libyuv ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/nasm ${WEBRTCDIR}/third_party ${MV} ${WRKDIR}/opus ${WEBRTCDIR}/ringrtc/opus/src post-patch: ${REINPLACE_CMD} "s|LOCALBASE|${LOCALBASE}|" \ ${WEBRTCDIR}/build/toolchain/gcc_toolchain.gni \ ${WEBRTCDIR}/buildtools/third_party/libc++/BUILD.gn ${ECHO_CMD} "# Generated from 'DEPS'" > ${WEBRTCDIR}/build/config/gclient_args.gni ${ECHO_CMD} 1591703586 > ${WEBRTCDIR}/build/util/LASTCHANGE.committime ${ECHO_CMD} "qqchose " > ${WEBRTCDIR}/build/util/LASTCHANGE pre-build: cd ${WEBRTCDIR} && \ ${SETENV} ${CONFIGURE_ENV} gn gen out/release --args='${GN_ARGS}' # build webrtc first, ringrtc needs libwebrtc.a cd ${WEBRTCDIR} \ && ${MAKE_ENV} CC=ccache CXX=ccache ninja -C out/release # it's not intended to be used outside of signal-desktop, put that in # /usr/local/share/ringrtc instead? do-install: ${INSTALL_LIB} ${CARGO_TARGET_DIR}/${CARGO_BUILD_TARGET}/release/libringrtc.so \ ${STAGEDIR}${PREFIX}/lib/ .include diff --git a/net-im/libsignal-node/Makefile b/net-im/libsignal-node/Makefile index 6cfb24261e5f..0d1b53455e7b 100644 --- a/net-im/libsignal-node/Makefile +++ b/net-im/libsignal-node/Makefile @@ -1,100 +1,100 @@ PORTNAME= libsignal DISTVERSIONPREFIX= v DISTVERSION= 0.39.1 PORTREVISION= 1 CATEGORIES= net-im PKGNAMESUFFIX= -node DISTFILES= libsignal-node-${DISTVERSION}-yarn-cache.tar.gz -MAINTAINER= mikael@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Platform-agnostic APIs used by the official Signal clients and servers WWW= https://github.com/signalapp/libsignal LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= aarch64 amd64 FETCH_DEPENDS= yarn-node18>0:www/yarn-node18 EXTRACT_DEPENDS=yarn-node18>0:www/yarn-node18 BUILD_DEPENDS= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT} \ protoc:devel/protobuf \ yarn:www/yarn-node18 USES= cargo gmake python:build USE_GITHUB= yes GH_ACCOUNT= signalapp GH_TUPLE= google:boringssl:44b3df6f03d85c901767250329c571db405122d5:boringssl \ google:boringssl:853ca1ea1168dff08011e5d42d94609cc0ca2e27:boringssl_fips # RUSTFLAGS=-Clink-dead-code is required to have a functional libsignal-node binary: # linkme is broken with https://github.com/dtolnay/linkme/commit/64e7c63c106848481bea8f66c4885b52c26ca9ec # It's probably related to https://github.com/dtolnay/linkme/issues/49 MAKE_ENV= HOME=${WRKDIR} \ PYTHON=${PYTHON_CMD} \ RUSTFLAGS=-Clink-dead-code \ XDG_CACHE_HOME=${WRKDIR}/.cache MAKE_ENV+= RUSTC_BOOTSTRAP=aes,polyval USE_LDCONFIG= yes PLIST_FILES= lib/libsignal_node.so NODE_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/:S/i386/ia32/:C/powerpc64.*/ppc64/} NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.36.0-67d1b48bd4c1ea31c155ea14a0bd28f04e46eff5-integrity NPM_SIGNAL_DIR= npm-@signalapp-libsignal-client-0.39.1-15b41f15c516ae3eecf8a098a9c9c7aac00444d7-integrity NPM_SQLITE3_DIR= npm-@signalapp-better-sqlite3-8.6.0-0413f4d0626b99838cd64ad09c88720aa2bec6ed-integrity RUST_ARCH= ${ARCH:S/amd64/x86_64/:S/i386/i686/} SQLCIPHER= sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b YARN_TIMESTAMP= 1661146515 .include .if ${ARCH:Mpowerpc64*} EXTRA_PATCHES= ${FILESDIR}/${ARCH}-patch-node_binding.gyp .endif pre-fetch: if [ ! -f ${DISTDIR}/libsignal-node-${DISTVERSION}-yarn-cache.tar.gz ]; \ then ${MKDIR} ${WRKDIR}; \ ${ECHO_CMD} 'yarn-offline-mirror "./yarn-offline-cache"' >> \ ${WRKDIR}/.yarnrc; \ ${CP} ${FILESDIR}/node/package.json ${FILESDIR}/node/yarn.lock ${WRKDIR}; \ cd ${WRKDIR} && ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.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}/libsignal-node-${DISTVERSION}-yarn-cache.tar.gz \ @yarn-offline-cache.mtree; \ ${RM} -r ${WRKDIR}; \ fi post-patch: ${REINPLACE_CMD} "s#python3#${PYTHON_CMD}#" \ ${WRKSRC}/node/binding.gyp # Check hash here: https://github.com/signalapp/boring/tree/libsignal/boring-sys/deps post-extract: ${MV} ${WRKDIR}/boringssl-44b3df6f03d85c901767250329c571db405122d5/* ${WRKDIR}/boring-8245063ae6eb97d909982b89fad45bb7f0a2a1a0/boring-sys/deps/boringssl ${MV} ${WRKDIR}/boringssl-853ca1ea1168dff08011e5d42d94609cc0ca2e27/* ${WRKDIR}/boring-8245063ae6eb97d909982b89fad45bb7f0a2a1a0/boring-sys/deps/boringssl-fips ${CP} ${FILESDIR}/node/package.json ${WRKSRC}/node do-build: ${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc ${ECHO_CMD} 'nodedir "${LOCALBASE}"' >> ${WRKSRC}/.yarnrc cd ${WRKSRC}/node && \ ${SETENV} ${MAKE_ENV} yarn install --frozen-lockfile --ignore-optional --offline cd ${WRKSRC}/node && \ ${SETENV} ${MAKE_ENV} yarn tsc do-install: ${INSTALL_DATA} ${WRKSRC}/node/build/Release/obj.target/libsignal_client_freebsd_${NODE_ARCH}.node/geni/rust/${RUST_ARCH}-unknown-freebsd/release/libsignal_node.so \ ${STAGEDIR}${PREFIX}/lib/ .include diff --git a/net-im/signal-desktop/Makefile b/net-im/signal-desktop/Makefile index cc5765eb158b..f111e0854707 100644 --- a/net-im/signal-desktop/Makefile +++ b/net-im/signal-desktop/Makefile @@ -1,234 +1,234 @@ PORTNAME= signal-desktop DISTVERSIONPREFIX= v DISTVERSION= 6.48.1 PORTREVISION= 1 CATEGORIES= net-im MASTER_SITES= LOCAL/mikael/signal-desktop/:npm \ LOCAL/mikael/signal-desktop/:sqlite \ LOCAL/mikael/signal-desktop/:yarn \ https://build-artifacts.signal.org/desktop/:sqlcipher DISTFILES= signal-desktop-${DISTVERSION}-yarn-cache.tar.gz:yarn \ signal-desktop-6.37.0-npm-cache.tar.gz:npm \ ${SQLCIPHER}.tar.gz:sqlcipher -MAINTAINER= mikael@FreeBSD.org +MAINTAINER= ports@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-node18>0:www/yarn-node18 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-node18 \ yarn:www/yarn-node18 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 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=${WRKDIR}/esbuild-freebsd-64/package/bin/esbuild _BUILD_DATE= $$(date +'%s') ELECTRON_VER_MAJOR= 28 # sh get_deps.sh NPM_SIGNAL_DIR= npm-@signalapp-libsignal-client-0.39.1-15b41f15c516ae3eecf8a098a9c9c7aac00444d7-integrity NPM_RINGRTC_DIR= npm-@signalapp-ringrtc-2.37.0-d8f98d839c8cd8737acacdec111fb3bf272af54c-integrity NPM_SQLITE3_DIR= npm-@signalapp-better-sqlite3-8.6.0-0413f4d0626b99838cd64ad09c88720aa2bec6ed-integrity NPM_ESBUILD_VERS= 0.18.20 SQLCIPHER= sqlcipher-4.5.5-fts5-fix--3.0.7--0.2.1-ef53ea45ed92b928ecfd33c552d8d405263e86e63dec38e1ec63e1b0193b630b 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 .include .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .elif ${ARCH} == amd64 PLIST_SUB+= NOT_AARCH64="" .endif 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 '.devDependencies.esbuild = "0.18.20"' | \ ${PREFIX}/bin/jq '.engines.node = ""' > /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 --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-extract: # install yarn modules and fail silently ${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc ${ECHO_CMD} 'nodedir "${LOCALBASE}"' >> ${WRKSRC}/.yarnrc # Update node engine ${PREFIX}/bin/jq '.engines.node = ""' ${WRKSRC}/package.json > ${WRKSRC}/package.json.tmp.1 ${PREFIX}/bin/jq '.devDependencies.esbuild = "0.18.20"' ${WRKSRC}/package.json.tmp.1 > ${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 ${CP} ${FILESDIR}/yarn.lock ${WRKSRC} cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} yarn install --ignore-optional --offline || ${TRUE} do-build: ${ECHO_CMD} 'yarn-offline-mirror "../yarn-offline-cache"' > ${WRKSRC}/.yarnrc ${ECHO_CMD} 'nodedir "${LOCALBASE}/share/electron${ELECTRON_VER_MAJOR}/node_headers"' >> ${WRKSRC}/.yarnrc # electron-builder is stupid and tries to open ${LOCALBASE}/share/electron25/electron with WRITE priv # copy ${LOCALBASE}/share/electron25 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 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:esbuild:prod 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 # 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 ${WRKDIR}/.cache/yarn/v6/.tmp cd ${WRKDIR} && \ ${TAR} czf signal-desktop-${DISTVERSION}-npm-cache.tar.gz .npm .include