pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio add audio/osstest



details:   https://anonhg.NetBSD.org/pkgsrc/rev/414f0c015c16
branches:  trunk
changeset: 452362:414f0c015c16
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun May 09 08:14:51 2021 +0000

description:
add audio/osstest

The osstest applet is a simple test application that can be used to test
functionality of the sound hardware installed in the system.

osstest performs a playback test for each installed audio device. If there
are any "machine detectable" problems they will be reported. You will first
hear an audio sample played on the left speaker, then the right speaker and
finally in stereo on both speakers.

NOTE: On NetBSD, use `audiocfg test 0` instead. This package primarily
exists to test OSSv4 compatibility.

diffstat:

 audio/Makefile                                    |   3 +-
 audio/osstest/DESCR                               |  10 ++++
 audio/osstest/Makefile                            |  50 +++++++++++++++++++++++
 audio/osstest/PLIST                               |   4 +
 audio/osstest/distinfo                            |   7 +++
 audio/osstest/files/Makefile                      |  14 ++++++
 audio/osstest/patches/patch-cmd_osstest_osstest.c |  20 +++++++++
 7 files changed, 107 insertions(+), 1 deletions(-)

diffs (146 lines):

diff -r 9c35ec7fa2a4 -r 414f0c015c16 audio/Makefile
--- a/audio/Makefile    Sun May 09 08:02:15 2021 +0000
+++ b/audio/Makefile    Sun May 09 08:14:51 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.629 2021/05/09 08:02:03 nia Exp $
+# $NetBSD: Makefile,v 1.630 2021/05/09 08:14:51 nia Exp $
 #
 
 COMMENT=       Audio tools, players, and libraries
@@ -353,6 +353,7 @@
 SUBDIR+=       opus-tools
 SUBDIR+=       opusfile
 SUBDIR+=       ossmix
+SUBDIR+=       osstest
 SUBDIR+=       ossxmix
 SUBDIR+=       p5-Audio-CD
 SUBDIR+=       p5-Audio-Scan
