* Maintenance update to 12.17.6.

* Change sound support: enable native sun audio, drop emulated OSS.
This commit is contained in:
naddy 2004-10-15 18:45:50 +00:00
parent fa24063526
commit 33f8016f42
12 changed files with 98 additions and 185 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.26 2004/07/31 14:18:14 naddy Exp $
# $OpenBSD: Makefile,v 1.27 2004/10/15 18:45:50 naddy Exp $
COMMENT= "SOund eXchange - universal sound sample translator"
DISTNAME= sox-12.17.4
PKGNAME= ${DISTNAME}p1
DISTNAME= sox-12.17.6
CATEGORIES= audio
HOMEPAGE= http://sox.sourceforge.net/
@ -17,17 +16,17 @@ PERMIT_DISTFILES_FTP= "no redistribution"
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=sox/}
CONFIGURE_STYLE=autoconf
AUTOCONF_VERSION=2.54
CONFIGURE_ARGS= --disable-sun-audio
CONFIGURE_STYLE=gnu dest
CONFIGURE_ARGS= --disable-oss-dsp
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
MAKE_ENV= PLAY_SUPPORT=1
FLAVORS= mp3 vorbis
FLAVOR?=
.if ${FLAVOR:L:Mvorbis}
LIB_DEPENDS+= vorbis.1,vorbisenc.1,vorbisfile.2::audio/libvorbis
LIB_DEPENDS+= vorbis.3,vorbisenc.2,vorbisfile.4::audio/libvorbis
.else
CONFIGURE_ARGS+= --disable-ogg-vorbis
.endif
@ -38,6 +37,7 @@ LIB_DEPENDS+= mad.2::audio/libmad mp3lame.0::audio/lame
CONFIGURE_ARGS+= --disable-mad --disable-lame
.endif
NO_REGRESS= Yes
do-regress:
@cd ${WRKSRC}/src && ./tests.sh && ./testall.sh
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
MD5 (sox-12.17.4.tar.gz) = 39bdb64e06a8c456057e87eff7d0b339
RMD160 (sox-12.17.4.tar.gz) = 057efe3807d4126cb7047e6300f495907c7e20c3
SHA1 (sox-12.17.4.tar.gz) = d6fba1e40b20f73334917d4aaab113b6066283cd
MD5 (sox-12.17.6.tar.gz) = ea368e7baf6618a2116f3ed6c111bd4a
RMD160 (sox-12.17.6.tar.gz) = 30975ee4a87cbedb2552d30f5141bb1d8215a64e
SHA1 (sox-12.17.6.tar.gz) = d3e8548814daee5f2d6ace04afc2789ae6e74e58

View File

@ -1,82 +0,0 @@
$OpenBSD: patch-Makefile.in,v 1.4 2003/07/17 20:29:14 naddy Exp $
--- Makefile.in.orig Sat Feb 8 15:39:19 2003
+++ Makefile.in Thu Jul 17 21:41:46 2003
@@ -14,6 +14,8 @@ libdir = @libdir@
mandir = @mandir@
includedir = @includedir@
+DESTDIR =
+
# Shell commands.
CC = @CC@
@@ -28,7 +30,7 @@ GSM_LIB_0 =
GSM_LIB_1 = -lgsm
GSM_SUPPORT = @GSM_SUPPORT@
-CFLAGS = @CFLAGS@ -I$(srcdir) -I$(builddir)
+CFLAGS = @CFLAGS@ @CPPFLAGS@ -I$(srcdir) -I$(builddir)
LDFLAGS = -L. -L./gsm @LDFLAGS@
LIBS = -lst $(GSM_LIB_$(GSM_SUPPORT)) @LIBS@
@@ -98,35 +100,35 @@ PLAY_INSTALL_0 =
PLAY_INSTALL_1 = install-play
install: sox soxmix $(PLAY_INSTALL_$(PLAY_SUPPORT))
- $(srcdir)/mkinstalldirs $(bindir)
- $(srcdir)/mkinstalldirs $(mandir)/man1
- $(INSTALL) -c -m 755 sox $(bindir)
- $(INSTALL) -c -m 755 soxmix $(bindir)
- $(INSTALL) -c -m 644 $(srcdir)/sox.1 $(mandir)/man1
- if [ -f $(mandir)/man1/soxmix.1 ] ; then $(RM) $(mandir)/man1/soxmix.1; fi
- $(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
- $(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(mandir)/man1
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
+ $(INSTALL) -c -m 755 sox $(DESTDIR)$(bindir)
+ $(INSTALL) -c -m 755 soxmix $(DESTDIR)$(bindir)
+ $(INSTALL) -c -m 644 $(srcdir)/sox.1 $(DESTDIR)$(mandir)/man1
+ if [ -f $(DESTDIR)$(mandir)/man1/soxmix.1 ] ; then $(RM) $(DESTDIR)$(mandir)/man1/soxmix.1; fi
+ cd $(DESTDIR)$(mandir)/man1 && $(LN_S) sox.1 soxmix.1
+ $(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(DESTDIR)$(mandir)/man1
install-play:
- if [ -f $(bindir)/rec ] ; then $(RM) $(bindir)/rec; fi
- if [ -f $(mandir)/man1/rec.1 ]; then $(RM) $(mandir)/man1/rec.1; fi
- $(srcdir)/mkinstalldirs $(mandir)/man1
- $(srcdir)/mkinstalldirs $(bindir)
- $(INSTALL) -c -m 755 play $(bindir)
- $(INSTALL) -c -m 644 $(srcdir)/play.1 $(mandir)/man1
- $(LN_S) $(bindir)/play $(bindir)/rec
- $(LN_S) $(mandir)/man1/play.1 $(mandir)/man1/rec.1
+ if [ -f $(DESTDIR)$(bindir)/rec ] ; then $(RM) $(DESTDIR)$(bindir)/rec; fi
+ if [ -f $(DESTDIR)$(mandir)/man1/rec.1 ]; then $(RM) $(DESTDIR)$(mandir)/man1/rec.1; fi
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
+ $(INSTALL) -c -m 755 play $(DESTDIR)$(bindir)
+ $(INSTALL) -c -m 644 $(srcdir)/play.1 $(DESTDIR)$(mandir)/man1
+ cd $(DESTDIR)$(bindir) && $(LN_S) play rec
+ cd $(DESTDIR)$(mandir)/man1 && $(LN_S) play.1 rec.1
install-lib: libst.a
- $(srcdir)/mkinstalldirs $(libdir)
- $(srcdir)/mkinstalldirs $(mandir)/man3
- $(srcdir)/mkinstalldirs $(includedir)
- $(INSTALL) -c -m 755 libst-config $(bindir)
- $(INSTALL) -c -m 644 libst.a $(libdir)
- $(RANLIB) $(libdir)/libst.a
- $(INSTALL) -c -m 644 $(srcdir)/libst.3 $(mandir)/man3
- $(INSTALL) -c -m 644 $(srcdir)/st.h $(includedir)
- $(INSTALL) -c -m 644 ststdint.h $(includedir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir)
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man3
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(includedir)
+ $(INSTALL) -c -m 755 libst-config $(DESTDIR)$(bindir)
+ $(INSTALL) -c -m 644 libst.a $(DESTDIR)$(libdir)
+ $(RANLIB) $(DESTDIR)$(libdir)/libst.a
+ $(INSTALL) -c -m 644 $(srcdir)/libst.3 $(DESTDIR)$(mandir)/man3
+ $(INSTALL) -c -m 644 $(srcdir)/st.h $(DESTDIR)$(includedir)
+ $(INSTALL) -c -m 644 ststdint.h $(DESTDIR)$(includedir)
GSM_INSTALL_0 =
GSM_INSTALL_1 = install-gsmlib

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-Makefile_in,v 1.1 2004/10/15 18:45:50 naddy Exp $
--- Makefile.in.orig Thu Sep 2 00:04:02 2004
+++ Makefile.in Fri Oct 15 18:27:13 2004
@@ -27,19 +27,22 @@ man: $(srcdir)/sox.1 $(srcdir)/soxexam.1
nroff -man $(srcdir)/soxexam.1 | col -b > soxexam.txt
nroff -man $(srcdir)/libst.3 | col -b > libst.txt
+PLAY_INSTALL_0 =
+PLAY_INSTALL_1 = install-play
+
install: $(PLAY_INSTALL_$(PLAY_SUPPORT))
cd src && $(MAKE) $@
$(srcdir)/mkinstalldirs $(mandir)/man1
$(INSTALL) -c -m 644 $(srcdir)/sox.1 $(mandir)/man1
if [ -f $(mandir)/man1/soxmix.1 ] ; then $(RM) $(mandir)/man1/soxmix.1; fi
- $(LN_S) $(mandir)/man1/sox.1 $(mandir)/man1/soxmix.1
+ cd $(mandir)/man1 && $(LN_S) sox.1 soxmix.1
$(INSTALL) -c -m 644 $(srcdir)/soxexam.1 $(mandir)/man1
install-play:
if [ -f $(mandir)/man1/rec.1 ]; then $(RM) $(mandir)/man1/rec.1; fi
$(srcdir)/mkinstalldirs $(mandir)/man1
$(INSTALL) -c -m 644 $(srcdir)/play.1 $(mandir)/man1
- $(LN_S) $(mandir)/man1/play.1 $(mandir)/man1/rec.1
+ cd $(mandir)/man1 && $(LN_S) play.1 rec.1
install-lib:
cd src && $(MAKE) $@

View File

@ -1,29 +0,0 @@
$OpenBSD: patch-configure.in,v 1.5 2004/01/16 22:30:53 naddy Exp $
--- configure.in.orig 2003-02-08 15:39:19.000000000 +0100
+++ configure.in 2004-01-16 23:22:31.000000000 +0100
@@ -136,10 +136,10 @@ then
if test "$found_ogg_vorbis" = yes
then
AC_CHECK_LIB(vorbis, vorbis_analysis_init,
- LIBS="$LIBS -logg -lvorbis -lvorbisfile -lvorbisenc"
+ LIBS="$LIBS -lvorbisfile -lvorbisenc -lvorbis -logg -lm"
AC_DEFINE([HAVE_LIBVORBIS], 1,
[Define if you have Ogg Vorbis Library installed]),
- enable_ogg_vorbis=no)
+ enable_ogg_vorbis=no, -logg)
fi
fi
@@ -229,10 +229,11 @@ fi
if test "$enable_oss_dsp" = yes
then
- AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h, found_oss_dsp=yes)
+ AC_CHECK_HEADERS(soundcard.h sys/soundcard.h machine/soundcard.h, found_oss_dsp=yes)
if test "$found_oss_dsp" = yes
then
+ AC_CHECK_LIB(ossaudio, _oss_ioctl, LIBS="$LIBS -lossaudio")
AC_DEFINE([HAVE_OSS], 1,
[Define if you have OSS installed])
NEED_OSS=1

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-oss.c,v 1.3 2002/01/17 00:25:52 naddy Exp $
--- oss.c.orig Sat Dec 1 03:17:18 2001
+++ oss.c Wed Jan 16 23:25:12 2002
@@ -33,6 +33,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
+#ifdef HAVE_SOUNDCARD_H
+#include <soundcard.h>
+#endif
#ifdef HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
#endif

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-play_in,v 1.2 2003/07/17 20:29:14 naddy Exp $
--- play.in.orig Tue Jan 28 02:59:06 2003
+++ play.in Thu Jul 17 19:08:37 2003
@@ -193,6 +193,12 @@ case $arch in
device="/dev/audio"
fi
;;
+ OpenBSD)
+ arch_defines="-t ossdsp"
+ if [ -z "$device" ]; then
+ device="/dev/sound"
+ fi
+ ;;
esac
# If user sets AUDIODEV environment variable then force output device

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_Makefile_in,v 1.1 2004/10/15 18:45:50 naddy Exp $
--- src/Makefile.in.orig Fri Oct 15 18:02:17 2004
+++ src/Makefile.in Fri Oct 15 18:03:40 2004
@@ -110,7 +110,7 @@ install-play:
if [ -f $(bindir)/rec ] ; then $(RM) $(bindir)/rec; fi
$(top_srcdir)/mkinstalldirs $(bindir)
$(INSTALL) -c -m 755 play $(bindir)
- $(LN_S) $(bindir)/play $(bindir)/rec
+ cd $(bindir) && $(LN_S) play rec
install-lib: libst.a
$(top_srcdir)/mkinstalldirs $(libdir)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_play_in,v 1.1 2004/10/15 18:45:50 naddy Exp $
--- src/play.in.orig Fri Oct 15 18:13:23 2004
+++ src/play.in Fri Oct 15 18:13:34 2004
@@ -187,7 +187,7 @@ case $arch in
device="/dev/dsp"
fi
;;
- NetBSD)
+ NetBSD|OpenBSD)
arch_defines="-t sunau"
if [ -z "$device" ]; then
device="/dev/audio"

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-src_sunaudio_c,v 1.1 2004/10/15 18:45:50 naddy Exp $
--- src/sunaudio.c.orig Fri Oct 15 18:15:46 2004
+++ src/sunaudio.c Fri Oct 15 18:18:08 2004
@@ -20,8 +20,8 @@
#if defined(HAVE_SUNAUDIO)
#include <sys/ioctl.h>
-#if defined(__SVR4) || defined(__NetBSD__)
-#ifdef __NetBSD__
+#if defined(__SVR4) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined( __NetBSD__) || defined(__OpenBSD__)
#include <sys/types.h> /* This should be in audioio.h itself but its not */
#endif
#include <sys/audioio.h>
@@ -31,10 +31,9 @@
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
-#ifndef __NetBSD__
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
#include <stropts.h>
#endif
-#include <malloc.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -172,7 +171,7 @@ int st_sunstartread(ft_t ft)
return(ST_EOF);
}
/* Flush any data in the buffers - its probably in the wrong format */
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__OpenBSD__)
ioctl(fileno(ft->fp), AUDIO_FLUSH);
#else
ioctl(fileno(ft->fp), I_FLUSH, FLUSHR);

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-stconfig_h_in,v 1.2 2003/07/17 20:29:14 naddy Exp $
--- stconfig.h.in.orig Mon Jan 27 20:15:56 2003
+++ stconfig.h.in Thu Jul 17 19:09:12 2003
@@ -75,6 +75,9 @@
/* Define to 1 if you have the `rand' function. */
#undef HAVE_RAND
+/* Define if you have the <soundcard.h> header file. */
+#undef HAVE_SOUNDCARD_H
+
/* Define to 1 if you have the <sound/asound.h> header file. */
#undef HAVE_SOUND_ASOUND_H

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-wav_c,v 1.1 2004/07/31 14:18:14 naddy Exp $
--- wav.c.orig Fri Jul 30 19:33:34 2004
+++ wav.c Fri Jul 30 19:36:08 2004
@@ -917,6 +917,8 @@ int st_wavstartread(ft_t ft)
} else if(strncmp(magic,"ICRD",4) == 0){
st_readdw(ft,&len);
len = (len + 1) & ~1;
+ if (len > 254)
+ break;
st_reads(ft,text,len);
if (strlen(ft->comment) + strlen(text) < 254)
{
@@ -926,6 +928,8 @@ int st_wavstartread(ft_t ft)
} else if(strncmp(magic,"ISFT",4) == 0){
st_readdw(ft,&len);
len = (len + 1) & ~1;
+ if (len > 254)
+ break;
st_reads(ft,text,len);
if (strlen(ft->comment) + strlen(text) < 254)
{