1 |
commit: 68a910e5e46ce5b2b51f3ff1358e7a2aeeacc678 |
2 |
Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 26 01:42:37 2017 +0000 |
4 |
Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 26 01:42:37 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68a910e5 |
7 |
|
8 |
media-libs/webrtc-audio-processing: use autoconf to properly detect |
9 |
cxxabi.h and execinfo.h |
10 |
|
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.3 |
12 |
|
13 |
...sing-0.3-proper_detection_cxxabi_execinfo.patch | 63 ++++++++++++++++++++++ |
14 |
.../webrtc-audio-processing-0.3.ebuild | 6 ++- |
15 |
2 files changed, 68 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-0.3-proper_detection_cxxabi_execinfo.patch b/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-0.3-proper_detection_cxxabi_execinfo.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..a0332db8e78 |
20 |
--- /dev/null |
21 |
+++ b/media-libs/webrtc-audio-processing/files/webrtc-audio-processing-0.3-proper_detection_cxxabi_execinfo.patch |
22 |
@@ -0,0 +1,63 @@ |
23 |
+From b7a166acaddc4c78afa2b653e25114d9114699f3 Mon Sep 17 00:00:00 2001 |
24 |
+From: Thomas Petazzoni <thomas.petazzoni@××××××××××××××.com> |
25 |
+Date: Sat, 6 Aug 2016 11:24:50 +0200 |
26 |
+Subject: [PATCH] Proper detection of cxxabi.h and execinfo.h |
27 |
+ |
28 |
+The current code in webrtc/base/checks.cc assumes that if __GLIBCXX__ is |
29 |
+defined and __UCLIBC__ is not defined, then both cxxabi.h and execinfo.h |
30 |
+will be available. |
31 |
+ |
32 |
+Unfortunately, this is not correct with the musl C library: |
33 |
+ |
34 |
+ - It defines __GLIBCXX__ |
35 |
+ - It does not define __UCLIBC__ (it's not uClibc after all!) |
36 |
+ - But it also doesn't provide execinfo.h |
37 |
+ |
38 |
+Therefore, in order to make things work properly, we switch to proper |
39 |
+autoconf checks for cxxabi.h and execinfo.h, and only use the backtrace |
40 |
+functionality if both are provided. |
41 |
+ |
42 |
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@××××××××××××××.com> |
43 |
+--- |
44 |
+ configure.ac | 2 ++ |
45 |
+ webrtc/base/checks.cc | 4 ++-- |
46 |
+ 2 files changed, 4 insertions(+), 2 deletions(-) |
47 |
+ |
48 |
+diff --git a/configure.ac b/configure.ac |
49 |
+index acbb3e2..ff4c752 100644 |
50 |
+--- a/configure.ac |
51 |
++++ b/configure.ac |
52 |
+@@ -45,6 +45,8 @@ AC_SUBST(GNUSTL_CFLAGS) |
53 |
+ # Borrowed from gst-plugins-bad |
54 |
+ AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes", HAVE_IOS="no", [-]) |
55 |
+ |
56 |
++AC_CHECK_HEADERS([cxxabi.h execinfo.h]) |
57 |
++ |
58 |
+ # Based on gst-plugins-bad configure.ac and defines in |
59 |
+ # <chromium source>/build/config/BUILDCONFIG.gn and |
60 |
+ # webrtc/BUILD.gn |
61 |
+diff --git a/webrtc/base/checks.cc b/webrtc/base/checks.cc |
62 |
+index 49a31f2..05d23a6 100644 |
63 |
+--- a/webrtc/base/checks.cc |
64 |
++++ b/webrtc/base/checks.cc |
65 |
+@@ -16,7 +16,7 @@ |
66 |
+ #include <cstdio> |
67 |
+ #include <cstdlib> |
68 |
+ |
69 |
+-#if defined(__GLIBCXX__) && !defined(__UCLIBC__) |
70 |
++#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H) |
71 |
+ #include <cxxabi.h> |
72 |
+ #include <execinfo.h> |
73 |
+ #endif |
74 |
+@@ -55,7 +55,7 @@ void PrintError(const char* format, ...) { |
75 |
+ // to get usable symbols on Linux. This is copied from V8. Chromium has a more |
76 |
+ // advanced stace trace system; also more difficult to copy. |
77 |
+ void DumpBacktrace() { |
78 |
+-#if defined(__GLIBCXX__) && !defined(__UCLIBC__) |
79 |
++#if defined(HAVE_CXX_ABI_H) && defined(HAVE_EXECINFO_H) |
80 |
+ void* trace[100]; |
81 |
+ int size = backtrace(trace, sizeof(trace) / sizeof(*trace)); |
82 |
+ char** symbols = backtrace_symbols(trace, size); |
83 |
+-- |
84 |
+2.7.4 |
85 |
+ |
86 |
|
87 |
diff --git a/media-libs/webrtc-audio-processing/webrtc-audio-processing-0.3.ebuild b/media-libs/webrtc-audio-processing/webrtc-audio-processing-0.3.ebuild |
88 |
index 28c7ac52659..b48c1061479 100644 |
89 |
--- a/media-libs/webrtc-audio-processing/webrtc-audio-processing-0.3.ebuild |
90 |
+++ b/media-libs/webrtc-audio-processing/webrtc-audio-processing-0.3.ebuild |
91 |
@@ -1,4 +1,4 @@ |
92 |
-# Copyright 1999-2016 Gentoo Foundation |
93 |
+# Copyright 1999-2017 Gentoo Foundation |
94 |
# Distributed under the terms of the GNU General Public License v2 |
95 |
|
96 |
EAPI=6 |
97 |
@@ -16,6 +16,10 @@ IUSE="static-libs" |
98 |
|
99 |
DOCS=( AUTHORS NEWS README.md ) |
100 |
|
101 |
+PATCHES=( |
102 |
+ "${FILESDIR}"/${PN}-0.3-proper_detection_cxxabi_execinfo.patch |
103 |
+) |
104 |
+ |
105 |
multilib_src_configure() { |
106 |
ECONF_SOURCE="${S}" \ |
107 |
econf |