Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/pulseaudio: improve dependency handling
@ 2022-07-27 10:19 Fabrice Fontaine
  2022-07-27 13:25 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-07-27 10:19 UTC (permalink / raw)
  To: buildroot; +Cc: Bernd Kuhls, Fabrice Fontaine

- Use explicit options
- speex is optional, not mandatory
- lirc-tools and valgrind are optional dependencies (enabled by default)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/pulseaudio/Config.in     |  1 -
 package/pulseaudio/pulseaudio.mk | 65 ++++++++++++++++++++++++++++----
 2 files changed, 58 insertions(+), 8 deletions(-)

diff --git a/package/pulseaudio/Config.in b/package/pulseaudio/Config.in
index 0fcd7b16eb..337a64bf1d 100644
--- a/package/pulseaudio/Config.in
+++ b/package/pulseaudio/Config.in
@@ -22,7 +22,6 @@ config BR2_PACKAGE_PULSEAUDIO
 	select BR2_PACKAGE_LIBTOOL
 	select BR2_PACKAGE_LIBSNDFILE
 	select BR2_PACKAGE_PULSEAUDIO_ENABLE_ATOMIC
-	select BR2_PACKAGE_SPEEX
 	help
 	  PulseAudio is a sound system for POSIX OSes, meaning that it
 	  is a proxy for your sound applications. It allows you to do
diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk
index 5f6981ba0d..7b2d362316 100644
--- a/package/pulseaudio/pulseaudio.mk
+++ b/package/pulseaudio/pulseaudio.mk
@@ -20,16 +20,32 @@ PULSEAUDIO_CONF_OPTS = \
 	-Dtests=false
 
 PULSEAUDIO_DEPENDENCIES = \
-	host-pkgconf libtool libsndfile speex libglib2 \
-	$(TARGET_NLS_DEPENDENCIES) \
-	$(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
-	$(if $(BR2_PACKAGE_DBUS),dbus) \
-	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
-	$(if $(BR2_PACKAGE_FFTW_SINGLE),fftw-single) \
-	$(if $(BR2_PACKAGE_SYSTEMD),systemd)
+	host-pkgconf libtool libsndfile libglib2 \
+	$(TARGET_NLS_DEPENDENCIES)
 
 PULSEAUDIO_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
 
+ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y)
+PULSEAUDIO_CONF_OPTS += -Davahi=enabled
+PULSEAUDIO_DEPENDENCIES += avahi
+else
+PULSEAUDIO_CONF_OPTS += -Davahi=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_DBUS),y)
+PULSEAUDIO_CONF_OPTS += -Ddbus=enabled
+PULSEAUDIO_DEPENDENCIES += dbus
+else
+PULSEAUDIO_CONF_OPTS += -Ddbus=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
+PULSEAUDIO_CONF_OPTS += -Dfftw=enabled
+PULSEAUDIO_DEPENDENCIES += fftw-single
+else
+PULSEAUDIO_CONF_OPTS += -Dfftw=disabled
+endif
+
 ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
 PULSEAUDIO_CONF_OPTS += -Dsamplerate=enabled
 PULSEAUDIO_DEPENDENCIES += libsamplerate
@@ -58,6 +74,20 @@ PULSEAUDIO_CFLAGS = $(TARGET_CFLAGS) -DAO_NO_SPARC_V9
 endif
 endif
 
+ifeq ($(BR2_PACKAGE_LIRC_TOOLS),y)
+PULSEAUDIO_DEPENDENCIES += lirc-tools
+PULSEAUDIO_CONF_OPTS += -Dlirc=enabled
+else
+PULSEAUDIO_CONF_OPTS += -Dlirc=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+PULSEAUDIO_CONF_OPTS += -Dopenssl=enabled
+PULSEAUDIO_DEPENDENCIES += openssl
+else
+PULSEAUDIO_CONF_OPTS += -Dopenssl=disabled
+endif
+
 ifeq ($(BR2_PACKAGE_ORC),y)
 PULSEAUDIO_DEPENDENCIES += orc
 PULSEAUDIO_CONF_ENV += ORCC=$(HOST_DIR)/bin/orcc
@@ -132,6 +162,27 @@ else
 PULSEAUDIO_CONF_OPTS += -Dx11=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_SPEEX),y)
+PULSEAUDIO_CONF_OPTS += -Dspeex=enabled
+PULSEAUDIO_DEPENDENCIES += speex
+else
+PULSEAUDIO_CONF_OPTS += -Dspeex=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+PULSEAUDIO_CONF_OPTS += -Dsystemd=enabled
+PULSEAUDIO_DEPENDENCIES += systemd
+else
+PULSEAUDIO_CONF_OPTS += -Dsystemd=disabled
+endif
+
+ifeq ($(BR2_PACKAGE_VALGRIND),y)
+PULSEAUDIO_CONF_OPTS += -Dvalgrind=enabled
+PULSEAUDIO_DEPENDENCIES += valgrind
+else
+PULSEAUDIO_CONF_OPTS += -Dvalgrind=disabled
+endif
+
 # ConsoleKit module init failure breaks user daemon startup
 define PULSEAUDIO_REMOVE_CONSOLE_KIT
 	rm -f $(TARGET_DIR)/usr/lib/pulse-$(PULSEAUDIO_VERSION)/modules/module-console-kit.so
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/pulseaudio: improve dependency handling
  2022-07-27 10:19 [Buildroot] [PATCH 1/1] package/pulseaudio: improve dependency handling Fabrice Fontaine
@ 2022-07-27 13:25 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-27 13:25 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Bernd Kuhls, buildroot

On Wed, 27 Jul 2022 12:19:02 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> - Use explicit options
> - speex is optional, not mandatory
> - lirc-tools and valgrind are optional dependencies (enabled by default)
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/pulseaudio/Config.in     |  1 -
>  package/pulseaudio/pulseaudio.mk | 65 ++++++++++++++++++++++++++++----
>  2 files changed, 58 insertions(+), 8 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-07-27 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27 10:19 [Buildroot] [PATCH 1/1] package/pulseaudio: improve dependency handling Fabrice Fontaine
2022-07-27 13:25 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox