On Fri, Jan 18, 2008 at 04:23:36PM -0500, Deanna Phillips wrote:
> As you may recall, a long-overdue update to esound was backed
> out at the last minute before the 4.2 release.  The thread is
> here:
> 
> http://marc.info/?l=openbsd-ports&m=118541595130336&w=2
> 
> I've just tried the 2.38 update on auich(4) and can't reproduce
> the problems we once had.
> 
> 2.38 also fixes some bugs with socket creation and cleanup that
> are causing micropolis to skip some sounds.  This bug can be
> reproduced by throwing many files at esdplay at once with
> something like 'for file in *.wav ; do esdplay $file& ; done',
> or running the Firebomb scenario in Micropolis and watching
> stderr.
> 
> esd should be able to mix those sounds (that's what it's for),
> but with the version in tree it gets very confused and skips
> some, fails to open the audio device or resample, etc.
> 
> So.  Here's Martynas's old diff pulled from cvs.
> 
> Anyone want to try again?

here's a new diff, with some improvements in the audio(4) interface,
and an -arts FLAVOR.  yes, arts depends on esd, so you have to build
a non-flavored esd, then arts, then -arts FLAVORed esd, and then
install the FLAVORed esd with pkg_add -r -F installed esd-arts.  after
all that, it has worked quite well in my testing.

-- 
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- Makefile    28 Oct 2006 10:30:41 -0000      1.39
+++ Makefile    10 Mar 2008 20:53:14 -0000
@@ -1,11 +1,10 @@
-# $OpenBSD: Makefile,v 1.39 2006/10/28 10:30:41 espie Exp $
+# $OpenBSD: Makefile,v 1.40 2007/06/26 17:10:29 martynas Exp $
 # $FreeBSD: Makefile,v 1.8 1999/03/09 01:08:46 nectar Exp $
 
 COMMENT=       "sound library for Enlightenment"
 
-DISTNAME=      esound-0.2.34
-PKGNAME=       ${DISTNAME}p0
-SHARED_LIBS += esd                  2.34     # .2.34
+DISTNAME=      esound-0.2.38
+SHARED_LIBS += esd                  2.40     # .2.38
 CATEGORIES=    audio
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/esound/0.2/}
 
@@ -20,16 +19,37 @@
 PERMIT_DISTFILES_FTP=  Yes
 WANTLIB=               c m wrap
 
+FLAVORS=       arts
+FLAVOR?=
+
 USE_LIBTOOL=   Yes
 SEPARATE_BUILD=        concurrent
-AUTOCONF_VERSION=2.13
+AUTOCONF_VERSION=2.61
 CONFIGURE_STYLE= autoconf
-CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
-CONFIGURE_ARGS+= --with-libwrap
+CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
+                --disable-alsa \
+                --disable-oss \
+                --with-libwrap
 # broken, relies upon v4-mapped addresses
 CONFIGURE_ARGS+= --disable-ipv6
 
+.if ${FLAVOR:L:Marts}
+CONFIGURE_ARGS+=--enable-arts
+MODULES+=      devel/gettext
+LIB_DEPENDS+=  artsc::x11/kde/arts3
+WANTLIB+=      glib-2.0 gthread-2.0 gmodule-2.0 pcre pthread stdc++
+.else
+CONFIGURE_ARGS+=--disable-arts
+.endif
+
+FAKE_FLAGS=    DESTDIR=${WRKINST} \
+               esdconfdir=${PREFIX}/share/examples/esound
+
 post-extract:
        @cp -f ${FILESDIR}/audio_sun.c ${WRKSRC}
