All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support
@ 2016-07-03 23:35 Romain Naour
  2016-07-03 23:35 ` [Buildroot] [PATCH v2 2/3] package/pulseaudio: explicitly enable/disable WebRTC support Romain Naour
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Romain Naour @ 2016-07-03 23:35 UTC (permalink / raw)
  To: buildroot

C++11 support is only required for WebRTC optional support but
pulseaudio can still be built with toolchains based on gcc 4.7 or older
witch doesn't have it.

Add a patch to make C++11 support optional and explicitely check for
gnu++11. Also stop the build only if no C++11 support has been found
and WebRTC support has been resquested.

Fixes:
http://autobuild.buildroot.net/results/d89/d897a94a8b6a52eba03d04c24536f554a7643000

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: keep original comments in configure.ac (Yann)
    fix syntax paramters to m4 macros (Yann)
---
 ...-C-11-is-only-required-for-WebRTC-support.patch | 41 ++++++++++++++++++++++
 package/pulseaudio/pulseaudio.mk                   |  3 ++
 2 files changed, 44 insertions(+)
 create mode 100644 package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch

diff --git a/package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch b/package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
new file mode 100644
index 0000000..b2c0651
--- /dev/null
+++ b/package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
@@ -0,0 +1,41 @@
+From 7af6cbe74d48a9853b60b029d4ce38a963386138 Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Sun, 3 Jul 2016 20:19:48 +0200
+Subject: [PATCH] webrtc: C++11 is only required for WebRTC support
+
+Make C++11 support optional and explicitely check for gnu++11.
+
+Stop the build only if no C++11 support has been found and WebRTC
+support has been resquested.
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ configure.ac | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4edc8e0..fea93a9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -84,7 +84,7 @@ AM_PROG_CC_C_O
+ # Only required if you want the WebRTC canceller -- no runtime dep on
+ # libstdc++ otherwise
+ AC_PROG_CXX
+-AX_CXX_COMPILE_STDCXX_11
++AX_CXX_COMPILE_STDCXX_11([ext],[optional])
+ AC_PROG_GCC_TRADITIONAL
+ AC_USE_SYSTEM_EXTENSIONS
+ 
+@@ -1414,6 +1414,9 @@ fi
+ AC_ARG_ENABLE([webrtc-aec],
+     AS_HELP_STRING([--enable-webrtc-aec], [Enable the optional WebRTC-based echo canceller]))
+ 
++AS_IF([test "x$enable_webrtc_aec" = "xyes" && test "$HAVE_CXX11" = "0"],
++    [AC_MSG_ERROR([*** webrtc-audio-processing needs C++11 support])])
++
+ AS_IF([test "x$enable_webrtc_aec" != "xno"],
+     [PKG_CHECK_MODULES(WEBRTC, [ webrtc-audio-processing >= 0.2 ], [HAVE_WEBRTC=1], [HAVE_WEBRTC=0])],
+     [HAVE_WEBRTC=0])
+-- 
+2.5.5
+
diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
index f50ea67..bc95d91 100644
--- a/package/pulseaudio/pulseaudio.mk
+++ b/package/pulseaudio/pulseaudio.mk
@@ -21,6 +21,9 @@ PULSEAUDIO_CONF_OPTS = \
 PULSE_AUDIO_CONF_ENV += \
 	ac_cv_header_atomic_ops_h=no
 
+# 0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
+PULSEAUDIO_AUTORECONF = YES
+
 PULSEAUDIO_DEPENDENCIES = \
 	host-pkgconf libtool json-c libsndfile speex host-intltool \
 	$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
-- 
2.5.5

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

* [Buildroot] [PATCH v2 2/3] package/pulseaudio: explicitly enable/disable WebRTC support
  2016-07-03 23:35 [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support Romain Naour
@ 2016-07-03 23:35 ` Romain Naour
  2016-07-03 23:35 ` [Buildroot] [PATCH v2 3/3] package/pulseaudio: fix typo Romain Naour
  2016-07-04 15:16 ` [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Romain Naour @ 2016-07-03 23:35 UTC (permalink / raw)
  To: buildroot

Currently, pulseaudio optionally depends on webrtc if it is enabled.

However, it is never explcitly enabled or disabled, although
pulseaudio's ./configure has --enable/disable-webrtc-aec.

Forcibly enable/disable webrtc support using those options.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
v2: rewrite comments (Yann)
---
 package/pulseaudio/pulseaudio.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
index bc95d91..9ef11bc 100644
--- a/package/pulseaudio/pulseaudio.mk
+++ b/package/pulseaudio/pulseaudio.mk
@@ -34,7 +34,6 @@ PULSEAUDIO_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
 	$(if $(BR2_PACKAGE_FFTW),fftw) \
-	$(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd)
 
 ifeq ($(BR2_PACKAGE_GDBM),y)
@@ -88,6 +87,13 @@ else
 PULSEAUDIO_CONF_OPTS += --disable-udev
 endif
 
+ifeq ($(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),y)
+PULSEAUDIO_CONF_OPTS += --enable-webrtc-aec
+PULSEAUDIO_DEPENDENCIES += webrtc-audio-processing
+else
+PULSEAUDIO_CONF_OPTS += --disable-webrtc-aec
+endif
+
 ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
 # The optional webrtc echo canceller is written in C++, causing auto* to want
 # to link module-echo-cancel.so with CXX even if webrtc ISN'T used.
-- 
2.5.5

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

* [Buildroot] [PATCH v2 3/3] package/pulseaudio: fix typo
  2016-07-03 23:35 [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support Romain Naour
  2016-07-03 23:35 ` [Buildroot] [PATCH v2 2/3] package/pulseaudio: explicitly enable/disable WebRTC support Romain Naour
@ 2016-07-03 23:35 ` Romain Naour
  2016-07-04 15:16 ` [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Romain Naour @ 2016-07-03 23:35 UTC (permalink / raw)
  To: buildroot

commit 7290dc1e87b23fe21c75c50b2238004273a0ec5c added
PULSE_AUDIO_CONF_ENV instead of PULSEAUDIO_CONF_ENV.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/pulseaudio/pulseaudio.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
index 9ef11bc..e0d9ab4 100644
--- a/package/pulseaudio/pulseaudio.mk
+++ b/package/pulseaudio/pulseaudio.mk
@@ -18,7 +18,7 @@ PULSEAUDIO_CONF_OPTS = \
 # Make sure we don't detect libatomic_ops. Indeed, since pulseaudio
 # requires json-c, which needs 4 bytes __sync builtins, there should
 # be no need for pulseaudio to rely on libatomic_ops.
-PULSE_AUDIO_CONF_ENV += \
+PULSEAUDIO_CONF_ENV += \
 	ac_cv_header_atomic_ops_h=no
 
 # 0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch
-- 
2.5.5

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

* [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support
  2016-07-03 23:35 [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support Romain Naour
  2016-07-03 23:35 ` [Buildroot] [PATCH v2 2/3] package/pulseaudio: explicitly enable/disable WebRTC support Romain Naour
  2016-07-03 23:35 ` [Buildroot] [PATCH v2 3/3] package/pulseaudio: fix typo Romain Naour
@ 2016-07-04 15:16 ` Thomas Petazzoni
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2016-07-04 15:16 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  4 Jul 2016 01:35:04 +0200, Romain Naour wrote:
> C++11 support is only required for WebRTC optional support but
> pulseaudio can still be built with toolchains based on gcc 4.7 or older
> witch doesn't have it.
> 
> Add a patch to make C++11 support optional and explicitely check for
> gnu++11. Also stop the build only if no C++11 support has been found
> and WebRTC support has been resquested.
> 
> Fixes:
> http://autobuild.buildroot.net/results/d89/d897a94a8b6a52eba03d04c24536f554a7643000
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
> v2: keep original comments in configure.ac (Yann)
>     fix syntax paramters to m4 macros (Yann)
> ---
>  ...-C-11-is-only-required-for-WebRTC-support.patch | 41 ++++++++++++++++++++++
>  package/pulseaudio/pulseaudio.mk                   |  3 ++
>  2 files changed, 44 insertions(+)
>  create mode 100644 package/pulseaudio/0002-webrtc-C-11-is-only-required-for-WebRTC-support.patch

Series applied, thanks. Please don't forget to send the patch
upstream to pulseaudio people.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-07-04 15:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-03 23:35 [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support Romain Naour
2016-07-03 23:35 ` [Buildroot] [PATCH v2 2/3] package/pulseaudio: explicitly enable/disable WebRTC support Romain Naour
2016-07-03 23:35 ` [Buildroot] [PATCH v2 3/3] package/pulseaudio: fix typo Romain Naour
2016-07-04 15:16 ` [Buildroot] [PATCH v2 1/3] package/pulseaudio: allow to build without C++11 support Thomas Petazzoni

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.