From 417229f12ce5f330b303c0930ac03912d2fd5f16 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara <vittorio.giovara@savoirfairelinux.com> Date: Tue, 6 May 2014 13:51:43 -0400 Subject: [PATCH] contrib: add sndfile rules Change-Id: I7fb7a7f64feede2a925edcd8cbdf0191d9c70219 Refs: #46617 --- contrib/src/sndfile/SHA512SUMS | 1 + contrib/src/sndfile/carbon.patch | 10 ++++++++++ contrib/src/sndfile/rules.mak | 27 +++++++++++++++++++++++++++ contrib/src/sndfile/soundcard.patch | 16 ++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 contrib/src/sndfile/SHA512SUMS create mode 100644 contrib/src/sndfile/carbon.patch create mode 100644 contrib/src/sndfile/rules.mak create mode 100644 contrib/src/sndfile/soundcard.patch diff --git a/contrib/src/sndfile/SHA512SUMS b/contrib/src/sndfile/SHA512SUMS new file mode 100644 index 0000000000..ad45e4bd6d --- /dev/null +++ b/contrib/src/sndfile/SHA512SUMS @@ -0,0 +1 @@ +4ca9780ed0a915aca8a10ef91bf4bf48b05ecb85285c2c3fe7eef1d46d3e0747e61416b6bddbef369bd69adf4b796ff5f61380e0bc998906b170a93341ba6f78 libsndfile-1.0.25.tar.gz diff --git a/contrib/src/sndfile/carbon.patch b/contrib/src/sndfile/carbon.patch new file mode 100644 index 0000000000..22d89bae54 --- /dev/null +++ b/contrib/src/sndfile/carbon.patch @@ -0,0 +1,10 @@ +--- a/programs/sndfile-play.c.orig 2014-06-26 18:33:49.000000000 -0400 ++++ b/programs/sndfile-play.c 2014-06-26 18:33:52.000000000 -0400 +@@ -63,7 +63,6 @@ + #include <sys/soundcard.h> + + #elif (defined (__MACH__) && defined (__APPLE__)) +- #include <Carbon.h> + #include <CoreAudio/AudioHardware.h> + + #elif defined (HAVE_SNDIO_H) diff --git a/contrib/src/sndfile/rules.mak b/contrib/src/sndfile/rules.mak new file mode 100644 index 0000000000..5f5ff9c6e8 --- /dev/null +++ b/contrib/src/sndfile/rules.mak @@ -0,0 +1,27 @@ +# SNDFILE +SNDFILE_VERSION := 1.0.25 +SNDFILE_URL := http://www.mega-nerd.com/libsndfile/files/libsndfile-$(SNDFILE_VERSION).tar.gz + +PKGS += sndfile +ifeq ($(call need_pkg,"sndfile"),) +PKGS_FOUND += sndfile +endif + +DEPS_sndfile = ogg vorbis flac + +$(TARBALLS)/libsndfile-$(SNDFILE_VERSION).tar.gz: + $(call download,$(SNDFILE_URL)) + +.sum-sndfile: libsndfile-$(SNDFILE_VERSION).tar.gz + +sndfile: libsndfile-$(SNDFILE_VERSION).tar.gz .sum-sndfile + $(UNPACK) + $(APPLY) $(SRC)/sndfile/soundcard.patch + $(APPLY) $(SRC)/sndfile/carbon.patch + $(UPDATE_AUTOCONFIG) && cd $(UNPACK_DIR) && mv config.guess config.sub Cfg + $(MOVE) + +.sndfile: sndfile + cd $< && $(HOSTVARS) ./configure $(HOSTCONF) + cd $< && $(MAKE) install + touch $@ diff --git a/contrib/src/sndfile/soundcard.patch b/contrib/src/sndfile/soundcard.patch new file mode 100644 index 0000000000..298d0e12bb --- /dev/null +++ b/contrib/src/sndfile/soundcard.patch @@ -0,0 +1,16 @@ +--- a/programs/sndfile-play.c.orig 2014-06-12 16:00:39.348060215 -0400 ++++ b/programs/sndfile-play.c 2014-06-12 16:01:05.660059438 -0400 +@@ -52,7 +52,12 @@ + #include <sys/time.h> + #endif + +-#if defined (__linux__) || defined (__FreeBSD_kernel__) || defined (__FreeBSD__) ++#if defined(__ANDROID__) ++ #include <fcntl.h> ++ #include <sys/ioctl.h> ++ #include <linux/soundcard.h> ++ ++#elif defined (__linux__) || defined (__FreeBSD_kernel__) || defined (__FreeBSD__) + #include <fcntl.h> + #include <sys/ioctl.h> + #include <sys/soundcard.h> -- GitLab