]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/multimedia/pulseaudio/pulseaudio.mk
pulseaudio: remove dependency on gettext
[coffee/buildroot.git] / package / multimedia / pulseaudio / pulseaudio.mk
1 ################################################################################
2 #
3 # pulseaudio
4 #
5 ################################################################################
6
7 PULSEAUDIO_VERSION = 4.0
8 PULSEAUDIO_SITE = http://freedesktop.org/software/pulseaudio/releases/
9 PULSEAUDIO_INSTALL_STAGING = YES
10 PULSEAUDIO_LICENSE = LGPLv2.1+ (specific license for modules, see LICENSE file)
11 PULSEAUDIO_LICENSE_FILES = LICENSE GPL LGPL
12 PULSEAUDIO_CONF_OPT = \
13         --localstatedir=/var \
14         --disable-default-build-tests \
15         --disable-legacy-runtime-dir \
16         --disable-legacy-database-entry-format \
17         $(if $(BR2_HAVE_DOCUMENTATION),,--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_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_OPT += --enable-orc
39 else
40 PULSEAUDIO_CONF_OPT += --disable-orc
41 endif
42
43 ifneq ($(BR2_INSTALL_LIBSTDCPP),y)
44 # The optional webrtc echo canceller is written in C++, causing auto* to want
45 # to link module-echo-cancel.so with CXX even if webrtc ISN'T used.
46 # If we don't have C++ support enabled in BR, CXX will point to /bin/false,
47 # which makes configure think we aren't able to create C++ .so files
48 # (arguable true), breaking the build when it tries to install the .so
49 # workaround it by patching up the libtool invocations to use C mode instead
50 define PULSEAUDIO_FORCE_CC
51         $(SED) 's/--tag=CXX/--tag=CC/g' -e 's/(CXXLD)/(CCLD)/g' \
52                 $(@D)/src/Makefile.in
53 endef
54
55 PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FORCE_CC
56 endif
57
58 PULSEAUDIO_CONF_OPT += $(if $(BR2_ARM_ENABLE_NEON),--enable-neon-opt=yes,--enable-neon-opt=no)
59 # pulseaudio alsa backend needs pcm/mixer apis
60 ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy)
61 PULSEAUDIO_CONF_OPT += --disable-alsa
62 endif
63
64 ifeq ($(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_XLIB_LIBSM)$(BR2_PACKAGE_XLIB_LIBXTST),yyy)
65 PULSEAUDIO_DEPENDENCIES += libxcb xlib_libSM xlib_libXtst
66
67 # .desktop file generation needs nls support, so fake it for !locale builds
68 # https://bugs.freedesktop.org/show_bug.cgi?id=54658
69 ifneq ($(BR2_ENABLE_LOCALE),y)
70 define PULSEAUDIO_FIXUP_DESKTOP_FILES
71         cp $(@D)/src/daemon/pulseaudio.desktop.in \
72            $(@D)/src/daemon/pulseaudio.desktop
73         cp $(@D)/src/daemon/pulseaudio-kde.desktop.in \
74            $(@D)/src/daemon/pulseaudio-kde.desktop
75 endef
76 PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FIXUP_DESKTOP_FILES
77 endif
78
79 else
80 PULSEAUDIO_CONF_OPT += --disable-x11
81 endif
82
83 ifneq ($(BR2_PACKAGE_VALA),y)
84 define PULSEAUDIO_REMOVE_VALA
85         rm -rf $(TARGET_DIR)/usr/share/vala
86 endef
87
88 PULSEAUDIO_POST_INSTALL_TARGET_HOOKS += PULSEAUDIO_REMOVE_VALA
89 endif
90
91 ifeq ($(BR2_PACKAGE_PULSEAUDIO_DAEMON),y)
92 define PULSEAUDIO_USERS
93         pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access
94 endef
95
96 define PULSEAUDIO_INSTALL_INIT_SYSV
97         $(INSTALL) -D -m 755 package/multimedia/pulseaudio/S50pulseaudio \
98                 $(TARGET_DIR)/etc/init.d/S50pulseaudio
99 endef
100
101 endif
102
103 $(eval $(autotools-package))