pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
-pcaudiolib
Module Name: pkgsrc-wip
Committed By: Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By: bsiegert
Date: Thu Feb 29 15:17:16 2024 +0100
Changeset: e866b54279dd8e193e7724bcf7e09f7d429ad65b
Modified Files:
Makefile
Removed Files:
pcaudiolib/COMMIT_MSG
pcaudiolib/DESCR
pcaudiolib/Makefile
pcaudiolib/PLIST
pcaudiolib/buildlink3.mk
pcaudiolib/distinfo
pcaudiolib/options.mk
pcaudiolib/patches/patch-Makefile.am
pcaudiolib/patches/patch-configure.ac
pcaudiolib/patches/patch-src_audio.c
pcaudiolib/patches/patch-src_audio__priv.h
pcaudiolib/patches/patch-src_netbsd.c
Log Message:
-pcaudiolib
now in pkgsrc/audio/pcaudiolib.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e866b54279dd8e193e7724bcf7e09f7d429ad65b
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 -
pcaudiolib/COMMIT_MSG | 3 -
pcaudiolib/DESCR | 3 -
pcaudiolib/Makefile | 46 -------
pcaudiolib/PLIST | 3 -
pcaudiolib/buildlink3.mk | 26 ----
pcaudiolib/distinfo | 10 --
pcaudiolib/options.mk | 22 ----
pcaudiolib/patches/patch-Makefile.am | 16 ---
pcaudiolib/patches/patch-configure.ac | 42 ------
pcaudiolib/patches/patch-src_audio.c | 25 ----
pcaudiolib/patches/patch-src_audio__priv.h | 32 -----
pcaudiolib/patches/patch-src_netbsd.c | 200 -----------------------------
13 files changed, 429 deletions(-)
diffs:
diff --git a/Makefile b/Makefile
index 7486adf252..38a1c2655b 100644
--- a/Makefile
+++ b/Makefile
@@ -2886,7 +2886,6 @@ SUBDIR+= paxtest
SUBDIR+= payara41
SUBDIR+= pbbuttonsd
SUBDIR+= pbzx
-SUBDIR+= pcaudiolib
SUBDIR+= pcem
SUBDIR+= pcp
SUBDIR+= pdb2ldif
diff --git a/pcaudiolib/COMMIT_MSG b/pcaudiolib/COMMIT_MSG
deleted file mode 100644
index b8337f0886..0000000000
--- a/pcaudiolib/COMMIT_MSG
+++ /dev/null
@@ -1,3 +0,0 @@
-audio/pcaudiolib: Add pcaudiolib version 1.2
-
-Packaged in wip by adr
diff --git a/pcaudiolib/DESCR b/pcaudiolib/DESCR
deleted file mode 100644
index 7402b3f50d..0000000000
--- a/pcaudiolib/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-The Portable C Audio Library (pcaudiolib) provides a C API to
-different audio devices. It supports: ALSA, CoreAudio (Mac OS),
-OSS and PulseAudio.
diff --git a/pcaudiolib/Makefile b/pcaudiolib/Makefile
deleted file mode 100644
index 968cb3772c..0000000000
--- a/pcaudiolib/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-# $NetBSD$
-
-DISTNAME= pcaudiolib-1.2
-CATEGORIES= audio
-MASTER_SITES= ${MASTER_SITE_GITHUB:=espeak-ng/}
-GITHUB_PROJECT= pcaudiolib
-GITHUB_RELEASE= 1.2
-
-MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE= https://github.com/espeak-ng/pcaudiolib/
-COMMENT= Provides a C API to different audio devices
-LICENSE= gnu-gpl-v3
-
-GNU_CONFIGURE= yes
-USE_LIBTOOL= yes
-USE_LANGUAGES= c c++
-USE_TOOLS+= automake autoconf autoreconf pkg-config
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "NetBSD"
-CONFIGURE_ARGS+= --with-netbsd
-.else
-CONFIGURE_ARGS+= --without-netbsd
-.endif
-
-.if ${OPSYS} == "Darwin"
-CONFIGURE_ARGS+= --with-coreaudio
-.else
-CONFIGURE_ARGS+= --without-coreaudio
-.endif
-
-.include "../../mk/oss.buildlink3.mk"
-.if ${OSS_TYPE} != "none"
-SUBST_CLASSES+= oss
-SUBST_STAGE.oss= pre-configure
-SUBST_FILES.oss= src/oss.c
-SUBST_SED.oss= -e s,/dev/dsp,${DEVOSSAUDIO},g
-SUBST_MESSAGE.oss= Fixing hardcoded audio device.
-.endif
-
-pre-configure:
- set -e; cd ${WRKSRC} && autoreconf -fi
-
-.include "options.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/pcaudiolib/PLIST b/pcaudiolib/PLIST
deleted file mode 100644
index 9d055b8422..0000000000
--- a/pcaudiolib/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD$
-include/pcaudiolib/audio.h
-lib/libpcaudio.la
diff --git a/pcaudiolib/buildlink3.mk b/pcaudiolib/buildlink3.mk
deleted file mode 100644
index fe1a44ebf8..0000000000
--- a/pcaudiolib/buildlink3.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# $NetBSD: buildlink3.mk,v 1.19 2022/09/11 12:51:04 wiz Exp $
-
-BUILDLINK_TREE+= pcaudiolib
-
-.if !defined(PCAUDIOLIB_BUILDLINK3_MK)
-PCAUDIOLIB_BUILDLINK3_MK:=
-
-BUILDLINK_API_DEPENDS.pcaudiolib+= pcaudiolib>=1.2
-BUILDLINK_ABI_DEPENDS.pcaudiolib+= pcaudiolib>=1.2
-BUILDLINK_PKGSRCDIR.pcaudiolib?= ../../audio/pcaudiolib
-BUILDLINK_INCDIRS.pcaudiolib?= include/pcaudiolib
-
-pkgbase:= pcaudiolib
-.include "../../mk/pkg-build-options.mk"
-
-.if ${PKG_BUILD_OPTIONS.pcaudiolib:Malsa}
-. include "../../audio/alsa-lib/buildlink3.mk"
-.endif
-
-.if ${PKG_BUILD_OPTIONS.pcaudiolib:Mpulseaudio}
-. include "../../audio/pulseaudio/buildlink3.mk"
-.endif
-
-.endif # PCAUDIOLIB_BUILDLINK3_MK
-
-BUILDLINK_TREE+= -pcaudiolib
diff --git a/pcaudiolib/distinfo b/pcaudiolib/distinfo
deleted file mode 100644
index 48a6da5ffa..0000000000
--- a/pcaudiolib/distinfo
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD$
-
-BLAKE2s (pcaudiolib-1.2.tar.gz) = 11dc27e944fb2edba51c0b4f1da100e7279e44e24821941e3fdd222c85b2da94
-SHA512 (pcaudiolib-1.2.tar.gz) = 803e8c36646f780b9e9a98600092af366ad47ecf9cb447b9b6c82b75eb316ee65674832fc0cbfa56ee4d508ae1d0f69890f5885817e6df3e2ecef54571b936d6
-Size (pcaudiolib-1.2.tar.gz) = 377066 bytes
-SHA1 (patch-Makefile.am) = 98b94b9187db8c10980081fb2db54f4305734a71
-SHA1 (patch-configure.ac) = f5cfa55793b644572ccb3d26ae82d2699204e894
-SHA1 (patch-src_audio.c) = c249bf6b0efe3f6b9a6166b3ab7857314d73e297
-SHA1 (patch-src_audio__priv.h) = d38ff94692362e8e801c9a7f671b8ac46bdf8b21
-SHA1 (patch-src_netbsd.c) = 96ff1f35bbcee8107b33166a4daad902c9a1e1b9
diff --git a/pcaudiolib/options.mk b/pcaudiolib/options.mk
deleted file mode 100644
index 6da95636de..0000000000
--- a/pcaudiolib/options.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# $NetBSD: $
-
-PKG_OPTIONS_VAR= PKG_OPTIONS.pcaudiolib
-
-PKG_SUPPORTED_OPTIONS+= alsa pulseaudio
-PKG_SUGGESTED_OPTIONS.Linux+= alsa
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Malsa)
-. include "../../audio/alsa-lib/buildlink3.mk"
-CONFIGURE_ARGS+= --with-alsa
-.else
-CONFIGURE_ARGS+= --without-alsa
-.endif
-
-.if !empty(PKG_OPTIONS:Mpulseaudio)
-. include "../../audio/pulseaudio/buildlink3.mk"
-CONFIGURE_ARGS+= --with-pulseaudio
-.else
-CONFIGURE_ARGS+= --without-pulseaudio
-.endif
diff --git a/pcaudiolib/patches/patch-Makefile.am b/pcaudiolib/patches/patch-Makefile.am
deleted file mode 100644
index 8979234099..0000000000
--- a/pcaudiolib/patches/patch-Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
-Add netbsd.c to the source list when NetBSD native audio is enabled
-
---- Makefile.am.orig 2018-03-14 09:47:45.000000000 +0000
-+++ Makefile.am
-@@ -90,3 +90,9 @@ EXTRA_DIST += \
- src/TPCircularBuffer/README.markdown \
- src/TPCircularBuffer/TPCircularBuffer.podspec
- endif
-+
-+# NetBSD audio support
-+if HAVE_NETBSD
-+src_libpcaudio_la_SOURCES += \
-+ src/netbsd.c
-+endif
diff --git a/pcaudiolib/patches/patch-configure.ac b/pcaudiolib/patches/patch-configure.ac
deleted file mode 100644
index 691e4343d1..0000000000
--- a/pcaudiolib/patches/patch-configure.ac
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD$
-
-Add NetBSD native audio support
-
---- configure.ac.orig 2021-07-30 12:08:56.000000000 +0000
-+++ configure.ac
-@@ -152,6 +152,29 @@ else
- fi
-
- dnl ================================================================
-+dnl NetBSD checks.
-+dnl ================================================================
-+
-+AC_ARG_WITH([netbsd],
-+ [AS_HELP_STRING([--with-netbsd], [support for NetBSD audio output @<:@default=no@:>@])],
-+ [])
-+
-+if test "$with_netbsd" = "no"; then
-+ echo "Disabling NetBSD audio output support"
-+ have_netbsd=no
-+else
-+ case $host_os in
-+ *netbsd*)
-+ have_netbsd=yes
-+ ;;
-+ *)
-+ have_netbsd=no
-+ ;;
-+ esac
-+fi
-+AM_CONDITIONAL([HAVE_NETBSD], [test "x${have_netbsd}" = "xyes"])
-+
-+dnl ================================================================
- dnl Generate output.
- dnl ================================================================
-
-@@ -172,4 +195,5 @@ AC_MSG_NOTICE([
- QSA support: ${have_qsa}
- Coreaudio support: ${have_coreaudio}
- OSS support: ${have_oss}
-+ NetBSD support: ${have_netbsd}
- ])
diff --git a/pcaudiolib/patches/patch-src_audio.c b/pcaudiolib/patches/patch-src_audio.c
deleted file mode 100644
index 4144f14fb8..0000000000
--- a/pcaudiolib/patches/patch-src_audio.c
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
-Add NetBSD native audio support
-
---- src/audio.c.orig 2017-01-08 13:01:50.000000000 +0000
-+++ src/audio.c
-@@ -94,7 +94,10 @@ create_audio_device_object(const char *d
- #if defined(__APPLE__)
- if ((object = create_coreaudio_object(device, application_name, description)) != NULL)
- return object;
--
-+#else
-+#if defined(__NetBSD__)
-+ if ((object = create_netbsd_object(device, application_name, description)) != NULL)
-+ return object;
- #else
- if ((object = create_pulseaudio_object(device, application_name, description)) != NULL)
- return object;
-@@ -106,5 +109,6 @@ create_audio_device_object(const char *d
- return object;
- #endif
- #endif
-+#endif
- return NULL;
- }
diff --git a/pcaudiolib/patches/patch-src_audio__priv.h b/pcaudiolib/patches/patch-src_audio__priv.h
deleted file mode 100644
index eab2722c2c..0000000000
--- a/pcaudiolib/patches/patch-src_audio__priv.h
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
-Add NetBSD native audio support
-
---- src/audio_priv.h.orig 2021-07-30 08:54:26.000000000 +0000
-+++ src/audio_priv.h
-@@ -86,6 +86,15 @@ create_xaudio2_object(const char *device
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
-+#ifdef __NetBSD__
-+
-+struct audio_object *
-+create_netbsd_object(const char *device,
-+ const char *application_name,
-+ const char *description);
-+
-+#else
-+
- #ifdef __APPLE__
-
- struct audio_object *
-@@ -117,7 +126,8 @@ create_oss_object(const char *device,
-
- #endif
- #endif
--
-+#endif
-+
- #ifdef __cplusplus
- }
- #endif
diff --git a/pcaudiolib/patches/patch-src_netbsd.c b/pcaudiolib/patches/patch-src_netbsd.c
deleted file mode 100644
index a8b68edd5c..0000000000
--- a/pcaudiolib/patches/patch-src_netbsd.c
+++ /dev/null
@@ -1,200 +0,0 @@
-$NetBSD$
-
-Add NetBSD native audio support
-
---- src/netbsd.c.orig 2024-01-30 02:16:50.046541412 +0000
-+++ src/netbsd.c
-@@ -0,0 +1,193 @@
-+/* Netbsd Output.
-+ *
-+ * Based on Oss Output by Reece H. Dunn
-+ *
-+ * This file is part of pcaudiolib.
-+ *
-+ * pcaudiolib is free software: you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation, either version 3 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * pcaudiolib is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with pcaudiolib. If not, see <http://www.gnu.org/licenses/>.
-+ */
-+
-+#include "config.h"
-+#include "audio_priv.h"
-+
-+#include <sys/audioio.h>
-+
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <string.h>
-+#include <stdio.h>
-+#include <sys/ioctl.h>
-+#include <unistd.h>
-+
-+struct netbsd_object
-+{
-+ struct audio_object vtable;
-+ int fd;
-+ int ctlfd;
-+ char *device;
-+
-+};
-+
-+#define to_netbsd_object(object) container_of(object, struct netbsd_object, vtable)
-+
-+int
-+netbsd_object_open(struct audio_object *object,
-+ enum audio_object_format format,
-+ uint32_t rate,
-+ uint8_t channels)
-+{
-+ struct netbsd_object *self = to_netbsd_object(object);
-+
-+ if (self->fd != -1)
-+ return EEXIST;
-+
-+ struct aformat_sun
-+ {
-+ int audio_object_format;
-+ int netbsd_format;
-+ int netbsd_precision;
-+ };
-+ struct aformat_sun aformat_netbsd_tbl[] = {
-+ {AUDIO_OBJECT_FORMAT_ALAW, AUDIO_ENCODING_ALAW, 8},
-+ {AUDIO_OBJECT_FORMAT_ULAW, AUDIO_ENCODING_ULAW, 8},
-+ {AUDIO_OBJECT_FORMAT_S8, AUDIO_ENCODING_SLINEAR, 8},
-+ {AUDIO_OBJECT_FORMAT_U8, AUDIO_ENCODING_ULINEAR, 8},
-+ {AUDIO_OBJECT_FORMAT_S16LE, AUDIO_ENCODING_SLINEAR_LE, 16},
-+ {AUDIO_OBJECT_FORMAT_S16BE, AUDIO_ENCODING_SLINEAR_BE, 16},
-+ {AUDIO_OBJECT_FORMAT_U16LE, AUDIO_ENCODING_ULINEAR_LE, 16},
-+ {AUDIO_OBJECT_FORMAT_U16BE, AUDIO_ENCODING_ULINEAR_BE, 16},
-+ {AUDIO_OBJECT_FORMAT_S18LE, AUDIO_ENCODING_SLINEAR_LE, 18},
-+ {AUDIO_OBJECT_FORMAT_S18BE, AUDIO_ENCODING_SLINEAR_BE, 18},
-+ {AUDIO_OBJECT_FORMAT_U18LE, AUDIO_ENCODING_ULINEAR_LE, 18},
-+ {AUDIO_OBJECT_FORMAT_U18BE, AUDIO_ENCODING_ULINEAR_BE, 18},
-+ {AUDIO_OBJECT_FORMAT_S20LE, AUDIO_ENCODING_SLINEAR_LE, 20},
-+ {AUDIO_OBJECT_FORMAT_S20BE, AUDIO_ENCODING_SLINEAR_BE, 20},
-+ {AUDIO_OBJECT_FORMAT_U20LE, AUDIO_ENCODING_ULINEAR_LE, 20},
-+ {AUDIO_OBJECT_FORMAT_U20BE, AUDIO_ENCODING_ULINEAR_BE, 20},
-+ {AUDIO_OBJECT_FORMAT_S24LE, AUDIO_ENCODING_SLINEAR_LE, 24},
-+ {AUDIO_OBJECT_FORMAT_S24BE, AUDIO_ENCODING_SLINEAR_BE, 24},
-+ {AUDIO_OBJECT_FORMAT_U24LE, AUDIO_ENCODING_ULINEAR_LE, 24},
-+ {AUDIO_OBJECT_FORMAT_U24BE, AUDIO_ENCODING_ULINEAR_BE, 24},
-+ {AUDIO_OBJECT_FORMAT_S32LE, AUDIO_ENCODING_SLINEAR_LE, 32},
-+ {AUDIO_OBJECT_FORMAT_S32BE, AUDIO_ENCODING_SLINEAR_BE, 32},
-+ {AUDIO_OBJECT_FORMAT_U32LE, AUDIO_ENCODING_ULINEAR_LE, 32},
-+ {AUDIO_OBJECT_FORMAT_U32BE, AUDIO_ENCODING_ULINEAR_BE, 32},
-+ {AUDIO_OBJECT_FORMAT_ADPCM, AUDIO_ENCODING_ADPCM, 8},
-+ };
-+#define NETBSDFORMATS (sizeof(aformat_netbsd_tbl)/sizeof(aformat_netbsd_tbl[0]))
-+ int i;
-+ for(i=0; i < NETBSDFORMATS; i++)
-+ if(aformat_netbsd_tbl[i].audio_object_format == format)
-+ break;
-+ if(i >= NETBSDFORMATS)
-+ return EINVAL;
-+
-+ audio_info_t audioinfo;
-+ if ((self->fd = open(self->device ? self->device : "/dev/audio", O_WRONLY, 0)) == -1)
-+ return errno;
-+ AUDIO_INITINFO(&audioinfo);
-+ audioinfo.play.sample_rate = rate;
-+ audioinfo.play.channels = channels;
-+ audioinfo.play.precision = aformat_netbsd_tbl[i].netbsd_precision;
-+ audioinfo.play.encoding = aformat_netbsd_tbl[i].netbsd_format;
-+ if (ioctl(self->fd, AUDIO_SETINFO, &audioinfo) == -1)
-+ goto error;
-+ return 0;
-+error:
-+ close(self->fd);
-+ self->fd = -1;
-+ return errno;
-+}
-+
-+void
-+netbsd_object_close(struct audio_object *object)
-+{
-+ struct netbsd_object *self = to_netbsd_object(object);
-+
-+ if (self->fd != -1) {
-+ close(self->fd);
-+ self->fd = -1;
-+ }
-+}
-+
-+void
-+netbsd_object_destroy(struct audio_object *object)
-+{
-+ struct netbsd_object *self = to_netbsd_object(object);
-+
-+ free(self->device);
-+ free(self);
-+}
-+
-+int
-+netbsd_object_drain(struct audio_object *object)
-+{
-+ struct netbsd_object *self = to_netbsd_object(object);
-+
-+ if (ioctl(self->fd, AUDIO_DRAIN, NULL) == -1)
-+ return errno;
-+ return 0;
-+}
-+
-+int
-+netbsd_object_flush(struct audio_object *object)
-+{
-+ struct netbsd_object *self = to_netbsd_object(object);
-+
-+ if (ioctl(self->fd, AUDIO_FLUSH, NULL) == -1)
-+ return errno;
-+ return 0;
-+}
-+
-+int
-+netbsd_object_write(struct audio_object *object,
-+ const void *data,
-+ size_t bytes)
-+{
-+ struct netbsd_object *self = to_netbsd_object(object);
-+
-+ if (write(self->fd, data, bytes) == -1)
-+ return errno;
-+ return 0;
-+}
-+
-+const char *
-+netbsd_object_strerror(struct audio_object *object,
-+ int error)
-+{
-+ return strerror(error);
-+}
-+
-+struct audio_object *
-+create_netbsd_object(const char *device,
-+ const char *application_name,
-+ const char *description)
-+{
-+ struct netbsd_object *self = malloc(sizeof(struct netbsd_object));
-+ if (!self)
-+ return NULL;
-+
-+ self->fd = -1;
-+ self->device = device ? strdup(device) : NULL;
-+
-+ self->vtable.open = netbsd_object_open;
-+ self->vtable.close = netbsd_object_close;
-+ self->vtable.destroy = netbsd_object_destroy;
-+ self->vtable.write = netbsd_object_write;
-+ self->vtable.drain = netbsd_object_drain;
-+ self->vtable.flush = netbsd_object_flush;
-+ self->vtable.strerror = netbsd_object_strerror;
-+
-+ return &self->vtable;
-+}
Home |
Main Index |
Thread Index |
Old Index