The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / pulseaudio / pulseaudio.mk
1 ################################################################################
2 #
3 # pulseaudio
4 #
5 ################################################################################
6
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 \
17         --disable-manpages
18
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)
33
34
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
39 else
40 PULSEAUDIO_CONF_OPTS += --disable-orc
41 endif
42
43 ifeq ($(BR2_PACKAGE_LIBCAP),y)
44 PULSEAUDIO_DEPENDENCIES += libcap
45 PULSEAUDIO_CONF_OPTS += --with-caps
46 else
47 PULSEAUDIO_CONF_OPTS += --without-caps
48 endif
49
50 # gtk3 support needs X11 backend
51 ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y)
52 PULSEAUDIO_DEPENDENCIES += libgtk3
53 PULSEAUDIO_CONF_OPTS += --enable-gtk3
54 else
55 PULSEAUDIO_CONF_OPTS += --disable-gtk3
56 endif
57
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' \
67                 $(@D)/src/Makefile.in
68 endef
69
70 PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FORCE_CC
71 endif
72
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
77 endif
78 endif
79
80 ifeq ($(PULSEAUDIO_USE_NEON),y)
81 PULSEAUDIO_CONF_OPTS += --enable-neon-opt=yes
82 else
83 PULSEAUDIO_CONF_OPTS += --enable-neon-opt=no
84 endif
85
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
89 endif
90
91 ifeq ($(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_XLIB_LIBSM)$(BR2_PACKAGE_XLIB_LIBXTST),yyy)
92 PULSEAUDIO_DEPENDENCIES += libxcb xlib_libSM xlib_libXtst
93
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
102 endef
103 PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FIXUP_DESKTOP_FILES
104 endif
105
106 else
107 PULSEAUDIO_CONF_OPTS += --disable-x11
108 endif
109
110 define PULSEAUDIO_REMOVE_VALA
111         rm -rf $(TARGET_DIR)/usr/share/vala
112 endef
113
114 PULSEAUDIO_POST_INSTALL_TARGET_HOOKS += PULSEAUDIO_REMOVE_VALA
115
116 ifeq ($(BR2_PACKAGE_PULSEAUDIO_DAEMON),y)
117 define PULSEAUDIO_USERS
118         pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access
119 endef
120
121 define PULSEAUDIO_INSTALL_INIT_SYSV
122         $(INSTALL) -D -m 755 package/pulseaudio/S50pulseaudio \
123                 $(TARGET_DIR)/etc/init.d/S50pulseaudio
124 endef
125
126 endif
127
128 $(eval $(autotools-package))