pulseaudio: fix X11 + !locale build issue
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 6 Oct 2012 19:32:09 +0000 (21:32 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 6 Oct 2012 19:32:09 +0000 (21:32 +0200)
Fixes http://autobuild.buildroot.net/results/aa1072ee5115ce12f03d600b46ff980a9d20c45d/

Pulseaudio installs autostart .desktop files when X11 support is enabled,
but the files are not created from the corresponding .desktop.in files
when built with --disable-nls (which we add for !locale builds).

Reported upstream at: https://bugs.freedesktop.org/show_bug.cgi?id=54658

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/multimedia/pulseaudio/pulseaudio.mk

index b9638ac18a78e79b453d992cb4480bea6398ca42..6396fef439721675476eb7eace68f7827f6a0277 100644 (file)
@@ -57,6 +57,25 @@ ifneq ($(BR2_PACKAGE_LIBGTK2)$(BR2_PACKAGE_XORG),yy)
 PULSEAUDIO_CONF_OPT += --disable-gtk2
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_XLIB_LIBSM)$(BR2_PACKAGE_XLIB_LIBXTST),yyy)
+PULSEAUDIO_DEPENDENCIES += libxcb xlib_libSM xlib_libXtst
+
+# .desktop file generation needs nls support, so fake it for !locale builds
+# https://bugs.freedesktop.org/show_bug.cgi?id=54658
+ifneq ($(BR2_ENABLE_LOCALE),y)
+define PULSEAUDIO_FIXUP_DESKTOP_FILES
+       cp $(@D)/src/daemon/pulseaudio.desktop.in \
+          $(@D)/src/daemon/pulseaudio.desktop
+       cp $(@D)/src/daemon/pulseaudio-kde.desktop.in \
+          $(@D)/src/daemon/pulseaudio-kde.desktop
+endef
+PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FIXUP_DESKTOP_FILES
+endif
+
+else
+PULSEAUDIO_CONF_OPT += --disable-x11
+endif
+
 ifneq ($(BR2_PACKAGE_VALA),y)
 define PULSEAUDIO_REMOVE_VALA
        rm -rf $(TARGET_DIR)/usr/share/vala