aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/alsa-lib/Makefile27
-rw-r--r--audio/alsa-lib/distinfo5
-rw-r--r--audio/alsa-lib/files/linux/types.h10
-rw-r--r--audio/alsa-lib/files/patch-include_alsa-symbols.h59
-rw-r--r--audio/alsa-lib/files/patch-modules_mixer_simple_python.c565
-rw-r--r--audio/alsa-lib/files/patch-src_async.c6
-rw-r--r--audio/alsa-lib/files/patch-src_conf_alsa.conf13
-rw-r--r--audio/alsa-lib/pkg-plist85
-rw-r--r--audio/alsa-plugins/Makefile39
-rw-r--r--audio/alsa-plugins/distinfo5
-rw-r--r--audio/alsa-plugins/pkg-plist13
-rw-r--r--audio/alsa-utils/Makefile76
-rw-r--r--audio/alsa-utils/distinfo5
-rw-r--r--audio/alsa-utils/files/patch-alsa-info_alsa-info.sh.111
-rw-r--r--audio/alsa-utils/files/patch-alsaconf_alsaconf.811
-rw-r--r--audio/alsa-utils/files/patch-alsaconf_alsaconf.fr.811
-rw-r--r--audio/alsa-utils/files/patch-alsactl_Makefile.in11
-rw-r--r--audio/alsa-utils/files/patch-alsactl_alsactl__init.xml24
-rw-r--r--audio/alsa-utils/files/patch-alsamixer_volume__mapping.c11
-rw-r--r--audio/alsa-utils/files/patch-amidi_amidi.115
-rw-r--r--audio/alsa-utils/files/patch-aplay_aplay.c18
-rw-r--r--audio/alsa-utils/files/patch-speaker-test_samples_sample__map.csv7
-rw-r--r--audio/alsa-utils/files/patch-speaker-test_speaker-test.111
-rw-r--r--audio/alsa-utils/files/patch-utils_alsa-utils.spec.in11
-rw-r--r--audio/alsa-utils/pkg-plist10
25 files changed, 261 insertions, 798 deletions
diff --git a/audio/alsa-lib/Makefile b/audio/alsa-lib/Makefile
index 4b8ea58fb321..bc1804438c2c 100644
--- a/audio/alsa-lib/Makefile
+++ b/audio/alsa-lib/Makefile
@@ -1,8 +1,7 @@
# Created by: Aragon Gouveia <aragon@phat.za.net>
PORTNAME= alsa-lib
-PORTVERSION= 1.1.2
-PORTREVISION= 2
+PORTVERSION= 1.2.2
CATEGORIES= audio
MASTER_SITES= ftp://ftp.alsa-project.org/pub/lib/ \
GENTOO
@@ -24,21 +23,15 @@ TEST_ENV= ${MAKE_ENV} \
TEST_TARGET= check
CPPFLAGS+= -I${FILESDIR}
-OPTIONS_DEFINE= PYTHON
-OPTIONS_SUB= yes
-
-PYTHON_USES= python
-PYTHON_CONFIGURE_ENABLE= python
-
-post-patch: .SILENT
- ${REINPLACE_CMD} -e '/LIBS/ { s/-ldl//g; s/-lrt//g; }' \
- -e 's/python-config/${PYTHON_CMD:T}-config/g' \
- -e '/pythonlibs/s/--libs/--ldflags/' \
- -e '/_GNU_SOURCE/d' \
- -e '/lt_cv_dlopen/s/-ldl//g' ${WRKSRC}/configure
- ${REINPLACE_CMD} '/LIBADD/s/-ldl//g' \
- ${WRKSRC}/modules/mixer/simple/Makefile.in
- ${REINPLACE_CMD} 's|/etc|${PREFIX}&|g' \
+OPTIONS_DEFINE= PYTHON
+OPTIONS_SUB= yes
+
+PYTHON_USES= gettext-runtime python
+PYTHON_CONFIGURE_ENABLE= mixer-pymods python
+PYTHON_BINARY_ALIAS= python3-config=${PYTHON_CMD:T}-config
+
+post-patch:
+ @${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/src/conf/alsa.conf
post-install:
diff --git a/audio/alsa-lib/distinfo b/audio/alsa-lib/distinfo
index ef2e685aca82..5edbc1a47022 100644
--- a/audio/alsa-lib/distinfo
+++ b/audio/alsa-lib/distinfo
@@ -1,2 +1,3 @@
-SHA256 (alsa-lib-1.1.2.tar.bz2) = d38dacd9892b06b8bff04923c380b38fb2e379ee5538935ff37e45b395d861d6
-SIZE (alsa-lib-1.1.2.tar.bz2) = 947423
+TIMESTAMP = 1615528054
+SHA256 (alsa-lib-1.2.2.tar.bz2) = d8e853d8805574777bbe40937812ad1419c9ea7210e176f0def3e6ed255ab3ec
+SIZE (alsa-lib-1.2.2.tar.bz2) = 1030747
diff --git a/audio/alsa-lib/files/linux/types.h b/audio/alsa-lib/files/linux/types.h
index b6de02a9c29a..0329d94e09dd 100644
--- a/audio/alsa-lib/files/linux/types.h
+++ b/audio/alsa-lib/files/linux/types.h
@@ -10,6 +10,16 @@
typedef pid_t __kernel_pid_t;
typedef off_t __kernel_off_t;
+typedef long __kernel_long_t;
+typedef uint8_t __u8;
+typedef uint16_t __u16;
+typedef uint32_t __u32;
typedef uint64_t __u64;
+
+typedef int8_t __s8;
+typedef int16_t __s16;
+typedef int32_t __s32;
+typedef int64_t __s64;
+
#endif /* _LINUX_TYPES_H */
diff --git a/audio/alsa-lib/files/patch-include_alsa-symbols.h b/audio/alsa-lib/files/patch-include_alsa-symbols.h
deleted file mode 100644
index 2dee729b1344..000000000000
--- a/audio/alsa-lib/files/patch-include_alsa-symbols.h
+++ /dev/null
@@ -1,59 +0,0 @@
-commit 3bad0a21b4d13d8d10691f382c836897fa7a7cb9
-Author: Breno Leitao <leitao@debian.org>
-Date: Wed Feb 22 16:45:00 2017 -0300
-
- Drop ppc64-specific workaround for versioned symbols
-
- Currently aserver fails to build when using parameter
- --without-versioned, due to an workaround for ppc64
- (06221f86d207cb33ddd4867ca5301eeb247c4400). This workaround is
- not required anymore on the ppc64 ABI v2, and, in fact is breaking the
- compilation. Reverting this commit
-
- Signed-off-by: Breno Leitao <leitao@debian.org>
- Signed-off-by: Takashi Iwai <tiwai@suse.de>
-
---- include/alsa-symbols.h.orig 2016-08-02 17:48:38 UTC
-+++ include/alsa-symbols.h
-@@ -29,19 +29,10 @@
- #define INTERNAL_CONCAT2_2(Pre, Post) Pre##Post
- #define INTERNAL(Name) INTERNAL_CONCAT2_2(__, Name)
-
--#ifdef __powerpc64__
--# define symbol_version(real, name, version) \
-- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version); \
-- __asm__ (".symver ." ASM_NAME(#real) ",." ASM_NAME(#name) "@" #version)
--# define default_symbol_version(real, name, version) \
-- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version); \
-- __asm__ (".symver ." ASM_NAME(#real) ",." ASM_NAME(#name) "@@" #version)
--#else
- # define symbol_version(real, name, version) \
- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@" #version)
- # define default_symbol_version(real, name, version) \
- __asm__ (".symver " ASM_NAME(#real) "," ASM_NAME(#name) "@@" #version)
--#endif
-
- #ifdef USE_VERSIONED_SYMBOLS
- #define use_symbol_version(real, name, version) \
-@@ -50,13 +41,6 @@
- default_symbol_version(real, name, version)
- #else
- #define use_symbol_version(real, name, version) /* nothing */
--#ifdef __powerpc64__
--#define use_default_symbol_version(real, name, version) \
-- __asm__ (".weak " ASM_NAME(#name)); \
-- __asm__ (".weak ." ASM_NAME(#name)); \
-- __asm__ (".set " ASM_NAME(#name) "," ASM_NAME(#real)); \
-- __asm__ (".set ." ASM_NAME(#name) ",." ASM_NAME(#real))
--#else
- #if defined(__alpha__) || defined(__mips__)
- #define use_default_symbol_version(real, name, version) \
- __asm__ (".weak " ASM_NAME(#name)); \
-@@ -65,7 +49,6 @@
- #define use_default_symbol_version(real, name, version) \
- __asm__ (".weak " ASM_NAME(#name)); \
- __asm__ (".set " ASM_NAME(#name) "," ASM_NAME(#real))
--#endif
- #endif
- #endif
-
diff --git a/audio/alsa-lib/files/patch-modules_mixer_simple_python.c b/audio/alsa-lib/files/patch-modules_mixer_simple_python.c
deleted file mode 100644
index 2afa4df4a5dc..000000000000
--- a/audio/alsa-lib/files/patch-modules_mixer_simple_python.c
+++ /dev/null
@@ -1,565 +0,0 @@
-https://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=345843fc24b3
-
---- modules/mixer/simple/python.c.orig 2016-08-02 17:48:38 UTC
-+++ modules/mixer/simple/python.c
-@@ -25,6 +25,10 @@
- #include "asoundlib.h"
- #include "mixer_abst.h"
-
-+#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
-+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
-+#endif
-+
- struct python_priv {
- int py_initialized;
- PyObject *py_event_func;
-@@ -56,20 +60,49 @@ struct pymixer {
-
- static PyInterpreterState *main_interpreter;
-
-+#if PY_MAJOR_VERSION >= 3
-+ #define PyInt_FromLong PyLong_FromLong
-+#endif
-+
-+static inline int get_long(PyObject *o, long *val)
-+{
-+#if PY_MAJOR_VERSION < 3
-+ if (PyInt_Check(o)) {
-+ *val = PyInt_AsLong(o);
-+ return 0;
-+ }
-+#endif
-+ if (PyLong_Check(o)) {
-+ *val = PyLong_AsLong(o);
-+ return 0;
-+ }
-+ return 1;
-+}
-+
-+static inline PyObject *InternFromString(const char *name)
-+{
-+#if PY_MAJOR_VERSION < 3
-+ return PyString_InternFromString(name);
-+#else
-+ return PyUnicode_InternFromString(name);
-+#endif
-+}
-+
- static void *get_C_ptr(PyObject *obj, const char *attr)
- {
- PyObject *o;
-+ long val;
-
-- o = PyObject_GetAttr(obj, PyString_InternFromString(attr));
-+ o = PyObject_GetAttr(obj, InternFromString(attr));
- if (!o) {
- PyErr_Format(PyExc_TypeError, "missing '%s' attribute", attr);
- return NULL;
- }
-- if (!PyInt_Check(o)) {
-- PyErr_Format(PyExc_TypeError, "'%s' attribute is not integer", attr);
-+ if (get_long(o, &val)) {
-+ PyErr_Format(PyExc_TypeError, "'%s' attribute is not Int or Long", attr);
- return NULL;
- }
-- return (void *)PyInt_AsLong(o);
-+ return (void *)val;
- }
-
- static struct pymelem *melem_to_pymelem(snd_mixer_elem_t *elem)
-@@ -80,11 +113,11 @@ static struct pymelem *melem_to_pymelem(snd_mixer_elem
- static int pcall(struct pymelem *pymelem, const char *attr, PyObject *args, PyObject **_res)
- {
- PyObject *obj = (PyObject *)pymelem, *res;
-- int xres = 0;
-+ long xres = 0;
-
- if (_res)
- *_res = NULL;
-- obj = PyObject_GetAttr(obj, PyString_InternFromString(attr));
-+ obj = PyObject_GetAttr(obj, InternFromString(attr));
- if (!obj) {
- PyErr_Format(PyExc_TypeError, "missing '%s' attribute", attr);
- PyErr_Print();
-@@ -103,8 +136,12 @@ static int pcall(struct pymelem *pymelem, const char *
- *_res = res;
- res = PyTuple_GetItem(res, 0);
- }
-- if (PyInt_Check(res)) {
-+ if (PyLong_Check(res)) {
-+ xres = PyLong_AsLong(res);
-+#if PY_MAJOR_VERSION < 3
-+ } else if (PyInt_Check(res)) {
- xres = PyInt_AsLong(res);
-+#endif
- } else if (res == Py_None) {
- xres = 0;
- } else if (PyBool_Check(res)) {
-@@ -155,7 +192,7 @@ static int is_ops(snd_mixer_elem_t *elem, int dir, int
- static int get_x_range_ops(snd_mixer_elem_t *elem, int dir,
- long *min, long *max, const char *attr)
- {
-- PyObject *obj1, *res;
-+ PyObject *obj1, *t1, *t2, *res;
- struct pymelem *pymelem = melem_to_pymelem(elem);
- int err;
-
-@@ -163,21 +200,23 @@ static int get_x_range_ops(snd_mixer_elem_t *elem, int
- PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(dir));
- err = pcall(pymelem, attr, obj1, &res);
- if (err >= 0) {
-- err = !PyInt_Check(PyTuple_GetItem(res, 1)) || !PyInt_Check(PyTuple_GetItem(res, 2));
-- if (err) {
-- err = !PyLong_Check(PyTuple_GetItem(res, 1)) || !PyLong_Check(PyTuple_GetItem(res, 2));
-- if (err) {
-- PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-- PyErr_Print();
-- PyErr_Clear();
-- err = -EIO;
-- } else {
-- *min = PyLong_AsLong(PyTuple_GetItem(res, 1));
-- *max = PyLong_AsLong(PyTuple_GetItem(res, 2));
-- }
-- } else {
-+ t1 = PyTuple_GetItem(res, 1);
-+ t2 = PyTuple_GetItem(res, 2);
-+ if (PyLong_Check(t1) && PyLong_Check(t2)) {
-+ *min = PyLong_AsLong(PyTuple_GetItem(res, 1));
-+ *max = PyLong_AsLong(PyTuple_GetItem(res, 2));
-+ err = 0;
-+#if PY_MAJOR_VERSION < 3
-+ } else if (PyInt_Check(t1) && PyInt_Check(t2)) {
- *min = PyInt_AsLong(PyTuple_GetItem(res, 1));
- *max = PyInt_AsLong(PyTuple_GetItem(res, 2));
-+ err = 0;
-+#endif
-+ } else {
-+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-+ PyErr_Print();
-+ PyErr_Clear();
-+ err = -EIO;
- }
- }
- Py_XDECREF(res);
-@@ -207,7 +246,7 @@ static int get_x_ops(snd_mixer_elem_t *elem, int dir,
- long channel, long *value,
- const char *attr)
- {
-- PyObject *obj1, *res;
-+ PyObject *obj1, *t1, *res;
- struct pymelem *pymelem = melem_to_pymelem(elem);
- int err;
-
-@@ -216,19 +255,20 @@ static int get_x_ops(snd_mixer_elem_t *elem, int dir,
- PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong(channel));
- err = pcall(pymelem, attr, obj1, &res);
- if (err >= 0) {
-- err = !PyInt_Check(PyTuple_GetItem(res, 1));
-- if (err) {
-- err = !PyLong_Check(PyTuple_GetItem(res, 1));
-- if (err) {
-- PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-- PyErr_Print();
-- PyErr_Clear();
-- err = -EIO;
-- } else {
-- *value = PyLong_AsLong(PyTuple_GetItem(res, 1));
-- }
-+ t1 = PyTuple_GetItem(res, 1);
-+ if (PyLong_Check(t1)) {
-+ *value = PyLong_AsLong(t1);
-+ err = 0;
-+#if PY_MAJOR_VERSION < 3
-+ } else if (PyInt_Check(t1)) {
-+ *value = PyInt_AsLong(t1);
-+ err = 0;
-+#endif
- } else {
-- *value = PyInt_AsLong(PyTuple_GetItem(res, 1));
-+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-+ PyErr_Print();
-+ PyErr_Clear();
-+ err = -EIO;
- }
- }
- Py_XDECREF(res);
-@@ -265,7 +305,7 @@ static int ask_dB_vol_ops(snd_mixer_elem_t *elem,
- long *dbValue,
- int xdir)
- {
-- PyObject *obj1, *res;
-+ PyObject *obj1, *t1, *res;
- struct pymelem *pymelem = melem_to_pymelem(elem);
- int err;
-
-@@ -275,19 +315,20 @@ static int ask_dB_vol_ops(snd_mixer_elem_t *elem,
- PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(xdir));
- err = pcall(pymelem, "opsGetDBVol", obj1, &res);
- if (err >= 0) {
-- err = !PyInt_Check(PyTuple_GetItem(res, 1));
-- if (err) {
-- err = !PyLong_Check(PyTuple_GetItem(res, 1));
-- if (err) {
-- PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-- PyErr_Print();
-- PyErr_Clear();
-- err = -EIO;
-- } else {
-- *dbValue = PyLong_AsLong(PyTuple_GetItem(res, 1));
-- }
-+ t1 = PyTuple_GetItem(res, 1);
-+ if (PyLong_Check(t1)) {
-+ *dbValue = PyLong_AsLong(t1);
-+ err = 0;
-+#if PY_MAJOR_VERSION < 3
-+ } else if (PyInt_Check(t1)) {
-+ *dbValue = PyInt_AsLong(t1);
-+ err = 0;
-+#endif
- } else {
-- *dbValue = PyInt_AsLong(PyTuple_GetItem(res, 1));
-+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-+ PyErr_Print();
-+ PyErr_Clear();
-+ err = -EIO;
- }
- }
- Py_XDECREF(res);
-@@ -353,7 +394,7 @@ static int enum_item_name_ops(snd_mixer_elem_t *elem,
- unsigned int item,
- size_t maxlen, char *buf)
- {
-- PyObject *obj1, *res;
-+ PyObject *obj1, *obj2, *t1, *res;
- struct pymelem *pymelem = melem_to_pymelem(elem);
- int err;
- unsigned int len;
-@@ -363,19 +404,35 @@ static int enum_item_name_ops(snd_mixer_elem_t *elem,
- PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(item));
- err = pcall(pymelem, "opsGetEnumItemName", obj1, &res);
- if (err >= 0) {
-- err = !PyString_Check(PyTuple_GetItem(res, 1));
-- if (err) {
-- PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-- PyErr_Print();
-- PyErr_Clear();
-- err = -EIO;
-- } else {
-- s = PyString_AsString(PyTuple_GetItem(res, 1));
-+ t1 = PyTuple_GetItem(res, 1);
-+ if (PyUnicode_Check(t1)) {
-+ obj2 = PyUnicode_AsEncodedString(t1, "utf-8", "strict");
-+ if (obj2) {
-+ s = PyBytes_AsString(obj2);
-+ len = strlen(s);
-+ if (maxlen - 1 > len)
-+ len = maxlen - 1;
-+ memcpy(buf, s, len);
-+ buf[len] = '\0';
-+ Py_DECREF(obj2);
-+ } else {
-+ goto errlbl;
-+ }
-+#if PY_MAJOR_VERSION < 3
-+ } else if (PyString_Check(t1)) {
-+ s = PyString_AsString(t1);
- len = strlen(s);
- if (maxlen - 1 > len)
- len = maxlen - 1;
- memcpy(buf, s, len);
- buf[len] = '\0';
-+#endif
-+ } else {
-+errlbl:
-+ PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
-+ PyErr_Print();
-+ PyErr_Clear();
-+ err = -EIO;
- }
- }
- Py_XDECREF(res);
-@@ -386,7 +443,7 @@ static int get_enum_item_ops(snd_mixer_elem_t *elem,
- snd_mixer_selem_channel_id_t channel,
- unsigned int *itemp)
- {
-- PyObject *obj1, *res;
-+ PyObject *obj1, *t1, *res;
- struct pymelem *pymelem = melem_to_pymelem(elem);
- int err;
-
-@@ -394,14 +451,20 @@ static int get_enum_item_ops(snd_mixer_elem_t *elem,
- PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong(channel));
- err = pcall(pymelem, "opsGetEnumItem", obj1, &res);
- if (err >= 0) {
-- err = !PyInt_Check(PyTuple_GetItem(res, 1));
-- if (err) {
-+ t1 = PyTuple_GetItem(res, 1);
-+ if (PyLong_Check(t1)) {
-+ *itemp = PyLong_AsLong(t1);
-+ err = 0;
-+#if PY_MAJOR_VERSION < 3
-+ } else if (PyInt_Check(t1)) {
-+ *itemp = PyInt_AsLong(t1);
-+ err = 0;
-+#endif
-+ } else {
- PyErr_Format(PyExc_TypeError, "wrong result (invalid tuple)");
- PyErr_Print();
- PyErr_Clear();
- err = -EIO;
-- } else {
-- *itemp = PyInt_AsLong(PyTuple_GetItem(res, 1));
- }
- }
- Py_XDECREF(res);
-@@ -464,7 +527,7 @@ pymelem_get_caps(struct pymelem *pymelem, void *priv A
- static PyObject *
- pymelem_get_name(struct pymelem *pymelem, void *priv ATTRIBUTE_UNUSED)
- {
-- return PyString_FromString(snd_mixer_selem_id_get_name(pymelem->selem.id));
-+ return PyUnicode_FromString(snd_mixer_selem_id_get_name(pymelem->selem.id));
- }
-
- static PyObject *
-@@ -476,12 +539,18 @@ pymelem_get_index(struct pymelem *pymelem, void *priv
- static int
- pymelem_set_caps(struct pymelem *pymelem, PyObject *val, void *priv ATTRIBUTE_UNUSED)
- {
-- if (!PyInt_Check(val)) {
-- PyErr_SetString(PyExc_TypeError, "The last attribute value must be an integer");
-- return -1;
-+ if (PyLong_Check(val)) {
-+ pymelem->selem.caps = PyLong_AsLong(val);
-+ return 0;
- }
-- pymelem->selem.caps = PyInt_AsLong(val);
-- return 0;
-+#if PY_MAJOR_VERSION < 3
-+ if (PyInt_Check(val)) {
-+ pymelem->selem.caps = PyInt_AsLong(val);
-+ return 0;
-+ }
-+#endif
-+ PyErr_SetString(PyExc_TypeError, "The last attribute value must be an integer");
-+ return -1;
- }
-
- static PyObject *
-@@ -588,7 +657,6 @@ static void
- pymelem_dealloc(struct pymelem *self)
- {
- selem_free(self->melem);
-- self->ob_type->tp_free(self);
- }
-
- static PyGetSetDef pymelem_getseters[] = {
-@@ -634,7 +702,7 @@ static PyMethodDef pymelem_methods[] = {
- };
-
- static PyTypeObject pymelem_type = {
-- PyObject_HEAD_INIT(0)
-+ PyVarObject_HEAD_INIT(NULL, 0)
- tp_name: "smixer_python.InternalMElement",
- tp_basicsize: sizeof(struct pymelem),
- tp_dealloc: (destructor)pymelem_dealloc,
-@@ -708,7 +776,7 @@ pymixer_melement_new(struct pymixer *pymixer, PyObject
- obj1 = PyTuple_New(4);
- if (PyTuple_SET_ITEM(obj1, 0, (PyObject *)pymixer))
- Py_INCREF((PyObject *)pymixer);
-- PyTuple_SET_ITEM(obj1, 1, PyString_FromString(name));
-+ PyTuple_SET_ITEM(obj1, 1, PyUnicode_FromString(name));
- PyTuple_SET_ITEM(obj1, 2, PyInt_FromLong(index));
- PyTuple_SET_ITEM(obj1, 3, PyInt_FromLong(weight));
- obj2 = PyObject_CallObject(obj, obj1);
-@@ -800,7 +868,6 @@ static void
- pymixer_dealloc(struct pymixer *self)
- {
- pymixer_free(self);
-- self->ob_type->tp_free(self);
- }
-
- static PyGetSetDef pymixer_getseters[] = {
-@@ -816,7 +883,7 @@ static PyMethodDef pymixer_methods[] = {
- };
-
- static PyTypeObject pymixer_type = {
-- PyObject_HEAD_INIT(0)
-+ PyVarObject_HEAD_INIT(NULL, 0)
- tp_name: "smixer_python.InternalMixer",
- tp_basicsize: sizeof(struct pymixer),
- tp_dealloc: (destructor)pymixer_dealloc,
-@@ -910,12 +977,12 @@ int alsa_mixer_simple_event(snd_mixer_class_t *class,
- snd_hctl_elem_t *helem, snd_mixer_elem_t *melem)
- {
- struct python_priv *priv = snd_mixer_sbasic_get_private(class);
-- PyThreadState *tstate, *origstate;
-+ PyThreadState *tstate;
- PyObject *t, *o, *r;
- int res = -ENOMEM;
-
- tstate = PyThreadState_New(main_interpreter);
-- origstate = PyThreadState_Swap(tstate);
-+ PyThreadState_Swap(tstate);
-
- t = PyTuple_New(3);
- if (t) {
-@@ -935,8 +1002,12 @@ int alsa_mixer_simple_event(snd_mixer_class_t *class,
- r = PyObject_CallObject(priv->py_event_func, t);
- Py_DECREF(t);
- if (r) {
-- if (PyInt_Check(r)) {
-+ if (PyLong_Check(r)) {
-+ res = PyLong_AsLong(r);
-+#if PY_MAJOR_VERSION < 3
-+ } else if (PyInt_Check(r)) {
- res = PyInt_AsLong(r);
-+#endif
- } else if (r == Py_None) {
- res = 0;
- }
-@@ -966,6 +1037,71 @@ static void alsa_mixer_simple_free(snd_mixer_class_t *
- free(priv);
- }
-
-+static int alsa_mixer_simple_pyinit(struct python_priv *priv,
-+ PyObject *py_mod,
-+ FILE *fp,
-+ const char *file,
-+ snd_mixer_class_t *class,
-+ snd_mixer_t *mixer,
-+ const char *device)
-+{
-+ PyObject *obj, *obj1, *obj2, *mdict;
-+
-+ mdict = priv->py_mdict = PyModule_GetDict(py_mod);
-+ obj = PyUnicode_FromString(file);
-+ if (obj)
-+ PyDict_SetItemString(mdict, "__file__", obj);
-+ Py_XDECREF(obj);
-+ obj = PyUnicode_FromString(device);
-+ if (obj)
-+ PyDict_SetItemString(mdict, "device", obj);
-+ Py_XDECREF(obj);
-+ Py_INCREF(&pymelem_type);
-+ Py_INCREF(&pymixer_type);
-+ PyModule_AddObject(py_mod, "InternalMElement", (PyObject *)&pymelem_type);
-+ PyModule_AddObject(py_mod, "InternalMixer", (PyObject *)&pymixer_type);
-+ obj = PyDict_GetItemString(mdict, "InternalMixer");
-+ if (obj) {
-+ obj1 = PyTuple_New(3);
-+ PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong((long)class));
-+ PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong((long)mixer));
-+ if (PyTuple_SET_ITEM(obj1, 2, mdict))
-+ Py_INCREF(mdict);
-+ obj2 = PyObject_CallObject(obj, obj1);
-+ Py_XDECREF(obj1);
-+ PyDict_SetItemString(mdict, "mixer", obj2);
-+ priv->py_mixer = obj2;
-+ } else {
-+ SNDERR("Unable to create InternalMixer object");
-+ return -EIO;
-+ }
-+
-+ obj = PyRun_FileEx(fp, file, Py_file_input, mdict, mdict, 1);
-+ if (obj == NULL)
-+ PyErr_Print();
-+ Py_XDECREF(obj);
-+ priv->py_event_func = PyDict_GetItemString(mdict, "event");
-+ if (priv->py_event_func == NULL) {
-+ SNDERR("Unable to find python function 'event'");
-+ return -EIO;
-+ }
-+ return 0;
-+}
-+
-+#if PY_MAJOR_VERSION >= 3
-+static struct PyModuleDef smixer_python_module = {
-+ PyModuleDef_HEAD_INIT,
-+ "smixer_python",
-+ NULL,
-+ 0,
-+ python_methods,
-+ NULL,
-+ NULL,
-+ NULL,
-+ NULL
-+};
-+#endif
-+
- int alsa_mixer_simple_finit(snd_mixer_class_t *class,
- snd_mixer_t *mixer,
- const char *device)
-@@ -973,7 +1109,7 @@ int alsa_mixer_simple_finit(snd_mixer_class_t *class,
- struct python_priv *priv;
- FILE *fp;
- const char *file;
-- PyObject *obj, *obj1, *obj2, *py_mod, *mdict;
-+ PyObject *obj, *py_mod;
-
- priv = calloc(1, sizeof(*priv));
- if (priv == NULL)
-@@ -993,54 +1129,21 @@ int alsa_mixer_simple_finit(snd_mixer_class_t *class,
- }
-
- Py_Initialize();
-- if (PyType_Ready(&pymelem_type) < 0)
-+ if (PyType_Ready(&pymelem_type) < 0 ||
-+ PyType_Ready(&pymixer_type) < 0) {
-+ fclose(fp);
- return -EIO;
-- if (PyType_Ready(&pymixer_type) < 0)
-- return -EIO;
-+ }
-+#if PY_MAJOR_VERSION < 3
- Py_InitModule("smixer_python", python_methods);
-+#else
-+ PyModule_Create(&smixer_python_module);
-+#endif
- priv->py_initialized = 1;
- main_interpreter = PyThreadState_Get()->interp;
- obj = PyImport_GetModuleDict();
- py_mod = PyDict_GetItemString(obj, "__main__");
-- if (py_mod) {
-- mdict = priv->py_mdict = PyModule_GetDict(py_mod);
-- obj = PyString_FromString(file);
-- if (obj)
-- PyDict_SetItemString(mdict, "__file__", obj);
-- Py_XDECREF(obj);
-- obj = PyString_FromString(device);
-- if (obj)
-- PyDict_SetItemString(mdict, "device", obj);
-- Py_XDECREF(obj);
-- Py_INCREF(&pymixer_type);
-- PyModule_AddObject(py_mod, "InternalMElement", (PyObject *)&pymelem_type);
-- PyModule_AddObject(py_mod, "InternalMixer", (PyObject *)&pymixer_type);
-- obj = PyDict_GetItemString(mdict, "InternalMixer");
-- if (obj) {
-- obj1 = PyTuple_New(3);
-- PyTuple_SET_ITEM(obj1, 0, PyInt_FromLong((long)class));
-- PyTuple_SET_ITEM(obj1, 1, PyInt_FromLong((long)mixer));
-- if (PyTuple_SET_ITEM(obj1, 2, mdict))
-- Py_INCREF(mdict);
-- obj2 = PyObject_CallObject(obj, obj1);
-- Py_XDECREF(obj1);
-- PyDict_SetItemString(mdict, "mixer", obj2);
-- priv->py_mixer = obj2;
-- } else {
-- SNDERR("Unable to create InternalMixer object");
-- return -EIO;
-- }
--
--
-- obj = PyRun_FileEx(fp, file, Py_file_input, mdict, mdict, 1);
-- if (obj == NULL)
-- PyErr_Print();
-- Py_XDECREF(obj);
-- priv->py_event_func = PyDict_GetItemString(mdict, "event");
-- if (priv->py_event_func == NULL) {
-- SNDERR("Unable to find python function 'event'");
-- return -EIO;
-- }
-- }
-+ if (py_mod)
-+ alsa_mixer_simple_pyinit(priv, py_mod, fp, file, class, mixer, device);
- return 0;
- }
diff --git a/audio/alsa-lib/files/patch-src_async.c b/audio/alsa-lib/files/patch-src_async.c
index 2502546a94cf..a510736e9607 100644
--- a/audio/alsa-lib/files/patch-src_async.c
+++ b/audio/alsa-lib/files/patch-src_async.c
@@ -1,8 +1,8 @@
$NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
---- src/async.c.orig 2016-03-31 13:10:39 UTC
+--- src/async.c.orig 2020-02-19 09:35:39 UTC
+++ src/async.c
-@@ -51,6 +51,15 @@ static LIST_HEAD(snd_async_handlers);
+@@ -54,6 +54,15 @@ static LIST_HEAD(snd_async_handlers);
static void snd_async_handler(int signo ATTRIBUTE_UNUSED, siginfo_t *siginfo, void *context ATTRIBUTE_UNUSED)
{
@@ -18,7 +18,7 @@ $NetBSD: patch-bk,v 1.1 2008/12/25 13:18:00 hasso Exp $
int fd;
struct list_head *i;
//assert(siginfo->si_code == SI_SIGIO);
-@@ -60,6 +69,7 @@ static void snd_async_handler(int signo
+@@ -66,6 +75,7 @@ static void snd_async_handler(int signo ATTRIBUTE_UNUS
if (h->fd == fd && h->callback)
h->callback(h);
}
diff --git a/audio/alsa-lib/files/patch-src_conf_alsa.conf b/audio/alsa-lib/files/patch-src_conf_alsa.conf
new file mode 100644
index 000000000000..4c2c9d6f565b
--- /dev/null
+++ b/audio/alsa-lib/files/patch-src_conf_alsa.conf
@@ -0,0 +1,13 @@
+--- src/conf/alsa.conf.orig 2020-02-19 09:35:39 UTC
++++ src/conf/alsa.conf
+@@ -8,8 +8,8 @@
+ {
+ func load
+ files [
+- "/etc/alsa/conf.d"
+- "/etc/asound.conf"
++ "%%PREFIX%%/etc/alsa/conf.d"
++ "%%PREFIX%%/etc/asound.conf"
+ "~/.asoundrc"
+ ]
+ errors false
diff --git a/audio/alsa-lib/pkg-plist b/audio/alsa-lib/pkg-plist
index 9d1cbcdef704..5b6f5bfe2873 100644
--- a/audio/alsa-lib/pkg-plist
+++ b/audio/alsa-lib/pkg-plist
@@ -1,5 +1,4 @@
bin/aserver
-include/alsa/alisp.h
include/alsa/asoundef.h
include/alsa/asoundlib.h
include/alsa/conf.h
@@ -33,27 +32,34 @@ include/alsa/sound/sb16_csp.h
include/alsa/sound/sscape_ioctl.h
include/alsa/sound/tlv.h
include/alsa/sound/type_compat.h
+include/alsa/sound/uapi/asoc.h
+include/alsa/sound/uapi/asound_fm.h
+include/alsa/sound/uapi/emu10k1.h
+include/alsa/sound/uapi/hdsp.h
+include/alsa/sound/uapi/hdspm.h
+include/alsa/sound/uapi/sb16_csp.h
+include/alsa/sound/uapi/sscape_ioctl.h
+include/alsa/sound/uapi/tlv.h
include/alsa/timer.h
include/alsa/topology.h
include/alsa/use-case.h
include/alsa/version.h
+include/asoundlib.h
include/sys/asoundlib.h
-lib/alsa-lib/smixer/smixer-ac97.la
-lib/alsa-lib/smixer/smixer-ac97.so
-lib/alsa-lib/smixer/smixer-hda.la
-lib/alsa-lib/smixer/smixer-hda.so
%%PYTHON%%lib/alsa-lib/smixer/smixer-python.la
%%PYTHON%%lib/alsa-lib/smixer/smixer-python.so
-lib/alsa-lib/smixer/smixer-sbase.la
-lib/alsa-lib/smixer/smixer-sbase.so
lib/libasound.la
lib/libasound.so
lib/libasound.so.2
lib/libasound.so.2.0.0
+lib/libatopology.la
+lib/libatopology.so
+lib/libatopology.so.2
+lib/libatopology.so.2.0.0
+libdata/pkgconfig/alsa-topology.pc
libdata/pkgconfig/alsa.pc
share/aclocal/alsa.m4
share/alsa/alsa.conf
-share/alsa/alsa.conf.d/README
share/alsa/cards/AACI.conf
share/alsa/cards/ATIIXP-MODEM.conf
share/alsa/cards/ATIIXP-SPDMA.conf
@@ -83,6 +89,7 @@ share/alsa/cards/FWSpeakers.conf
share/alsa/cards/FireWave.conf
share/alsa/cards/GUS.conf
share/alsa/cards/HDA-Intel.conf
+share/alsa/cards/HdmiLpeAudio.conf
share/alsa/cards/ICE1712.conf
share/alsa/cards/ICE1724.conf
share/alsa/cards/ICH-MODEM.conf
@@ -99,8 +106,6 @@ share/alsa/cards/RME9636.conf
share/alsa/cards/RME9652.conf
share/alsa/cards/SB-XFi.conf
share/alsa/cards/SI7018.conf
-share/alsa/cards/SI7018/sndoc-mixer.alisp
-share/alsa/cards/SI7018/sndop-mixer.alisp
share/alsa/cards/TRID4DWAVENX.conf
share/alsa/cards/USB-Audio.conf
share/alsa/cards/VIA686A.conf
@@ -111,8 +116,9 @@ share/alsa/cards/VX222.conf
share/alsa/cards/VXPocket.conf
share/alsa/cards/VXPocket440.conf
share/alsa/cards/YMF744.conf
-share/alsa/cards/aliases.alisp
share/alsa/cards/aliases.conf
+share/alsa/cards/pistachio-card.conf
+share/alsa/cards/vc4-hdmi.conf
share/alsa/pcm/center_lfe.conf
share/alsa/pcm/default.conf
share/alsa/pcm/dmix.conf
@@ -130,61 +136,4 @@ share/alsa/pcm/surround41.conf
share/alsa/pcm/surround50.conf
share/alsa/pcm/surround51.conf
share/alsa/pcm/surround71.conf
-share/alsa/smixer.conf
-share/alsa/sndo-mixer.alisp
-share/alsa/topology/broadwell/broadwell.conf
-share/alsa/topology/sklrt286/codec0_in-cpr-1.bin
-share/alsa/topology/sklrt286/codec0_in-mi.bin
-share/alsa/topology/sklrt286/codec0_out-cpr-4.bin
-share/alsa/topology/sklrt286/codec0_out-mo.bin
-share/alsa/topology/sklrt286/codec1_out-cpr-5.bin
-share/alsa/topology/sklrt286/codec1_out-mo.bin
-share/alsa/topology/sklrt286/dmic01_hifi_in-cpr-3.bin
-share/alsa/topology/sklrt286/dmic01_hifi_in-mi.bin
-share/alsa/topology/sklrt286/hdmi1_pt_out-cpr-7.bin
-share/alsa/topology/sklrt286/hdmi1_pt_out-cpr-8.bin
-share/alsa/topology/sklrt286/hdmi2_pt_out-cpr-10.bin
-share/alsa/topology/sklrt286/hdmi2_pt_out-cpr-9.bin
-share/alsa/topology/sklrt286/hdmi3_pt_out-cpr-11.bin
-share/alsa/topology/sklrt286/hdmi3_pt_out-cpr-12.bin
-share/alsa/topology/sklrt286/media0_in-cpr-0.bin
-share/alsa/topology/sklrt286/media0_in-mi.bin
-share/alsa/topology/sklrt286/media0_out-cpr-6.bin
-share/alsa/topology/sklrt286/media0_out-mo.bin
-share/alsa/topology/sklrt286/skl_i2s.conf
-share/alsa/ucm/DAISY-I2S/DAISY-I2S.conf
-share/alsa/ucm/DAISY-I2S/HiFi.conf
-share/alsa/ucm/GoogleNyan/GoogleNyan.conf
-share/alsa/ucm/GoogleNyan/HiFi.conf
-share/alsa/ucm/PAZ00/HiFi.conf
-share/alsa/ucm/PAZ00/PAZ00.conf
-share/alsa/ucm/PAZ00/Record.conf
-share/alsa/ucm/PandaBoard/FMAnalog
-share/alsa/ucm/PandaBoard/PandaBoard.conf
-share/alsa/ucm/PandaBoard/hifi
-share/alsa/ucm/PandaBoard/hifiLP
-share/alsa/ucm/PandaBoard/record
-share/alsa/ucm/PandaBoard/voice
-share/alsa/ucm/PandaBoard/voiceCall
-share/alsa/ucm/PandaBoardES/FMAnalog
-share/alsa/ucm/PandaBoardES/PandaBoardES.conf
-share/alsa/ucm/PandaBoardES/hifi
-share/alsa/ucm/PandaBoardES/hifiLP
-share/alsa/ucm/PandaBoardES/record
-share/alsa/ucm/PandaBoardES/voice
-share/alsa/ucm/PandaBoardES/voiceCall
-share/alsa/ucm/SDP4430/FMAnalog
-share/alsa/ucm/SDP4430/SDP4430.conf
-share/alsa/ucm/SDP4430/hifi
-share/alsa/ucm/SDP4430/hifiLP
-share/alsa/ucm/SDP4430/record
-share/alsa/ucm/SDP4430/voice
-share/alsa/ucm/SDP4430/voiceCall
-share/alsa/ucm/VEYRON-I2S/HiFi.conf
-share/alsa/ucm/VEYRON-I2S/VEYRON-I2S.conf
-share/alsa/ucm/broadwell-rt286/HiFi
-share/alsa/ucm/broadwell-rt286/broadwell-rt286.conf
-share/alsa/ucm/chtrt5645/HiFi.conf
-share/alsa/ucm/chtrt5645/chtrt5645.conf
-share/alsa/ucm/tegraalc5632/tegraalc5632.conf
@sample etc/asound.conf.sample
diff --git a/audio/alsa-plugins/Makefile b/audio/alsa-plugins/Makefile
index 0e93414d2c95..1e970778b641 100644
--- a/audio/alsa-plugins/Makefile
+++ b/audio/alsa-plugins/Makefile
@@ -1,8 +1,7 @@
# Created by: Aragon Gouveia <aragon@phat.za.net>
PORTNAME= alsa-plugins
-PORTVERSION= 1.1.1
-PORTREVISION= 7
+PORTVERSION= 1.2.2
CATEGORIES= audio
MASTER_SITES= ftp://ftp.alsa-project.org/pub/plugins/ \
GENTOO
@@ -16,47 +15,43 @@ LIB_DEPENDS= libasound.so:audio/alsa-lib
USES= alias libtool:keepla localbase pkgconfig tar:bzip2
GNU_CONFIGURE= yes
+MAKE_ARGS+= RM="${RM}"
EXTRA_PATCHES+= ${FILESDIR}/alsa-plugins.patch
INSTALL_TARGET= install-strip
CPPFLAGS+= -I${.CURDIR}/../alsa-lib/files
-OPTIONS_DEFAULT=IO_PTR
-OPTIONS_DEFINE= JACK FFMPEG PULSEAUDIO SAMPLERATE SPEEX
-OPTIONS_SUB= yes
+OPTIONS_DEFAULT= BUFSZ_P2 IO_PTR PULSEAUDIO
+OPTIONS_DEFINE= BUFSZ_P2 FFMPEG JACK PULSEAUDIO SAMPLERATE SPEEX
+OPTIONS_SUB= yes
-OPTIONS_GROUP= OSS
-OPTIONS_GROUP_OSS=IO_PTR BLKCNT_P2 BUFSZ_P2 VERBOSE
+OPTIONS_GROUP= OSS
+OPTIONS_GROUP_OSS= BLKCNT_P2 BUFSZ_P2 IO_PTR VERBOSE
IO_PTR_DESC= Precise playback/recording pointer
BLKCNT_P2_DESC= Restrict number of fragments to ^2 aligned
BUFSZ_P2_DESC= Restrict buffer size to ^2 aligned
VERBOSE_DESC= Print debugging messages
-IO_PTR_CFLAGS= -DFREEBSD_OSS_USE_IO_PTR
-BLKCNT_P2_CFLAGS=-DFREEBSD_OSS_BLKCNT_P2
-BUFSZ_P2_CFLAGS=-DFREEBSD_OSS_BUFSZ_P2
-VERBOSE_CFLAGS= -DFREEBSD_OSS_DEBUG_VERBOSE
+IO_PTR_CFLAGS= -DFREEBSD_OSS_USE_IO_PTR
+BLKCNT_P2_CFLAGS= -DFREEBSD_OSS_BLKCNT_P2
+BUFSZ_P2_CFLAGS= -DFREEBSD_OSS_BUFSZ_P2
+VERBOSE_CFLAGS= -DFREEBSD_OSS_DEBUG_VERBOSE
JACK_LIB_DEPENDS= libjack.so:audio/jack
JACK_CONFIGURE_ENABLE= jack
JACK_IMPLIES= SAMPLERATE
-FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
-FFMPEG_CONFIGURE_ENABLE=avcodec
+FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg
+FFMPEG_CONFIGURE_ENABLE= avcodec
-PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
-PULSEAUDIO_CONFIGURE_ENABLE=pulseaudio
+PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
+PULSEAUDIO_CONFIGURE_ENABLE= pulseaudio
-SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate
-SAMPLERATE_CONFIGURE_ENABLE=samplerate
+SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate
+SAMPLERATE_CONFIGURE_ENABLE= samplerate
SPEEX_LIB_DEPENDS= libspeex.so:audio/speex
SPEEX_CONFIGURE_ON= --with-speex=lib
SPEEX_CONFIGURE_OFF= --without-speex
-post-patch: .SILENT
- ${REINPLACE_CMD} -e '/LIBS/s/-ldl//g' \
- -e '/lt_cv_dlopen/s/-ldl//g' \
- ${WRKSRC}/configure
-
.include <bsd.port.mk>
diff --git a/audio/alsa-plugins/distinfo b/audio/alsa-plugins/distinfo
index 6548bf004a76..ca008eccbaaf 100644
--- a/audio/alsa-plugins/distinfo
+++ b/audio/alsa-plugins/distinfo
@@ -1,2 +1,3 @@
-SHA256 (alsa-plugins-1.1.1.tar.bz2) = 8ea4d1e082c36528a896a2581e5eb62d4dc2683238e353050d0d624e65f901f1
-SIZE (alsa-plugins-1.1.1.tar.bz2) = 366193
+TIMESTAMP = 1585923260
+SHA256 (alsa-plugins-1.2.2.tar.bz2) = 1c0f06450c928d711719686c9dbece2d480184f36fab11b8f0534cb7b41e337d
+SIZE (alsa-plugins-1.2.2.tar.bz2) = 406494
diff --git a/audio/alsa-plugins/pkg-plist b/audio/alsa-plugins/pkg-plist
index a7a8b1d3dbdb..4847ffc641be 100644
--- a/audio/alsa-plugins/pkg-plist
+++ b/audio/alsa-plugins/pkg-plist
@@ -1,3 +1,10 @@
+@comment etc/alsa/conf.d/50-arcam-av-ctl.conf
+@comment etc/alsa/conf.d/50-oss.conf
+@comment etc/alsa/conf.d/50-pulseaudio.conf
+@comment etc/alsa/conf.d/60-upmix.conf
+@comment etc/alsa/conf.d/60-vdownmix.conf
+@comment etc/alsa/conf.d/98-usb-stream.conf
+@comment etc/alsa/conf.d/99-pulseaudio-default.conf.example
%%PULSEAUDIO%%lib/alsa-lib/libasound_module_conf_pulse.la
%%PULSEAUDIO%%lib/alsa-lib/libasound_module_conf_pulse.so
lib/alsa-lib/libasound_module_ctl_arcam_av.la
@@ -38,5 +45,9 @@ lib/alsa-lib/libasound_module_pcm_vdownmix.so
%%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate.so
%%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_best.so
%%SPEEX%%lib/alsa-lib/libasound_module_rate_speexrate_medium.so
+@comment share/alsa/alsa.conf.d/50-arcam-av-ctl.conf
+@comment share/alsa/alsa.conf.d/50-oss.conf
%%PULSEAUDIO%%share/alsa/alsa.conf.d/50-pulseaudio.conf
-%%PULSEAUDIO%%share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example
+@comment share/alsa/alsa.conf.d/60-upmix.conf
+@comment share/alsa/alsa.conf.d/60-vdownmix.conf
+@comment share/alsa/alsa.conf.d/98-usb-stream.conf
diff --git a/audio/alsa-utils/Makefile b/audio/alsa-utils/Makefile
index 8d13c413de7c..aabe03f53995 100644
--- a/audio/alsa-utils/Makefile
+++ b/audio/alsa-utils/Makefile
@@ -1,8 +1,7 @@
# Created by: Aragon Gouveia <aragon@phat.za.net>
PORTNAME= alsa-utils
-PORTVERSION= 1.1.2
-PORTREVISION= 1
+PORTVERSION= 1.2.2
CATEGORIES= audio
MASTER_SITES= ftp://ftp.alsa-project.org/pub/utils/ \
GENTOO
@@ -13,45 +12,54 @@ COMMENT= ALSA compatibility utilities
LICENSE= GPLv2+
LIB_DEPENDS= libasound.so:audio/alsa-lib \
- libfftw3f.so:math/fftw3-float
+ libepoll-shim.so:devel/libepoll-shim \
+ libfftw3f.so:math/fftw3-float \
+ libinotify.so:devel/libinotify
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
-USES= gmake localbase ncurses shebangfix tar:bzip2
+USES= autoreconf gmake libtool localbase ncurses shebangfix tar:bzip2 pkgconfig
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-udev-rules-dir="\$${prefix}/lib/udev"
SHEBANG_FILES= alsa-info/alsa-info.sh alsaconf/alsaconf.in bat/alsabat-test.sh
INSTALL_TARGET= install-strip
CPPFLAGS+= -I${.CURDIR}/../alsa-lib/files
+CFLAGS+= -Dlseek64=lseek -DSCHED_IDLE=SCHED_OTHER \
+ -I${LOCALBASE}/include/libepoll-shim
+LDFLAGS+= -linotify -lepoll-shim
-OPTIONS_SUB= yes
-OPTIONS_DEFINE= BAT MANPAGES NLS SAMPLERATE
-OPTIONS_DEFAULT=BAT MANPAGES
-
-BAT_DESC= Basic Audio Tester support
-BAT_LIB_DEPENDS=libfftw3.so:math/fftw3
-BAT_CONFIGURE_ENABLE=bat
-
-MANPAGES_BUILD_DEPENDS= minixmlto:textproc/minixmlto
-MANPAGES_CONFIGURE_ENV= ac_cv_prog_xmlto=minixmlto
-MANPAGES_CONFIGURE_ENABLE=xmlto
-
-NLS_USES= gettext
-NLS_CONFIGURE_ENABLE=nls
-NLS_LIBS= -lintl
-
-SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate
-SAMPLERATE_CONFIGURE_ENV_OFF=ac_cv_header_samplerate_h=no
-
-post-patch: .SILENT
- ${REINPLACE_CMD} -e '/LIBS/s/-ldl//g; /LIBRT/s/-lrt//g;' \
- -e '/x"$$xmlto"/s/= xyes/!= xno/' \
- ${WRKSRC}/configure
- ${REINPLACE_CMD} -e 's/ xmlto/ $$(xmlto)/' \
- ${WRKSRC}/alsactl/Makefile.in
- ${FIND} -E ${WRKSRC} -type f -regex \
- '.*\.([[:digit:]]|spec\.in|csv|xml)' -exec \
- ${REINPLACE_CMD} -i .pathfix.bak \
- -e 's|/usr/share|${PREFIX}/share|g' \
- -e 's|/etc/asound\.conf|${LOCALBASE}&|g' {} +
+OPTIONS_SUB= yes
+OPTIONS_DEFINE= BAT MANPAGES NLS SAMPLERATE
+OPTIONS_DEFAULT= BAT MANPAGES
+
+BAT_DESC= Basic Audio Tester support
+BAT_LIB_DEPENDS= libfftw3.so:math/fftw3 \
+ libfftw3f.so:math/fftw3-float
+BAT_CONFIGURE_ENABLE= bat
+
+MANPAGES_BUILD_DEPENDS= minixmlto:textproc/minixmlto
+MANPAGES_CONFIGURE_ENV= ac_cv_prog_xmlto=minixmlto
+MANPAGES_CONFIGURE_ENABLE= xmlto
+
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE= nls
+NLS_LIBS= -lintl
+
+SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate
+SAMPLERATE_CONFIGURE_ENV_OFF= ac_cv_header_samplerate_h=no
+
+post-patch:
+ @${REINPLACE_CMD} \
+ 's|%%PREFIX%%|${PREFIX}|g' \
+ ${WRKSRC}/alsactl/alsactl_init.xml \
+ ${WRKSRC}/speaker-test/speaker-test.1 \
+ ${WRKSRC}/speaker-test/samples/sample_map.csv \
+ ${WRKSRC}/alsaconf/alsaconf.fr.8 \
+ ${WRKSRC}/alsaconf/alsaconf.8 \
+ ${WRKSRC}/utils/alsa-utils.spec.in \
+ ${WRKSRC}/amidi/amidi.1
+ @${REINPLACE_CMD} \
+ 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/alsa-info/alsa-info.sh.1 \
+ ${WRKSRC}/amidi/amidi.1
.include <bsd.port.mk>
diff --git a/audio/alsa-utils/distinfo b/audio/alsa-utils/distinfo
index 1ff95fce2c78..55464f24cd0b 100644
--- a/audio/alsa-utils/distinfo
+++ b/audio/alsa-utils/distinfo
@@ -1,2 +1,3 @@
-SHA256 (alsa-utils-1.1.2.tar.bz2) = 7af603c0877d1251599d65b4fbc372e63a54371b888f5c26c6a86ac1d0519071
-SIZE (alsa-utils-1.1.2.tar.bz2) = 1193140
+TIMESTAMP = 1615527978
+SHA256 (alsa-utils-1.2.2.tar.bz2) = 44807bd578c5f6df6e91a11b8d37e546424a5a1ea8d8e659ee359fe01730e4f3
+SIZE (alsa-utils-1.2.2.tar.bz2) = 1274821
diff --git a/audio/alsa-utils/files/patch-alsa-info_alsa-info.sh.1 b/audio/alsa-utils/files/patch-alsa-info_alsa-info.sh.1
new file mode 100644
index 000000000000..7c87d358dd5b
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsa-info_alsa-info.sh.1
@@ -0,0 +1,11 @@
+--- alsa-info/alsa-info.sh.1.orig 2020-02-19 12:02:10 UTC
++++ alsa-info/alsa-info.sh.1
+@@ -37,7 +37,7 @@ Includes output from \fIamixer\fP.
+ Includes output from \fIalsactl\fP.
+ .TP
+ \fI\-\-with-configs\fP
+-Includes output from ~/.asoundrc and /etc/asound.conf if they exist.
++Includes output from ~/.asoundrc and %%LOCALBASE%%/etc/asound.conf if they exist.
+ .TP
+ \fI\-\-update\fP
+ Check server for updates.
diff --git a/audio/alsa-utils/files/patch-alsaconf_alsaconf.8 b/audio/alsa-utils/files/patch-alsaconf_alsaconf.8
new file mode 100644
index 000000000000..3094a154906d
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsaconf_alsaconf.8
@@ -0,0 +1,11 @@
+--- alsaconf/alsaconf.8.orig 2020-02-19 12:02:10 UTC
++++ alsaconf/alsaconf.8
+@@ -79,7 +79,7 @@ In Debian, the default gid of the device files is 29 (
+ audio group) and the default device mode is 0660.
+
+ For the ALSA base package, see also
+-.I /usr/share/doc/alsa\-base/
++.I %%PREFIX%%/share/doc/alsa\-base/
+
+ .SH SEE ALSO
+ \fB
diff --git a/audio/alsa-utils/files/patch-alsaconf_alsaconf.fr.8 b/audio/alsa-utils/files/patch-alsaconf_alsaconf.fr.8
new file mode 100644
index 000000000000..1ae7414cd270
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsaconf_alsaconf.fr.8
@@ -0,0 +1,11 @@
+--- alsaconf/alsaconf.fr.8.orig 2020-02-19 12:02:10 UTC
++++ alsaconf/alsaconf.fr.8
+@@ -82,7 +82,7 @@ correspond au groupe audio) et le mode par défaut des
+ 0660.
+
+ Pour le paquetage de base ALSA, voir aussi
+-.I /usr/share/doc/alsa-base/
++.I %%PREFIX%%/share/doc/alsa-base/
+
+ .SH VOIR AUSSI
+ \fB
diff --git a/audio/alsa-utils/files/patch-alsactl_Makefile.in b/audio/alsa-utils/files/patch-alsactl_Makefile.in
new file mode 100644
index 000000000000..298b89b22cd8
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsactl_Makefile.in
@@ -0,0 +1,11 @@
+--- alsactl/Makefile.in.orig 2021-03-12 04:46:51 UTC
++++ alsactl/Makefile.in
+@@ -1110,7 +1110,7 @@ alsa-restore.service: alsa-restore.service.in
+ $(edit)
+
+ %.7: %.xml
+- xmlto man $?
++ $(xmlto) man $?
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/audio/alsa-utils/files/patch-alsactl_alsactl__init.xml b/audio/alsa-utils/files/patch-alsactl_alsactl__init.xml
new file mode 100644
index 000000000000..9bd84eed91a0
--- /dev/null
+++ b/audio/alsa-utils/files/patch-alsactl_alsactl__init.xml
@@ -0,0 +1,24 @@
+--- alsactl/alsactl_init.xml.orig 2020-02-19 12:02:10 UTC
++++ alsactl/alsactl_init.xml
+@@ -29,8 +29,8 @@
+
+ <refsect1><title>CONFIGURATION</title>
+ <para>All "alsactl init" configuration files are placed in
+- <filename>/usr/share/alsa/init/</filename> directory. The top level
+- configuration file is <filename>/usr/share/alsa/init/00main</filename>.
++ <filename>%%PREFIX%%/share/alsa/init/</filename> directory. The top level
++ configuration file is <filename>%%PREFIX%%/share/alsa/init/00main</filename>.
+ The default top-level file can be also specified using -i or
+ --initfile parameter for the alsactl tool.
+ Every file consists of a set of lines of text. All empty lines or
+@@ -38,8 +38,8 @@
+
+ <refsect2><title>Rules files</title>
+ <para>The "alsactl init" rules are read from the files located
+- in the <filename>/usr/share/alsa/init/*</filename>. The top
+- level configuration file is <filename>/usr/share/alsa/init/00main</filename>.
++ in the <filename>%%PREFIX%%/share/alsa/init/*</filename>. The top
++ level configuration file is <filename>%%PREFIX%%/share/alsa/init/00main</filename>.
+ Every line in the rules file contains at least one key value pair.
+ There are two kind of keys, match and assignment keys. If all match
+ keys are matching against its value, the rule gets applied and the
diff --git a/audio/alsa-utils/files/patch-alsamixer_volume__mapping.c b/audio/alsa-utils/files/patch-alsamixer_volume__mapping.c
deleted file mode 100644
index 34cc3e0973a2..000000000000
--- a/audio/alsa-utils/files/patch-alsamixer_volume__mapping.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- alsamixer/volume_mapping.c.orig 2016-03-31 14:37:02 UTC
-+++ alsamixer/volume_mapping.c
-@@ -37,7 +37,7 @@
- #include <stdbool.h>
- #include "volume_mapping.h"
-
--#ifdef __UCLIBC__
-+#ifndef __GLIBC__
- /* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
- #define exp10(x) (exp((x) * log(10)))
- #endif /* __UCLIBC__ */
diff --git a/audio/alsa-utils/files/patch-amidi_amidi.1 b/audio/alsa-utils/files/patch-amidi_amidi.1
new file mode 100644
index 000000000000..6cd54974c17b
--- /dev/null
+++ b/audio/alsa-utils/files/patch-amidi_amidi.1
@@ -0,0 +1,15 @@
+--- amidi/amidi.1.orig 2020-02-19 12:02:10 UTC
++++ amidi/amidi.1
+@@ -160,10 +160,10 @@ and stops after the device has finished sending data
+ creates a virtual RawMIDI port and prints all data sent to this port.
+
+ .SH FILES
+-.I /usr/share/alsa/alsa.conf
++.I %%PREFIX%%/share/alsa/alsa.conf
+ default rawmidi definitions
+ .br
+-.I /etc/asound.conf
++.I %%LOCALBASE%%/etc/asound.conf
+ system\-wide rawmidi definitions
+ .br
+ .I ~/.asoundrc
diff --git a/audio/alsa-utils/files/patch-aplay_aplay.c b/audio/alsa-utils/files/patch-aplay_aplay.c
index f50a227535d9..61a9046313b2 100644
--- a/audio/alsa-utils/files/patch-aplay_aplay.c
+++ b/audio/alsa-utils/files/patch-aplay_aplay.c
@@ -1,23 +1,23 @@
---- aplay/aplay.c.orig 2016-03-31 14:37:02 UTC
+--- aplay/aplay.c.orig 2020-02-19 12:02:10 UTC
+++ aplay/aplay.c
-@@ -48,7 +48,6 @@
+@@ -49,7 +49,6 @@
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <endian.h>
- #include "aconfig.h"
#include "gettext.h"
#include "formats.h"
+ #include "version.h"
@@ -70,6 +69,12 @@
+ #define be16toh(x) __be16_to_cpu(x)
+ #define le32toh(x) __le32_to_cpu(x)
#define be32toh(x) __be32_to_cpu(x)
- #endif
-
++#endif
++
+#ifndef _LARGEFILE64_SOURCE
+/* assume modern system */
+typedef off_t off64_t;
+#define lseek64 lseek
-+#endif
-+
- #define DEFAULT_FORMAT SND_PCM_FORMAT_U8
- #define DEFAULT_SPEED 8000
+ #endif
+ #define DEFAULT_FORMAT SND_PCM_FORMAT_U8
diff --git a/audio/alsa-utils/files/patch-speaker-test_samples_sample__map.csv b/audio/alsa-utils/files/patch-speaker-test_samples_sample__map.csv
new file mode 100644
index 000000000000..a37d824c6b84
--- /dev/null
+++ b/audio/alsa-utils/files/patch-speaker-test_samples_sample__map.csv
@@ -0,0 +1,7 @@
+--- speaker-test/samples/sample_map.csv.orig 2020-02-19 12:02:10 UTC
++++ speaker-test/samples/sample_map.csv
+@@ -1,2 +1,2 @@
+-0, "Front Left", "/usr/share/alsa/samples/Front_Left.wav"
+-1, "Front Right", "/usr/share/alsa/samples/Front_Right.wav"
++0, "Front Left", "%%PREFIX%%/share/alsa/samples/Front_Left.wav"
++1, "Front Right", "%%PREFIX%%/share/alsa/samples/Front_Right.wav"
diff --git a/audio/alsa-utils/files/patch-speaker-test_speaker-test.1 b/audio/alsa-utils/files/patch-speaker-test_speaker-test.1
new file mode 100644
index 000000000000..142ca2214ff9
--- /dev/null
+++ b/audio/alsa-utils/files/patch-speaker-test_speaker-test.1
@@ -0,0 +1,11 @@
+--- speaker-test/speaker-test.1.orig 2020-02-19 12:02:10 UTC
++++ speaker-test/speaker-test.1
+@@ -129,7 +129,7 @@ Use the given WAV file for the playback instead of pre
+ .TP
+ \fB\-W\fP | \fB\-\-wavdir\fP \fIDIRECTORY\fP
+ Specify the directory containing WAV files for playback.
+-The default path is \fI/usr/share/sounds/alsa\fP.
++The default path is \fI%%PREFIX%%/share/sounds/alsa\fP.
+
+ .TP
+ \fB\-m\fP | \fB\-\-chmap\fP \fIMAP\fP
diff --git a/audio/alsa-utils/files/patch-utils_alsa-utils.spec.in b/audio/alsa-utils/files/patch-utils_alsa-utils.spec.in
new file mode 100644
index 000000000000..fff32c4ef562
--- /dev/null
+++ b/audio/alsa-utils/files/patch-utils_alsa-utils.spec.in
@@ -0,0 +1,11 @@
+--- utils/alsa-utils.spec.in.orig 2020-02-19 12:02:10 UTC
++++ utils/alsa-utils.spec.in
+@@ -41,7 +41,7 @@ Advanced Linux Sound Architecture (ALSA) - Utils
+ * Sun Nov 11 2001 Miroslav Benes <mbenes@tenez.cz>
+
+ - dangerous command "rpm -rf $RPM_BUILD_ROOT" checks $RPM_BUILD_ROOT variable
+-- unset key "Docdir" - on some new systems are documentation in /usr/share/doc
++- unset key "Docdir" - on some new systems are documentation in %%PREFIX%%/share/doc
+
+ * Mon May 28 1998 Helge Jensen <slog@slog.dk>
+
diff --git a/audio/alsa-utils/pkg-plist b/audio/alsa-utils/pkg-plist
index 60c87911f8ff..125e57deb7bd 100644
--- a/audio/alsa-utils/pkg-plist
+++ b/audio/alsa-utils/pkg-plist
@@ -12,11 +12,15 @@ bin/arecord
bin/arecordmidi
bin/aseqdump
bin/aseqnet
+bin/axfer
bin/iecset
bin/speaker-test
+lib/udev/89-alsa-ucm.rules
lib/udev/90-alsa-restore.rules
man/fr/man8/alsaconf.8.gz
man/man1/aconnect.1.gz
+man/man1/alsa-info.sh.1.gz
+%%BAT%%man/man1/alsabat.1.gz
man/man1/alsactl.1.gz
man/man1/alsaloop.1.gz
man/man1/alsamixer.1.gz
@@ -28,11 +32,11 @@ man/man1/arecord.1.gz
man/man1/arecordmidi.1.gz
man/man1/aseqdump.1.gz
man/man1/aseqnet.1.gz
+man/man1/axfer-list.1.gz
+man/man1/axfer-transfer.1.gz
+man/man1/axfer.1.gz
man/man1/iecset.1.gz
man/man1/speaker-test.1.gz
-man/man1/alsa-info.sh.1.gz
-%%BAT%%man/man1/alsabat.1.gz
-%%MANPAGES%%man/man7/alsactl_init.7.gz
man/man8/alsaconf.8.gz
sbin/alsa-info.sh
%%BAT%%sbin/alsabat-test.sh