From dd29e2a7377773a4db400bd3d1b6962fce95d441 Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 18 Oct 2002 13:26:12 +0000 Subject: Make this package OSS-aware. --- audio/libsndfile/Makefile | 16 ++++++--- audio/libsndfile/distinfo | 4 ++- audio/libsndfile/patches/patch-ac | 71 +++++++++++++++++++++++++++++++++++++++ audio/libsndfile/patches/patch-ad | 13 +++++++ 4 files changed, 99 insertions(+), 5 deletions(-) create mode 100644 audio/libsndfile/patches/patch-ac create mode 100644 audio/libsndfile/patches/patch-ad (limited to 'audio') diff --git a/audio/libsndfile/Makefile b/audio/libsndfile/Makefile index 46e68e04ef4..03773edf5d5 100644 --- a/audio/libsndfile/Makefile +++ b/audio/libsndfile/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2002/09/30 20:54:34 skrll Exp $ +# $NetBSD: Makefile,v 1.6 2002/10/18 13:26:12 jlam Exp $ # DISTNAME= libsndfile-1.0.1 @@ -9,9 +9,17 @@ MAINTAINER= dillo@giga.or.at HOMEPAGE= http://www.zipworld.com.au/~erikd/libsndfile/ COMMENT= library for reading and writing audio files -USE_LIBTOOL= YES +USE_BUILDLINK2= YES +GNU_CONFIGURE= YES +USE_LIBTOOL= YES LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig -GNU_CONFIGURE= YES -USE_BUILDLINK2= YES + +.include "../../mk/bsd.prefs.mk" + +.if defined(USE_OSS) +. include "../../mk/ossaudio.buildlink2.mk" +OSS_DEFS= -DDEV_DSP=\\\"${DEVOSSAUDIO}\\\" -DUSE_OSS=1 +MAKE_ENV+= AM_CFLAGS="${OSS_DEFS}" +.endif .include "../../mk/bsd.pkg.mk" diff --git a/audio/libsndfile/distinfo b/audio/libsndfile/distinfo index 51bc7ec1487..fe52490e841 100644 --- a/audio/libsndfile/distinfo +++ b/audio/libsndfile/distinfo @@ -1,6 +1,8 @@ -$NetBSD: distinfo,v 1.3 2002/09/30 20:54:34 skrll Exp $ +$NetBSD: distinfo,v 1.4 2002/10/18 13:26:12 jlam Exp $ SHA1 (libsndfile-1.0.1.tar.gz) = 223050ae8676b72e5859941edcf5706fd5635349 Size (libsndfile-1.0.1.tar.gz) = 539300 bytes SHA1 (patch-aa) = b6b0546bb87da67bd11c303942aa794666b0c05f SHA1 (patch-ab) = 68b80ce90db3e9f00e6729dc042f6189f4231409 +SHA1 (patch-ac) = 7d82013f1e4dbcdf59f066dc8c8614458f760c9e +SHA1 (patch-ad) = 93ca76ab0e1671abb44fddf5ab95d9102544aa57 diff --git a/audio/libsndfile/patches/patch-ac b/audio/libsndfile/patches/patch-ac new file mode 100644 index 00000000000..42a18e1f6f8 --- /dev/null +++ b/audio/libsndfile/patches/patch-ac @@ -0,0 +1,71 @@ +$NetBSD: patch-ac,v 1.1 2002/10/18 13:26:12 jlam Exp $ + +--- examples/sndfile-play.c.orig Mon Aug 5 18:50:55 2002 ++++ examples/sndfile-play.c +@@ -20,16 +20,21 @@ + #include + #include + +-#if defined (__linux__) ++#if defined (__linux__) || defined(USE_OSS) + #include + #include + #include + ++ #ifndef DEV_DSP ++ #define DEV_DSP "/dev/dsp" ++ #endif ++ + #elif (defined (__MACH__) && defined (__APPLE__)) + #include + #include + +-#elif (defined (sun) && defined (unix)) ++#elif (defined (sun) && defined (unix)) || \ ++ (defined (__NetBSD__) && !defined(USE_OSS)) + #include + #include + #include +@@ -49,7 +54,7 @@ + ** Linux/OSS functions for playing a sound. + */ + +-#if defined (__linux__) ++#if defined (__linux__) || defined(USE_OSS) + + static int linux_open_dsp_device (int channels, int srate) ; + +@@ -110,7 +115,7 @@ static int + linux_open_dsp_device (int channels, int srate) + { int fd, stereo, temp, error ; + +- if ((fd = open ("/dev/dsp", O_WRONLY, 0)) == -1) ++ if ((fd = open (DEV_DSP, O_WRONLY, 0)) == -1) + { perror("linux_open_dsp_device : open ") ; + exit (1) ; + } ; +@@ -468,7 +473,8 @@ win32_play (int argc, char *argv []) + ** Solaris. + */ + +-#if (defined (sun) && defined (unix)) /* ie Solaris */ ++#if (defined (sun) && defined (unix)) || \ ++ (defined (__NetBSD__) && !defined(USE_OSS)) + + static void + solaris_play (int argc, char *argv []) +@@ -562,11 +568,12 @@ main (int argc, char *argv []) + return 1 ; + } ; + +-#if defined (__linux__) ++#if defined (__linux__) || defined(USE_OSS) + linux_play (argc, argv) ; + #elif (defined (__MACH__) && defined (__APPLE__)) + macosx_play (argc, argv) ; +-#elif (defined (sun) && defined (unix)) ++#elif (defined (sun) && defined (unix)) || \ ++ (defined (__NetBSD__) && !defined(USE_OSS)) + solaris_play (argc, argv) ; + #elif (defined (_WIN32) || defined (WIN32)) + win32_play (argc, argv) ; diff --git a/audio/libsndfile/patches/patch-ad b/audio/libsndfile/patches/patch-ad new file mode 100644 index 00000000000..14145405d15 --- /dev/null +++ b/audio/libsndfile/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1 2002/10/18 13:26:13 jlam Exp $ + +--- examples/Makefile.in.orig Thu Oct 17 22:22:17 2002 ++++ examples/Makefile.in +@@ -107,7 +107,7 @@ sndfile_info_SOURCES = sndfile-info.c + sndfile_info_LDADD = $(SNDFILEDIR)/libsndfile.la -lm + + sndfile_play_SOURCES = sndfile-play.c +-sndfile_play_LDADD = $(SNDFILEDIR)/libsndfile.la -lm $(OS_SPECIFIC_LINKS) ++sndfile_play_LDADD = $(SNDFILEDIR)/libsndfile.la -lm $(OS_SPECIFIC_LINKS) $(LIBOSSAUDIO) + + sfconvert_SOURCES = sfconvert.c + sfconvert_LDADD = $(SNDFILEDIR)/libsndfile.la -lm -- cgit v1.2.3