libsndfile package. Closes #1325
authorPeter Korsgaard <jacmet@sunsite.dk>
Tue, 24 Apr 2007 13:43:15 +0000 (13:43 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 24 Apr 2007 13:43:15 +0000 (13:43 -0000)
package/Config.in
package/libsndfile/Config.in [new file with mode: 0644]
package/libsndfile/libsndfile-srconly.patch [new file with mode: 0644]
package/libsndfile/libsndfile.mk [new file with mode: 0644]

index af6bec3980e31e98cc0d0ebf616bca8a0eac23be..e3753358c6221fc02198acf186e950ceaa6eaeef 100644 (file)
@@ -236,6 +236,7 @@ menuconfig BR2_AUDIO_SUPPORT
 if BR2_AUDIO_SUPPORT
 source "package/asterisk/Config.in"
 source "package/libmad/Config.in"
+source "package/libsndfile/Config.in"
 source "package/mpg123/Config.in"
 endif
 
diff --git a/package/libsndfile/Config.in b/package/libsndfile/Config.in
new file mode 100644 (file)
index 0000000..f813b5f
--- /dev/null
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBSNDFILE
+       bool "libsndfile"
+       default n
+       help
+           Libsndfile is a C library for reading and writing files containing 
+           sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) 
+           through one standard library interface.
+
diff --git a/package/libsndfile/libsndfile-srconly.patch b/package/libsndfile/libsndfile-srconly.patch
new file mode 100644 (file)
index 0000000..1796b80
--- /dev/null
@@ -0,0 +1,11 @@
+--- libsndfile-1.0.17/Makefile.in.orig 2006-12-06 17:26:46.000000000 +0100
++++ libsndfile-1.0.17/Makefile.in      2006-12-06 17:31:11.000000000 +0100
+@@ -209,7 +209,7 @@
+ target_cpu = @target_cpu@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+-SUBDIRS = man doc Win32 Octave src examples regtest tests
++SUBDIRS = src
+ DIST_SUBDIRS = $(SUBDIRS)
+ EXTRA_DIST = reconfigure.mk acinclude.m4 libsndfile.spec.in \
+                       sndfile.pc.in Mingw-make-dist.sh
diff --git a/package/libsndfile/libsndfile.mk b/package/libsndfile/libsndfile.mk
new file mode 100644 (file)
index 0000000..1a45141
--- /dev/null
@@ -0,0 +1,61 @@
+#############################################################
+#
+# libsndfile
+#
+#############################################################
+LIBSNDFILE_VER:=1.0.17
+LIBSNDFILE_SOURCE:=libsndfile-$(LIBSNDFILE_VER).tar.gz
+LIBSNDFILE_SITE:=http://www.mega-nerd.com/libsndfile/$(LIBUSB_SOURCE)
+LIBSNDFILE_DIR:=$(BUILD_DIR)/libsndfile-$(LIBSNDFILE_VER)
+LIBSNDFILE_BINARY:=libsndfile.sa
+LIBSNDFILE_TARGET_BINARY:=usr/lib/libsndfile.so
+
+$(DL_DIR)/$(LIBSNDFILE_SOURCE):
+       $(WGET) -P $(DL_DIR) $(LIBSNDFILE_SITE)/$(LIBSNDFILE_SOURCE)
+
+$(LIBSNDFILE_DIR)/.source: $(DL_DIR)/$(LIBSNDFILE_SOURCE)
+       $(ZCAT) $(DL_DIR)/$(LIBSNDFILE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       toolchain/patch-kernel.sh $(LIBSNDFILE_DIR) package/libsndfile/ \*.patch
+       touch $(LIBSNDFILE_DIR)/.source
+
+$(LIBSNDFILE_DIR)/.configured: $(LIBSNDFILE_DIR)/.source
+       (cd $(LIBSNDFILE_DIR); \
+               $(TARGET_CONFIGURE_OPTS) \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               ./configure \
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --prefix=/usr \
+               --sysconfdir=/etc \
+       );
+       touch $(LIBSNDFILE_DIR)/.configured;
+
+$(LIBSNDFILE_DIR)/$(LIBSNDFILE_BINARY): $(LIBSNDFILE_DIR)/.configured
+       $(MAKE) CC=$(TARGET_CC) -C $(LIBSNDFILE_DIR)
+
+$(TARGET_DIR)/$(LIBSNDFILE_TARGET_BINARY): $(LIBSNDFILE_DIR)/$(LIBSNDFILE_BINARY)
+       $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBSNDFILE_DIR) install
+       rm -Rf $(TARGET_DIR)/usr/man
+
+libsndfile: uclibc $(TARGET_DIR)/$(LIBSNDFILE_TARGET_BINARY)
+
+libsndfile-source: $(DL_DIR)/$(LIBSNDFILE_SOURCE)
+
+libsndfile-clean:
+       $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBSNDFILE_DIR) uninstall
+       -$(MAKE) -C $(LIBSNDFILE_DIR) clean
+
+libsndfile-dirclean:
+       rm -rf $(LIBSNDFILE_DIR)
+
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBSNDFILE)),y)
+TARGETS+=libsndfile
+endif
+