diff -r 9c35ec7fa2a4 -r 414f0c015c16 audio/osstest/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/osstest/DESCR       Sun May 09 08:14:51 2021 +0000
@@ -0,0 +1,10 @@
+The osstest applet is a simple test application that can be used to test
+functionality of the sound hardware installed in the system.
+
+osstest performs a playback test for each installed audio device. If there
+are any "machine detectable" problems they will be reported. You will first
+hear an audio sample played on the left speaker, then the right speaker and
+finally in stereo on both speakers.
+
+NOTE: On NetBSD, use `audiocfg test 0` instead. This package primarily
+exists to test OSSv4 compatibility.
diff -r 9c35ec7fa2a4 -r 414f0c015c16 audio/osstest/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/osstest/Makefile    Sun May 09 08:14:51 2021 +0000
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1 2021/05/09 08:14:51 nia Exp $
+
+DISTNAME=      oss-v4.2-build2019-src-bsd
+PKGNAME=       osstest-${DISTNAME:S/oss-v//1:S/-src-bsd//1:S/-/./g}
+CATEGORIES=    audio
+MASTER_SITES=  http://www.opensound.com/developer/sources/stable/bsd/
+EXTRACT_SUFX=  .tar.bz2
+
+MAINTAINER=    nia%NetBSD.org@localhost
+HOMEPAGE=      http://www.opensound.com/
+COMMENT=       Application for testing OSSv4 sound devices
+LICENSE=       2-clause-bsd
+
+BUILD_DIRS=    cmd/${PKGBASE}
+
+# NOTE: Linux support will require an OSSv4 package integrated into
+# oss.buildlink3.mk
+ONLY_FOR_PLATFORM+=    FreeBSD-*-*
+ONLY_FOR_PLATFORM+=    NetBSD-*-*
+ONLY_FOR_PLATFORM+=    SunOS-*-*
+
+.include "../../mk/oss.buildlink3.mk"
+
+LDFLAGS+=      ${LIBOSSAUDIO}
+
+.if ${OPSYS} == "NetBSD" && \
+       (!empty(OS_VERSION:M[5-9].*) && empty(OS_VERSION:M9.99.*))
+PKG_SKIP_REASON+=      "Requires OSSv4 support"
+.endif
+
+SUBST_CLASSES+=                paths
+SUBST_STAGE.paths=     pre-configure
+SUBST_FILES.paths=     cmd/${PKGBASE}/${PKGBASE}.man
+SUBST_SED.paths=       -e 's,/usr/bin,${PREFIX}/bin,g'
+
+INSTALLATION_DIRS+=    bin
+INSTALLATION_DIRS+=    share/doc/${PKGBASE}
+
+pre-build:
+       ${CP} ${FILESDIR}/Makefile ${WRKSRC}/cmd/${PKGBASE}/Makefile
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/cmd/${PKGBASE}/${PKGBASE} \
+               ${DESTDIR}${PREFIX}/bin/${PKGBASE}
+       ${INSTALL_DATA} ${WRKSRC}/COPYING \
+               ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/COPYING
+       ${INSTALL_DATA} ${WRKSRC}/cmd/${PKGBASE}/${PKGBASE}.man \
+               ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}/${PKGBASE}.man
+
+.include "../../mk/bsd.pkg.mk"
diff -r 9c35ec7fa2a4 -r 414f0c015c16 audio/osstest/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/osstest/PLIST       Sun May 09 08:14:51 2021 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2021/05/09 08:14:51 nia Exp $
+bin/osstest
+share/doc/osstest/COPYING
+share/doc/osstest/osstest.man
diff -r 9c35ec7fa2a4 -r 414f0c015c16 audio/osstest/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/osstest/distinfo    Sun May 09 08:14:51 2021 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2021/05/09 08:14:51 nia Exp $
+
+SHA1 (oss-v4.2-build2019-src-bsd.tar.bz2) = f6e03cbb5b5010aa48dd6d963b7e68c991c7d7dc
+RMD160 (oss-v4.2-build2019-src-bsd.tar.bz2) = be04756160843acdaacbb610d5e8ebd9f7acf572
+SHA512 (oss-v4.2-build2019-src-bsd.tar.bz2) = 9d43fa3e3abe4cf006cabfedf2c9fc51372f8cbe499c2e4bee6ba489291c31eb93b66b312054bcf92fc26df329bc3c7ef14a633fece8af38256bc7198d0c1556
+Size (oss-v4.2-build2019-src-bsd.tar.bz2) = 1723557 bytes
+SHA1 (patch-cmd_osstest_osstest.c) = 3e7a9d5b166430995c45aa390bed96bbba858ee8
diff -r 9c35ec7fa2a4 -r 414f0c015c16 audio/osstest/files/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/osstest/files/Makefile      Sun May 09 08:14:51 2021 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1 2021/05/09 08:14:52 nia Exp $
+
+CFLAGS+=       -DLOCAL_BUILD
+
+OBJS=          osstest.o help.o wavedata.o
+PROG=          osstest
+
+all: ${PROG}
+
+.c.o:
+       ${CC} ${CFLAGS} -c ${.IMPSRC}
+
+${PROG}: ${OBJS}
+       ${CC} ${LDFLAGS} -o ${PROG} ${OBJS}
diff -r 9c35ec7fa2a4 -r 414f0c015c16 audio/osstest/patches/patch-cmd_osstest_osstest.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/osstest/patches/patch-cmd_osstest_osstest.c Sun May 09 08:14:51 2021 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-cmd_osstest_osstest.c,v 1.1 2021/05/09 08:14:52 nia Exp $
+
+XXX: I need to implement this in libossaudio...
+
+--- cmd/osstest/osstest.c.orig 2019-03-06 07:52:21.000000000 +0000
++++ cmd/osstest/osstest.c
+@@ -524,11 +524,13 @@ test_device (int t, int flags)
+       return 1;
+       }
+ 
++#ifdef DSP_CH_MASK
+   if ((ainfo.caps & DSP_CH_MASK) == DSP_CH_MULTI)
+     {
+       printf ("- Skipping multi channel device\n");
+       return 1;
+     }
++#endif
+ 
+   if (ainfo.pid != -1)
+     {



Home | Main Index | Thread Index | Old Index