1 ################################################################################
5 ################################################################################
7 PULSEAUDIO_VERSION = 5.0
8 PULSEAUDIO_SOURCE = pulseaudio-$(PULSEAUDIO_VERSION).tar.xz
9 PULSEAUDIO_SITE = http://freedesktop.org/software/pulseaudio/releases
10 PULSEAUDIO_INSTALL_STAGING = YES
11 PULSEAUDIO_LICENSE = LGPLv2.1+ (specific license for modules, see LICENSE file)
12 PULSEAUDIO_LICENSE_FILES = LICENSE GPL LGPL
13 PULSEAUDIO_CONF_OPTS = \
14 --disable-default-build-tests \
15 --disable-legacy-runtime-dir \
16 --disable-legacy-database-entry-format \
19 PULSEAUDIO_DEPENDENCIES = \
20 host-pkgconf libtool json-c libsndfile speex host-intltool \
21 $(if $(BR2_PACKAGE_LIBATOMIC_OPS),libatomic_ops) \
22 $(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \
23 $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \
24 $(if $(BR2_PACKAGE_LIBGLIB2),libglib2) \
25 $(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
26 $(if $(BR2_PACKAGE_DBUS),dbus) \
27 $(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \
28 $(if $(BR2_PACKAGE_HAS_UDEV),udev) \
29 $(if $(BR2_PACKAGE_OPENSSL),openssl) \
30 $(if $(BR2_PACKAGE_FFTW),fftw) \
31 $(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \
32 $(if $(BR2_PACKAGE_SYSTEMD),systemd)
35 ifeq ($(BR2_PACKAGE_ORC),y)
36 PULSEAUDIO_DEPENDENCIES += orc
37 PULSEAUDIO_CONF_ENV += ORCC=$(HOST_DIR)/usr/bin/orcc
38 PULSEAUDIO_CONF_OPTS += --enable-orc
40 PULSEAUDIO_CONF_OPTS += --disable-orc
43 ifeq ($(BR2_PACKAGE_LIBCAP),y)
44 PULSEAUDIO_DEPENDENCIES += libcap
45 PULSEAUDIO_CONF_OPTS += --with-caps
47 PULSEAUDIO_CONF_OPTS += --without-caps
50 # gtk3 support needs X11 backend
51 ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
52 PULSEAUDIO_DEPENDENCIES += libgtk3
53 PULSEAUDIO_CONF_OPTS += --enable-gtk3
55 PULSEAUDIO_CONF_OPTS += --disable-gtk3
58 ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
59 # The optional webrtc echo canceller is written in C++, causing auto* to want
60 # to link module-echo-cancel.so with CXX even if webrtc ISN'T used.
61 # If we don't have C++ support enabled in BR, CXX will point to /bin/false,
62 # which makes configure think we aren't able to create C++ .so files
63 # (arguable true), breaking the build when it tries to install the .so
64 # workaround it by patching up the libtool invocations to use C mode instead
65 define PULSEAUDIO_FORCE_CC
66 $(SED) 's/--tag=CXX/--tag=CC/g' -e 's/(CXXLD)/(CCLD)/g' \
70 PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FORCE_CC
73 # neon intrinsics not available with float-abi=soft
74 ifeq ($(BR2_ARM_SOFT_FLOAT),)
75 ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
76 PULSEAUDIO_USE_NEON = y
80 ifeq ($(PULSEAUDIO_USE_NEON),y)
81 PULSEAUDIO_CONF_OPTS += --enable-neon-opt=yes
83 PULSEAUDIO_CONF_OPTS += --enable-neon-opt=no
86 # pulseaudio alsa backend needs pcm/mixer apis
87 ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy)
88 PULSEAUDIO_CONF_OPTS += --disable-alsa
91 ifeq ($(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_XLIB_LIBSM)$(BR2_PACKAGE_XLIB_LIBXTST),yyy)
92 PULSEAUDIO_DEPENDENCIES += libxcb xlib_libSM xlib_libXtst
94 # .desktop file generation needs nls support, so fake it for !locale builds
95 # https://bugs.freedesktop.org/show_bug.cgi?id=54658
96 ifneq ($(BR2_ENABLE_LOCALE),y)
97 define PULSEAUDIO_FIXUP_DESKTOP_FILES
98 cp $(@D)/src/daemon/pulseaudio.desktop.in \
99 $(@D)/src/daemon/pulseaudio.desktop
100 cp $(@D)/src/daemon/pulseaudio-kde.desktop.in \
101 $(@D)/src/daemon/pulseaudio-kde.desktop
103 PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FIXUP_DESKTOP_FILES
107 PULSEAUDIO_CONF_OPTS += --disable-x11
110 define PULSEAUDIO_REMOVE_VALA
111 rm -rf $(TARGET_DIR)/usr/share/vala
114 PULSEAUDIO_POST_INSTALL_TARGET_HOOKS += PULSEAUDIO_REMOVE_VALA
116 ifeq ($(BR2_PACKAGE_PULSEAUDIO_DAEMON),y)
117 define PULSEAUDIO_USERS
118 pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access
121 define PULSEAUDIO_INSTALL_INIT_SYSV
122 $(INSTALL) -D -m 755 package/pulseaudio/S50pulseaudio \
123 $(TARGET_DIR)/etc/init.d/S50pulseaudio
128 $(eval $(autotools-package))