diff --git a/backports/signal-desktop/APKBUILD b/backports/signal-desktop/APKBUILD index c926d3d..6c0f92a 100644 --- a/backports/signal-desktop/APKBUILD +++ b/backports/signal-desktop/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Lauren N. Liberda # Maintainer: Lauren N. Liberda pkgname=signal-desktop -pkgver=6.16.0 +pkgver=6.25.0 pkgrel=0 pkgdesc="A messaging app for simple private communication with friends" url="https://github.com/signalapp/Signal-Desktop/" @@ -9,39 +9,44 @@ url="https://github.com/signalapp/Signal-Desktop/" # aarch64: polyval-0.5.3 crate subdep uses unstable stdsimd feature arch="x86_64" license="AGPL-3.0-only" -# this build system sucks massive ass and does not add needed to anything depends=" electron - ffmpeg-libavcodec - ffmpeg-libavformat - ffmpeg-libavutil font-barlow font-eb-garamond font-inter font-parisienne - libevent - opus " makedepends=" alsa-lib-dev + aom-dev + brotli-dev bsd-compat-headers cargo + cargo-auditable cbindgen clang-dev cmake + crc32c-dev + dav1d-dev electron-dev electron-tasje ffmpeg-dev git-lfs glib-dev gn + jsoncpp-dev + libavif-dev + libjpeg-turbo-dev libepoxy-dev libevent-dev + libvpx-dev + libwebp-dev lld llvm-dev mesa-dev nodejs npm + openh264-dev openssl-dev opus-dev pipewire-dev @@ -60,11 +65,11 @@ options="net !check" _libsignalver=0.22.0 # follow signal-desktop package.json -> @signalapp/ringrtc -_ringrtcver=2.26.2 +_ringrtcver=2.28.1 # follow ringrtc (on version above) -> config/version.properties -> webrtc.version # downloading tarball generated with abuild snapshot (with gclient dependencies fetched) -_webrtcver=5481b +_webrtcver=5615b # follow @signalapp/better-sqlite3 (on version in package.json) -> deps/download.js -> TOKENIZER_VERSION # last bsqlite version: 8.4.3 @@ -74,18 +79,22 @@ source=" https://github.com/signalapp/Signal-Desktop/archive/refs/tags/v$pkgver/Signal-Desktop-$pkgver.tar.gz https://github.com/signalapp/libsignal/archive/refs/tags/v$_libsignalver/libsignal-$_libsignalver.tar.gz https://github.com/signalapp/ringrtc/archive/refs/tags/v$_ringrtcver/ringrtc-$_ringrtcver.tar.gz - https://s3.sakamoto.pl/lnl-aports-snapshots/webrtc-$_webrtcver.tar.xz + https://s3.sakamoto.pl/lnl-aports-snapshots/webrtc-$_webrtcver.tar.zst https://github.com/signalapp/Signal-FTS5-Extension/archive/refs/tags/v$_stokenizerver/stokenizer-$_stokenizerver.tar.gz bettersqlite-use-system-sqlcipher.patch + libsignal-auditable.patch libsignal-too-new-clang.patch libsignal-fix-build-rust-1.69.patch signal-disable-updates.patch signal-update-links.patch signal-tasje-whatever-the-fuck-is-ignore-doing-here.patch signal-show-window-please.patch + ringrtc-webrtc-renamed.patch + webrtc-shared-like-my-wife.patch webrtc-use-alpine-target.patch - webrtc-no-shared-deps-in-static-lib.patch + webrtc-gcc13.patch + webrtc-opus-is-ours.patch signal-desktop " @@ -106,7 +115,6 @@ export CPPFLAGS="$CPPFLAGS -D__DATE__= -D__TIME__= -D__TIMESTAMP__=" export CARGO_PROFILE_RELEASE_OPT_LEVEL=2 export CARGO_PROFILE_RELEASE_STRIP="symbols" -export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse" export RUSTFLAGS="$RUSTFLAGS -C linker=clang -C link-arg=-fuse-ld=lld" export YARN_CACHE_FOLDER="$srcdir/.yarn" @@ -120,7 +128,7 @@ snapshot() { rm -rf src rm -rf webrtc-$_webrtcver rm -f webrtc-$_webrtcver.tar - rm -f webrtc-$_webrtcver.tar.xz + rm -f webrtc-$_webrtcver.tar.zst echo " solutions = [{ @@ -155,10 +163,14 @@ target_cpu_only = True --exclude-vcs \ webrtc-$_webrtcver - xz -T0 -e -9 -vv -k webrtc-$_webrtcver.tar + zstd --ultra --long -22 -T4 -vv webrtc-$_webrtcver.tar } +# manual patches +default_prepare() { :; } + prepare() { + default_prepare msg "Applying patches" for x in $source; do case "$x" in @@ -189,26 +201,35 @@ prepare() { cd "$srcdir"/webrtc-$_webrtcver local use_system=" + brotli + crc32c + dav1d ffmpeg fontconfig freetype harfbuzz-ng icu + jsoncpp + libaom + libavif libdrm libevent libjpeg libpng + libvpx libwebp libxml libxslt + openh264 opus re2 snappy + woff2 zlib " for _lib in $use_system libjpeg_turbo; do msg "Removing buildscripts for system provided $_lib" - find . -type f -path "*third_party/$_lib/*" \ + find . -type f -path "*{third_party,ringrtc}/$_lib/*" \ \! -path "*third_party/$_lib/chromium/*" \ \! -path "*third_party/$_lib/google/*" \ \! -path './base/third_party/icu/*' \ @@ -309,15 +330,12 @@ build() { symbol_level=0 use_custom_libcxx=false use_sysroot=false - use_system_freetype=true - use_system_harfbuzz=true - use_system_libjpeg=true " mkdir -p "$srcdir"/ringrtc-$_ringrtcver/out/release msg "Building signal's webrtc" # shellcheck disable=2090,2116 gn gen "$srcdir"/ringrtc-$_ringrtcver/out/release --args="$(echo $webrtc_args)" - ninja -C "$srcdir"/ringrtc-$_ringrtcver/out/release webrtc + ninja -C "$srcdir"/ringrtc-$_ringrtcver/out/release signaldeswebrtc ) ( @@ -325,8 +343,10 @@ build() { msg "Building libringrtc" OUTPUT_DIR="$srcdir"/ringrtc-$_ringrtcver/out \ - cargo build --features electron --release + cargo auditable build --features electron --release + mkdir -p ../node/build/linux + cp -fv ../../out/release/libsignaldeswebrtc.so ../node/build/linux/libsignaldeswebrtc.so cp -fv target/release/libringrtc.so ../node/build/linux/libringrtc-$chromium_arch.node ) @@ -361,7 +381,7 @@ build() { cd "$srcdir"/Signal-FTS5-Extension-$_stokenizerver msg "Building signal tokenizer" - cargo build --features extension --release --frozen + cargo auditable build --features extension --release --frozen cbindgen --profile release . -o target/release/signal-tokenizer.h ) @@ -444,6 +464,9 @@ package() { cp -r resources/app.asar.unpacked "$pkgdir"/usr/lib/$pkgname/app.asar.unpacked install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop + # this should be in /usr/lib/signal-desktop. however, it does not simply work and I stopped to care + install -Dm755 "$srcdir"/ringrtc-$_ringrtcver/out/release/libsignaldeswebrtc.so "$pkgdir"/usr/lib/libsignaldeswebrtc.so + install -Dm755 "$srcdir"/$pkgname "$pkgdir"/usr/bin/$pkgname while read -r size; do @@ -452,19 +475,23 @@ package() { } sha512sums=" -0f6fa53d8e9b8fef9af074a8c626ff8f607dd7707ed80ed0b12fbb77186f322f5c8664b5df836c55b2ecac5b08575671a4665568fed5b99d588b78df27a1010e Signal-Desktop-6.16.0.tar.gz +2b479de6ea9f68ff98cebf90127ccfd29477e11c7bfed5fd7ef6a79649802edd27c549314e738b1eade66bd2dfc63d81ea2f8b50695b7a75f607efb01eb1acfa Signal-Desktop-6.25.0.tar.gz 9483c8d302728d6caa123f1fb9a977c7cb3aea09ecd1d2cfb3b19f2f2c66f884c41e37642c89db4eeeb0d607fddf281ba27ba4bd0a90e43b972d0cbc607e1483 libsignal-0.22.0.tar.gz -82a95e14460bb19c7f5a6a1b1effbe34ade2edee0ef4f35a2efd1dc4d58974f1da69c81762fcfa23675f9b58dc1b50f6ca5699dfaaf79ee38bc6c93e41b70742 ringrtc-2.26.2.tar.gz -2963e70caed8d67602ca8608ea4e418af90e34fbd8ce1532b4cc914eb8799a30b3e569ff0b8953838c3c71ae130d566a8a51ad1f1d84580987d1b44ca9d11f8a webrtc-5481b.tar.xz +858c0e41a8488b197133012cb067e5f3f5d2376347496c28d82d075eab930204987249ae8261cd3d7e84a1293f77bf3df8b750c9757fde54c90d1d0938a72ef0 ringrtc-2.28.1.tar.gz +2491d924ecbf85dd5a412bbd2d2802d88b94b40353450fc0f265fed4fe5cc975183d557faed243ab8fec866801b7636bee59a229bd8dba1977c377510410d8d0 webrtc-5615b.tar.zst 84a1f2fc29262a12842e94698d124a85b823128e72a493b0be8ea92fbb72c5c268499f4a6827cdedaae06ec73cce4039a39fe5c5d536cbef330e59ba0183da28 stokenizer-0.2.1.tar.gz be5b4e823543b79175a12314f10c6326d9f0d59f470136962daed4665887006acc05b48b40dc1b67747396d8f6f7d23be298c1e110ccdd35ff9b09d5e6b80bab bettersqlite-use-system-sqlcipher.patch +90d47914e30f095515c47c9ef7c763a7a2583a281228d6ea7e2a3444be670b3ae506c82b4fcea8a228f88f688a43c23c8dcef52b65805d2105287234550718a5 libsignal-auditable.patch 78be44ef201d9e6e127979a496f7244c8d93e936f85ad8753fea1646e6142f8a0dbff705ba612c8c724d19e6a9e89ccae254719326021818e04cccef452fc308 libsignal-too-new-clang.patch f2b39498192744fadb7e2b969979653a5bd84af0befcc0a9b2ac60f63a487cc2d0d90a0345c7e884c84b3759c62f07d97c576ef1e2b271bdd993893e26a45c5c libsignal-fix-build-rust-1.69.patch 60a45285d885922f5c21f64b761a10efbee9081baf3efa4c8c13abc6a43dc4d27662ed10e239b0fa2071ab9e3a0dbbb4b11d6e3d26fe2b74a19f39e72b74a5bd signal-disable-updates.patch d50eb5724502df9ea4d795db8cfc27af767c25168d7db2af512e615be7cc2ca290210a9ae78e1abb153c0198677e858ad3d74926c958099d0319295e7d9e7f1d signal-update-links.patch ae91177b9df6bd5ac5cdbe28e6b591138d2c4b057dde84596ac89fc46e94bf713da18f652346486ebb1c88e7035d595b757b099b160aafa2c7cf103dfb2db8ab signal-tasje-whatever-the-fuck-is-ignore-doing-here.patch 646d303fe58cae3f0896ae0275a66695b902fae6ddde7c568cc9798157dee9f45ceff907bc951fadc4c511d512a73d114b4e4f7c8914e2311c63929d29e1621a signal-show-window-please.patch +ab51b8fdcda1d8811213d2c5d8cb5d8457b478a02e23ce40f36b38ec56d45a3bd7a2d184720c27046f98a27771551cfad93c1290fe93856cc02695d318b33e47 ringrtc-webrtc-renamed.patch +9d92389637cdda83a0a7039fa6c52516d7bc491d0b1e42d5374b9d1f4fa7b9c930642f2dca896da17a2dc3344fa1bb97434c8dddd0539a4fedfd0dec809fc875 webrtc-shared-like-my-wife.patch 354f516a74c5491727afe084ef7688b3e1359d230daa720ffc30b33d3ea7579c9f37a50fbdc5fe2e8dc5322e42a0a39e4ae3449d4cf5b77daed2229bd743028c webrtc-use-alpine-target.patch -bab56a33265b5b094f161af1462166e371913a5269fe8e7d12e9f65ec4f5b908157406b3bcbcf73db15d03470445127d27c64fd731b6ea57c631aba3f4d302cb webrtc-no-shared-deps-in-static-lib.patch +78fdcbc66103ade6fd4fecae85a919c00344a96ac5a7ddd6fa708451d1cf24346d715e5b5dd6e0c4f9f42ececf781d3083e8833970f6fbc92578261001472a70 webrtc-gcc13.patch +51d6e6427b4dd5c6b4942d597917a628aebca34815f15894406e0e8f121c663261beab488d9f04e24fe1bbc4c055124667c3728b1db29a99e110887e89c88c63 webrtc-opus-is-ours.patch 87534e7b5ad7365509eab75629e6bd1a9ed61ee92f7e358405a0abaf0df57de14623fb3894eb082f8785422e5c087e1c50f9e2e5cafbb2529591fd7bf447f7f5 signal-desktop " diff --git a/backports/signal-desktop/libsignal-auditable.patch b/backports/signal-desktop/libsignal-auditable.patch new file mode 100644 index 0000000..ef7bf26 --- /dev/null +++ b/backports/signal-desktop/libsignal-auditable.patch @@ -0,0 +1,11 @@ +--- ./node/build_node_bridge.py.orig ++++ ./node/build_node_bridge.py +@@ -63,7 +63,7 @@ + + out_dir = options.out_dir.strip('"') or os.path.join('build', configuration_name) + +- cmdline = ['cargo', 'build', '--target', cargo_target, '-p', 'libsignal-node'] ++ cmdline = ['cargo', 'auditable', 'build', '--target', cargo_target, '-p', 'libsignal-node'] + if configuration_name == 'Release': + cmdline.append('--release') + print("Running '%s'" % (' '.join(cmdline))) diff --git a/backports/signal-desktop/ringrtc-webrtc-renamed.patch b/backports/signal-desktop/ringrtc-webrtc-renamed.patch new file mode 100644 index 0000000..2d2a61a --- /dev/null +++ b/backports/signal-desktop/ringrtc-webrtc-renamed.patch @@ -0,0 +1,21 @@ +--- ./src/rust/build.rs.orig ++++ ./src/rust/build.rs +@@ -41,15 +41,15 @@ + if cfg!(feature = "native") { + if let Ok(out_dir) = out_dir { + println!( +- "cargo:rustc-link-search=native={}/{}/obj/", ++ "cargo:rustc-link-search=native={}/{}/", + out_dir, build_type, + ); +- println!("cargo:rerun-if-changed={}/{}/obj/", out_dir, build_type,); ++ println!("cargo:rerun-if-changed={}/{}/", out_dir, build_type,); + } else { + println!("cargo:warning=No WebRTC output directory (OUTPUT_DIR) defined!"); + } + +- println!("cargo:rustc-link-lib=webrtc"); ++ println!("cargo:rustc-link-lib=dylib=signaldeswebrtc"); + + if cfg!(target_os = "macos") { + println!("cargo:rustc-link-lib=dylib=c++"); diff --git a/backports/signal-desktop/webrtc-gcc13.patch b/backports/signal-desktop/webrtc-gcc13.patch new file mode 100644 index 0000000..5bb7e34 --- /dev/null +++ b/backports/signal-desktop/webrtc-gcc13.patch @@ -0,0 +1,20 @@ +--- ./rtc_base/system/file_wrapper.h.orig ++++ ./rtc_base/system/file_wrapper.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + + #include + +--- ./rtc_base/third_party/base64/base64.h.orig ++++ ./rtc_base/third_party/base64/base64.h +@@ -12,6 +12,7 @@ + #ifndef RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ + #define RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_ + ++#include + #include + #include + diff --git a/backports/signal-desktop/webrtc-no-shared-deps-in-static-lib.patch b/backports/signal-desktop/webrtc-no-shared-deps-in-static-lib.patch deleted file mode 100644 index d2a83b2..0000000 --- a/backports/signal-desktop/webrtc-no-shared-deps-in-static-lib.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -480,11 +480,6 @@ - "rtc_base", - "sdk", - "video", -- -- # Added by RingRTC -- # Necessary for use_custom_libcxx=true, -- # which is in turn necessary for deploying to Ubuntu 16.04. -- "//build/config:shared_library_deps", - ] - - if (rtc_include_builtin_audio_codecs) { diff --git a/backports/signal-desktop/webrtc-opus-is-ours.patch b/backports/signal-desktop/webrtc-opus-is-ours.patch new file mode 100644 index 0000000..55688cb --- /dev/null +++ b/backports/signal-desktop/webrtc-opus-is-ours.patch @@ -0,0 +1,11 @@ +--- ./modules/audio_coding/BUILD.gn.orig ++++ ./modules/audio_coding/BUILD.gn +@@ -551,7 +551,7 @@ + + if (rtc_build_opus) { + deps += [ rtc_opus_dir ] +- public_configs = [ "//ringrtc/opus:opus_config" ] ++ public_configs = [ "//third_party/opus:opus_config" ] + } else if (build_with_mozilla) { + include_dirs = [ getenv("DIST") + "/include/opus" ] + } diff --git a/backports/signal-desktop/webrtc-shared-like-my-wife.patch b/backports/signal-desktop/webrtc-shared-like-my-wife.patch new file mode 100644 index 0000000..bd7115a --- /dev/null +++ b/backports/signal-desktop/webrtc-shared-like-my-wife.patch @@ -0,0 +1,28 @@ +--- ./BUILD.gn.orig ++++ ./BUILD.gn +@@ -38,7 +38,7 @@ + # 'ninja default' and then 'ninja all', the second build should do no work. + group("default") { + testonly = true +- deps = [ ":webrtc" ] ++ deps = [ ":signaldeswebrtc" ] + if (rtc_build_examples) { + deps += [ "examples" ] + } +@@ -464,7 +464,7 @@ + + if (!build_with_chromium) { + # Target to build all the WebRTC production code. +- rtc_static_library("webrtc") { ++ rtc_shared_library("signaldeswebrtc") { + # Only the root target and the test should depend on this. + visibility = [ + "//:default", +@@ -472,7 +472,6 @@ + ] + + sources = [] +- complete_static_lib = true + suppressed_configs += [ "//build/config/compiler:thin_archive" ] + defines = [] +