From dda56249ae75ae6bb7c8fcb7f4792682617fdf48 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sat, 5 Feb 2022 20:19:45 +0200 Subject: [PATCH] gnu: webrtc-audio-processing: Fix building on riscv64-linux. * gnu/packages/audio.scm (webrtc-audio-processing)[arguments]: Add phase on riscv64-linux to adjust headers to add support for riscv64-linux. --- gnu/packages/audio.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 22dd88ef0c..867011f473 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -4,7 +4,7 @@ ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Alex Kost ;;; Copyright © 2015, 2016 Mark H Weaver -;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner +;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner ;;; Copyright © 2016, 2017 Alex Griffin ;;; Copyright © 2016 Nikita ;;; Copyright © 2016 Lukas Gradl @@ -254,6 +254,19 @@ softsynth library that can be use with other applications.") (sha256 (base32 "1gsx7k77blfy171b6g3m0k0s0072v6jcawhmx1kjs9w5zlwdkzd0")))) (build-system gnu-build-system) + (arguments + ;; TODO: Move this to a snippet or remove with the upgrade to 1.0. + (if (target-riscv64?) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda _ + (substitute* "webrtc/typedefs.h" + (("defined\\(__aarch64__\\)" all) + (string-append + all " || (defined(__riscv) && __riscv_xlen == 64)"))))))) + '())) (synopsis "WebRTC's Audio Processing Library") (description "WebRTC-Audio-Processing library based on Google's implementation of WebRTC.")