summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-05-09 08:14:51 +0000
committernia <nia@pkgsrc.org>2021-05-09 08:14:51 +0000
commitcdda6495b8aefe84715c6f26372608d99f15b1f5 (patch)
treedb086bbbddd8c3a40ce9e14c51c685fe68307557 /audio
parent172ac7866e75bba0315075d5f295c140ec24f5f7 (diff)
downloadpkgsrc-cdda6495b8aefe84715c6f26372608d99f15b1f5.tar.gz
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 (limited to 'audio')
-rw-r--r--audio/Makefile3
-rw-r--r--audio/osstest/DESCR10
-rw-r--r--audio/osstest/Makefile50
-rw-r--r--audio/osstest/PLIST4
-rw-r--r--audio/osstest/distinfo7
-rw-r--r--audio/osstest/files/Makefile14
-rw-r--r--audio/osstest/patches/patch-cmd_osstest_osstest.c20
7 files changed, 107 insertions, 1 deletions
diff --git a/audio/Makefile b/audio/Makefile
index 7e80f38d73c..225fa70f510 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -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+= opencore-amr
SUBDIR+= opus-tools
SUBDIR+= opusfile
SUBDIR+= ossmix
+SUBDIR+= osstest
SUBDIR+= ossxmix
SUBDIR+= p5-Audio-CD
SUBDIR+= p5-Audio-Scan
diff --git a/audio/osstest/DESCR b/audio/osstest/DESCR
new file mode 100644
index 00000000000..258d77fa1ef
--- /dev/null
+++ b/audio/osstest/DESCR
@@ -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 --git a/audio/osstest/Makefile b/audio/osstest/Makefile
new file mode 100644
index 00000000000..97ab4b11a15
--- /dev/null
+++ b/audio/osstest/Makefile
@@ -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
+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 --git a/audio/osstest/PLIST b/audio/osstest/PLIST
new file mode 100644
index 00000000000..cd8cf063293
--- /dev/null
+++ b/audio/osstest/PLIST
@@ -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 --git a/audio/osstest/distinfo b/audio/osstest/distinfo
new file mode 100644
index 00000000000..ebd7e23ef60
--- /dev/null
+++ b/audio/osstest/distinfo
@@ -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 --git a/audio/osstest/files/Makefile b/audio/osstest/files/Makefile
new file mode 100644
index 00000000000..bd3b870cb6a
--- /dev/null
+++ b/audio/osstest/files/Makefile
@@ -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 --git a/audio/osstest/patches/patch-cmd_osstest_osstest.c b/audio/osstest/patches/patch-cmd_osstest_osstest.c
new file mode 100644
index 00000000000..f5ff6d37df2
--- /dev/null
+++ b/audio/osstest/patches/patch-cmd_osstest_osstest.c
@@ -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)
+ {