summary refs log tree commit diff
path: root/gnu/packages/audio.scm
diff options
context:
space:
mode:
authorAdam Faiz <adam.faiz@disroot.org>2022-12-20 16:19:21 +0800
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:44:34 +0200
commit7c092f727e3a68229c6821059c4c849a08025e82 (patch)
tree18c0c8e4132a91e556d1e3523fa590fb391924e2 /gnu/packages/audio.scm
parent84d4ee7e0c03fc24714daed751e755e655b721f2 (diff)
downloadguix-7c092f727e3a68229c6821059c4c849a08025e82.tar.gz
gnu: webrtc-audio-processing: Update to 1.0.
* gnu/packages/audio.scm (webrtc-audio-processing): Update to 1.0.
[source]: Add snippet that fixes building on riscv and powerpc
architectures.
[arguments]: Remove patch-source phase.
[build-system]: Update to meson-build-system.
[inputs]: Add abseil-cpp as input.
* gnu/packages/patches/webrtc-audio-processing-big-endian.patch: Update
to 1.0.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I3e4a9e34aa23336ab09d4d5f098abe8c53f32f9d
Diffstat (limited to 'gnu/packages/audio.scm')
-rw-r--r--gnu/packages/audio.scm74
1 files changed, 31 insertions, 43 deletions
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index bfe897ba23..f9da325377 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -305,55 +305,43 @@ displays a histogram of the roundtrip time jitter.")
 (define-public webrtc-audio-processing
   (package
     (name "webrtc-audio-processing")
-    (version "0.3.1")
+    (version "1.0")
     (source
      (origin
        (method url-fetch)
        (uri
         (string-append "http://freedesktop.org/software/pulseaudio/"
-                       name "/" name "-" version ".tar.xz"))
+                       name "/" name "-" version ".tar.gz"))
        (sha256
-        (base32 "1gsx7k77blfy171b6g3m0k0s0072v6jcawhmx1kjs9w5zlwdkzd0"))))
-    (build-system gnu-build-system)
-    (arguments
-     ;; TODO: Move this to a snippet/patch or remove with the upgrade to 1.0.
-     (if (or (target-riscv64?)
-             (target-powerpc?))
-       (list
-         #:phases
-         #~(modify-phases %standard-phases
-             (add-after 'unpack 'patch-source
-               (lambda* (#:key inputs #:allow-other-keys)
-                 (let ((patch-file
-                        #$(local-file
-                           (search-patch
-                             "webrtc-audio-processing-big-endian.patch"))))
-                   (invoke "patch" "--force" "-p1" "-i" patch-file)
-                   (substitute* "webrtc/typedefs.h"
-                     (("defined\\(__aarch64__\\)" all)
-                      (string-append
-                        ;; powerpc-linux
-                        "(defined(__PPC__) && __SIZEOF_SIZE_T__ == 4)\n"
-                        "#define WEBRTC_ARCH_32_BITS\n"
-                        "#define WEBRTC_ARCH_BIG_ENDIAN\n"
-                        ;; powerpc64-linux
-                        "#elif (defined(__PPC64__) && defined(_BIG_ENDIAN))\n"
-                        "#define WEBRTC_ARCH_64_BITS\n"
-                        "#define WEBRTC_ARCH_BIG_ENDIAN\n"
-                        ;; aarch64-linux
-                        "#elif " all
-                        ;; riscv64-linux
-                        " || (defined(__riscv) && __riscv_xlen == 64)"
-                        ;; powerpc64le-linux
-                        " || (defined(__PPC64__) && defined(_LITTLE_ENDIAN))"))))))))
-       '()))
-    (native-inputs
-     (if (or (target-riscv64?)
-             (target-powerpc?))
-       (list
-         (local-file (search-patch "webrtc-audio-processing-big-endian.patch"))
-         patch)
-       '()))
+        (base32 "0vwkw5xw8l37f5vbzbkipjsf03r7b8nnrfbfbhab8bkvf79306j4"))
+       (modules '((guix build utils)))
+       (snippet
+        #~(begin
+            ;; See:
+            ;; <https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/4>.
+            (substitute* "meson.build"
+              (("absl_flags_registry") "absl_flags_reflection"))
+            (substitute* "webrtc/rtc_base/system/arch.h"
+              (("defined\\(__aarch64__\\)" all)
+               (string-append
+                ;; powerpc-linux
+                "(defined(__PPC__) && __SIZEOF_SIZE_T__ == 4)\n"
+                "#define WEBRTC_ARCH_32_BITS\n"
+                "#define WEBRTC_ARCH_BIG_ENDIAN\n"
+                ;; powerpc64-linux
+                "#elif (defined(__PPC64__) && defined(_BIG_ENDIAN))\n"
+                "#define WEBRTC_ARCH_64_BITS\n"
+                "#define WEBRTC_ARCH_BIG_ENDIAN\n"
+                ;; aarch64-linux
+                "#elif " all
+                ;; riscv64-linux
+                " || (defined(__riscv) && __riscv_xlen == 64)"
+                ;; powerpc64le-linux
+                " || (defined(__PPC64__) && defined(_LITTLE_ENDIAN))")))))
+       (patches
+        (search-patches "webrtc-audio-processing-big-endian.patch"))))
+    (build-system meson-build-system)
+    (inputs (list abseil-cpp))
     (synopsis "WebRTC's Audio Processing Library")
     (description "WebRTC-Audio-Processing library based on Google's
 implementation of WebRTC.")