From 4c2b62caea8564d6df9ea55a1fc72848c2af4887 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 29 Dec 2007 02:01:56 +0000 Subject: [PATCH] Add pulseaudio, but broken ! SVN-Revision: 10020 --- sound/pulseaudio/Makefile | 54 +++++++++++++++++++ .../patches/001-atomic_ops_headers.patch | 14 +++++ sound/pulseaudio/patches/002-shm_unlink.patch | 32 +++++++++++ 3 files changed, 100 insertions(+) create mode 100644 sound/pulseaudio/Makefile create mode 100644 sound/pulseaudio/patches/001-atomic_ops_headers.patch create mode 100644 sound/pulseaudio/patches/002-shm_unlink.patch diff --git a/sound/pulseaudio/Makefile b/sound/pulseaudio/Makefile new file mode 100644 index 0000000000..e41aaac2be --- /dev/null +++ b/sound/pulseaudio/Makefile @@ -0,0 +1,54 @@ +# +# Copyright (C) 2007 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=pulseaudio +PKG_VERSION:=0.9.8 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/pulseaudio/ +PKG_MD5SUM:=184a41d5947e583d395f0a2541525fc2 + +include $(INCLUDE_DIR)/package.mk + +define Package/pulseaudio + SECTION:=sound + CATEGORY:=Sound + DEPENDS:=+liboil +libsamplerate +libsndfile +libatomicops +libltdl @BROKEN + TITLE:=Network sound server + URL:=http://www.pulseaudio.org +endef + +CONFIGURE_ARGS += \ + --with-system-user=root \ + --with-system-group=root \ + --with-realtime-group=root \ + --with-access-group=root \ + --without-x \ + --enable-static-bins \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \ + LIBOIL_CFLAGS="-I$(STAGING_DIR)/usr/include/liboil-0.3/" \ + LIBOIL_LIBS="-L$(STAGING_DIR)/usr/lib/" \ + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \ + LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + X_CFLAGS="" \ + all install +endef + +define Package/pulseaudio/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/* $(1)/ +endef + +$(eval $(call BuildPackage,pulseaudio)) diff --git a/sound/pulseaudio/patches/001-atomic_ops_headers.patch b/sound/pulseaudio/patches/001-atomic_ops_headers.patch new file mode 100644 index 0000000000..dc5d392f22 --- /dev/null +++ b/sound/pulseaudio/patches/001-atomic_ops_headers.patch @@ -0,0 +1,14 @@ +diff -urN pulseaudio-0.9.7/configure pulseaudio-0.9.7.new/configure +--- pulseaudio-0.9.7/configure 2007-10-30 17:02:51.000000000 +0100 ++++ pulseaudio-0.9.7.new/configure 2007-11-11 20:39:27.000000000 +0100 +@@ -29636,8 +29636,7 @@ + else + + { { echo "$as_me:$LINENO: error: *** libatomic-ops headers not found" >&5 +-echo "$as_me: error: *** libatomic-ops headers not found" >&2;} +- { (exit 1); exit 1; }; } ++echo "$as_me: error: *** libatomic-ops headers not found" >&2;} } + + fi + + diff --git a/sound/pulseaudio/patches/002-shm_unlink.patch b/sound/pulseaudio/patches/002-shm_unlink.patch new file mode 100644 index 0000000000..edc6dc4995 --- /dev/null +++ b/sound/pulseaudio/patches/002-shm_unlink.patch @@ -0,0 +1,32 @@ +diff -urN pulseaudio-0.9.7/src/pulsecore/shm.c pulseaudio-0.9.7.new/src/pulsecore/shm.c +--- pulseaudio-0.9.7/src/pulsecore/shm.c 2007-10-28 20:13:53.000000000 +0100 ++++ pulseaudio-0.9.7.new/src/pulsecore/shm.c 2007-12-09 19:25:03.000000000 +0100 +@@ -167,7 +167,7 @@ + + fail: + +-#ifdef HAVE_SHM_OPEN ++#ifdef HAVE_SHM_UNLINK + if (fd >= 0) { + shm_unlink(fn); + pa_close(fd); +@@ -196,7 +196,7 @@ + pa_xfree(m->ptr); + #endif + } else { +-#ifdef HAVE_SHM_OPEN ++#ifdef HAVE_SHM_UNLINK + if (munmap(m->ptr, m->size) < 0) + pa_log("munmap() failed: %s", pa_cstrerror(errno)); + +@@ -370,8 +370,10 @@ + /* Ok, the owner of this shms segment is dead, so, let's remove the segment */ + segment_name(fn, sizeof(fn), id); + ++#ifdef HAVE_SHM_UNLINK + if (shm_unlink(fn) < 0 && errno != EACCES) + pa_log_warn("Failed to remove SHM segment %s: %s\n", fn, pa_cstrerror(errno)); ++#endif + } + + closedir(d); -- 2.30.2