ports/169767: audio/alsa-plugins: desync with oss plugin
Jan Beich
jbeich at tormail.org
Tue Jul 10 17:50:15 UTC 2012
The following reply was made to PR ports/169767; it has been noted by GNATS.
From: Jan Beich <jbeich at tormail.org>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: ports/169767: audio/alsa-plugins: desync with oss plugin
Date: Tue, 10 Jul 2012 10:43:35 -0700
--=-=-=
Content-Type: text/plain
Content-Disposition: inline
Here is more easy way to test.
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=vanilla.diff
Index: audio/alsa-plugins/Makefile
===================================================================
RCS file: /a/.csup/ports/audio/alsa-plugins/Makefile,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile
--- audio/alsa-plugins/Makefile 7 May 2012 15:23:52 -0000 1.5
+++ audio/alsa-plugins/Makefile 10 Jul 2012 17:40:53 -0000
@@ -25,6 +25,7 @@ LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS= JACK "JACK audio support (requires SAMPLERATE)" Off \
LAVC "libavcodec support" Off \
SAMPLERATE "libsamplerate support" Off \
+ FREEBSD_PATCH "FreeBSD-specific OSS plugin" Off \
PULSE "PulseAudio support" Off \
SPEEX "Speex support" Off
@@ -76,6 +77,7 @@ CONFIGURE_ARGS+= --without-speex
PLIST_SUB+= SPEEX="@comment "
.endif
+.if defined(WITH_FREEBSD_PATCH)
.if ${OSVERSION} > 900036 \
|| ${OSVERSION} > 802503 && ${OSVERSION} < 900000 \
|| ${OSVERSION} > 704000 && ${OSVERSION} < 800000
@@ -83,6 +85,7 @@ EXTRA_PATCHES+= ${FILESDIR}/alsa-plugins
.else # ${OSVERSION} <= 704000
EXTRA_PATCHES+= ${FILESDIR}/alsa-plugins.patch
.endif
+.endif
post-patch: .SILENT
${REINPLACE_CMD} -e '/LIBS/s/-ldl//g' \
Index: audio/alsa-plugins/files/alsa-plugins-getiptrfix.patch
===================================================================
RCS file: /a/.csup/ports/audio/alsa-plugins/files/alsa-plugins-getiptrfix.patch,v
retrieving revision 1.1
diff -u -p -r1.1 alsa-plugins-getiptrfix.patch
--- audio/alsa-plugins/files/alsa-plugins-getiptrfix.patch 7 May 2012 15:23:52 -0000 1.1
+++ audio/alsa-plugins/files/alsa-plugins-getiptrfix.patch 10 Jul 2012 17:31:11 -0000
@@ -1,29 +1,5 @@
---- jack/pcm_jack.c.orig 2009-09-16 04:33:36.000000000 +0800
-+++ jack/pcm_jack.c 2009-09-16 04:33:55.000000000 +0800
-@@ -20,7 +20,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <sys/shm.h>
- #include <sys/types.h>
- #include <sys/socket.h>
--- oss/ctl_oss.c.orig 2009-08-31 21:09:41.000000000 +0800
+++ oss/ctl_oss.c 2009-09-15 01:07:51.000000000 +0800
-@@ -26,7 +26,11 @@
- #include <sys/ioctl.h>
- #include <alsa/asoundlib.h>
- #include <alsa/control_external.h>
-+#ifdef __FreeBSD__
-+#include <sys/soundcard.h>
-+#else
- #include <linux/soundcard.h>
-+#endif
-
- typedef struct snd_ctl_oss {
- snd_ctl_ext_t ext;
@@ -362,7 +366,9 @@
{
snd_config_iterator_t it, next;
@@ -66,15 +42,12 @@
oss->ext.private_data = oss;
--- oss/pcm_oss.c.orig 2010-04-16 14:11:10.000000000 +0300
+++ oss/pcm_oss.c 2012-02-14 19:27:15.833934348 +0200
-@@ -22,17 +22,55 @@
- #include <sys/ioctl.h>
+@@ -27,16 +27,52 @@
#include <alsa/asoundlib.h>
#include <alsa/pcm_external.h>
+ #include <linux/soundcard.h>
+#ifdef __FreeBSD__
+#include <sys/param.h>
-+#include <sys/soundcard.h>
-+#else
- #include <linux/soundcard.h>
+#endif
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
Index: audio/alsa-plugins/files/alsa-plugins.patch
===================================================================
RCS file: /a/.csup/ports/audio/alsa-plugins/files/alsa-plugins.patch,v
retrieving revision 1.1
diff -u -p -r1.1 alsa-plugins.patch
--- audio/alsa-plugins/files/alsa-plugins.patch 7 May 2012 15:23:52 -0000 1.1
+++ audio/alsa-plugins/files/alsa-plugins.patch 10 Jul 2012 17:25:24 -0000
@@ -1,29 +1,5 @@
---- jack/pcm_jack.c.orig 2009-09-16 04:33:36.000000000 +0800
-+++ jack/pcm_jack.c 2009-09-16 04:33:55.000000000 +0800
-@@ -20,7 +20,9 @@
- *
- */
-
-+#ifndef __FreeBSD__
- #include <byteswap.h>
-+#endif
- #include <sys/shm.h>
- #include <sys/types.h>
- #include <sys/socket.h>
--- oss/ctl_oss.c.orig 2009-08-31 21:09:41.000000000 +0800
+++ oss/ctl_oss.c 2009-09-15 01:07:51.000000000 +0800
-@@ -26,7 +26,11 @@
- #include <sys/ioctl.h>
- #include <alsa/asoundlib.h>
- #include <alsa/control_external.h>
-+#ifdef __FreeBSD__
-+#include <sys/soundcard.h>
-+#else
- #include <linux/soundcard.h>
-+#endif
-
- typedef struct snd_ctl_oss {
- snd_ctl_ext_t ext;
@@ -362,7 +366,9 @@
{
snd_config_iterator_t it, next;
Index: audio/alsa-plugins/files/patch-jack-pcm_jack.c
===================================================================
RCS file: audio/alsa-plugins/files/patch-jack-pcm_jack.c
diff -N audio/alsa-plugins/files/patch-jack-pcm_jack.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ audio/alsa-plugins/files/patch-jack-pcm_jack.c 10 Jul 2012 17:22:40 -0000
@@ -0,0 +1,12 @@
+--- jack/pcm_jack.c.orig 2009-09-16 04:33:36.000000000 +0800
++++ jack/pcm_jack.c 2009-09-16 04:33:55.000000000 +0800
+@@ -20,7 +20,9 @@
+ *
+ */
+
++#ifndef __FreeBSD__
+ #include <byteswap.h>
++#endif
+ #include <sys/shm.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
Index: audio/alsa-plugins/files/patch-oss-ctl_oss.c
===================================================================
RCS file: audio/alsa-plugins/files/patch-oss-ctl_oss.c
diff -N audio/alsa-plugins/files/patch-oss-ctl_oss.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ audio/alsa-plugins/files/patch-oss-ctl_oss.c 10 Jul 2012 17:21:00 -0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/12/19 04:03:22 jmcneill Exp $
+
+--- oss/ctl_oss.c.orig 2008-10-29 08:42:13.000000000 -0400
++++ oss/ctl_oss.c
+@@ -26,7 +26,11 @@
+ #include <sys/ioctl.h>
+ #include <alsa/asoundlib.h>
+ #include <alsa/control_external.h>
++#ifdef __linux__
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+
+ typedef struct snd_ctl_oss {
+ snd_ctl_ext_t ext;
Index: audio/alsa-plugins/files/patch-oss-pcm_oss.c
===================================================================
RCS file: audio/alsa-plugins/files/patch-oss-pcm_oss.c
diff -N audio/alsa-plugins/files/patch-oss-pcm_oss.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ audio/alsa-plugins/files/patch-oss-pcm_oss.c 10 Jul 2012 17:30:39 -0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-ac,v 1.1.1.1 2008/12/19 04:03:22 jmcneill Exp $
+
+--- oss/pcm_oss.c.orig 2008-10-29 08:42:13.000000000 -0400
++++ oss/pcm_oss.c
+@@ -22,4 +22,8 @@
+ #include <sys/ioctl.h>
+ #include <alsa/asoundlib.h>
+ #include <alsa/pcm_external.h>
++#ifdef __linux__
+ #include <linux/soundcard.h>
++#else
++#include <sys/soundcard.h>
++#endif
+@@ -116,7 +120,7 @@ static int oss_drain(snd_pcm_ioplug_t *i
+ snd_pcm_oss_t *oss = io->private_data;
+
+ if (io->stream == SND_PCM_STREAM_PLAYBACK)
+- ioctl(oss->fd, SNDCTL_DSP_SYNC);
++ ioctl(oss->fd, SNDCTL_DSP_SYNC, NULL);
+ return 0;
+ }
+
+@@ -125,7 +129,7 @@ static int oss_prepare(snd_pcm_ioplug_t
+ snd_pcm_oss_t *oss = io->private_data;
+ int tmp;
+
+- ioctl(oss->fd, SNDCTL_DSP_RESET);
++ ioctl(oss->fd, SNDCTL_DSP_RESET, NULL);
+
+ tmp = io->channels;
+ if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
--=-=-=--
More information about the freebsd-ports-bugs
mailing list