pkgsrc-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bba08e44cdc2
branches:  trunk
changeset: 452364:bba08e44cdc2
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun May 09 08:27:21 2021 +0000

description:
add audio/ossinfo

Display Open Sound System device information.

NOTE: On NetBSD, use audiocfg(1) instead.
This package primarily exists to test OSSv4 compatibility.

diffstat:

 audio/Makefile                                    |    3 +-
 audio/ossinfo/DESCR                               |    4 +
 audio/ossinfo/Makefile                            |   50 ++++++++++
 audio/ossinfo/PLIST                               |    4 +
 audio/ossinfo/distinfo                            |    7 +
 audio/ossinfo/files/Makefile                      |   14 ++
 audio/ossinfo/patches/patch-cmd_ossinfo_ossinfo.c |  103 ++++++++++++++++++++++
 7 files changed, 184 insertions(+), 1 deletions(-)

diffs (223 lines):

diff -r 5ef99738f5fe -r bba08e44cdc2 audio/Makefile
--- a/audio/Makefile    Sun May 09 08:15:03 2021 +0000
+++ b/audio/Makefile    Sun May 09 08:27:21 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.630 2021/05/09 08:14:51 nia Exp $
+# $NetBSD: Makefile,v 1.631 2021/05/09 08:27:21 nia Exp $
 #
 
 COMMENT=       Audio tools, players, and libraries
@@ -352,6 +352,7 @@
 SUBDIR+=       opencore-amr
 SUBDIR+=       opus-tools
 SUBDIR+=       opusfile
+SUBDIR+=       ossinfo
 SUBDIR+=       ossmix
 SUBDIR+=       osstest
 SUBDIR+=       ossxmix
