Subject: pkg/18791: Fix for pkgsrc/audio/libmikmod on Solaris
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sketch@rd.bbc.co.uk>
List: netbsd-bugs
Date: 10/24/2002 08:42:13
>Number:         18791
>Category:       pkg
>Synopsis:       Fix for pkgsrc/audio/libmikmod on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 24 08:43:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        1.6
>Organization:
British Broadcasting Corporation
>Environment:
SunOS desk06 5.9 Generic_112233-01 sun4u sparc SUNW,Ultra-5_10
>Description:
Solaris doesn't define AUDIO_ENCODING_{SLINEAR,ULINEAR}, preferring
AUDIO_ENCODING_LINEAR{,8}.  libmikmod doesn't account for this, and
building breaks at

nclude -I/cache/pkg/include -finline-functions -funroll-loops -ffast-math -Wall -Dunix -I../include -I.. -I../include -DMIKMOD_H=../include/mikmod.h -c ../drivers/drv_sun.c
../drivers/drv_sun.c: In function `Sun_Init':
../drivers/drv_sun.c:335: `AUDIO_ENCODING_SLINEAR_BE' undeclared (first use in this function)
../drivers/drv_sun.c:335: (Each undeclared identifier is reported only once
../drivers/drv_sun.c:335: for each function it appears in.)
../drivers/drv_sun.c:335: `AUDIO_ENCODING_ULINEAR_BE' undeclared (first use in this function)
gmake[2]: *** [drv_sun.lo] Error 1
>How-To-Repeat:
Confirmed on Solaris 6 through 9.
>Fix:
This works:

Index: distinfo
===================================================================
RCS file: /cache/ncvs/pkgsrc/audio/libmikmod/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo    2002/08/31 03:47:53     1.6
+++ distinfo    2002/10/24 15:36:09
@@ -5,4 +5,4 @@
 SHA1 (patch-aa) = bfff6a9a77238e159e039bfa7d3f590bce8c9c9c
 SHA1 (patch-ab) = afda9a7d29e70e42c037163ac5b2d2742c77daab
 SHA1 (patch-ac) = 97554f00e4a4823e7a90f742679044fb8f887167
-SHA1 (patch-ad) = 6b5df049ef7ea3c8a527de59361a17a5b64829d6
+SHA1 (patch-ad) = 4c563693aa060c9ac2869d84add3ea830a0a770c
cvs diff: Diffing patches
Index: patches/patch-ad
===================================================================
RCS file: /cache/ncvs/pkgsrc/audio/libmikmod/patches/patch-ad,v
retrieving revision 1.6
diff -u -r1.6 patch-ad
--- patches/patch-ad    2002/08/25 19:21:52     1.6
+++ patches/patch-ad    2002/10/24 15:35:35
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.4.2.1 2002/08/22 11:09:50 jlam Exp $
+$NetBSD$
 
 --- drivers/drv_sun.c.orig     Sun Jan 13 00:58:57 2002
-+++ drivers/drv_sun.c  Thu Jul 11 02:12:04 2002
-@@ -79,9 +79,9 @@
++++ drivers/drv_sun.c
+@@ -79,10 +79,16 @@ extern int fputs(const char *, FILE *);
  #endif
  
  /* Sound device to open */
@@ -12,5 +12,12 @@
 -#else /* Solaris, *BSD */
 +#else /* Solaris */
  #define SOUNDDEVICE "/dev/audio"
++#endif
++
++/* Solaris doesn't have these */
++#ifdef SOLARIS
++#define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_LINEAR
++#define AUDIO_ENCODING_ULINEAR AUDIO_ENCODING_LINEAR8
  #endif
  
+ /* Compatibility defines, for old *BSD or SunOS systems */
>Release-Note:
>Audit-Trail:
>Unformatted: