On 2016/09/02 11:28, Alexandre Ratchov wrote:
> On Fri, Sep 02, 2016 at 10:08:43AM +0200, Antoine Jacoutot wrote:
> > On Wed, Aug 31, 2016 at 01:22:43AM -0600, Alexandre Ratchov wrote:
> > > CVSROOT:  /cvs
> > > Module name:      src
> > > Changes by:       ratc...@cvs.openbsd.org 2016/08/31 01:22:43
> > > 
> > > Modified files:
> > >   share/man/man4 : audio.4 
> > >   sys/dev        : audio.c audio_if.h 
> > >   sys/sys        : audioio.h 
> > >   sys/kern       : kern_pledge.c 
> > > 
> > > Log message:
> > > Delete unused ioctls and associated macros. Move macros that are still
> > > used internally by low-level drivers from sys/audioio.h to
> > > dev/audio_if.h instead of deleting them.
> > 
> > This broke ports/x11/emiclock.
> > 
> > error: 'AUDIO_DRAIN' undeclared (first use in this function)
> > 
> 
> According to sources, sound never worked on modern machines.  Given
> that last update of emiclock was in ~2000, $MASTER_SITES is dead,
> before I start fixing this, I'd prefer asking what's the most more
> appropriate:
>  - fix sound?
>  - disable sound?
>  - delete emiclock?

Since it is marked "PERMIT_PACKAGE_FTP=     may not modify/package"
I think deleting it makes sense.


> Meanwhile, below is a quick fix to keep the current behavior:
> AUDIO_DRAIN is useless in this case, because close() drains anyway. 
> So just drop the calls to AUDIO_DRAIN.
> 
> OK?
> 
> (moving discutions to ports@)
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/emiclock/Makefile,v
> retrieving revision 1.26
> diff -u -p -u -p -r1.26 Makefile
> --- Makefile  11 Oct 2013 21:21:00 -0000      1.26
> +++ Makefile  2 Sep 2016 09:18:58 -0000
> @@ -3,7 +3,7 @@
>  COMMENT=     hyper-animated face analog clock for X11
>  
>  DISTNAME=    emiclock-2.0.2
> -REVISION=    3
> +REVISION=    4
>  CATEGORIES=  x11
>  
>  MASTER_SITES=        http://download.vector.co.jp/pack/unix/personal/tokei/
> Index: patches/patch-sys_FreeBSD_audio_c
> ===================================================================
> RCS file: /cvs/ports/x11/emiclock/patches/patch-sys_FreeBSD_audio_c,v
> retrieving revision 1.1
> diff -u -p -u -p -r1.1 patch-sys_FreeBSD_audio_c
> --- patches/patch-sys_FreeBSD_audio_c 26 Oct 2007 20:44:07 -0000      1.1
> +++ patches/patch-sys_FreeBSD_audio_c 2 Sep 2016 09:18:58 -0000
> @@ -1,6 +1,6 @@
>  $OpenBSD$
>  --- sys/FreeBSD/audio.c.orig Thu Sep  2 16:34:34 1999
> -+++ sys/FreeBSD/audio.c      Fri Oct 26 22:33:32 2007
> ++++ sys/FreeBSD/audio.c      Fri Sep  2 11:13:33 2016
>  @@ -90,7 +90,9 @@ S_PlaySound(char *soundfile)
>       return (SOUND_DEVICE_ERROR);
>       }
> @@ -11,19 +11,17 @@ $OpenBSD$
>       
>       fstat(sfile, &sstat);
>       len = sstat.st_size;
> -@@ -100,7 +102,11 @@ S_PlaySound(char *soundfile)
> +@@ -100,7 +102,9 @@ S_PlaySound(char *soundfile)
>       if ( (l = read(sfile, buffer, len)) > 0)
>       write(sdev, buffer, l);
>       
>  +#ifdef __FreeBSD__
>       ioctl(sdev, SNDCTL_DSP_SYNC, 0);
> -+#elif defined(__OpenBSD__)
> -+    ioctl(sdev, AUDIO_DRAIN, 0);
>  +#endif
>       XtFree(buffer);
>       
>       close(sdev); 
> -@@ -159,11 +165,17 @@ S_PlayCacheSound(SoundCacheBuffer *cacheBufferPtr)
> +@@ -159,11 +163,15 @@ S_PlayCacheSound(SoundCacheBuffer *cacheBufferPtr)
>       return(SOUND_DEVICE_ERROR);
>       }
>       
> @@ -35,8 +33,6 @@ $OpenBSD$
>       
>  +#ifdef __FreeBSD__
>       ioctl(sdev, SNDCTL_DSP_SYNC, 0);
> -+#elif defined(__OpenBSD__)
> -+    ioctl(sdev, AUDIO_DRAIN, 0);
>  +#endif
>       close(sdev);
>       
> 

Reply via email to