all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#72469] [PATCH core-updates] gnu: webrtc-audio-processing: Fix build on i686.
@ 2024-08-04 18:28 Kaelyn Takata via Guix-patches via
  2024-08-21 15:38 ` bug#72469: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Kaelyn Takata via Guix-patches via @ 2024-08-04 18:28 UTC (permalink / raw)
  To: 72469; +Cc: Kaelyn Takata

* gnu/packages/audio.scm (webrtc-audio-processing): Fix build on i686.
* gnu/packages/patches/webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch
* gnu/packages/patches/webrtc-audio-processing-1.3-x86-no-sse.patch

Change-Id: I3a95e5e2794df0d51e005672b5d3e2d98f27b767
---
 gnu/packages/audio.scm                        | 11 ++++++-
 ...yte-order-and-pointer-size-detection.patch | 32 +++++++++++++++++++
 ...brtc-audio-processing-1.3-x86-no-sse.patch | 13 ++++++++
 3 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch
 create mode 100644 gnu/packages/patches/webrtc-audio-processing-1.3-x86-no-sse.patch

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 382bd77c47..7fd720a435 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -309,8 +309,17 @@ (define-public webrtc-audio-processing
         (string-append "http://freedesktop.org/software/pulseaudio/"
                        name "/" name "-" version ".tar.gz"))
        (sha256
-        (base32 "0xfvq5lxg612vfzk3zk6896zcb4cgrrb7fq76w9h40magz0jymcm"))))
+        (base32 "0xfvq5lxg612vfzk3zk6896zcb4cgrrb7fq76w9h40magz0jymcm"))
+       ;; See https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5
+       (patches
+        (search-patches
+         "webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch"
+         "webrtc-audio-processing-1.3-x86-no-sse.patch"))))
     (build-system meson-build-system)
+    (arguments
+     (if (target-x86-32?)
+         (list #:configure-flags #~(list "-Dc_args=-DPFFFT_SIMD_DISABLE"))
+         '()))
     (native-inputs (list pkg-config))
     (inputs (list abseil-cpp))
     (synopsis "WebRTC's Audio Processing Library")
diff --git a/gnu/packages/patches/webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch b/gnu/packages/patches/webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch
new file mode 100644
index 0000000000..e2d974afd9
--- /dev/null
+++ b/gnu/packages/patches/webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/917493
+https://sources.debian.org/src/webrtc-audio-processing/1.0-0.2/debian/patches/Add-generic-byte-order-and-pointer-size-detection.patch/
+
+Description: Add generic byte order and pointer size detection
+Author: Than <than@redhat.com>
+Origin: https://bugs.freedesktop.org/show_bug.cgi?id=95738#c4
+Last-Update: 2022-02-01
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/webrtc/rtc_base/system/arch.h
++++ b/webrtc/rtc_base/system/arch.h
+@@ -58,7 +58,19 @@
+ #define WEBRTC_ARCH_32_BITS
+ #define WEBRTC_ARCH_LITTLE_ENDIAN
+ #else
+-#error Please add support for your architecture in rtc_base/system/arch.h
++/* instead of failing, use typical unix defines... */
++#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
++#define WEBRTC_ARCH_LITTLE_ENDIAN
++#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++#define WEBRTC_ARCH_BIG_ENDIAN
++#else
++#error __BYTE_ORDER__ is not defined
++#endif
++#if defined(__LP64__)
++#define WEBRTC_ARCH_64_BITS
++#else
++#define WEBRTC_ARCH_32_BITS
++#endif
+ #endif
+ 
+ #if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN))
diff --git a/gnu/packages/patches/webrtc-audio-processing-1.3-x86-no-sse.patch b/gnu/packages/patches/webrtc-audio-processing-1.3-x86-no-sse.patch
new file mode 100644
index 0000000000..c194dd9244
--- /dev/null
+++ b/gnu/packages/patches/webrtc-audio-processing-1.3-x86-no-sse.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/921140
+https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5
+--- a/webrtc/rtc_base/system/arch.h
++++ b/webrtc/rtc_base/system/arch.h
+@@ -34,7 +34,7 @@
+ #else
+ #define WEBRTC_ARCH_32_BITS
+ #endif
+-#elif defined(_M_IX86) || defined(__i386__)
++#elif defined(__SSE__) && (defined(_M_IX86) || defined(__i386__))
+ #define WEBRTC_ARCH_X86_FAMILY
+ #define WEBRTC_ARCH_X86
+ #define WEBRTC_ARCH_32_BITS

base-commit: baad95b19a24401cad8bee7290e5dbf3b3f38287
-- 
2.45.2






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#72469: [PATCH core-updates] gnu: webrtc-audio-processing: Fix build on i686.
  2024-08-04 18:28 [bug#72469] [PATCH core-updates] gnu: webrtc-audio-processing: Fix build on i686 Kaelyn Takata via Guix-patches via
@ 2024-08-21 15:38 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2024-08-21 15:38 UTC (permalink / raw)
  To: Kaelyn Takata; +Cc: 72469-done

Hi Kaelyn,

Kaelyn Takata <kaelyn.alexi@protonmail.com> skribis:

> * gnu/packages/audio.scm (webrtc-audio-processing): Fix build on i686.
> * gnu/packages/patches/webrtc-audio-processing-1.3-Add-generic-byte-order-and-pointer-size-detection.patch
> * gnu/packages/patches/webrtc-audio-processing-1.3-x86-no-sse.patch
>
> Change-Id: I3a95e5e2794df0d51e005672b5d3e2d98f27b767

Applied.  I added the patches to ‘gnu/local.mk’, shortened a bit the
file names, and more importantly I arranged so that the patches are
applied in a phase and only on i686-linux and powerpc64le-linux, to
avoid a rebuild on other architectures (‘webrtc-audio-processing’ has
~3K dependents).

Thank you!

Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-21 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-04 18:28 [bug#72469] [PATCH core-updates] gnu: webrtc-audio-processing: Fix build on i686 Kaelyn Takata via Guix-patches via
2024-08-21 15:38 ` bug#72469: " Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.