diff options
author | Seungha Yang <seungha@centricular.com> | 2024-07-09 20:47:20 +0900 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2024-07-25 09:47:02 +0000 |
commit | e208b999d416f200a33287149b91872af457fa51 (patch) | |
tree | d1b397916de4524afee1058988baaa09766b0271 | |
parent | b3a36ada9457b1c58d5bb87208117a681420eea3 (diff) |
webrtc-audio-processing: Fix MinGW build
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1524>
3 files changed, 71 insertions, 0 deletions
diff --git a/recipes/webrtc-audio-processing.recipe b/recipes/webrtc-audio-processing.recipe index d144286b..c31dc31c 100644 --- a/recipes/webrtc-audio-processing.recipe +++ b/recipes/webrtc-audio-processing.recipe @@ -15,6 +15,12 @@ class Recipe(recipe.Recipe): # webrtc-audio-processing links to abseil statically meson_subprojects = ['abseil-cpp'] + patches = [ + # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/40 + 'webrtc-audio-processing/0001-build-Appease-MSYS2-UCRT64-GCC-13.patch', + 'webrtc-audio-processing/0002-file_wrapper.h-Fix-build-with-GCC13.patch', + ] + files_libs = [ 'libwebrtc-audio-coding-1', 'libwebrtc-audio-processing-1', diff --git a/recipes/webrtc-audio-processing/0001-build-Appease-MSYS2-UCRT64-GCC-13.patch b/recipes/webrtc-audio-processing/0001-build-Appease-MSYS2-UCRT64-GCC-13.patch new file mode 100644 index 00000000..75ac37f0 --- /dev/null +++ b/recipes/webrtc-audio-processing/0001-build-Appease-MSYS2-UCRT64-GCC-13.patch @@ -0,0 +1,38 @@ +From a949f1de2d7201de603e2f4fc66ed75636e39d80 Mon Sep 17 00:00:00 2001 +From: "L. E. Segovia" <amy@centricular.com> +Date: Sat, 23 Mar 2024 16:34:50 -0300 +Subject: [PATCH 1/2] build: Appease MSYS2 UCRT64 GCC 13 + +Undefining this macro makes GCC in standards C++ mode very unhappy: + +In file included from D:/msys64/ucrt64/include/c++/13.2.0/bits/requires_hosted.h:31, + from D:/msys64/ucrt64/include/c++/13.2.0/string:38, + from ..\subprojects\webrtc-audio-processing\webrtc/rtc_base/system/file_wrapper.h:17, + from ../subprojects/webrtc-audio-processing/webrtc/rtc_base/system/file_wrapper.cc:11: +D:/msys64/ucrt64/include/c++/13.2.0/x86_64-w64-mingw32/bits/c++config.h:666:2: warning: #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported" [-Wcpp] + 666 | #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported" + | ^~~~~~~ + +See: https://github.com/fmtlib/fmt/issues/2059#issue-761209068 + +See: #32 +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 3843e92..de07ded 100644 +--- a/meson.build ++++ b/meson.build +@@ -92,7 +92,7 @@ elif host_system == 'linux' + os_deps += [dependency('threads')] + have_posix = true + elif host_system == 'windows' +- platform_cflags += ['-DWEBRTC_WIN', '-D_WIN32', '-U__STRICT_ANSI__'] ++ platform_cflags += ['-DWEBRTC_WIN', '-D_WIN32'] + # this one is for MinGW to get format specifiers from inttypes.h in C++ + platform_cflags += ['-D__STDC_FORMAT_MACROS=1'] + # Avoid min/max from windows.h which breaks std::min/max +-- +2.44.0.windows.1 + diff --git a/recipes/webrtc-audio-processing/0002-file_wrapper.h-Fix-build-with-GCC13.patch b/recipes/webrtc-audio-processing/0002-file_wrapper.h-Fix-build-with-GCC13.patch new file mode 100644 index 00000000..b670a13d --- /dev/null +++ b/recipes/webrtc-audio-processing/0002-file_wrapper.h-Fix-build-with-GCC13.patch @@ -0,0 +1,27 @@ +From 9a202fb8c218223d24dfbbe6130053c68111e97a Mon Sep 17 00:00:00 2001 +From: "L. E. Segovia" <amy@centricular.com> +Date: Sat, 23 Mar 2024 16:34:50 -0300 +Subject: [PATCH 2/2] file_wrapper.h: Fix build with GCC13 + +It is a missed instance of cdec109331de34958a892a1418d67806b171b862 (!31). + +Fixes #32 +--- + 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..bfd8fcd 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 <stdint.h> + + #include <string> + +-- +2.44.0.windows.1 + |