diff -r 5ef99738f5fe -r bba08e44cdc2 audio/ossinfo/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossinfo/DESCR       Sun May 09 08:27:21 2021 +0000
@@ -0,0 +1,4 @@
+Display Open Sound System device information.
+
+NOTE: On NetBSD, use audiocfg(1) instead.
+This package primarily exists to test OSSv4 compatibility.
diff -r 5ef99738f5fe -r bba08e44cdc2 audio/ossinfo/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossinfo/Makefile    Sun May 09 08:27:21 2021 +0000
@@ -0,0 +1,50 @@
+# $NetBSD: Makefile,v 1.1 2021/05/09 08:27:21 nia Exp $
+
+DISTNAME=      oss-v4.2-build2019-src-bsd
+PKGNAME=       ossinfo-${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=       Display OSSv4 device information
+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 5ef99738f5fe -r bba08e44cdc2 audio/ossinfo/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossinfo/PLIST       Sun May 09 08:27:21 2021 +0000
@@ -0,0 +1,4 @@
+@comment $NetBSD: PLIST,v 1.1 2021/05/09 08:27:21 nia Exp $
+bin/ossinfo
+share/doc/ossinfo/COPYING
+share/doc/ossinfo/ossinfo.man
diff -r 5ef99738f5fe -r bba08e44cdc2 audio/ossinfo/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossinfo/distinfo    Sun May 09 08:27:21 2021 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2021/05/09 08:27:21 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_ossinfo_ossinfo.c) = c23fa6445407588cc67aa02fdc9d637a8d95f6d7
diff -r 5ef99738f5fe -r bba08e44cdc2 audio/ossinfo/files/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossinfo/files/Makefile      Sun May 09 08:27:21 2021 +0000
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1 2021/05/09 08:27:21 nia Exp $
+
+CFLAGS+=       -DLOCAL_BUILD
+
+OBJS=          ossinfo.o
+PROG=          ossinfo
+
+all: ${PROG}
+
+.c.o:
+       ${CC} ${CFLAGS} -c ${.IMPSRC}
+
+${PROG}: ${OBJS}
+       ${CC} ${LDFLAGS} -o ${PROG} ${OBJS}
diff -r 5ef99738f5fe -r bba08e44cdc2 audio/ossinfo/patches/patch-cmd_ossinfo_ossinfo.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/ossinfo/patches/patch-cmd_ossinfo_ossinfo.c Sun May 09 08:27:21 2021 +0000
@@ -0,0 +1,103 @@
+$NetBSD: patch-cmd_ossinfo_ossinfo.c,v 1.1 2021/05/09 08:27:21 nia Exp $
+
+XXX: These features are missing from libossaudio.
+
+--- cmd/ossinfo/ossinfo.c.orig 2019-03-06 07:52:21.000000000 +0000
++++ cmd/ossinfo/ossinfo.c
+@@ -131,23 +131,35 @@ print_verbose_formats (unsigned long mas
+     printf ("      AFMT_MPEG\t- MPEG (MP2/MP3) encoded audio\n");
+   if (mask & AFMT_AC3)
+     printf ("      AFMT_AC3\t\t- AC3 (Dolby Digital) encoded audio\n");
++#ifdef AFMT_VORBIS
+   if (mask & AFMT_VORBIS)
+     printf ("      AFMT_VORBIS\t- Vorbis encoded audio\n");
++#endif
+   if (mask & AFMT_S32_LE)
+     printf ("      AFMT_S32_LE\t- 32 bit signed little endian\n");
+   if (mask & AFMT_S32_BE)
+     printf ("      AFMT_S32_BE\t- 32 bit signed big endian\n");
++#ifdef AFMT_FLOAT
+   if (mask & AFMT_FLOAT)
+     printf
+       ("      AFMT_FLOAT\t- Single precision floating point (native endianess)\n");
++#endif
++#ifdef AFMT_S24_LE
+   if (mask & AFMT_S24_LE)
+     printf ("      AFMT_S24_LE\t- 24/32 bit signed little endian\n");
++#endif
++#ifdef AFMT_S24_BE
+   if (mask & AFMT_S24_BE)
+     printf ("      AFMT_S24_BE\t- 24/32 bit signed big endian\n");
++#endif
++#ifdef AFMT_S24_PACKED
+   if (mask & AFMT_S24_PACKED)
+     printf ("      AFMT_S24_PACKED\t- 24 bit packed (3 byte)\n");
++#endif
++#ifdef AFMT_SPDIF_RAW
+   if (mask & AFMT_SPDIF_RAW)
+     printf ("      AFMT_SPDIF_RAW\t- Raw S/PDIF frames\n");
++#endif
+ }
+ 
+ static void
+@@ -167,15 +179,21 @@ print_engine_info (oss_audioinfo * ainfo
+ 
+   switch (ainfo->busy)
+     {
++#ifdef OSS_OPEN_READ
+     case OSS_OPEN_READ:
+       printf ("Busy (IN) ");
+       break;
++#endif
++#ifdef OSS_OPEN_WRITE
+     case OSS_OPEN_WRITE:
+       printf ("Busy (OUT) ");
+       break;
++#endif
++#ifdef OSS_OPEN_READWRITE
+     case OSS_OPEN_READWRITE:
+       printf ("Busy (IN/OUT) ");
+       break;
++#endif
+     default:
+       printf ("Available for use ");
+     }
+@@ -278,14 +296,22 @@ print_audio_info (void)
+       printf ("TRIGGER ");
+       if (ainfo.caps & PCM_CAP_MMAP)
+       printf ("MMAP ");
++#ifdef PCM_CAP_MULTI
+       if (ainfo.caps & PCM_CAP_MULTI)
+       printf ("MULTI ");
++#endif
++#ifdef PCM_CAP_BIND
+       if (ainfo.caps & PCM_CAP_BIND)
+       printf ("BIND ");
++#endif
++#ifdef PCM_CAP_VIRTUAL
+       if (ainfo.caps & PCM_CAP_VIRTUAL)
+       printf ("VIRTUAL ");
++#endif
++#ifdef PCM_CAP_SHADOW
+       if (ainfo.caps & PCM_CAP_SHADOW)
+       printf ("SHADOW ");
++#endif
+       if (ainfo.caps & PCM_CAP_HIDDEN)
+       printf ("HIDDEN ");
+       printf ("\n");
+@@ -395,6 +421,7 @@ print_audio_info (void)
+       printf ("    Sample rate source: %d\n", ainfo.rate_source);
+ 
+ 
++#ifdef DSP_CH_MASK
+       printf ("    Preferred channel configuration: ");
+       switch (ainfo.caps & DSP_CH_MASK)
+       {
+@@ -411,6 +438,7 @@ print_audio_info (void)
+         printf ("MULTICH\n");
+         break;
+       }
++#endif
+ 
+       printf ("    Supported number of channels (min - max): %d - %d\n",
+             ainfo.min_channels, ainfo.max_channels);



Home | Main Index | Thread Index | Old Index