+
+pre-configure:
+       @perl -pi -e 's|_LOCALBASE_|${LOCALBASE}|' \
+               ${WRKSRC}/test-script
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo    5 Apr 2007 15:37:41 -0000       1.6
+++ distinfo    10 Mar 2008 20:53:14 -0000
@@ -1,5 +1,5 @@
-MD5 (esound-0.2.34.tar.gz) = lSbU/7u9lGJ2izjAgscmxw==
-RMD160 (esound-0.2.34.tar.gz) = +/rAann7gX+e9h14CJRfe6h8ARA=
-SHA1 (esound-0.2.34.tar.gz) = T6H7MhIZl/6edQe/WvKWpkvAoiA=
-SHA256 (esound-0.2.34.tar.gz) = ass7wF3kshz9cpH93R9XwooxyHLuYGowp4ktAkLdznU=
-SIZE (esound-0.2.34.tar.gz) = 392336
+MD5 (esound-0.2.38.tar.gz) = d8TpgFoBf7oGVSSH3zxmYg==
+RMD160 (esound-0.2.38.tar.gz) = OwL3H38UZcIECjzwETbzHWJnfmE=
+SHA1 (esound-0.2.38.tar.gz) = QFQ9y1sVcsdwKwuwt1aEQEY1G6U=
+SHA256 (esound-0.2.38.tar.gz) = SKOU83d2M2JmBnlKUpTwHilOERTWzD54lMapDyImsGc=
+SIZE (esound-0.2.38.tar.gz) = 519964
Index: files/audio_sun.c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/files/audio_sun.c,v
retrieving revision 1.3
diff -u -r1.3 audio_sun.c
--- files/audio_sun.c   25 Jan 2004 22:07:28 -0000      1.3
+++ files/audio_sun.c   10 Mar 2008 20:53:14 -0000
@@ -27,7 +27,10 @@
 
 #include "config.h"
 
+#include <sys/types.h>
+#include <sys/ioctl.h>
 #include <sys/audioio.h>
