From owner-dev-commits-ports-all@freebsd.org Tue May 11 16:54:22 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E93663E1FF; Tue, 11 May 2021 16:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FfkXt421Gz4ZFx; Tue, 11 May 2021 16:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7CC471BD72; Tue, 11 May 2021 16:54:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14BGsMnx095040; Tue, 11 May 2021 16:54:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14BGsMht095039; Tue, 11 May 2021 16:54:22 GMT (envelope-from git) Date: Tue, 11 May 2021 16:54:22 GMT Message-Id: <202105111654.14BGsMht095039@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 44c14328c08e - main - audio/alsa-lib, audio/alsa-plugins, audio/alsa-utils: Update to 1.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44c14328c08e0ba92855367dba48ad9e06dc4b25 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2021 16:54:22 -0000 The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=44c14328c08e0ba92855367dba48ad9e06dc4b25 commit 44c14328c08e0ba92855367dba48ad9e06dc4b25 Author: Greg V AuthorDate: 2021-05-11 16:49:32 +0000 Commit: Gleb Popov CommitDate: 2021-05-11 16:53:01 +0000 audio/alsa-lib, audio/alsa-plugins, audio/alsa-utils: Update to 1.2.2 PR: 245321 Reviewed by: swills Tested by: Oleh Hushchenkov --- audio/alsa-lib/Makefile | 27 +- audio/alsa-lib/distinfo | 5 +- audio/alsa-lib/files/linux/types.h | 10 + audio/alsa-lib/files/patch-include_alsa-symbols.h | 59 --- .../files/patch-modules_mixer_simple_python.c | 565 --------------------- audio/alsa-lib/files/patch-src_async.c | 6 +- audio/alsa-lib/files/patch-src_conf_alsa.conf | 13 + audio/alsa-lib/pkg-plist | 85 +--- audio/alsa-plugins/Makefile | 39 +- audio/alsa-plugins/distinfo | 5 +- audio/alsa-plugins/pkg-plist | 13 +- audio/alsa-utils/Makefile | 76 +-- audio/alsa-utils/distinfo | 5 +- .../files/patch-alsa-info_alsa-info.sh.1 | 11 + audio/alsa-utils/files/patch-alsaconf_alsaconf.8 | 11 + .../alsa-utils/files/patch-alsaconf_alsaconf.fr.8 | 11 + audio/alsa-utils/files/patch-alsactl_Makefile.in | 11 + .../files/patch-alsactl_alsactl__init.xml | 24 + .../files/patch-alsamixer_volume__mapping.c | 11 - audio/alsa-utils/files/patch-amidi_amidi.1 | 15 + audio/alsa-utils/files/patch-aplay_aplay.c | 18 +- .../patch-speaker-test_samples_sample__map.csv | 7 + .../files/patch-speaker-test_speaker-test.1 | 11 + .../files/patch-utils_alsa-utils.spec.in | 11 + audio/alsa-utils/pkg-plist | 10 +- 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 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 -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 - Signed-off-by: Takashi Iwai - ---- 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 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 *** 433 LINES SKIPPED ***