pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun May  9 08:27:22 UTC 2021

Modified Files:
        pkgsrc/audio: Makefile
Added Files:
        pkgsrc/audio/ossinfo: DESCR Makefile PLIST distinfo
        pkgsrc/audio/ossinfo/files: Makefile
        pkgsrc/audio/ossinfo/patches: patch-cmd_ossinfo_ossinfo.c

Log Message:
add audio/ossinfo

Display Open Sound System device information.

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


To generate a diff of this commit:
cvs rdiff -u -r1.630 -r1.631 pkgsrc/audio/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ossinfo/DESCR \
    pkgsrc/audio/ossinfo/Makefile pkgsrc/audio/ossinfo/PLIST \
    pkgsrc/audio/ossinfo/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/audio/ossinfo/files/Makefile
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/ossinfo/patches/patch-cmd_ossinfo_ossinfo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/Makefile
diff -u pkgsrc/audio/Makefile:1.630 pkgsrc/audio/Makefile:1.631
--- pkgsrc/audio/Makefile:1.630 Sun May  9 08:14:51 2021
+++ pkgsrc/audio/Makefile       Sun May  9 08:27:21 2021
@@ -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+=    openal-soft
 SUBDIR+=       opencore-amr
 SUBDIR+=       opus-tools
 SUBDIR+=       opusfile
+SUBDIR+=       ossinfo
 SUBDIR+=       ossmix
 SUBDIR+=       osstest
 SUBDIR+=       ossxmix

Added files:

Index: pkgsrc/audio/ossinfo/DESCR
diff -u /dev/null pkgsrc/audio/ossinfo/DESCR:1.1
--- /dev/null   Sun May  9 08:27:22 2021
+++ pkgsrc/audio/ossinfo/DESCR  Sun May  9 08:27:21 2021
@@ -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.
Index: pkgsrc/audio/ossinfo/Makefile
diff -u /dev/null pkgsrc/audio/ossinfo/Makefile:1.1
--- /dev/null   Sun May  9 08:27:22 2021
+++ pkgsrc/audio/ossinfo/Makefile       Sun May  9 08:27:21 2021
@@ -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"
Index: pkgsrc/audio/ossinfo/PLIST
diff -u /dev/null pkgsrc/audio/ossinfo/PLIST:1.1
--- /dev/null   Sun May  9 08:27:22 2021
+++ pkgsrc/audio/ossinfo/PLIST  Sun May  9 08:27:21 2021
@@ -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
Index: pkgsrc/audio/ossinfo/distinfo
diff -u /dev/null pkgsrc/audio/ossinfo/distinfo:1.1
--- /dev/null   Sun May  9 08:27:22 2021
+++ pkgsrc/audio/ossinfo/distinfo       Sun May  9 08:27:21 2021
@@ -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

Index: pkgsrc/audio/ossinfo/files/Makefile
diff -u /dev/null pkgsrc/audio/ossinfo/files/Makefile:1.1
--- /dev/null   Sun May  9 08:27:22 2021
+++ pkgsrc/audio/ossinfo/files/Makefile Sun May  9 08:27:21 2021
@@ -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}

Index: pkgsrc/audio/ossinfo/patches/patch-cmd_ossinfo_ossinfo.c
diff -u /dev/null pkgsrc/audio/ossinfo/patches/patch-cmd_ossinfo_ossinfo.c:1.1
--- /dev/null   Sun May  9 08:27:22 2021
+++ pkgsrc/audio/ossinfo/patches/patch-cmd_ossinfo_ossinfo.c    Sun May  9 08:27:21 2021
@@ -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