+#include <string.h>
 
 static void sun_panic(int fd, char *s)
 {
@@ -48,9 +51,8 @@
 {
     const char *device;
     int afd = -1;
-    int fmt = 0, channels = 0;
+    int fmt = 0, channels = 0, bits = 0;
     int mode = O_WRONLY;
-    audio_encoding_t enc;
     audio_info_t info;
 
     AUDIO_INITINFO(&info);
@@ -58,13 +60,11 @@
     /* set the appropriate mode */
     if((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD) {
         mode = O_RDWR;
-       info.mode = AUMODE_PLAY | AUMODE_RECORD;
+       info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL | AUMODE_RECORD;
     } else {
-       info.mode = AUMODE_PLAY;
+       info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL;
     }
 
-    mode |= O_NONBLOCK;
-
     /* open the sound device */
     device = esd_audio_device ? esd_audio_device : "/dev/audio";
     if ((afd = open(device, mode, 0)) == -1) {
@@ -72,10 +72,6 @@
         return( -2 );
     }
 
-    mode = fcntl(afd, F_GETFL);
-    mode &= ~O_NONBLOCK;
-    fcntl(afd, F_SETFL, mode);
-
     /* set the requested mode */
     if(ioctl(afd, AUDIO_SETINFO, &info) < 0) {
        sun_panic(afd, "AUDIO_SETINFO");
@@ -91,22 +87,24 @@
     }
 
     /* pick a supported encoding */
-    
-#if defined(WORDS_BIGENDIAN)
-    fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
-        ? /* 16 bit */  AUDIO_ENCODING_SLINEAR_BE
-       : /* 8 bit */   AUDIO_ENCODING_PCM8;
-#else
-    fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
-        ? /* 16 bit */ AUDIO_ENCODING_SLINEAR_LE
-       : /* 8 bit */   AUDIO_ENCODING_PCM8;
-#endif
-
-    enc.index = 0;
-    while(!ioctl(afd, AUDIO_GETENC, &enc) && enc.encoding != fmt) {
-       enc.index++;
+    if ((esd_audio_format & ESD_MASK_BITS) == ESD_BITS16) {
+        bits = 16;
+        fmt = (BYTE_ORDER == 4321) ?
+          AUDIO_ENCODING_SLINEAR_BE : AUDIO_ENCODING_SLINEAR_LE;
+    } else {
+        bits = 8;
+        fmt = (BYTE_ORDER == 4321) ?
+          AUDIO_ENCODING_ULINEAR_BE : AUDIO_ENCODING_ULINEAR_LE;
+    }
+    info.play.encoding = fmt;
+    info.play.precision = bits;
+    if(ioctl(afd, AUDIO_SETINFO, &info) == -1) {
+       fprintf(stderr, "Unsupported encoding: %i-bit (0x%x)\n",
+           bits, fmt);
+       sun_panic(afd, "SETINFO");
+       return(-1);
     }
-    
+
     /* number of channels */
     channels = (((esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO)
         ? /* stereo */ 2
@@ -116,13 +114,19 @@
     if((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD) {
        info.record.channels = channels;
     }
-
-    info.play.encoding = fmt;
-    info.play.precision = enc.precision;
-
     if(ioctl(afd, AUDIO_SETINFO, &info) == -1) {
-       fprintf(stderr, "Unsupported encoding: %i-bit \"%s\" (0x%x)\n",
-           enc.precision, enc.name, fmt);
+       fprintf(stderr, "Unsupported channel count: %d\n",
+           channels);
+       sun_panic(afd, "SETINFO");
+       return(-1);
+    }
+
+    /* blocksize, a common power of 2 */
+    info.blocksize = 4096;
+    info.hiwat = 4;
+    if(ioctl(afd, AUDIO_SETINFO, &info) < 0) {
+       fprintf(stderr, "Unsupported blocksize: %d\n",
+           info.blocksize);
        sun_panic(afd, "SETINFO");
        return(-1);
     }
Index: patches/patch-Makefile.in
===================================================================
RCS file: patches/patch-Makefile.in
diff -N patches/patch-Makefile.in
--- patches/patch-Makefile.in   26 Jun 2004 04:38:33 -0000      1.6
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- Makefile.in.orig   Tue Mar 16 07:26:18 2004
-+++ Makefile.in        Thu Jun 24 20:07:12 2004
-@@ -180,7 +180,7 @@ esd_LDADD = $(WRAP_LIB) $(LDADD)
- m4datadir = $(datadir)/aclocal
- m4data_DATA = esd.m4
- 
--esdconfdir = $(sysconfdir)
-+esdconfdir = $(datadir)/examples/esound
- esdconf_DATA = esd.conf
- 
- pkgconfigdir = $(libdir)/pkgconfig
Index: patches/patch-acconfig_h
===================================================================
RCS file: patches/patch-acconfig_h
diff -N patches/patch-acconfig_h
--- patches/patch-acconfig_h    26 Jun 2004 04:38:33 -0000      1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- acconfig.h.orig    Thu Jan 15 05:49:09 2004
-+++ acconfig.h Thu Jun 24 20:09:24 2004
-@@ -11,6 +11,7 @@
- #undef DRIVER_ALSA_09_NEW_PCM_API
- #undef DRIVER_DART
- #undef DRIVER_COREAUDIO
-+#undef DRIVER_SUN
- #undef DRIVER_NONE
- #undef HAVE_INET_ATON
- #undef HAVE_INET_PTON
Index: patches/patch-audio_arts_c
===================================================================
RCS file: patches/patch-audio_arts_c
diff -N patches/patch-audio_arts_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-audio_arts_c  10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,89 @@
+$OpenBSD$
+--- audio_arts.c.orig  Thu Apr 19 07:43:59 2007
++++ audio_arts.c       Sun Mar  9 22:03:23 2008
+@@ -19,6 +19,7 @@
+  *
+  */
+ 
++#if 0
+ #include <dlfcn.h>
+ 
+ enum arts_parameter_t_enum { ARTS_P_BUFFER_TIME = 2 };
+@@ -37,14 +38,17 @@ static int (*arts_stream_set)(arts_stream_t sst, arts_
+ 
+ static arts_stream_t (*arts_play_stream)(int rrate, int bbits, int cch, const 
char *nn);
+ static arts_stream_t (*arts_record_stream)(int rrate, int bbits, int cch, 
const char *nn);
++#endif
+ 
++#include <artsc/artsc.h>
++
+ static arts_stream_t stream;
+ static int err_arts = -1;
+ static int arts_exit = 1;
+ 
+ static int arts()
+ {
+-
++#if 0
+     handle = dlopen ("libartsc.so", RTLD_LAZY);
+ 
+     if (!handle) {
+@@ -61,12 +65,13 @@ static int arts()
+     arts_record_stream = dlsym(handle, "arts_record_stream");
+     arts_close_stream = dlsym(handle, "arts_close_stream");
+     arts_stream_set = dlsym(handle, "arts_stream_set");
++#endif
+ 
+     err_arts = arts_init();
+ 
+     if (err_arts < 0) {
+       arts_exit = 0;
+-        dlclose(handle);
++        // dlclose(handle);
+         return err_arts;
+     }
+     
+@@ -83,6 +88,8 @@ int arts_esd_audio_open()
+     int channels;
+     int bits;
+ 
++    err_arts = arts_init();
++
+     channels = ( ( ( esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO )
+               ? /* stereo */ 2 : /* mono */ 1 );
+     bits = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
+@@ -105,7 +112,7 @@ void arts_esd_audio_close()
+     arts_close_stream(stream);
+     arts_exit = 0;
+     arts_free();
+-    dlclose(handle);
++    // dlclose(handle);
+     return;
+ }
+       
+@@ -131,11 +138,13 @@ void arts_esd_audio_flush()
+ 
+ static void impl_exit()
+ {
++#if 0
+     if ((arts_exit > 0) && (handle)) {
+       if (err_arts >= 0) 
+           arts_free();
+       dlclose(handle);
+     }
++#endif
+ }
+ 
+ void artschk() 
+@@ -148,6 +157,10 @@ void artschk() 
+       impl_esd_audio_flush = arts_esd_audio_flush;
+       impl_esd_audio_write = arts_esd_audio_write;
+       impl_esd_audio_read = arts_esd_audio_read;
++      /* close connection.  esd carelessly close()s 0-128, which will likely
++         include our connection and leave us messed up.  open it again when
++         ready to send data. */
++      arts_free();
+     }
+-    atexit(impl_exit);
++    // atexit(impl_exit);
+ }
Index: patches/patch-audio_c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-audio_c,v
retrieving revision 1.2
diff -u -r1.2 patch-audio_c
--- patches/patch-audio_c       26 Jul 2002 19:57:23 -0000      1.2
+++ patches/patch-audio_c       10 Mar 2008 20:53:14 -0000
@@ -1,11 +1,39 @@
---- audio.c.orig       Tue Jun  4 10:40:44 2002
-+++ audio.c    Fri Jul 19 18:32:52 2002
-@@ -25,6 +25,8 @@ static int esd_audio_fd = -1;
- #  include "audio_alsa.c"
- #elif defined(DRIVER_ALSA_09)
- #include "audio_alsa09.c"
-+#elif defined(DRIVER_SUN)
-+#  include "audio_sun.c"
- #elif defined(DRIVER_OSS)
- #  include "audio_oss.c"
- #elif defined(DRIVER_AIX)
+$OpenBSD: patch-audio_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- audio.c.orig       Thu Apr 19 17:43:59 2007
++++ audio.c    Sat Jun  2 23:15:49 2007
+@@ -20,34 +20,7 @@ static int esd_audio_fd = -1;
+ /*******************************************************************/
+ /* returns audio_fd for use by main prog - platform dependent */
+ 
+-/* ALSA before OSS as ALSA is OSS compatible */
+-#if defined(DRIVER_ALSA_09)
+-#  include "audio_alsa09.c"
+-#elif defined(DRIVER_ALSA) || defined(DRIVER_NEWALSA) 
+-#  include "audio_alsa.c"
+-#elif defined(DRIVER_OSS)
+-#  include "audio_oss.c"
+-#elif defined(DRIVER_AIX)
+-#  include "audio_aix.c"
+-#elif defined(DRIVER_IRIX)
+-#  include "audio_irix.c"
+-#elif defined(DRIVER_HPUX)
+-#  include "audio_hpux.c"
+-#elif defined(DRIVER_OSF)
+-#  include "audio_osf.c"
+-#elif defined(DRIVER_SOLARIS)
+-#  include "audio_solaris.c"
+-#elif defined(DRIVER_MKLINUX)
+-#  include "audio_mklinux.c"
+-#elif defined(DRIVER_DART)
+-#  include "audio_dart.c"
+-#elif defined(DRIVER_COREAUDIO)
+-#  include "audio_coreaudio.c"
+-#elif defined(DRIVER_ARTS)
+-#  include "audio_arts.c"
+-#else
+-#  include "audio_none.c"
+-#endif
++#include "audio_sun.c"
+ 
+ /*******************************************************************/
+ /* display available devices */
Index: patches/patch-clients_c
===================================================================
RCS file: patches/patch-clients_c
diff -N patches/patch-clients_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-clients_c     10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+--- clients.c.orig     Sun Mar  9 16:25:22 2008
++++ clients.c  Sun Mar  9 16:28:43 2008
+@@ -141,9 +141,9 @@ int get_new_clients( int listen )
+     struct sockaddr_in incoming;
+ #if defined (ENABLE_IPV6)
+     struct sockaddr_in6 incoming6;
+-    size_t size_in6 = sizeof(struct sockaddr_in6);
++    socklen_t size_in6 = sizeof(struct sockaddr_in6);
+ #endif
+-    size_t size_in = sizeof(struct sockaddr_in);
++    socklen_t size_in = sizeof(struct sockaddr_in);
+     esd_client_t *new_client = NULL;
+     
+     unsigned long addr;
+@@ -186,7 +186,7 @@ int get_new_clients( int listen )
+           if (esd_use_tcpip)
+           {
+               struct request_info req;
+-              struct servent *serv;
++              /* struct servent *serv; */
+ 
+               request_init( &req, RQ_DAEMON, "esound", RQ_FILE, fd, NULL );
+               fromhost( &req );
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac  10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,46 @@
+$OpenBSD: patch-configure_ac,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- configure.ac.orig  Thu May  3 13:47:30 2007
++++ configure.ac       Sun Mar  9 20:03:26 2008
+@@ -301,21 +301,16 @@ if test "x$enable_local_sound" = "xyes"; then
+      if test "x$HAVE_ARTS" = "xyes"; then
+        found_sound=yes
+        CFLAGS="$CFLAGS $ARTSC_CFLAGS"
+-       LIBS="$LIBS $ARTS_LIBS"
++       LIBS="$LIBS $ARTS_LIBS -lstdc++"
+        AC_DEFINE(DRIVER_ARTS, 1, [Defined if Arts backend is enabled])
+      fi
+    fi
+ 
+-   if test "$found_sound" = "no"; then
+-      AC_MSG_ERROR([Could not find a support sound driver])
+-   fi
+-
+    dnl Check for additional audio libs needed
+ 
+    echo 
"---------------------------------------------------------------------"
+    echo "--- Checking to see which audio libraries are required for linking.";
+    echo "--- Most of these checks should also fail. Do not be alarmed.";
+-   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
+    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
+    if test "x$enable_alsa" = "xyes"; then
+       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
+@@ -393,7 +388,8 @@ if test "x$with_libwrap" = "xyes"; then
+ 
+    wrap_ok=no
+    AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
+@@ -403,7 +399,8 @@ int deny_severity = LOG_WARNING;],
+        wrap_ok=yes],
+       [LIBS="$LIBS -lnsl"
+        AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- patches/patch-configure_in  26 Jun 2004 04:38:33 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
---- configure.in.orig  Tue Mar 16 07:20:39 2004
-+++ configure.in       Thu Jun 24 20:07:12 2004
-@@ -205,6 +205,16 @@ if test "x$enable_local_sound" = "xyes";
-       esac
-    fi
- 
-+   if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
-+      case ${host_os} in
-+      openbsd* | netbsd*)
-+         found_sound=yes
-+         DRIVER_SUN=1
-+         AC_DEFINE(DRIVER_SUN)
-+         ;;
-+      esac
-+   fi
-+
-    case ${host_os} in
-    os2*)
-       found_sound=yes
-@@ -263,7 +273,9 @@ if test "x$enable_local_sound" = "xyes";
-    echo 
"---------------------------------------------------------------------"
-    echo "--- Checking to see which audio libraries are required for linking.";
-    echo "--- Most of these checks should also fail. Do not be alarmed.";
--   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   if test ! "$DRIVER_SUN"; then
-+     AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   fi
-    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
-    if test "x$enable_alsa" = "xyes"; then
-       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
-@@ -382,7 +394,8 @@ if test "x$with_libwrap" = "xyes"; then
- 
-    wrap_ok=no
-    AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
-@@ -392,7 +405,8 @@ int deny_severity = LOG_WARNING;],
-        wrap_ok=yes],
-       [LIBS="$LIBS -lnsl"
-        AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
Index: patches/patch-esd.c
===================================================================
RCS file: patches/patch-esd.c
diff -N patches/patch-esd.c
--- patches/patch-esd.c 26 Jun 2004 04:38:33 -0000      1.7
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
---- esd.c.orig Wed Jan 14 07:00:46 2004
-+++ esd.c      Thu Jun 24 20:07:12 2004
-@@ -236,12 +236,12 @@ struct stat dir_stats;
- 
- #if defined(S_ISVTX)
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--                                S_IRGRP|S_IWGRP|S_IXGRP|\
--                                S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
-+                                S_IRGRP|S_IXGRP|\
-+                                S_IROTH|S_IXOTH|S_ISVTX)
- #else
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--                                S_IRGRP|S_IWGRP|S_IXGRP|\
--                                S_IROTH|S_IWOTH|S_IXOTH)
-+                                S_IRGRP|S_IXGRP|\
-+                                S_IROTH|S_IXOTH)
- #endif
- 
-   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esd_c
===================================================================
RCS file: patches/patch-esd_c
diff -N patches/patch-esd_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-esd_c 10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,20 @@
+$OpenBSD: patch-esd_c,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- esd.c.orig Thu May  3 13:28:35 2007
++++ esd.c      Sun Mar  9 21:54:55 2008
+@@ -274,12 +274,12 @@ struct stat dir_stats;
+ 
+ #if defined(S_ISVTX)
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-                                S_IRGRP|S_IWGRP|S_IXGRP|\
+-                                S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
++                                S_IRGRP|S_IXGRP|\
++                                S_IROTH|S_IXOTH|S_ISVTX)
+ #else
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-                                S_IRGRP|S_IWGRP|S_IXGRP|\
+-                                S_IROTH|S_IWOTH|S_IXOTH)
++                                S_IRGRP|S_IXGRP|\
++                                S_IROTH|S_IXOTH)
+ #endif
+ 
+   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esdlib_c
===================================================================
RCS file: patches/patch-esdlib_c
diff -N patches/patch-esdlib_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-esdlib_c      10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- esdlib.c.orig      Thu Apr 19 07:43:59 2007
++++ esdlib.c   Sun Mar  9 23:39:06 2008
+@@ -769,7 +769,7 @@ int esd_open_sound( const char *host )
+ 
+               sprintf(cmd, "%s/esd %s -spawnfd %d", SERVERDIR, 
esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
+ 
+-              execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
++              execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL);
+               perror("execl");
+               _exit(1);
+           } else
Index: patches/patch-test-script
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-test-script,v
retrieving revision 1.2
diff -u -r1.2 patch-test-script
--- patches/patch-test-script   5 Mar 2002 15:35:13 -0000       1.2
+++ patches/patch-test-script   10 Mar 2008 20:53:14 -0000
@@ -1,16 +1,18 @@
---- test-script.orig   Wed Jul 15 04:26:14 1998
-+++ test-script        Tue Mar  5 09:21:40 2002
+$OpenBSD: patch-test-script,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- test-script.orig   Thu Apr 19 07:43:59 2007
++++ test-script        Sun Mar  9 16:23:07 2008
 @@ -1,4 +1,4 @@
 -#!/bin/tcsh
 +#!/usr/local/bin/tcsh
  echo welcome to the test.
  
  echo ""
