git: 3e8ac98a09db - main - audio/pcaudiolib: New port: Portable C audio library

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Fri, 08 Jul 2022 16:29:25 UTC
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3e8ac98a09db6c18bdcb013d638b6c75ce54d422

commit 3e8ac98a09db6c18bdcb013d638b6c75ce54d422
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2022-07-08 16:26:10 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2022-07-08 16:26:10 +0000

    audio/pcaudiolib: New port: Portable C audio library
    
    This is a simple audio library that supports multiple backends: ALSA,
    OSS, and PulseAudio.
    
    The default backend on FreeBSD is OSS, since it is supported by the
    base system and does not depend on any other port.
---
 audio/Makefile             |  1 +
 audio/pcaudiolib/Makefile  | 27 +++++++++++++++++++++++++++
 audio/pcaudiolib/distinfo  |  3 +++
 audio/pcaudiolib/pkg-descr |  8 ++++++++
 audio/pcaudiolib/pkg-plist |  5 +++++
 5 files changed, 44 insertions(+)

diff --git a/audio/Makefile b/audio/Makefile
index 1cb24473b803..8825688353be 100644
--- a/audio/Makefile
+++ b/audio/Makefile
@@ -593,6 +593,7 @@
     SUBDIR += pavucontrol
     SUBDIR += pavucontrol-qt
     SUBDIR += pavumeter
+    SUBDIR += pcaudiolib
     SUBDIR += pc-mixer
     SUBDIR += pd
     SUBDIR += pear-Text_Spell_Audio
diff --git a/audio/pcaudiolib/Makefile b/audio/pcaudiolib/Makefile
new file mode 100644
index 000000000000..dee679ab30ff
--- /dev/null
+++ b/audio/pcaudiolib/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	pcaudiolib
+DISTVERSION=	1.2
+CATEGORIES=	audio
+
+MAINTAINER=	se@FreeBSD.org
+COMMENT=	Portable C audio library
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+USES=		autoreconf libtool pkgconfig
+USE_GITHUB=	yes
+GH_ACCOUNT=	espeak-ng
+GNU_CONFIGURE=	yes
+
+OPTIONS_DEFAULT=	OSS
+OPTIONS_MULTI=		Backend
+OPTIONS_MULTI_Backend=	ALSA OSS PULSEAUDIO
+
+ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
+PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
+
+ALSA_CONFIGURE_WITH=		alsa
+OSS_CONFIGURE_WITH=		oss
+PULSEAUDIO_CONFIGURE_WITH=	pulseaudio
+
+.include <bsd.port.mk>
diff --git a/audio/pcaudiolib/distinfo b/audio/pcaudiolib/distinfo
new file mode 100644
index 000000000000..9781e9225172
--- /dev/null
+++ b/audio/pcaudiolib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1657291568
+SHA256 (espeak-ng-pcaudiolib-1.2_GH0.tar.gz) = 44b9d509b9eac40a0c61585f756d76a7b555f732e8b8ae4a501c8819c59c6619
+SIZE (espeak-ng-pcaudiolib-1.2_GH0.tar.gz) = 34310
diff --git a/audio/pcaudiolib/pkg-descr b/audio/pcaudiolib/pkg-descr
new file mode 100644
index 000000000000..a4e6b01ed956
--- /dev/null
+++ b/audio/pcaudiolib/pkg-descr
@@ -0,0 +1,8 @@
+The Portable C Audio Library (pcaudiolib) provides a C API to different
+audio devices. Supported backends are ALSA, OSS, and PulseAudio.
+
+This Port can be built with any combination of the supported backends,
+but official packages are distributed with OSS support only, in order
+to not depend on the other backends being installed.
+
+WWW: https://github.com/espeak-ng/pcaudiolib
diff --git a/audio/pcaudiolib/pkg-plist b/audio/pcaudiolib/pkg-plist
new file mode 100644
index 000000000000..0b8d4650adcc
--- /dev/null
+++ b/audio/pcaudiolib/pkg-plist
@@ -0,0 +1,5 @@
+include/pcaudiolib/audio.h
+lib/libpcaudio.a
+lib/libpcaudio.so
+lib/libpcaudio.so.0
+lib/libpcaudio.so.0.0.1