From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1586237-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id E1C0515803E
	for <garchives@archives.gentoo.org>; Tue,  2 Jan 2024 04:40:15 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 230752BC02B;
	Tue,  2 Jan 2024 04:40:15 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id E77C22BC02B
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Jan 2024 04:40:14 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id BC5953406C2
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Jan 2024 04:40:13 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D77C31300
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Jan 2024 04:40:11 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1704170357.29cd0e622b574df6adff5704ab4e220709619767.sam@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/webrtc-audio-processing/files/, media-libs/webrtc-audio-processing/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-musl.patch media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-x86-no-sse.patch media-libs/webrtc-audio-processing/webrtc-audio-processing-1.3-r3.ebuild
X-VCS-Directories: media-libs/webrtc-audio-processing/ media-libs/webrtc-audio-processing/files/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 29cd0e622b574df6adff5704ab4e220709619767
X-VCS-Branch: master
Date: Tue,  2 Jan 2024 04:40:11 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: dff6f08f-5717-4adf-8a22-4ae19285268e
X-Archives-Hash: 18b6ce47be5c0fb8b5d11f365d92fda3

commit:     29cd0e622b574df6adff5704ab4e220709619767
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  2 04:36:56 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan  2 04:39:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29cd0e62

media-libs/webrtc-audio-processing: fix x86 w/o SSE

Tested with CFLAGS="-O2" CFLAGS_x86="-m32 -O2 -mno-sse -march=i686 -fcf-protection=none" e webrtc-audio-processing-1.3-r3.ebuild clean compile.

Closes: https://bugs.gentoo.org/918668
Closes: https://bugs.gentoo.org/921140
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/webrtc-audio-processing-1.3-musl.patch   | 34 ++++++++++++++++++
 .../webrtc-audio-processing-1.3-x86-no-sse.patch   | 13 +++++++
 .../webrtc-audio-processing-1.3-r3.ebuild          | 40 ++++++++++++++++++++++
 3 files changed, 87 insertions(+)

diff --git a/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-musl.patch b/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-musl.patch
new file mode 100644
index 000000000000..01e6e799a62b
--- /dev/null
+++ b/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-musl.patch
@@ -0,0 +1,34 @@
+https://bugs.gentoo.org/918668
+https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/37
+(see also https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/38)
+
+From de1b9c444df1ed66d72a4ab3d0e4dd2151037934 Mon Sep 17 00:00:00 2001
+From: Markus Volk <f_l_k@t-online.de>
+Date: Thu, 14 Sep 2023 16:12:32 +0200
+Subject: [PATCH] file_wrapper.h: add missing include for musl
+
+this fixes:
+| In file included from ../webrtc-audio-processing-1.3/webrtc/rtc_base/system/file_wrapper.cc:11:
+| ../webrtc-audio-processing-1.3/webrtc/rtc_base/system/file_wrapper.h:86:21: error: 'int64_t' has not been declared
+
+if built with musl libc
+
+Signed-off-by: Markus Volk <f_l_k@t-online.de>
+---
+ webrtc/rtc_base/system/file_wrapper.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/webrtc/rtc_base/system/file_wrapper.h b/webrtc/rtc_base/system/file_wrapper.h
+index 42c463c..c34d366 100644
+--- a/webrtc/rtc_base/system/file_wrapper.h
++++ b/webrtc/rtc_base/system/file_wrapper.h
+@@ -13,6 +13,7 @@
+ 
+ #include <stddef.h>
+ #include <stdio.h>
++#include <cstdint>
+ 
+ #include <string>
+ 
+-- 
+GitLab

diff --git a/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-x86-no-sse.patch b/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-1.3-x86-no-sse.patch
new file mode 100644
index 000000000000..c194dd9244e5
--- /dev/null
+++ b/media-libs/webrtc-audio-processing/files/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

diff --git a/media-libs/webrtc-audio-processing/webrtc-audio-processing-1.3-r3.ebuild b/media-libs/webrtc-audio-processing/webrtc-audio-processing-1.3-r3.ebuild
new file mode 100644
index 000000000000..33bf26456380
--- /dev/null
+++ b/media-libs/webrtc-audio-processing/webrtc-audio-processing-1.3-r3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit meson-multilib
+
+DESCRIPTION="AudioProcessing library from the webrtc.org codebase"
+HOMEPAGE="https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/"
+SRC_URI="https://freedesktop.org/software/pulseaudio/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="1"
+KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux"
+IUSE="cpu_flags_arm_neon"
+
+RDEPEND="dev-cpp/abseil-cpp:=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-1.3-Add-generic-byte-order-and-pointer-size-detection.patch"
+	"${FILESDIR}/${PN}-1.3-big-endian-support.patch"
+	"${FILESDIR}/${PN}-1.3-x86-no-sse.patch"
+	"${FILESDIR}/${PN}-1.3-musl.patch"
+)
+
+DOCS=( AUTHORS NEWS README.md )
+
+multilib_src_configure() {
+	if [[ ${ABI} == x86 ]] ; then
+		# bug #921140
+		local -x CPPFLAGS="${CPPFLAGS} -DPFFFT_SIMD_DISABLE"
+	fi
+
+	local emesonargs=(
+		-Dneon=$(usex cpu_flags_arm_neon yes no)
+	)
+	meson_src_configure
+}