-@@ -40,7 +40,6 @@ echo $< >& /dev/null
+@@ -40,7 +40,7 @@ echo $< >& /dev/null
  esdmon > sample.raw &
  esdcat -b -m -r 11025 test.wav
  sleep 3
 -killall esdmon
++pkill esdmon
  
  echo press enter to continue...
  echo $< >& /dev/null
Index: patches/patch-util_c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-util_c,v
retrieving revision 1.2
diff -u -r1.2 patch-util_c
--- patches/patch-util_c        26 Jun 2004 04:38:33 -0000      1.2
+++ patches/patch-util_c        10 Mar 2008 20:53:14 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-util_c,v 1.2 2004/06/26 04:38:33 brad Exp $
---- util.c.orig        Mon Mar  1 12:06:58 2004
-+++ util.c     Thu Jun 24 20:15:35 2004
+$OpenBSD: patch-util_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- util.c.orig        Thu Apr 19 17:43:59 2007
++++ util.c     Sat Jun  2 23:38:31 2007
 @@ -1,5 +1,8 @@
  #include "config.h"
  #include "esd.h"
@@ -10,11 +10,11 @@
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <stdlib.h>
-@@ -23,38 +26,31 @@ have_ipv6() {
+@@ -23,38 +26,31 @@ have_ipv6(void) {
  const char*
  esd_get_socket_dirname (void) 
  {
--      char *audiodev;
+-      const char *audiodev;
 -      static char *dirname = NULL;
 +      static char *sockdir = NULL, sockdirbuf[PATH_MAX];
 +      struct passwd *pw;
@@ -32,7 +32,7 @@
 -              strcpy(dirname, "/tmp/.esd");
 -              strcat(dirname, audiodev);
 +      if (sockdir != NULL)
-+              return (sockdir);
++              return sockdir;
 +      pw = getpwuid(getuid());
 +      if (pw == NULL || pw->pw_dir == NULL) {
 +              fprintf(stderr, "esd: could not find home directory\n");
@@ -43,7 +43,7 @@
 +      snprintf(sockdirbuf, sizeof(sockdirbuf), "%s/.esd", pw->pw_dir);
 +      endpwent();
 +      sockdir = sockdirbuf;
-+      return (sockdir);
++      return sockdir;
  }
  
  const char*
@@ -62,9 +62,9 @@
 -
 -      return name;
 +      if (sockname != NULL)
-+              return (sockname);
++              return sockname;
 +      snprintf(socknamebuf, sizeof(socknamebuf), "%s/socket",
 +              esd_get_socket_dirname());
 +      sockname = socknamebuf;
-+      return (sockname);
++      return sockname;
  }
Index: pkg/DESCR
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/pkg/DESCR,v
retrieving revision 1.4
diff -u -r1.4 DESCR
--- pkg/DESCR   15 Dec 2003 21:42:10 -0000      1.4
+++ pkg/DESCR   10 Mar 2008 20:53:14 -0000
@@ -1 +1,6 @@
-sound library for Enlightenment
+Esound is an audio mixing server that allows multiple applications
+to output sound to the same audio device.
+
+Esound is seriously lacking in features required for a modern desktop
+environment, particularly for multi-channel audio and audio/video
+synchronization.
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/pkg/PLIST,v
retrieving revision 1.15
diff -u -r1.15 PLIST
--- pkg/PLIST   5 Aug 2004 03:02:01 -0000       1.15
+++ pkg/PLIST   10 Mar 2008 20:53:14 -0000
@@ -1,4 +1,4 @@
[EMAIL PROTECTED] $OpenBSD: PLIST,v 1.15 2004/08/05 03:02:01 espie Exp $
[EMAIL PROTECTED] $OpenBSD: PLIST,v 1.16 2007/06/26 17:10:29 martynas Exp $
 bin/esd
 bin/esd-config
 bin/esdcat
@@ -18,7 +18,6 @@
 @man man/man1/esd.1
 @man man/man1/esdcat.1
 @man man/man1/esdctl.1
[EMAIL PROTECTED] man/man1/esddsp.1
 @man man/man1/esdfilt.1
 @man man/man1/esdloop.1
 @man man/man1/esdmon.1

Reply via email to